iiwusynth-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[iiwusynth-devel] Interaction between modules


From: M. Nentwig
Subject: [iiwusynth-devel] Interaction between modules
Date: Wed, 18 Dec 2002 18:23:27 +0200

Moi,

I have been thinking about the modules concept for a while. I should
note, that I'm not too deeply into the sequencer / file player details,
so that may require some more attention.

== command parser module ==
Most important, I think there should be a command parser module, which
is independent from stdio. It can receive commands as ASCII strings from
several sources, and returns the output to the same source, one line at
a time (for example via a callback function).
The command parser calls the appropriate functions in the other modules
(synth, reverb etc).
All the other modules register their commands to the command parser. For
example, the synth:
Command 'gain', 1 parameter, callback to 'iiwu_synth_set_gain' on
'synth'.
Command line options (like iiwusynth -c 2) are handled by the
application.

== shell ==
The command shell is a separate module, stdio on one side, the command
parser module on the other side. It is optional, an application can use
the synth without a shell.

== MIDI router ==
The MIDI router is called from the MIDI driver (noteon, noteoff, CC
etc). At least the default router just calls the same function on the
synth. Further, it reports command lines wrapped in sysex (as discussed
before) to the command parser.
The MIDI router implements OMNI mode, if ever. It also knows the (sysex)
device ID, which can be freely assigned.
This module is only needed, if MIDI inputs are used.

== TCP/IP ==
If we implement a TCP/IP module, it connects to the command parser in
exactly the same way as the shell. It acts as a server, one application
can connect to a TCP/IP port.

== MIDI drivers==
There can be any number of MIDI inputs, which call the MIDI router for
received events. The first driver uses channel 0..15, the second driver
16..31. The MIDI router decides then, what to do with the events (for
example treat channels 0 and 16 as the same, if the synth only has 16
channels).

== Audio driver ==
== Synth module==
==Patchbay (ex-LADSPA Fx) module==
== Sound font loader module==
== Sequencer==
== File player==

Does this make sense? This scheme should be thought through with threads
and priorities in mind (the MIDI thread has realtime priority, but when
a 'noteon' event triggers ASCII output, we probably want to write to
TCP/IP with normal priority).

Cheers

Markus




reply via email to

[Prev in Thread] Current Thread [Next in Thread]