
  uses minwin
  uses minmidi

  def MM midiOutShortMsg hMidi, 0X%1
  def MT sleep

  sys hMidi
  int er=midiOutOpen(hMidi, 0, 0, 0, CALLBACK_NULL) ' 0=synth a 2=soft synth
  MM 0xff     'reset
  MM 0x79B0   'reset all controllers
 
  'MM 0000C0 'PROG PIANO
  MM 000EC0 'PROG TUBULAR BELLS
  int i
  for i=1 to 3
    MM 3007B0 'VOL
    MM 7F0AB0 'PAN
    MM 404590 'A4 ON
    MT 300
  next
  for i=1 to 3
    MM 3007B0 'VOL
    MM 000AB0 'PAN
    'MM 4001B0 'MODULATION WHEEL
    MM 4C80E0 'PITCH WHEEL
    MM 404590 'A4 ON
    MT 300
  next
  for i=1 to 3
    MM 3007B0 'VOL
    MM 000AB0 'PAN
    MM 4001B0 'PIANO
    MM 4080E0 'PITCH WHEEL
    MM 304590 'A4 ON
    MT 300
  next
 int j=45 'A2
  for i=1 to 12
    MM 3007B0 'VOL
    MM 400AB0 'PAN
    MM 0001B0 'MODULATION WHEEL
    MM 4080E0 'PITCH WHEEL
    MM 250090+j*0x100 'SCALING NOTE ON
    MT 200
    j+=3
  next
  MT 3000
  MM 004580 'A4 OFF


  midiOutClose(hMidi)
 
