Class: MIDIVoice

Environment: Siren
Superclass: Siren.Voice
Category: MusicIO-MIDI
Instance variables: currentTime
Class instance variables: default
Class variables: Instance UseSingleton

A MidiVoice is used to play note events onto one or more output devices.
I store a MidiDevice (with a MIDIPort) in my instrument variable and play events onto it when asked to.

Instance variables:
instrument my instrument, a MidiDevice

initialize-release

close
Close the stream, device, or whatever.

initialize
Set up a MIDIVoice's time counter.

reset
Reset my time.

events

play: anEventList
Expand the list and play it now.

playEvent: anEvent at: aTime
Send the given Event to the instrument.

accessing

number
Answer my channel or icon number

MetaClass: MIDIVoice class

Instance variables: default

examples

randomExample
Play some random notes on a voice on a device on a port.

scaleExample
Play a scale on a voice on a device on a port to the Apple MIDI Mgr.

voiceInspect
MIDIVoice voiceInspect

instance creation

default
Answer the default MIDIVoice.

named: aName onDevice: aMidiDevice channel: aChannel
set up a MidiVoice on the given device and channel

new
Cache the latest instance.

on: aMidiDevice
Answer up a MidiVoice on the given device.

on: aMidiDevice channel: aChannel
set up a MidiVoice on the given device and channel

class initialization

defaultOutInterface
Answer the class's default intertface # (use external device list to get the right value).

flushDefault
Reset the class's default instance.

initialize
Reset the class's default instance.