home *** CD-ROM | disk | FTP | other *** search
- /* PlayMain.rexx */
-
- options results; address MrMIDI
-
- MUIA_List_Active = 0x8042391c; MUIA_Disabled = 0x80423661
-
- list ID SLIST ATTRS MUIA_List_Active
- list ID SLIST POS result
- if result ~= '' then do
- parse var result filename','dummy
- if ~exists(filename) then do
- temp_string = "Could not open the file '"filename"'."
- request ID WARN GADGETS '"OK"' temp_string
- call Stop()
- check ID PLAY ATTRS MUIA_Disabled 0
- return
- end
- call GetInfo()
- knob ID VOLM; vol = 'V='result
- cycle ID FREQ; freq = 'F='result
- check ID MONO
- if result = 0 then stereo = 'MONO'
- else stereo = 'STEREO'
- slider ID POLY; poly = 'P='result
- slider ID PRIO; pri = 'PRI='result
- check ID TOFI
- if result = 1 then t_f = 'TF'
- else t_f = 'NTF'
- string ID TOMP
- if result = '' then t_m = ''
- else t_m = 'T='result
- check ID DRFI
- if result = 1 then d_f = 'DF'
- else d_f = 'NDF'
- string ID DRMP
- if result = '' then d_m = ''
- else d_m = 'D='result
- slider ID BUFF; buf = 'B='result
- cycle ID VEMP; vel_map = 'VELMAP='result
- cycle ID VOMP; vol_map = 'VOLMAP='result
- popasl ID PATH; pathname = result
- setvar current_time '00:00'
- setvar current_song filename
- text ID PROG LABEL "Playing..."
- check ID PLAY ATTRS MUIA_Disabled 0
- address command '"'pathname'GMPlay" >NIL: "'filename'"' vol freq stereo poly pri t_f t_m d_f d_m buf vel_map vol_map
- end /* of if result */
- else do
- call Stop()
- check ID PLAY ATTRS MUIA_Disabled 0
- end
- return
-