AlsaModularSynth now supports JACK as well. When starting the program with the -j or --jack option and loading one of the example patches, all PCM In / Out modules are automatically converted into their JACK counterpart.
I have also written the tiny FM synthesizer
jack_miniFMsynth.c
which is both a JACK client and a client of the ALSA sequencer system.
This example client is based on the example
miniFMsynth.c
of my
ALSA 0.9.0 HOWTO
.
cc -o jack_miniFMsynth jack_miniFMsynth.c -ljack -lasound -lmjack_miniFMsynth takes several parameters:
jack_miniFMsynth <MIDI channel> <FM> <harmonic> <subharmonic> <transpose> <a> <d> <s> <r>
<MIDI channel> | MIDI channel for NOTE events |
<FM> | Strength of the frequency modulation |
<harmonic> | Harmonic of the master oscillator (integer) |
<subharmonic> | Subharmonic of the master oscillator (integer) |
<transpose> | Note offset for both oscillators (integer) |
<a> <d> <s> <r> | Attack, Decay, Sustain, Release |
| Harpsichord | ./jack_miniFMsynth 0 7.8 3 5 24 0.01 0.8 0.0 0.1 |
| Bell | ./jack_miniFMsynth 0 3.5 7 9 0 0.01 0.2 0.3 1.5 |
| Oboe | ./jack_miniFMsynth 0 0.7 1 3 24 0.05 0.3 0.8 0.2 |
jack_miniFMsynth reacts on pitchbender and modulation wheel events. Since it is
not optimized with respect to performance (you would e.g. never call the
expensive sin function in a "real" program), you might have to decrease the
polyphony in the source by modifying the #define POLY.