Norns Supercollider - /lib folder filepath

I’m trying a very basic implementation of the PartConv.ar convolution, and I’m wondering how I set the file path for SC to load an impulse response that’s saved in the /lib folder.

Do I do Platform.resourceDir +/+ "lib/impulseResponse.wav" or something else?

Thought it would be helpful for others as well, to know how to get SC to access the local /lib for a given engine.

Thank you!

at present there is no direct way, within supercollider, to automatically get the path of the current script for the lua process.

instead what i would do is have an engine command that accepts a full path to a soundfile. (e.g. /home/we/dust/code/convolver/lib/impulse.wav), and use the lua facilities to build the path from the current working directory (e.g. file = norns.state.path .. 'lib/impulse.wav')

Platform.resourceDir is not relevant.

2 Likes