Get script's chain ID

  • It would be useful to have a function that returns the ID of the script's chain for use with functions like addModulator so that it can be inserted into the same chain as the script while allowing the code to be generic.

  • Do you mean the Container of the script? Technically, the Script's chain is the MidiProcessor, so it has always the same ID...

  • I think I'm misunderstanding the chain ID parameter of the addModulator function because I've just realised it's expecting an integer. Could you show me a usage example for this function when you have some free time? (no rush at all).

  • 1 is Gain Modulation, 2 is Pitch Modulation - simple as that 🙂

    // Adds an LFO to the Gain chain
    const var myLFO = Synth.addModulator(1, "LFO", "My Funky LFO");

    I think the special Modulation chains (eg. the Sample Start Chain) are not supported. Do you need it?

  • Aha! thanks, that makes perfect sense to me now. No I don't need a sample start one - at the moment anyway 🙂

Log in to reply