Forums > MaxMSP

… another shell / aka.shell question :)

June 18, 2011 | 12:47 pm

Hello all, it’s been a while since I’ve used Max.

I’m trying to run a SoX command from Max via the [shell] or [aka.shell] objects, but with no success. If I run this straight in Terminal:

cd Desktop
sox test.wav test.aiff

… as expected a new aiff is created on my desktop, from the wav of the same name.

But running that exact text via [shell] or [aka.shell] does absolutely nothing. [aka.shell] politely prints out all the details about SoX to the Max window, but all I get from [shell] is a bang message.

Am I neglecting to include something in the message I’m sending from Max? I’m a bit stumped because the objects’ help files don’t have any extra info, leading me to believe this should be really straight-forward.

cheers for the help :)

(SoX is a command-line utility for various types of conversion of audio files – http://sox.sourceforge.net/)


June 18, 2011 | 3:05 pm

Hi there, multiple sequential commands in the shell object need to be separated by ;

Here’s an example with cd and ls.

– Pasted Max Patch, click to expand. –

Cheers.


June 18, 2011 | 6:27 pm

Cheers, that’s just the ticket :)

now I just have to remember how to format text strings with spaces in specific places :-/ … that’s always irked me :)

… and how to extract compatible directories from a folderpath :-o … need to find those regexp tutorials again


June 18, 2011 | 7:10 pm

You don’t have any idea why:

cd ~/Desktop; sox AltoSax.wav AltoSax_44100.wav rate -s 44100
cd ~/Desktop/Test; sox AltoSax.wav AltoSax_44100.wav rate -s 44100

would work while:

cd ~/Untitled:/Users/Tim_Lloyd/Desktop/Test; sox AltoSax.wav AltoSax_44100.wav rate -s 44100
or
cd Untitled:/Users/Tim_Lloyd/Desktop/Test; sox AltoSax.wav AltoSax_44100.wav rate -s 44100
or
cd ~Untitled:/Users/Tim_Lloyd/Desktop/Test; sox AltoSax.wav AltoSax_44100.wav rate -s 44100
or
cd /Untitled:/Users/Tim_Lloyd/Desktop/Test; sox AltoSax.wav AltoSax_44100.wav rate -s 44100
or
cd :/Users/Tim_Lloyd/Desktop/Test; sox AltoSax.wav AltoSax_44100.wav rate -s 44100

doesn’t?

This current directory thing in Terminal is confusing, and it’s very hard to know where one is going wrong when there isn’t any feedback apart from no new file being created :p


June 18, 2011 | 8:36 pm

When I have a chance to sit in front of my computer again I could send you a lot of info about formatting but check the forums or even my profile for posts and you’ll find a bunch of shell/space related questions.

Is your main volume really called untitled? By default it should be Macintosh HD:/Users/username/Desktop/thing.wav

By the way, most commands have a -v tag (verbose) meaning if it fails to copy it’ll print out why if you have print hooked up to stderr out.


June 19, 2011 | 12:14 am

… nearly got something working … but why, whyyyyyy do sequential commands need to be separated by a *backslash*; of all things :-o … it’s so irritating trying to deal with via [sprintf] and/or [combine] …


August 22, 2013 | 12:50 pm

I am also a bit stuck with shell formatting.
I have very little experience using Terminal. I would like to send Terminal a message from Max MSP telling it to open a vqs file using a hidden Command Interface application (hidden meaning no GUI). My objective here is to use Terminal to communicate with a Datapath X4 unit – a box which splits the image on my MacBook Pro from multiple screens

If I type this into Terminal it works as I want it to:
cd Documents/DatapathFiles

vqscmd -ConFigfile=tamquarter.vqs -DeviceNumber=0

But I am not sure how to format this through shell.


November 21, 2013 | 8:14 am

Just wondering if you were successful using the datapath x4 from your MBP. Any information appreciated!


Viewing 8 posts - 1 through 8 (of 8 total)