The channelPressure property can be subscribed to, to receive all Channel Pressure messages that pass through the MidiBus object.
The continue property can be subscribed to, to receive all Continue messages that pass through the MidiIn object.
The controlChange property can be subscribed to, to receive all Control Change messages that pass through the MidiBus object.
This event fires when the arpeggiator finishes.
Returns true if the MidiBus has been instructed to stop everything by the finish()
method.
The noteOff property can be subscribed to, to receive all Note Off messages that pass through the MidiBus object.
The noteOn property can be subscribed to, to receive all Note On messages that pass through the MidiBus object.
The notePressure property can be subscribed to, to receive all Note Pressure messages that pass through the MidiBus object.
The pitchBend property can be subscribed to, to receive all Pitch Bend messages that pass through the MidiBus object.
The programChange property can be subscribed to, to receive all Program Change messages that pass through the MidiBus object.
Provides a way of identifying MidiBus so it can be easily retrieved later.
The songPosition property can be subscribed to, to receive all Song Position messages that pass through the MidiBus object.
The start property can be subscribed to, to receive all Start messages that pass through the MidiIn object.
The stop property can be subscribed to, to receive all Stop messages that pass through the MidiIn object.
The tick property can be subscribed to, to receive all timing clock messages that pass through the MidiBus object.
Returns the name of this type. This can be used rather than instanceof which is sometimes unreliable.
The receiveData method allows for raw MIDI message data to be passed in, which will then be analysed, and trigger an event for whichever MIDI event type it corresponds to.
The data parameter should be a MIDI-compliant byte-array, see here for more information Summary of MIDI 1.0 Messages.
Sends data from the passed in MIDI message to the connected MIDI port
The stopNotes method allows for stopping any number of notes currently being sent by the MIDI out.
Provides a way for setting the ref through a chained function call. For example:
clock.addChild(new MidiBus().withRef('bus'));
The calling object.
The ref to set on the object.
Generated using TypeDoc
The MidiBus is a combination of both MidiIn & MidiOut. It gets data passed to it through the methods & properties that it implements from the IMidiOut interface, and in turn, distributes that data through the events that it implements from the IMidiIn interface.
The typical use cases of this are when you want some common actions to be applied to MIDI data being generated from a number of different places within your shimi application. For example, you might have a number of different processes generating a number of different instrument parts, and want to make sure that simple pitch correction is applied to all parts.
Rather than modify the logic of each separate process, you could instead have each process connect to a common MidiBus, then connect that MidiBus up to a MidiOut, and just insert pitch correction logic in that connection from MidiBus to MidiOut.