-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTESST.PAS
executable file
·158 lines (146 loc) · 7.22 KB
/
TESST.PAS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
uses OPL3,Pii,Graph,Grvirt,Crt,Bitmaps,Mouse,Synmouse,Objekty,Hotove,GrVirt2,
UPolana,Special;
var Aktion : AktType;
Retazec : string;
prem : byte;
begin
{aktivacia opl a mysi}
write('Detekujem OPL3 cip.....');
InitOPL;
writeln('OK');
InitChanells;
AktualnyPar:=1;
AktualnyPar:= Load4Inst('milanko.pi');
Kanals[1].SetSound;
Kanals[1].Oktava:=3;
Kanals[1].Frekvencia:=2440;
{with Kanals[1].Zop do begin
FeedType := 2;
with Ops[1].Opers[2] do begin
WaveForm := 2;
end;
end;
AktualnyPar:=1;
AktualnyPar:= Save4Inst('d:\tp7\test.pi');}
AktualnyPar:=1;
{Kanals[1].PlayIt;}
{repeat
until keypressed;
halt; }
if not InitMouse then
begin
writeln('Nenasiel som mysku!!!');
halt;
end;
{}
DeskTopCreate('Polana s288 synthesizer <c> 1900',9,8);
MainMenu;
ChanellTable;
Operator1;
Operator2;
Mixer;
Klavesy;
SetGraphicCursor(Sipka.Cursor);
AktualKurzor:=sipka;
ShowMouse;
{PanelInstrumentov;}
repeat
readmouse;
Control;
with EVENT do begin
case Typ of
2 : begin
if LeftButton then PracujSnim;
end;
end;
end;
GetAction(Aktion);
if Aktion.Typ <> 0 then
begin
with Aktion do begin
case Typ of
1 : begin
if Plocha = 'Main menu' then begin
if Meno = 'Exit' then UkonciTo;
end
else if Plocha = 'operator2' then begin
SaveOpValues;
if AktualnyPar = 1 then AktualnyPar:=2
else AktualnyPar:=1;
NastavHodnoty;
end
else if Plocha = 'Chanells' then begin
if Meno ='Name' then begin
Retazec:=MenaInstrumentov[AktualKanal];
GetString('Enter name:',16,Retazec);
MenaInstrumentov[AktualKanal] :=Retazec;
RewriteTxtOkno('Chanells','Kanaliky',MenaInstrumentov);
end
else if Meno='Load'then begin
GetString('filename:',8,Retazec);
prem:= Load4Inst(Retazec+'.pi');
end
else if Meno = 'Save' then begin
if AskYN('Are you shure?') then begin
GetString('filename:',8,Retazec);
prem:= Save4Inst(Retazec+'.pi');
end;
end;
end;
end;
3 : begin
if Plocha = 'Chanells' then
begin
SaveOpValues;
AktualKanal := Value;
NastavHodnoty;
end;
end;
10 : begin
HideMouse;
if Meno = 'Waveform' then begin
if Plocha = 'operator1' then begin
Kanals[AktualKanal].Zop.Ops[AktualnyPar].Opers[1].Waveform :=
Kanals[AktualKanal].Zop.Ops[AktualnyPar].Opers[1].Waveform +1;
if Kanals[AktualKanal].Zop.Ops[AktualnyPar].Opers[1].Waveform > 7 then
Kanals[AktualKanal].Zop.Ops[AktualnyPar].Opers[1].Waveform := 0;
PutWave(Ploska[GetPlochaNum(Plocha)]^.Item.x1+144,Ploska[GetPlochaNum(Plocha)]^.Item.y1+18,
Kanals[AktualKanal].Zop.Ops[AktualnyPar].Opers[1].Waveform);
OldWave1:= Kanals[AktualKanal].Zop.Ops[AktualnyPar].Opers[1].Waveform;
end
else begin
Kanals[AktualKanal].Zop.Ops[AktualnyPar].Opers[2].Waveform :=
Kanals[AktualKanal].Zop.Ops[AktualnyPar].Opers[2].Waveform +1;
if Kanals[AktualKanal].Zop.Ops[AktualnyPar].Opers[2].Waveform > 7 then
Kanals[AktualKanal].Zop.Ops[AktualnyPar].Opers[2].Waveform := 0;
PutWave(Ploska[GetPlochaNum(Plocha)]^.Item.x1+144,Ploska[GetPlochaNum(Plocha)]^.Item.y1+18,
Kanals[AktualKanal].Zop.Ops[AktualnyPar].Opers[2].Waveform);
OldWave2:= Kanals[AktualKanal].Zop.Ops[AktualnyPar].Opers[2].Waveform;
end;
end;
ShowMouse;
end;
4 : begin
if Plocha = 'mixer' then begin
HideMouse;
PutScheme(Ploska[GetPlochaNum(Plocha)]^.Item.x1+7,Ploska[GetPlochaNum(Plocha)]^.Item.y1+7+20,
GHRadioBox('mixer','schema')+2);
Kanals[AktualKanal].Zop.Feedtype := GHRadioBox('mixer','schema')+2;
OldScheme:= GHRadioBox('mixer','schema')+2;
ShowMouse;
end;
end;
15 : begin
SaveOpValues;
Kanals[AktualKanal].SetFreq(GetFreq(NajdenaPolozka.Meno));
Kanals[AktualKanal].SetSound;
Kanals[AktualKanal].PlayIt;
PressKlaves(NajdenaPolozka);
Kanals[AktualKanal].StopIt;
end;
end;
end;
end;
until RightButtonPressed and LeftButtonPressed;
ZrusChanells;
end.