External MIDI Linkage Modules

— MusicWeaver Release 2.3 February 2006 —

These modules use the newer BeOS MidiKit (R5 and later) to allow other MIDI applications (that also use the new kit) to connect with a MusicWeaver diagram, through named, externally accessible, endpoints.

MidiLink

The MidiLink module is somewhat similar to the older MidiConn module in that it allows access to external In and Out MIDI streams. It is much more flexible, though, as it can make a link to any MIDI 'Producer' or 'Consumer' supplying a named connection 'Endpoint' that it can discover. This includes the MIDI external I/O hardware ports. Unlike MidiConn, source and destination can be quite distinct — you could input from a Sequencer app and send out to the hardware for instance.

As with MidiConn, it is Multiconnector, accepting MusicWeaver MIDI on its 'MIDI Out' connector to send elsewhere, and passing the stream that arrives from outside to the diagram on the 'From MIDI In' connector.

The actual endpoints to which it connects are selected through the 'Source' and 'Dest' popup menus in its Control Panel. Each menu shows the selection of Producers ('Source') or Consumers ('Dest') available at the moment the menu is opened. Each also has a '<NO CONN>' item, if you wish to disable that direction.

ProduceMidi and AcceptMidi

These two modules let you provide named MIDI endpoints that other applications can connect with. Once you place one of these in a diagram, and set a label in its control panel, it is published for other programs to see and send events to ('AcceptMidi') or receive events from ('ProduceMidi').

ProduceMidi makes a MIDI stream from the MusicWeaver diagram available at its 'MidiProducer' MidiKit node. AcceptMidi provides a 'MidiConsumer' node to which other applications can send a stream of events. Aside from the direction of the flow, the two modules are very similar. The main thing is that, because of the direction of flow, AcceptMidi is a 'Source' element (no diagram inputs), while ProduceMidi is a normal 'Filter' that can be inserted anywhere in a path.

Each has a control panel with just one control — a text field into which you enter the name by which you desire the connection to be known to other applications. (The published name has no connection to the name you may choose to give it in the diagram itself) The element is inactive until a name is entered. Changing the name will close the existing node and open another with the new name. (Existing connections will not be carried over.)

Be aware that just possibly you might hit a small discrepancy in timing protocol between the MusicWeaver and outside applications that are based on the BMidiStore or other parts of the old MidiKit. By convention, MusicWeaver elements output (or record) events at the moment they are received; no attention is paid for this purpose to the 'time value' they are tagged with. Only a TimeSort element actually delays events until that time value is reached. If you get erratic timing in a stream input through AcceptMidi, inserting a TimeSort in the path should cure it.