home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Logiciels PC 23
/
LogicielsPC_23.iso
/
Educ
/
Moza
/
MIDI.BAS
< prev
next >
Wrap
BASIC Source File
|
1997-05-17
|
2KB
|
60 lines
rem this program plays a midi file
rem comments marcleon@ctv.es
rem try to do this in less than 50 lines in that other basic ;)
nomainwin
UpperLeftX = 257 'Window horizontal position screen
UpperLeftY = 40 'Window vertical position on screen
WindowWidth = 285
WindowHeight = 130
statictext #t.s,"File playing",100,25,150,25
textbox #t.t,100,50,150,30
button #t.o," Open ",[opfil],UL,10,10
button #t.p," Play ",[plfil],UL,10,40
button #t.c," Stop ",[clfil],UL,10,70
open "MIDI file player" for graphics_nsb as #t
print #t,"trapclose [xit]"
open "mmsystem.dll" for dll as #mm
[il]
input a$
[opfil]
filedialog "select midifile","*.mid",m$
if m$="" goto [xit]
if len(m$) >13 then mr$="..."+right$(m$,13) else mr$=m$
print #t.t,mr$
a$="open "+m$+" type sequencer alias fictoplay"
i1=0
i2=0
i3 =0
calldll #mm,"mciSendString",a$ as ptr,i1 as dword,i2 as short,_
i3 as short, r as long
goto [il]
[plfil]
a$="play fictoplay"
i1=0
i2=0
i3 =0
calldll #mm,"mciSendString",a$ as ptr,i1 as dword,i2 as short,_
i3 as short, r as long
goto [il]
[clfil]
a$="close fictoplay"
i1=0
i2=0
i3 =0
calldll #mm,"mciSendString",a$ as ptr,i1 as dword,i2 as short,_
i3 as short, r as long
goto [il]
[xit]
close #t
close #mm
end