sfztools / sfizz

SFZ parser and synth c++ library, providing a JACK standalone client
https://sfz.tools/sfizz/
BSD 2-Clause "Simplified" License
418 stars 58 forks source link

Routing of effects as a graph #207

Open jpcima opened 4 years ago

jpcima commented 4 years ago

Some notes on implementing a future effect graph

See the pages 351-352. It has an example of using it for routing. This need the effects buffer, mixer and the buses auxN.


To implement this, we need to compute an order over all effects. It's a dependency graph, and needs computation once after the sfz load. The purpose is to compute the chains which produce auxN (buffer) prior to computing another effect that requires it (mixer).


Idea: introduce some additional I/O ports to the Sfizz plugin. If we extend this model to designate inN / outN as buses mapped to extra plugin ports, we can have some abilities

One could imagine an example like the following, which routes signal unchanged into the 2nd stereo output.

<effect>
bus=fx2
fx2tomain=0
type=buffer
buffer_source=0
buffer_destination=out2

Maybe bus=out2 as a simplified way of writing?

alcomposer commented 4 years ago

So your suggesting the final example could be written using new opcodes:

<effect>
bus=out2
jpcima commented 4 years ago

Yes, that would be the idea. This wouldn't have an equivalent simplified form for input though. Implementation-wise, this would not make it a big difference. This still sticks reasonably to the Cakewalk effect specification + the book addition.

paulfd commented 4 years ago

Yeah I had something similar in mind in order to transparently handle both the multiple output cases and the effect inserts.