home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1996 May
/
PCW596.iso
/
polskie
/
eduk
/
genfast
/
demo_11.pak
/
KEYBOARD.DA_
< prev
next >
Wrap
Text File
|
1996-03-16
|
8KB
|
417 lines
; Aplikacja przykÆadowa - syntezator jednogÆosowy
; GENIO CX 2000 z syntezå obwiedni 5-cio gÆosowej
; zakoñczenie aplikacji - klawiszem [Esc]
[procedure OBWIEDNIA]
; graficzne przedstawienie obwiedni
@downarea(260,40,443,150,15)
; kaºda z czæ₧ci wykresu ma 40 punktów
@setcolors(1,0)
@line(275,95-(%f/20),315,95-(%g/20))
@setcolors(2,0)
@line(315,95-(%g/20),355,95-(%h/20))
@setcolors(3,0)
@line(355,95-(%h/20),395,95-(%i/20))
@setcolors(4,0)
@line(395,95-(%i/20),430,95-(%j/20))
@SetColors(0,7)
@SetPosition(270,50)
@FastWrite('Krzywa obwiedni')
@line(270,60,270,140)
@line(265,135,438,135)
@return
[procedure EKRAN]
; ekran poczåtkowy
; dªwiækiem podstawowym jest równowarto₧ì labelki strony []
; zapisane w zmiennej k
; zmienna d = oktawa (tylko teoretycznie)
@d:=1
; zmienna e = czas trwania (wybrzmiewania) dªwiæku w milisekundach
@e:=10
; zmienne f-j zawierajå czæ₧ci skÆadowe obwiedni
@f:=0
@g:=0
@h:=0
@i:=0
@j:=0
; rysowanie ekranu
@SetColors(0,0)
@bar(0,0,639,479)
@uparea(10,10,629,469,9)
@uparea(20,20,619,300,1)
@downarea(30,30,609,290,9)
@setcolors(8,0)
@bar(23,301,619,464)
; napis SYNTEZATOR...
@setcolors(7,0)
@SetPosition(42,42)
@Picture('napis.cgv')
@SetColors(0,0)
@SetPosition(40,40)
@Picture('napis.cgv')
@call:obwiednia
;gÆo₧nik
@downarea(453,40,598,150,8)
@a:=458
@setcolors(7,7)
@repeat:14
@uparea(%a,45,%a+5,145,0)
@a:=%a+10
@next
; regulatory:
@uparea(40,160,598,280,9)
; regulator 1 - oktawy
@SetColors(3,0)
@rectangle(50,170,130,270)
@setcolors(9,0)
@bar(60,168,120,172)
@setcolors(15,0)
@SetPosition(70,168)
@fastwrite('OKTAWA')
@setcolors(8,7)
@drawbutton(60,180,120,200,3,650,'+','')
@setcolors(0,7)
@bar(60,201,120,244)
@setcolors(14,0)
@writevalue(60,201,120,244,0,0,%d)
@setcolors(8,7)
@drawbutton(60,245,120,265,3,651,'-','')
; regulator 2 - czas
@SetColors(4,0)
@rectangle(140,170,220,270)
@setcolors(9,0)
@bar(150,168,210,172)
@setcolors(15,0)
@SetPosition(165,168)
@fastwrite('CZAS')
@setcolors(8,7)
@drawbutton(150,180,210,200,4,652,'+','')
@setcolors(0,7)
@bar(150,201,210,244)
@setcolors(14,0)
@writevalue(150,201,210,244,0,0,%e)
@setcolors(8,7)
@drawbutton(150,245,210,265,4,653,'-','')
; regulatory 3-7 - obwiednia
; 3 - skÆadowa1
@SetColors(14,0)
@rectangle(230,170,590,270)
@setcolors(9,0)
@bar(240,168,320,172)
@setcolors(15,0)
@SetPosition(245,168)
@fastwrite('OBWIEDNIA')
@setcolors(8,7)
@drawbutton(240,180,300,200,2,654,'+','')
@setcolors(0,7)
@bar(240,201,300,244)
@setcolors(14,0)
@writevalue(240,201,300,244,0,0,%f)
@setcolors(8,7)
@drawbutton(240,245,300,265,2,655,'-','')
; 4 - skÆadowa2
@drawbutton(305,180,365,200,2,656,'+','')
@setcolors(0,7)
@bar(305,201,365,244)
@setcolors(14,0)
@writevalue(305,201,365,244,0,0,%g)
@setcolors(8,7)
@drawbutton(305,245,365,265,2,657,'-','')
; 5 - skÆadowa3
@drawbutton(370,180,430,200,2,658,'+','')
@setcolors(0,7)
@bar(370,201,430,244)
@setcolors(14,0)
@writevalue(370,201,430,244,0,0,%h)
@setcolors(8,7)
@drawbutton(370,245,430,265,2,659,'-','')
; 6 - skÆadowa4
@drawbutton(435,180,495,200,2,660,'+','')
@setcolors(0,7)
@bar(435,201,495,244)
@setcolors(14,0)
@writevalue(435,201,495,244,0,0,%i)
@setcolors(8,7)
@drawbutton(435,245,495,265,2,661,'-','')
; 7 - skÆadowa5
@drawbutton(500,180,560,200,2,662,'+','')
@setcolors(0,7)
@bar(500,201,560,244)
@setcolors(14,0)
@writevalue(500,201,560,244,0,0,%j)
@setcolors(8,7)
@drawbutton(500,245,560,265,2,663,'-','')
; przycisk zerujåcy obwiedniæ
@drawbutton(565,180,580,265,2,664,'=','')
; przyciski on/off
@drawbutton(40,110,140,150,2,701,'W£ÅCZ','')
@drawbutton(150,110,250,150,4,700,'WY£ÅCZ','')
;klawisze biaÆe i czarne
@setcolors(0,8)
@a:=20
@repeat:17
@uparea(%a,301,%a+34,459,15)
@setinvisiblebutton(%a,301,%a+34,449,%a)
@a:=%a+35
@next
@SetColors(8,7)
@b:=43
@c:=0
[3]
@c:=%c+1
@if (%c = 3) then begin
@b:=%b+35
@goto:3
@end
@if (%c = 7) then begin
@b:=%b+35
@goto:3
@end
@if (%c = 10) then begin
@b:=%b+35
@goto:3
@end
@if (%c = 14) then begin
@b:=%b+35
@goto:3
@end
@if (%c = 17) then goto:4
@setcolors(7,0)
@bar(%b+3,301,%b+23,383)
@uparea(%b,301,%b+20,380,0)
@setinvisiblebutton(%b,301,%b+20,380,%b)
@b:=%b+35
@goto:3
[4]
@return
[1]
; wywoÆanie pierwszej strony
@disablestatusbar;
@call:ekran
@showscreen;
@defkeyboardhandler(2)
@checkevents;
[2]
; je₧li [Esc] to koniec!
@if (%z = $011B) then goto:0
@checkevents;
[20..600]
; zmienna %k uzaliæniona od bierzåcej strony
@getcurrentpage(%k)
@k:=%k*%d
@sound(%K+%f,%e)
@sound(%K+%g,%e)
@sound(%K+%h,%e)
@sound(%K+%f,%e)
@sound(%K+%i,%e)
@sound(%K+%j,%e)
@checkevents;
; strony 650-663 zmiana warto₧ci czasu, oktawy i poszczególnych
; skÆadowych obwiedni
[650]
@d:=%d+1
@if (%d > 6) then begin
@d:=6
@end
@setcolors(0,7)
@bar(60,201,120,244)
@setcolors(14,0)
@writevalue(60,201,120,244,0,0,%d)
@call:obwiednia
@checkevents
[651]
@d:=%d-1
@if (%d < 1) then begin
@d:=1
@end
@setcolors(0,7)
@bar(60,201,120,244)
@setcolors(14,0)
@writevalue(60,201,120,244,0,0,%d)
@call:obwiednia
@checkevents
[652]
@e:=%e+1
@if (%e > 100) then begin
@e:=100
@end
@setcolors(0,7)
@bar(150,201,210,244)
@setcolors(14,0)
@writevalue(150,201,210,244,0,0,%e)
@call:obwiednia
@checkevents
[653]
@e:=%e-1
@if (%e < 5) then begin
@e:=5
@end
@setcolors(0,7)
@bar(150,201,210,244)
@setcolors(14,0)
@writevalue(150,201,210,244,0,0,%e)
@call:obwiednia
@checkevents
[654]
@f:=%f+10
@if (%f > 1000) then begin
@f:=1000
@end
@setcolors(0,7)
@bar(240,201,300,244)
@setcolors(14,0)
@writevalue(240,201,300,244,0,0,%f)
@call:obwiednia
@checkevents
[655]
@f:=%f-10
@if (%f < -1000) then begin
@f:=-1000
@end
@setcolors(0,7)
@bar(240,201,300,244)
@setcolors(14,0)
@writevalue(240,201,300,244,0,0,%f)
@call:obwiednia
@checkevents
[656]
@g:=%g+10
@if (%g > 1000) then begin
@g:=1000
@end
@setcolors(0,7)
@bar(305,201,365,244)
@setcolors(14,0)
@writevalue(305,201,365,244,0,0,%g)
@call:obwiednia
@checkevents
[657]
@g:=%g-10
@if (%g < -1000) then begin
@g:=-1000
@end
@setcolors(0,7)
@bar(305,201,365,244)
@setcolors(14,0)
@writevalue(305,201,365,244,0,0,%g)
@call:obwiednia
@checkevents
[658]
@h:=%h+10
@if (%h > 1000) then begin
@h:=1000
@end
@setcolors(0,7)
@bar(370,201,430,244)
@setcolors(14,0)
@writevalue(370,201,430,244,0,0,%h)
@call:obwiednia
@checkevents
[659]
@h:=%h-10
@if (%h < -1000) then begin
@h:=-1000
@end
@setcolors(0,7)
@bar(370,201,430,244)
@setcolors(14,0)
@writevalue(370,201,430,244,0,0,%h)
@call:obwiednia
@checkevents
[660]
@i:=%i+10
@if (%i > 1000) then begin
@i:=1000
@end
@setcolors(0,7)
@bar(435,201,495,244)
@setcolors(14,0)
@writevalue(435,201,495,244,0,0,%i)
@call:obwiednia
@checkevents
[661]
@i:=%i-10
@if (%i < -1000) then begin
@i:=-1000
@end
@setcolors(0,7)
@bar(435,201,495,244)
@setcolors(14,0)
@writevalue(435,201,495,244,0,0,%i)
@call:obwiednia
@checkevents
[662]
@j:=%j+10
@if (%j > 1000) then begin
@j:=1000
@end
@setcolors(0,7)
@bar(500,201,560,244)
@setcolors(14,0)
@writevalue(500,201,560,244,0,0,%j)
@call:obwiednia
@checkevents
[663]
@j:=%j-10
@if (%j < -1000) then begin
@j:=-1000
@end
@setcolors(0,7)
@bar(500,201,560,244)
@setcolors(14,0)
@writevalue(500,201,560,244,0,0,%j)
@call:obwiednia
@checkevents
[664]
@f:=0
@g:=0
@h:=0
@i:=0
@j:=0
@setcolors(0,7)
@bar(240,201,300,244)
@setcolors(14,0)
@writevalue(240,201,300,244,0,0,%f)
@setcolors(0,7)
@bar(305,201,365,244)
@setcolors(14,0)
@writevalue(305,201,365,244,0,0,%g)
@setcolors(0,7)
@bar(370,201,430,244)
@setcolors(14,0)
@writevalue(370,201,430,244,0,0,%h)
@setcolors(0,7)
@bar(435,201,495,244)
@setcolors(14,0)
@writevalue(435,201,495,244,0,0,%i)
@setcolors(0,7)
@bar(500,201,560,244)
@setcolors(14,0)
@writevalue(500,201,560,244,0,0,%j)
@sound(200,100)
@sound(100,100)
@call:obwiednia
@checkevents
[700]
; gdy wci₧niæto klawisz off (wyÆåcz) ustawiamy niewidzialny przycisk
; który nic nie robi - skok do checkevents.
; niewidzialny przycisk - takºe na 'off'.
@setinvisiblebutton(0,251,635,479,702)
@setinvisiblebutton(150,110,250,150,702)
@checkevents;
[701]
; po nacisniæciu przycisku on (wÆåcz) usuwany niewidzialne przyciski
@deletebutton;
@deletebutton;
@checkevents;
[702]
; to polecenie nic nie robi - specjalnie!
@checkevents;