TimeStretch icon indicating copy to clipboard operation
TimeStretch copied to clipboard

supercollider: stretch2PlusChannels: escape .scd path

Open elgiano opened this issue 3 years ago • 0 comments

Escape .scd path to prevent errors when path includes spaces.

It affects only *stretch2PlusChannels as it's the only method I found that calls .runInTerminal. I tested it only on Linux, maybe it was a problem only there?

Issue

TimeStretch.stretch2PlusChannels("Bieber With Spaces", 100, [0,1], 9);
// a new sclang instance spawns in a terminal, but fails with:
// >  file "Bieber" does not exist.
// (instead of "Bieber With Spaces"

This PR solves it by calling thisProcess.formatPathForCmdLine(scdPath) before passing it to terminal.

elgiano avatar Sep 02 '21 22:09 elgiano