Ndef argument, min/max



I am very new to using ndef. I was curious if there was a way to use an argument to set the min and max of a parameter slider so I would not have to go in and adjust them every time I load a synth to the ndef.



Best way I know is with JITLibExtensions.

  1. Add the JITLibExtensions quark.
    a. Install git from git-scm.com.
    b. Quarks.gui
    c. Find JITLibExtensions and click the checkbox to install.
    d. Recompile the class library.

Then you can do:

Ndef(\a).addSpec(\parameter, [min, max, warp], \otherParameter, [min, max, warp]... etc...)



ahh amazing thanks!

Any other cool tips you recommend for Ndef?


Is there a directory where I can see what else these Jitlib extensions let me do?





That does not work for me due to the way I have quarks installed? Would there be another way?



Aha, well, I couldn’t have guessed that you were installing them in a nonstandard way.

In fact, it isn’t required to use git to download the quarks. The only thing that is required is to put them in userAppSupportDir/downloaded-quarks, e.g.:

var quarksDir = Platform.userAppSupportDir +/+ "downloaded-quarks";
if(File.exists(quarksDir).not) {

If there is a directory within this location, and that directory contains a valid ‘.quark’ file, then you can use Quarks methods to access it – no need for it to be in the official list of quarks.

So you might consider moving your quarks into this location. Then you can use Quarks.gui etc.

In the meantime, you could pick some class that is defined in the quark and use its filenameSymbol to open the directory. (The catch is that you wanted to open the directory to find out what’s defined inside!)




Weird, I have all my quarks in a folder called “downloaded-quarks” in my Supercollider Application support folder and the first method does not work? The quarks.gui does work for me.



the first method does not work

Recommended, if something is unexpectedly not working, to post the error output. This is actually an important point that often gets overlooked: if you ever catch yourself writing “it doesn’t work,” a little red flag should go up in your mind saying “Oops, it’s not enough to say that” – error or other output, maybe code snippets, to help diagnose the problem.

At present, all I know is that if I execute Quarks.at("JITLibExtensions").localPath, then I get "/home/dlm/.local/share/SuperCollider/downloaded-quarks/JITLibExtensions" as a String, and Strings know how to openOS.

There is no information about why it isn’t working on your machine, so I can’t begin to guess.