Where should I put Synth.deferCallbacks(true)?



  • Where should I put Synth.deferCallbacks(true); ? Only on interface script or all of the scripts attached one by one?
    My interface scpirt is like this

    Content.makeFrontInterface(645, 437);
    
    
    include("Knobs.js");
    include("CustomFunctions.js");
    
    
     
    


  • @Steve-Mohican

    Put it in all scripts that will benefit from it...

    Generally I recommend putting it at the top (under the Content.makeFrontInterface) of all main Interface scripts (and any other scripts you want to defer), but there may be occasions when that's not the way to go.



  • @d-healey Thank you for the information. My script are:

    1 script have knobs and their inline functions
    1 script have serial numbers
    1 script has serial number authorization system
    1 script has navigation menu

    I should add deferring callbacks all of them individually right?



  • @Steve-Mohican

    I should add deferring callbacks all of them individually right?

    I think you are mixing up MIDI processors with external script files. When you include external scripts they are all part of the same MIDI processor, so there is only one on init callback, one on note callback etc. You only need to put one defer statement per MIDI processor.

    You can defer each MIDI processor if you want to, but that depends on if it's something the script will benefit from. If you're doing real-time MIDI stuff then you probably don't want them deferred.



  • @d-healey Actually I don't know what you mean with MIDI processors, but In my Project's "Scripts > ScriptProcessors" folder there are 2 scripts, Interface and a Delay Compensation script processor. (I am making an fx plugin by the way)

    Other scripts are .js files that I am attaching seperately and they are one up directory (in "Scripts" folder)



  • @Steve-Mohican

    Yeah I should have said script processor, but they generally are MIDI processors.

    ff27efaf-3519-4b03-a284-353732bfdcf6-image.png


Log in to reply
 

14
Online

1.0k
Users

3.6k
Topics

30.7k
Posts