Best way to handle shared/multiple engines? [SOLVED]

I’m looking at incorporating the bit reduction sc engine used in @justmat’s Otis in my own script Compass, and want - of course - to make installation as easy as possible. Would a good practice be to copy the sc engine to my /lib and rename it to keep it fully local? Would that avoid the duplicate engine error?

I see in the script reference doc that I could simply reference Otis’ engine, but I don’t necessarily want to make Otis a dependency, if that makes sense.


mods: feel free to move this to Norns: scripting if that’s a better spot for this.

1 Like

that is what i’d recommend for now: rename both the class and the file to something (hopefully) unique to your script. it’s not ideal but we should have a better approach available soon.

2 Likes

I’ve done it both ways in the past. My thinking is to include/require the engine from another script only if it’s a script that is “included” with norns. (like the engine from awake, or something in we etc…) Otherwise I copy and re-name the lib/engine and class.

1 Like

Thank you both very much :100: