Hi,
> I try to understand your plan:
>
> simple data flow example:
>
> zynaddsubfx_1_output
>
> V
> sequencer_client_1_input
>
> V
> sequencer_input_ringbuffer
>
> V
> (sequencer processing stuff)
>
> V
> sequencer_output_ringbuffer
>
> V
> sequencer_client_output
>
> V
> system_client_input(hardware output)
Your picture is indeed correct. To add some more examples:
* Something like this is also possible
sequencer_input_ringbuffer_1 sequencer_input_ringbuffer_2
V V
plus (i.e. addition of sound-waves)
V
plus_effect_ringbuffer
* The part that you labeled "(sequencer processing stuff)" might be filled with:
V
peak_controller_effect some lfo generator
V (lfo) V (lfo)
zynaddsubfx_2_volume_input zynaddsubfx_2_filter_freq_input
V
(zynaddsubfx_2)
V
zynaddsubfx_2_output
V
sequencer_client_2_input
V
> Maybe also what you envision to happen in which thread or which
> callback?
Let's take the second example. zynaddsubfx itself is in another process, so we don't need to run this at all. For feeding each ringbuffer from zyn, I planned to use a separate jack client. E.g., if process() of sequencer_client_1_input is being called, it simply copies "nframes" into sequencer_input_ringbuffer.
Everything that now remains (e.g. lfo generator, peak_controller_effect, sending input to zynaddsubfx_2) is done by a process() callback of sequencer_client_output. I call this one the master jack client.
About the problem:
A point where I think spinlocks can't be avoided would be, e.g., reading from sequencer_output_ringbuffer. The sequencer's master jack client would need to do that in process(), but it can not guess when the ringbuffer reader from sequencer_client_2_input has even started to feed the ringbuffer.
> Do you want to do some signal processing in your sequencer or would it
> be ok to delegate this to other jack clients? (may be easier)
Hopefully you got it from the explenations above: the master jack client would do this right now, as I planned. Other ideas will be fine, too. Though, I guess, for "some lfo generator", e.g., a separate jack client would be overkill, as this generator simply does, e.g., f(x) = sin(x).
Hello,
currently, I am trying to write a sequencer which should be able to contain 40 or more instances of zynaddsubfx, plus some effects. zynaddsubfx outputs data using jack, so for each zynaddsubfx, I'll add a jack client with two ports each, and a ringbuffer. These clients will simply forward zyn's output to the respective ringbuffer.
So far (using jack2 at least), we end up in a parallelized setup. The problem is that I would like the sequencer to output it's final sound via jack, too. So the sequencer gets one more jack client, which is connected to the sequencer's out ports. This client must call process() to do everything except feeding the ringbuffers, e.g.:
* computing simple effects, like lfo generation, lfo transformation, ...
* sending control parameters *to* zynaddsubfx
* post-process zyn's audio data by reading the ringbuffers
However, the last points is an issue. If there's nothing to read, I'll need to use a spinlock to wait for zynaddsubfx. Even if that spinlock is atomic-based and lock-free (I think it should be RT safe then), this will cause many unused CPU cycles.
Does anyone have a better idea than using spinlocks?
Thanks + kind regards,
Johannes
Does anyone work on encryption for jack or encrypting/decrypting
applications?
It would be cool being able to use any voice/telephony application in an
encrypted mode just by using jack for input and output.