; Module header definitions for the MIDI Synth module

title-string: MIDI
help-string: MIDI 0.22 MIDI Synthesiser  Pete Everett
date-string: 07 Oct 2025

initialisation-code: module_init
finalisation-code: module_term
generic-veneers: ticker_callback
vector-handlers: tickerv

swi-chunk-base-number: &404C0
swi-handler-code: module_swi
swi-decoding-table: MIDI,
  SoundEnable,
  SetMode,
  SetTxChannel,
  SetTxActiveSensing,
  InqSongPositionPointer,
  InqBufferSize,
  InqError,
  RxByte,
  RxCommand,
  TxByte,
  TxCommand,
  TxNoteOff,
  TxNoteOn,
  TxPolyKeyPressure,
  TxControlChange,
  TxLocalControl,
  TxAllNotesOff,
  TxOmniModeOff,
  TxOmniModeOn,
  TxMonoModeOn,
  TxPolyModeOn,
  TxProgramChange,
  TxChannelPressure,
  TxPitchWheel,
  TxSongPositionPointer,
  TxSongSelect,
  TxTuneRequest,
  TxStart,
  TxContinue,
  TxStop,
  TxSystemReset,
  IgnoreTiming,
  SynchSoundScheduler,
  FastClock,
  Init,
  SetBufferSize,
  Interface,
  37,38,39,40,41,42,43,44,
  SynthControl

command-keyword-table: module_command
  MidiSound(,
    min-args:1,
    max-args:2,
    help-text: "Not Implemented\n"),

  MidiTouch(,
    min-args:1,
    max-args:1,
    help-text: "Not Implemented\n"),

  MidiChannel(,
    min-args:1,
    max-args: 1,
    help-text: "Not Implemented\n"),

  MidiMode(,
    min-args: 1,
    max-args: 1,
    help-text: "Not Implemented\n"),

  MidiStart(,
    min-args:1,
    max-args:1,
    help-text: "Not Implemented\n"),

  MidiStop(,
    min-args:0,
    max-args:0,
    help-text: "Not Implemented\n"),

  MidiContinue(,
    min-args:0,
    max-args:0,
    help-text: "Not Implemented\n"),

  MidiSynth(,
    min-args:1,
    max-args:10,
    invalid-syntax: "Syntax:\tMidiSynth [-option [-option ...]]\n",
    help-text: "Sets Synthesiser options\n"

"Syntax:\tMidiSynth [-option [-option ...]]\n"
"Options:\n"
  "\t-r reset the synthesiser\n"
  "\t-s stereo audio (default)\n"
  "\t-m mono audio\n"
  "\t-w swap L/R audio channels\n"
  "\t-n<x> x = number of generators (polyphony), 4 to 128, default 32\n"
  "\t-g<x> x = glide time, scale factor, 0 to 1000, default 100\n"
  "\t-t<x> x = sleep timeout in seconds, 0 to 3600, 0 = disable, default 10\n"
  "\t-v<x> variation banks, x = 0 disable, x = 1 allowed, default 0\n"
  "\t-a<x> variation kits, x = 0 disable, x = 1 allowed, default 0\n"
  "\t-k<x> x = kit override, 0 to 127, 0 = disable, default 0\n"
  "\t-b<x> x = bank override, 0 to 127, 0 = disable, default 0\n"
  "\t-i display information\n"
  "\t-i+ as -i with additional information\n"
"Following options are used for testing\n"
  "\t-o open log file in the current directory\n"
  "\t-c close log file\n"
  "\t-d<x> x = the sum of the following values\n"
    "\t\t1 = log swi calls\n"
    "\t\t2 = log midi messages\n"
    "\t\t4 = log ticker callbacks\n"
    "\t\t8 = log scheduler calls\n")

