Declarar dr%,du%,dd%
Declarar t%[127],i%[12],pu%,pd%,iu%,id%,sk%
Var okt%=3
Var instr%=1
i%[1]=0
i%[2]=6
i%[3]=14
i%[4]=18
i%[5]=19
i%[6]=42
i%[7]=43
i%[8]=48
i%[9]=56
i%[10]=58
i%[11]=62
i%[12]=71
Proc Tasten
Parámetros x%,y%,l%,t$,c%
UseBrush 1,c%
USEP 0,1,0
WhileLoop 1,len(t$)
If substr$(t$,&bucle)>" "
Rectángulo x%%-x%+50,y%+l%
DrawText x%+20,y%+l%-30,substr$(t$,&bucle)
EndIf
x%=x%+56
EndWhile
ENDPROC
Proc TonEin
Parámetros Ton%
Caso negativo t%[Ton%]
If dr%
Play 0;0;0;Ton%,0,0
Más
Play Ton%,0,0
EndIf
t%[Ton%]=1
EndIf
ENDPROC
Proc TonAus
Parámetros Ton%
Casenote dr% : Play -Ton%,0,0
t%[Ton%]=0
ENDPROC
Proc Testkey
Parámetros k%, t%
If isKey(k%)
TonEin(12*okt%+t%)
Más
TonAus(12*okt%+t%)
EndIf
ENDPROC
Proc Instrument
Parámetros en%
instr% = en%
Display
Play i%[instr%],-1,0
ENDPROC
Proc Display
UseBrush 1,$FFFF00
USEP 0,1,0
Rectángulo 320,10-620,140
Color del texto 0,-1
DrawText 330,15,"Oktave: " + Str$(okt%)
DrawText 330,35,"Instrument F" + str$(instr%) + ": "+ Str$(i%[instr%])
DrawText 330,55,"Drumpad-Modus: " + if(dr%=1,"EIN","AUS")
ENDPROC
Título de la ventana "RGHs Mini-Keyboard V2"
Ventana de Estilo 16
cls $3030
Color del texto $8080,-1
Tasten(0,310,140,"<YXCVBNM,.-",$FFFFFF)
Tasten(16,150,140,"QWERTZUIOPÜ",$FFFFFF)
Tasten(28,310,100,"ASD GH KLÖ",$2020)
Tasten(44,150,100,"23 567 90",$2020)
DrawText 10,10,"ESC = Ende"
DrawText 10,30,"Bild hoch / Bild runter = Oktave ändern"
DrawText 10,50,"F1 - F12 = Instrument auswählen"
DrawText 10,70,"Pos1 / Ende = aktuelles Instrument ändern"
DrawText 10,90,"Einfg = Drumpad-Modus una/aus"
Display
Play i%[instr%],-1,0
SetTimer 10
Mientras que 1
Waitinput
If getFocus(%hWnd)
Case isKey(27) : Romper
TestKey(226,5)
TestKey(ord("A"),6)
TestKey(ord("Y"),7)
TestKey(ord("S"),8)
TestKey(ord("X"),9)
TestKey(ord("D"),10)
TestKey(ord("C"),11)
TestKey(ord("V"),12)
TestKey(ord("G"),13)
TestKey(ord("B"),14)
TestKey(ord("H"),15)
TestKey(ord("N"),16)
TestKey(ord("M"),17)
TestKey(ord("K"),18)
TestKey(188,19)
TestKey(ord("L"),20)
TestKey(190,21)
TestKey(192,22)
TestKey(189,23)
TestKey(ord("Q"),24)
TestKey(ord("2"),25)
TestKey(ord("W"),26)
TestKey(ord("3"),27)
TestKey(ord("E"),28)
TestKey(ord("R"),29)
TestKey(ord("5"),30)
TestKey(ord("T"),31)
TestKey(ord("6"),32)
TestKey(ord("Z"),33)
TestKey(ord("7"),34)
TestKey(ord("U"),35)
TestKey(ord("I"),36)
TestKey(ord("9"),37)
TestKey(ord("O"),38)
TestKey(ord("0"),39)
TestKey(ord("P"),40)
TestKey(186,41)
Case isKey(112) : Instrument(1)
Case isKey(113) : Instrument(2)
Case isKey(114) : Instrument(3)
Case isKey(115) : Instrument(4)
Case isKey(116) : Instrument(5)
Case isKey(117) : Instrument(6)
Case isKey(118) : Instrument(7)
Case isKey(119) : Instrument(8)
Case isKey(120) : Instrument(9)
Case isKey(121) : Instrument(10)
Case isKey(122) : Instrument(11)
Case isKey(123) : Instrument(12)
If isKey(45) and (du% = 0)
du% = 1
dr% = 1 - dr%
Display
Más
Casenote Iskey(45) : du% = 0
EndIf
If isKey(33) and (pu% = 0)
pu% = 1
caso okt% < 7 : inc okt%
Display
Más
Casenote Iskey(33) : pu% = 0
EndIf
If isKey(34) and (pd% = 0)
pd% = 1
Case okt% > 0 : dec okt%
Display
Más
Casenote Iskey(34) : pd% = 0
EndIf
If isKey(36) and (iu% = 0)
iu% = 1
caso i%[instr%] < 127 : i%[instr%] = i%[instr%] + 1
Instrument(instr%)
Más
Casenote Iskey(36) : iu% = 0
EndIf
If isKey(35) and (id% = 0)
id% = 1
caso i%[instr%] > 0 : i%[instr%] = i%[instr%] - 1
Instrument(instr%)
Más
Casenote Iskey(35) : id% = 0
EndIf
Endif
EndWhile
End