*MIDIon (|OFF) Sets up an intercept on the SOUND command (OSWORD 7) to direct it via a MIDI port. The command assumes the port is a simple 6850 ACIA in page &FC. If no address is given, then &FCF0 is used (status register at &FCF0 and data register at &FCF1). If a two digit address is given, then that is used as the address in page &FC instead, eg *MIDIon 08 would set up the intercept using an ACIA at &FC08, as with the Ample Music 2000. Using 'OFF' will deselect the MIDI intercept. A small buffer is kept to remember what notes have previously been sent. The SOUND commands are intercepted in the following way: SOUND chan,vol,dur,pitch --> Turns off previous note, sends current note. SOUND chan,0,dur,pitch --> Turns off previous note, then doesn't send anything (ie silence). SOUND 0,vol,dur,pitch --> Ignored at the moment. SOUND &1xxx,vol,dur,pitch --> Ignored. There are also some extra extensions: SOUND -2,x,x,x --> All Notes Off. Sends a note off for all possible notes. SOUND -3,x,0,MIDIchannel --> Sets MIDI channel. SOUND -3,x,1,ignoreflag --> Sets the ignore flag. If b7 set then all calls go to the internal SOUND system as well as to the MIDI port. SOUND &Fzxx,x,b2,b1 --> Sends a specific MIDI command: Where xx is &8x to &Bx, sends to the MIDI channel followed by b1 then b2. Where xx is &Cx to &Ex, sends to the MIDI channel, followed by b1. Where xx is &Fx, just sends that command. Eg, SOUND &F0C0,0,5,0 will select voice 5. The actual duration is ignored. The length of the note is defined by sending another note (or a silence) after it to turn it off. This means that this is only suitable for direct use with programs that use a timing mechanism to time the notes, rather than using the sound queue to time them. For example, programs that use a structure similar to: T%=TIME+delay% SOUND etc, etc, etc, REPEAT UNTIL TIME>T% Many demo music programs use this method, and the music programs supplied by J.G.Harston PD use it. With programs that use the sound queue to time the music, setting the ignore flag off with SOUND -3,0,1,&80 will send sound to the internal system as well as to MIDI. Using *FX210,1 to turn off the internal speaker will then in most cases get a sound-queued program to work. Another point to bear in mind is that this will only work with programs that use SOUND (or OSWORD 7). It will not work with programs that directly access the sound hardware. On this disk is a file T/MIDI which is an graphics text file showing a circuit diagram for a MIDI interface. Use *PRINT T/MIDI (or *TYPE T/MIDI if *PRINT is not available) to display it.