Setting Ugen parameters/values from Tidal

Hi :slight_smile:
I'm curious about what is necessary in a Ugen or Synthdef's code in order for one or more of it's parameters or values to be changed from within Tidal?
I'm familiar with the audio effects available in Tidal, for example # room controls one of the parameters in a reverb effect. Is Tidal communicating with an SC Ugen in that instance?
If I have a synthdef written in SC and it has envelopes, for example, that control the tone is there a way to change the ADSR values of it from Tidal using the # similar to room, as an example?
I want to get into programming Ugens for use in Tidal and am wondering if anyone can shed any light on the topic for me.
I'm guessing that modulating synthdefs from within Tidal and modulating Ugens from within Tidal are two separate things that require separate approaches.

Not an expert, but this is my understanding of setting up that connection:

Some synthdefs are defined here:

Map parameter references in tidal (you can load a file like this as part of boottidal.hs or on the fly)

Some of the effects are global, these need extra handling in supercollider/startup.scd:

        // define global effects for mutable instruments effects
        ~dirt.orbits.do { |x|
            var clouds = GlobalDirtEffect(\global_mi_clouds, [\cloudspitch, \cloudspos, \cloudssize, \cloudsdens, \cloudstex, \cloudswet, \cloudsgain, \cloudsspread, \cloudsrvb, \cloudsfb, \cloudsfreeze, \cloudsmode, \cloudslofi]);
            var verb = GlobalDirtEffect(\global_mi_verb, [\verbwet, \verbtime, \verbdamp, \verbhp, \verbfreeze, \verbdiff, \verbgain]);
            x.globalEffects = x.globalEffects
              .addFirst(clouds)
              .addFirst(verb);
            x.initNodeTree;
        };

Okay, so basically you declare your variables in SC within the synthdef such as:

| slope = 1.0

and then reference that in the synthdef somewhere instead of putting a discrete value
like:
linlin.ar (slope, slope, freq)

which is the same as writing:

linlin.ar(1.0, 1.0, 440)

etc (thats a bad example, I know)
and then in your tidal code you have a sequence of lines that begin with a let statement and then define those variables for tidal like:

let
slope = pF "slope"

and now you can write something in tidal like:

d1 $ note "cs4 cs4 ds3 e2" # s "mySynthdef" # "slope" 1.2

and that will trigger the synthdef to play something and also modulate the parameter inside it, in this case the value of the slope variable??

Maybe I'm not understanding entirely correctly?
and what is the pF or pI in the tidal code? Does that differentiate between certain kinds of variables in SC?
That's a lot of questions, I'll try and run the code and tweak it maybe that will help me understand a little better.

Floats and Integers :slightly_smiling_face:

I had the same question @Ghost_Chamb3r - it does work and adds a ton of room to make cool stuff. I don't know my haskell well enough to know where Tidal implementation stops and Haskell starts - but have made it work with pI and pF. I'm used to SC, but love how Tidal works so trying to make the best of both myself.