Forums > MaxMSP

automatic filenames generation for sfrecord~

November 26, 2008 | 10:13 pm

hello

i’d like to automatically generate incremental filenames for sfrecord~

i tried to do it this way :

– Pasted Max Patch, click to expand. –

but sfrecord~won’t accept spaces in filenames, so my problem is: how to remove those ?

i suppose i’ll need to use regexp, but this one is really scary for me..

any help appreciated

thanks


November 26, 2008 | 10:44 pm

tosymbol ?
On Nov 26, 2008, at 2:13 PM, Philippe Jelli wrote:

>
> hello
>
> i’d like to automatically generate incremental filenames for sfrecord~
>
> i tried to do it this way :
>
>

– Pasted Max Patch, click to expand. –

>
> but sfrecord~won’t accept spaces in filenames, so my problem is: how
> to remove those ?
>
> i suppose i’ll need to use regexp, but this one is really scary for
> me..
>
> any help appreciated
>
> thanks

Sam Nichols
samuelnichols@earthlink.net
http://samnichols.net/
(530) 312-0478


November 26, 2008 | 11:26 pm

Try using [sprintf open cyclerec%ld.AIF] instead of your [prepend] and [append] objects. As you can see it can piece things together without spaces.

lh


November 27, 2008 | 7:45 am

ooh yes sprintf … that was the one i was looking for, not regexp.

But both are still mysterious beasts to me ;-)

thanks

ph


November 27, 2008 | 7:45 pm

here’s a javascript that maybe will make it easier for you. It’s a bit less mysterious than sprintf and regexp.


November 27, 2008 | 8:18 pm

In max 5 you also have the combine object which is less "obscur" than
sprintf.

Cheers,
ej

On 27 nov. 08, at 20:45, pnyboer

wrote:

> here’s a javascript that maybe will make it easier for you. It’s a
> bit less mysterious than sprintf and regexp.
>
>
>
> –
> MIDI hardware and video software: http://www.lividinstruments.com
>
> * * * *
> The Altamont
> 2 oz light rum
> 3/4 oz lime juice
> 1/2 oz orange curaçao
> 1/4 oz orgeat
> splash of pernod
> handful of fresh mint leaves
> * * * *
>


November 28, 2008 | 9:45 am

Thank you all for your useful answers !
i did it using sprintf like this, and it’s working fine
but i have a corollar question : if i remove the pipe object, sometimes (but not always) the open message arrives after the trigger, and i get a error message in max window (like "record was not preceded by the open message" or something like that), but not all the time.
Especially when dsp is turned on i think. (overdrive is on, also)
Is this normal ? It doesn’t fit with the left-to-right/top-to-bottom logic…

ph

– Pasted Max Patch, click to expand. –

November 28, 2008 | 4:59 pm


November 28, 2008 | 5:08 pm

No, signal doesn’t go through the [pipe], only a trigger (0 or 1) from a separate controller.

The L & R signals going to [sfrecord~] aren’t visible in my small extracted patch, but they arrive separately…

ph


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