grame-cncm / faust

Functional programming language for signal processing and sound synthesis
http://faust.grame.fr
Other
2.58k stars 322 forks source link

Triggering polyphonic voices via OSC #261

Closed mephistopheles-8 closed 5 years ago

mephistopheles-8 commented 5 years ago

I am running on Linux, using JACK. This seems to affect the faust2jackconsole and faust2jack backends

I can't seem to trigger a polyphonic voice using OSC -- is this possible? I can trigger notes via MIDI, and I can alter the frequency / gain / gate while the note is playing via OSC.

I am using the interface in ungrouped mode, with the basic sawtooth example here:

// polysaw.dsp
import("stdfaust.lib");

freq = hslider("freq",200,50,1000,0.01);
gain = hslider("gain",0.5,0,1,0.01);
gate = button("gate");

process = os.sawtooth(freq)*gain*gate <:_,_;

For example, the following OSC do not play notes ( running ./polysaw --group 0 )

oscsend localhost 5510 /Polyphonic/V1/polysaw/gain i 1
oscsend localhost 5510 /Polyphonic/V1/polysaw/gate i 1

I can see that the values have changed when I send "get" messages.

I would like to use OSC exclusively to trigger the polyphonic voices, if possible.

sletz commented 5 years ago

This should be fixed in https://github.com/grame-cncm/faust/commit/063efdbb0401cd248b3c174cdf4cfb19465a9c6f

A new --controlparameter is now available in some of faust2xx scripts. So you'll have to do something like:

faust2jaqt -midi -nvoices 8 -osc clarinetMIDI.dsp

then ./clarinetMIDI --group 0 --control 0

All polyphonic voices are always "on" and can be individually controlled with OSC messages.

mephistopheles-8 commented 5 years ago

That works for me -- thanks!