Hi Matt,
Welcome to Faust!
In your example you can use :
gate = button("../basshit-gate");
Cheers
Yann
-------------------------
Yann Orlarey
Directeur scientifique / Scientific Director
<http://www.grame.fr>
Le mar. 11 juin 2019 à 19:56, interrupt <[email protected]> a
écrit :
> Bonjour, FAUST users!
> My name is Matt Howell, Nice to meet all of you. I have just started
> learning the language so I have a few questions. I have a long experience
> as a programmer, artist, and sound design, so I'm excited to be using
> FAUST for a percussion synth that I am building on the Teensy3.6.
>
> I am currently trying to understand at least two things:
> 1. how to make a button trigger two envelopes
> 2. how to make the button show up in a higher level group, instead of
> twice in the two envelope ui groups
>
> source >>>
>
> import("stdfaust.lib");
>
> gate = button("basshit-gate");
>
> carrierAmpEnv(trig) = hgroup("[0]Carrier-Amp-Envelope",
> en.dx7envelope(
> vslider("[0]amp-rate1",0,0,2,0.001): si.smoo,
> vslider("[2]amp-rate2",0.02,0,2,0.001): si.smoo,
> vslider("[4]amp-rate3",0.04,0,2,0.001): si.smoo,
> vslider("[6]amp-rate4",0.25,0,2,0.001): si.smoo,
> vslider("[1]amp-level1",1,0,1,0.01): si.smoo,
> vslider("[3]amp-level2",1,0,1,0.01): si.smoo,
> vslider("[5]amp-level3",0.5,0,1,0.01): si.smoo,
> vslider("[7]amp-level4",0,0,1,0.01): si.smoo,
> trig
> )
> );
> modulationEnv(trig) = hgroup("[1]Modulation-Envelope",
> en.dx7envelope(
> vslider("[0]mod-rate1",0.00,0,2,0.001): si.smoo,
> vslider("[2]mod-rate2",0.02,0,2,0.001): si.smoo,
> vslider("[4]mod-rate3",0.04,0,2,0.001): si.smoo,
> vslider("[6]mod-rate4",0.25,0,2,0.001): si.smoo,
> vslider("[1]mod-level1",1,0,1,0.01): si.smoo,
> vslider("[3]mod-level2",1,0,1,0.01): si.smoo,
> vslider("[5]mod-level3",0.5,0,1,0.01): si.smoo,
> vslider("[7]mod-level4",0,0,1,0.01): si.smoo,
> trig
> )
> );
> modulatorFreq = hslider("modulator-freq", 110, 20, 15000, 10) : si.smoo;
> carrierFreq = hslider("carrier-freq", 90, 20, 15000, 10) : si.smoo;
> modIndex = hslider("modulator-index", 10000, 0, 15000, 10) : si.smoo;
> modGain = hslider("modulator-gain", 0.5, 0, 1, 0.01) : si.smoo;
> carrierGain = hslider("carrier-gain", 0.5, 0, 1, 0.01) : si.smoo;
>
> dualOpFm(trig, carFreq, modFreq, ampEnv, modEnv) = (out)
> with {
> modulator = os.osc(modulatorFreq);
> carrier = os.osc(carrierFreq + modulator * (modIndex *
> modulationEnv(trig)));
> out = ((modulator * modGain) , (carrier * (carrierGain *
> carrierAmpEnv(trig))));
> };
>
> process = dualOpFm(gate) <: _,_;
>
> <<< end source
>
> Any thoughts?
>
> Cheers,
> Matt
> _______________________________________________
> Faudiostream-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/faudiostream-users
>
_______________________________________________
Faudiostream-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/faudiostream-users