home *** CD-ROM | disk | FTP | other *** search
/ Amiga ACS 1998 #4 / amigaacscoverdisc1998-041998.iso / utilities / shareware / music / mrmidi / playmain.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1998-03-08  |  1.4 KB  |  53 lines

  1. /* PlayMain.rexx */
  2.  
  3. options results; address MrMIDI
  4.  
  5. MUIA_List_Active    = 0x8042391c;    MUIA_Disabled        = 0x80423661
  6.  
  7. list ID SLIST ATTRS MUIA_List_Active
  8. list ID SLIST POS result
  9. if result ~= '' then do
  10.   parse var result filename','dummy
  11.   if ~exists(filename) then do
  12.     temp_string = "Could not open the file '"filename"'."
  13.     request ID WARN GADGETS '"OK"' temp_string
  14.     call Stop()
  15.     check ID PLAY ATTRS MUIA_Disabled 0
  16.     return
  17.   end
  18.   call GetInfo()
  19.   knob ID VOLM; vol = 'V='result
  20.   cycle ID FREQ; freq = 'F='result
  21.   check ID MONO
  22.   if result = 0 then stereo = 'MONO'
  23.   else stereo = 'STEREO'
  24.   slider ID POLY; poly = 'P='result
  25.   slider ID PRIO; pri = 'PRI='result
  26.   check ID TOFI
  27.   if result = 1 then t_f = 'TF'
  28.   else t_f = 'NTF'
  29.   string ID TOMP
  30.   if result = '' then t_m = ''
  31.   else t_m = 'T='result
  32.   check ID DRFI
  33.   if result = 1 then d_f = 'DF'
  34.   else d_f = 'NDF'
  35.   string ID DRMP
  36.   if result = '' then d_m = ''
  37.   else d_m = 'D='result
  38.   slider ID BUFF; buf = 'B='result
  39.   cycle ID VEMP; vel_map = 'VELMAP='result
  40.   cycle ID VOMP; vol_map = 'VOLMAP='result
  41.   popasl ID PATH; pathname = result
  42.   setvar current_time '00:00'
  43.   setvar current_song filename
  44.   text ID PROG LABEL "Playing..."
  45.   check ID PLAY ATTRS MUIA_Disabled 0
  46.   address command '"'pathname'GMPlay" >NIL: "'filename'"' vol freq stereo poly pri t_f t_m d_f d_m buf vel_map vol_map
  47. end /* of if result */
  48. else do
  49.   call Stop()
  50.   check ID PLAY ATTRS MUIA_Disabled 0
  51. end
  52. return
  53.