grame-cncm / faust

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

Please implement default values of controls in generated Csound opcodes #100

Closed gogins closed 6 years ago

gogins commented 6 years ago

Please implement default values of controls in generated Csound opcodes. This may be advisable for other architectures as well.

When the user has a working prototype in FaustLive or some other development environment, then the current values of user interface controls should be saved as the default/initial values of the DSP control variables.

In Csound, it is possible to declare optional k-rate parameters with a default value of -1 as "J". Then in the generated interface code, the values of the incoming parameters would be tested. If they were -1, the incoming parameter would automatically be set to the default value from the Faust DSP code. If they were not -1, the incoming parameter would be used with its current value.

In cases where the generated opcode used many parameters, this could save the user of the opcode from having to specify the value of every parameter in the Csound orchestra code.

There might be other ways to implement this...

sletz commented 6 years ago

Default values of all controllers are given when calling p->DSP->buildUserInterface(p->interface); (line 199 of csound.cpp). The used CSUI class has a set of addCheckButton, addVerticalSlider that receive the FAUSTFLOAT init, parameter. Could the values be used at this place ?

sletz commented 6 years ago

Note that there is also the (dynamic libfaust + LLVM) Faust/csound link that should possibly be checked also : see cashttps://github.com/grame-cncm/faust/tree/master-dev/embedded/faustcsound

gogins commented 6 years ago

I can't look at that until I have LLVM built to work with Faust. But I will keep it in mind.

Regards, Mike


Michael Gogins Irreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com

On Sat, Nov 25, 2017 at 1:00 AM, Stéphane Letz notifications@github.com wrote:

Note that there is also the (dynamic libfaust + LLVM) Faust/csound link that should possibly be checked also : see cashttps://github.com/grame- cncm/faust/tree/master-dev/embedded/faustcsound

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/grame-cncm/faust/issues/100#issuecomment-346928114, or mute the thread https://github.com/notifications/unsubscribe-auth/AGCDJUDgjXXvlY2P_UwJl-vlYL2gPt2cks5s59cggaJpZM4QqMn8 .