<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[I Need Help with scripting... pls :)]]></title><description><![CDATA[<p dir="auto">Hi, I'm new here, I have no training in programming language so it's extremely complicated for me to use HISE. I'll make it short... I would like to assign 3 different FX chains to one knob, therefore 3 different presets. I created the slider (Knob) and the ComboBox and I have already done the FX for the containers. Now I don't know how to connect everything with the knob. I tried with Scriptnode but my code gives error. Can someone give me a hand please?</p>
<p dir="auto">I leave the code generated by ChatGPT here if it helps to understand...</p>
<p dir="auto">Don't pay attention to the names of the presets, it's just a test! :)</p>
<pre><code>// Ottenere i riferimenti ai container
const var FXContainerModern = Synth.getChild("Master Chain.FXContainer_Modern");
const var FXContainerHipHop = Synth.getChild("Master Chain.FXContainer_HipHop");
const var FXContainerVintage = Synth.getChild("Master Chain.FXContainer_Vintage");

// Creare il knob OneKnob e la ComboBox (già esistenti nel tuo progetto)
const var OneKnob = Content.getControl("OneKnob");
const var ComboBox1 = Content.getControl("ComboBox1");

// Funzione per aggiornare il controllo Dry/Wet
function updateDryWet(value)
{
    // Impostiamo il Dry/Wet per ciascun container
    // FXContainerModern
    FXContainerModern.setWetDry(value);
    
    // FXContainerHipHop
    FXContainerHipHop.setWetDry(value);

    // FXContainerVintage
    FXContainerVintage.setWetDry(value);
}

// Funzione per selezionare e abilitare/disabilitare i container
function updateActiveContainer(value)
{
    // Disabilitare tutti i container
    FXContainerModern.setBypassed(true);
    FXContainerHipHop.setBypassed(true);
    FXContainerVintage.setBypassed(true);

    // Attivare il container selezionato in base al valore del ComboBox
    if (value == 0) {
        FXContainerModern.setBypassed(false);  // Attiva il container Modern
        Console.print("Preset: Modern");
    } 
    else if (value == 1) {
        FXContainerHipHop.setBypassed(false);  // Attiva il container HipHop
        Console.print("Preset: HipHop");
    } 
    else if (value == 2) {
        FXContainerVintage.setBypassed(false); // Attiva il container Vintage
        Console.print("Preset: Vintage");
    }
}

// Funzione di callback per il knob (OneKnob)
OneKnob.setControlCallback(function(value)
{
    updateDryWet(value);  // Regola Dry/Wet per i container
});

// Funzione di callback per la ComboBox (ComboBox1)
ComboBox1.setControlCallback(function(value)
{
    updateActiveContainer(value);  // Attiva il container corrispondente al preset selezionato
});

// Inizializzazione - attiviamo il preset di default
updateActiveContainer(0);  // Imposta di default il preset Modern
updateDryWet(0.5);  // Imposta un valore di Dry/Wet iniziale

</code></pre>
<p dir="auto">:(<img src="/assets/uploads/files/1738448343362-screenshot-2025-02-01-230542.png" alt="Screenshot 2025-02-01 230542.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.hise.audio/topic/11868/i-need-help-with-scripting-pls</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Mar 2026 19:46:19 GMT</lastBuildDate><atom:link href="https://forum.hise.audio/topic/11868.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 01 Feb 2025 22:28:22 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to I Need Help with scripting... pls :) on Sun, 02 Feb 2025 10:23:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/4136">@Davide8075</a> said in <a href="/post/96883">I Need Help with scripting... pls :)</a>:</p>
<blockquote>
<p dir="auto">I leave the code generated by ChatGPT here if it helps</p>
</blockquote>
<p dir="auto">It doesn't help much. Start at the beginning, go watch my scripting 101 video.</p>
]]></description><link>https://forum.hise.audio/post/96912</link><guid isPermaLink="true">https://forum.hise.audio/post/96912</guid><dc:creator><![CDATA[David Healey]]></dc:creator><pubDate>Sun, 02 Feb 2025 10:23:34 GMT</pubDate></item><item><title><![CDATA[Reply to I Need Help with scripting... pls :) on Sun, 02 Feb 2025 05:37:30 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/4136">@Davide8075</a> said in <a href="/post/96883">I Need Help with scripting... pls :)</a>:</p>
<pre><code> const var FXContainerModern = Synth.getChild("Master Chain.FXContainer_Modern");
 const var FXContainerHipHop = Synth.getChild("Master Chain.FXContainer_HipHop");
 const var FXContainerVintage = Synth.getChild("Master Chain.FXContainer_Vintage");
</code></pre>
<p dir="auto">For starters, Synth.getChild should be  Synth.getChildSynth.</p>
<pre><code>const var FXContainerModern = Synth.getChildSynth("Master Chain.FXContainer_Modern");
const var FXContainerHipHop = Synth.getChildSynth("Master Chain.FXContainer_HipHop");
const var FXContainerVintage = Synth.getChildSynth("Master Chain.FXContainer_Vintage");
</code></pre>
]]></description><link>https://forum.hise.audio/post/96910</link><guid isPermaLink="true">https://forum.hise.audio/post/96910</guid><dc:creator><![CDATA[hujackus]]></dc:creator><pubDate>Sun, 02 Feb 2025 05:37:30 GMT</pubDate></item></channel></rss>