
  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
 int j=33 'A1
  for i=1 to 20
    MM 4007B0 'VOL
    MM 400AB0 'PAN
    MM 0001B0 'MODULATION WHEEL
    MM 4080E0 'PITCH WHEEL
    MM 450090+j*0x100 'SCALING NOTE ON
    if i=20
      MM 450090+(j+3)*0x100 'SCALING NOTE ON
    endif
    MT 150
    'MM 000080+j*0x100 'SCALING NOTE OFF
    j+=3
  next
  MT 500

  MT 3000


  midiOutClose(hMidi)
 
