Music 220b: Lecture Notes 7


MIDI Output Syntax

The course, until now, has treated only the Stella write command using MusicKit syntax. With a MIDI interface installed, Stella can output MIDI directly to a synthesizer in realtime, using the listen command. The output syntax is changed to "MIDI." MIDI-out.lisp has a collection of examples.

Playing MIDI Parts via MusicKit

MIDI can also be a SynthPatch in MusicKit syntax. Everything remains the same, simply use the mkMIDI SynthPatch in an algorithm. MIDI channel assignment is restricted to one channel per algorithm and is set in the initialization block. It cannot be reset in the dynamic block. MIDI-mk.lisp demonstrates a one channel example. MIDI output can be mixed with DSP synthesis in this way as in Midi-DSP.lisp.


If you want to play MIDI via ScorePlayer (for instance, to hear Midi-DSP.lisp) and you previously had opened a MIDI listener output stream under MIDI output syntax, ScorePlayer will not have access to the NeXT MIDI driver. You can see all current output streams from a top-level container, io-streams: type "go io-streams"

      Stella [Io-Streams]: list
		1.	#	<-----------------this is the one to close
		2.	#	<--this is the MK syntax output
To close the MIDI Listener stream, you must be in syntax MIDI and issue the close command.


Create an example combining MusicKit DSP and MIDI algorithms as above. Use defmacro to abstract only those parameters which you care to distinguish.To hear the two together you need an external mixer (the ballroom is set up for this).

©1995 Fernando Lopez-Lezcano. All Rights Reserved.