open/load up sound file automatically using loadbang?

Jan 3, 2007 at 12:53pm

open/load up sound file automatically using loadbang?

Hi there,

I’m very new to max/MSP. Just spent the past week getting to grips with the basics.

I’m trying to get my sound file to open automatically when I run my patch.

I have placed the sound file in the same folder as my max patches.

I have been trying to achieve this by using the open message wih my file name typed afterwards (broken by a space) and attaching the loadbang to the inlet. Although I’m not succeding. :(

Does anyone have any tips?

Jan 3, 2007 at 1:02pm

Do you get any error messages?

Jan 3, 2007 at 1:07pm

Try this simple one.

max v2;
#N vpatcher 140 132 740 532;
#P window setfont “Sans Serif” 9.;
#P newex 128 145 128 196617 loadmess open Yourfile.aif;
#N sfplay~ 1 120960 0 ;
#P newobj 128 167 44 196617 sfplay~;
#P connect 1 0 0 0;
#P pop;

Jan 3, 2007 at 1:25pm

Thanks Morten,

I just tried that. No good :(

Error message: e

rror:sfplay~ can’t find file 1_Forrest

Jan 3, 2007 at 1:27pm

I was making a silly error!!!

The sound file I was using was named with spaces in-between some of the words! It appears max does not like this? And was looking for a file with everything up until the first space of the file name!!!

It now works :)

Lesson learned = don’t use spaces.

Thanks v much.

Jan 3, 2007 at 2:29pm

On 03-janv.-07, at 14:27, Thomo wrote:

> Lesson learned = don’t use spaces.

Or use quotes. Check also [tosymbol].


Jan 3, 2007 at 5:41pm

Thanks Patrick!

Jan 4, 2007 at 10:44am

Thomo wrote:
> Lesson learned = don’t use spaces.

Wrong conclusion as it would mean an unecessary limitation…
You can use spaces, but need to prepare correctly. [tosymbol] is your
(Had been covered on the list a trillion times, search the archives)
As long as you patch for yourself, avoiding spaces is simple though…


Stefan Tiedje————x——-
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–


You must be logged in to reply to this topic.