Problem with moving things to different script processors.
-
So I build a Mic Mixer originally in my main interface script using David Healeys amazing youtube tutorials.
Then I thought I want to try and built a Sequencer.. So I wanted to move my Mic Mixer script into its own script. I did some googling and some thinking and probably over simplified it to just be.. build a second script with all the same controls. Link those from the main interface to the Mic Mixer script copy the script and it would work. I was wrong...
So my current issue is when I try to compile I get "TTV1 20221101:! Line 109, column 31: Unknown function 'setControlCallback'"
setControlCallback i'm pretty sure is a function and it was all working in my main script so there must be more to it?
So i've obviously messed up somewhere and would be very thankful for any advice you may have.
Heres a snippet
HiseSnippet 4029.3oc6c0zaaajFlx1LIVooMsnEn8PWvJrnPFIQV7C4jhroU9qj5VqHUKWmTTzMkVZjM2PQpRR4XkVCjEX+ArmJPu0eB6dbOsA6o8mQ2a6wdb2S6NeQpgeZQxJ2FWIfD3guyy67Luy67xYFMynVVlc.11lVbEVb2QC.bEdI91iLbNb8CU0L31ZCtBuB+t6tmnfTUIIQwphbqMZfpsMnKWgByeOTlJr3Bb3O+3GrlptpQGv3GwwsmoVGv1Z80bF+zV0+XMc86p1ErqVelbqTeqNlFqapaNDRn44qxMPsyiUO.beUT1limqvE1rqlioUaGUGfMWgEVyr6n1GZ9DCR92SyVaec.JgHWanhHO9tl5cQLF8Tt0OTSuaK2JtMGWA9ViMCySLCuNeCstZdOer43pXABiQvZOJLme5MuO5IxRupLzKBJMGCkVfPoWkucGKsANikf3yk42xvAX0SEZ1YoBIubE927qaByfgSk9pOFbWKXBO.kWoZ0qK.+uktcQ1O8FZzwQyzPvz39lNflFkWp3WWbwFvRE1XTQ6.CSKvlGAUZYGqg.D5SJJDDUudDXAjgnikotNvJRwHOBqj.V1XX+8AVWW3HUcXY6lQnYxusmOdaOqqQGh0gIilFaYn4zb.vHNGFNpIE1N81TVAypCtU5kosRs005Br3zfMFKx+Xi8aoZTkCSY1dGbo.tX9fKkO3x4CtR1fWDAGEkoZNwKlS7R4DubNwmF62ZCcbLMv3uL+9NFsFZc.nZdUfXdUfTdUfbdUPFMh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hGOCGAz7R+UxFVJ6e28Y+qwJ6qnaJWbiNtlL3Sn+M987ElGXflrHN.rNbZ359NJOdmR.EQENtLATRLi.qkIfWfWop7sxFxcLM6el61wkjaWgjb63RxsqPRtcbI41UHI2Ntjb6JDxsquZGKyG0gLlTjy2kvOA1hXf+ETcQ3vgfoEFe1R4qVoJ57sn8nNcPQvuAzKHZLRY.ibFvnjAL0x.lUx.lalAL2JQLnU5Y0gNl8IucG9fVaR5DUXSuNQyy8+QQZl3R
Thanks in advance.
Jack
-
Obviously that project is abit of a mess as i'm still learning and just figuring stuff out currently.
-
@crubbish Leave the mic mixer in the main interface script, there is no advantage to moving it to a separate script. If you want to improve organisation you could put it in a separate file and use an include.
-
Thanks David
How do you decide what is good to go in the main script vrs what should be in an external script?
Jack
-
@crubbish I section things into external scripts by their function.
-
@crubbish Anything that needs to be controlled by the user on the interface needs to be part of the main interface. Anything that needs to run on the audio thread (realtime) should be in a separate MIDI processor. I'll be posting a video about this to Patreon on Saturday.
An external script just means you put the code in a different .js file, but that file can be included in any script processor (usually the main script).
I think it's good practice to put almost all of your main interface code into separate js files, each with their own namespace.
This is a typical
on init
for one of my projects -
Thats worked brilliantly ty