Saving a filename in sfrecord
I'm trying to record some audio with sfrecord and the help file suggests I can give a filename as a default, but I cannot get this to work. Is this a bug or am a just reading it wrongly. Any help would be appreciated.
Regards,
Miles
On 4 nov. 08, at 21:50, Filament wrote:
> I'm trying to record some audio with sfrecord and the help file
> suggests I can give a filename as a default, but I cannot get this
> to work. Is this a bug or am a just reading it wrongly. Any help
> would be appreciated.
It's working fine for me with Max 5.0.5. Could you provide more
information? Which platform? Do you get any error message?
Cheers,
ej
Quote: Emmanuel Jourdan wrote on Tue, 04 November 2008 22:49
----------------------------------------------------
>> It's working fine for me with Max 5.0.5. Could you provide more
> information? Which platform? Do you get any error message?
>
> Cheers,
> ej
>
>
>
----------------------------------------------------
I'm on PC running Windows XP. Max 5.0.5.
I'm getting an error message: sfrecord~: can't make file filename.wave, err -1
I've tried this on my home pc, my work pc and my laptop, but still gives the same error messsage.
Thanks
Miles
I found out what the problem was. It was saving the file to C:Program FilesCycling '74Max 5.0 folder which was not clear in the helpfile.
It was giving the error message: sfrecord~: can't make file filename.wave, err -1 when I was clicking the message twice, so this was my fault. Sorry for the confusion.
Thanks for everyones help. It pushed me to look further.
Is there any way to be able to choose which folder you save the file to?
Regards,
Miles
Filament schrieb:
> Is there any way to be able to choose which folder you save the file
> to?
off course.....
As always if you want a specific place just deliver the complete path...
If you want a dialog, just don't give a file name, if you want a dialog
with a pre set file name, look into the folder object, or the dialog
object or... go through all the corresponding help files... There is a
"see also" section in all of the help files, they point you to
interesting other objects...
And most important, never give up.... ;-)
Stefan
--
Stefan Tiedje------------x-------
--_____-----------|--------------
--(_|_ ----|-----|-----()-------
-- _|_)----|-----()--------------
----------()--------www.ccmix.com
I tried to work this one out all of last night, but with no luck. I am ready to give up. I was pulling my hair out. It is probably something simple, but it is alluding me.
I just do not know what message to send to sfrecord so it will save a wav to my choice of folder (my documents).
Could you give an example please?
Best Regards,
Miles
Quote: stefantiedje wrote on Thu, 06 November 2008 08:18
----------------------------------------------------
> Filament schrieb:
> > Is there any way to be able to choose which folder you save the file
> > to?
>
> off course.....
>
>
>
>
>
>
> As always if you want a specific place just deliver the complete path...
> If you want a dialog, just don't give a file name, if you want a dialog
> with a pre set file name, look into the folder object, or the dialog
> object or... go through all the corresponding help files... There is a
> "see also" section in all of the help files, they point you to
> interesting other objects...
>
> And most important, never give up.... ;-)
>
> Stefan
>
> --
> Stefan Tiedje------------x-------
> --_____-----------|--------------
> --(_|_ ----|-----|-----()-------
> -- _|_)----|-----()--------------
> ----------()--------www.ccmix.com
>
>
----------------------------------------------------
On Nov 7, 2008, at 12:38 AM, Filament wrote:
> I just do not know what message to send to sfrecord so it will save
> a wav to my choice of folder (my documents).
Full paths work. For example sending sfrecord~ the message:
"open /Users/cbm/Music/Sounds/Misc/TempSnd.wav wave"
saves a wave file called TempSnd.wav to the path I specified.
Obviously, that example path is tied to my user name.
-C
Chris Muir
cbm@well.com
http://www.xfade.com
Quote: Chris Muir wrote on Fri, 07 November 2008 09:26
----------------------------------------------------
> Full paths work. For example sending sfrecord~ the message:
> "open /Users/cbm/Music/Sounds/Misc/TempSnd.wav wave"
> saves a wave file called TempSnd.wav to the path I specified.
This works, or a simple "open" message would allow you to browse to the folder into which you'd like to save your recording. Could you post the [sfrecord~] section/logic of your patch as it stands now, so that we might see where the disconnect is?
Hi Brennon,
The follwing patch is saving my random name wav file to: C:Program FilesCycling '74Max 5.0 which is all very well, but I want to save to this folder: C:Documents and SettingsMilesDavies.AMPHORAMy DocumentsAudio
Chris Muir's idea will work fine for me, but could someone please just let me know what the full filepath will look like including the filename if for example the filename was xistwyd.wav I guess I can just add the full filepath to the sprintf~ object and it should send the correct command to the sfrecord object.
Thanks for any help you can offer.
Quote: Brennon Bortz wrote on Fri, 07 November 2008 13:10
----------------------------------------------------
> Quote: Chris Muir wrote on Fri, 07 November 2008 09:26
> ----------------------------------------------------
>
> > Full paths work. For example sending sfrecord~ the message:
> > "open /Users/cbm/Music/Sounds/Misc/TempSnd.wav wave"
> > saves a wave file called TempSnd.wav to the path I specified.
>
> This works, or a simple "open" message would allow you to browse to the folder into which you'd like to save your recording. Could you post the [sfrecord~] section/logic of your patch as it stands now, so that we might see where the disconnect is?
>
>
----------------------------------------------------
By the way when I paste my file path into a message box, the back slashes are removed. Should this be happening?
Quote: Filament wrote on Fri, 07 November 2008 13:52
----------------------------------------------------
> Hi Brennon,
>
> The follwing patch is saving my random name wav file to: C:Program FilesCycling '74Max 5.0 which is all very well, but I want to save to this folder: C:Documents and SettingsMilesDavies.AMPHORAMy DocumentsAudio
Try this:
Quote: Filament wrote on Fri, 07 November 2008 13:58
----------------------------------------------------
> By the way when I paste my file path into a message box, the back slashes are removed. Should this be happening?
----------------------------------------------------
Backslashes in a message must be escaped with a backslash. You'll see in the patch that I sent that "double" backslashes are used.
There is a very strange thing happening. I am putting the file path into the sprintf~ object to send it to the message box but the back slashes are being deleted. Have a look yourself to see what I am trying to do.
On 7 nov. 08, at 15:17, Filament wrote:
> There is a very strange thing happening. I am putting the file path
> into the sprintf~ object to send it to the message box but the back
> slashes are being deleted. Have a look yourself to see what I am
> trying to do.
Max uses slashes to delimit folder, wether you're on MacOS or on
Windows. You have to construct your path using "C:/whatever/" syntax.
Note that it's highly recommended to only use sprintf (or combine) to
generate your path, and then prepend with the "open" keyword for
instance (using the prepend object) leaving the path untouched.
HTH,
ej
Emmanuel, I've had lots of problems using "forward slashes" as a path delimiter on Windows--it has worked at times, and driven me nuts at others. On the other hand, I've never had a problem with backslashes. Either way, Miles, you need to escape the double-quotes in your [sprintf] with backslashes, for sure. So, using forward slashes as your path delimiter, your [sprintf] with arguments should be:
sprintf open "C:/Documents and Settings/MilesDavies.AMPHORA/My Documents/Audio/%s.wav" wave
Note that you are using "wav" as the file type. The documentation calls for this to be provided as the symbol "wave", with the "e". I'm not sure if this will cause you problems or not, but I'd recommend using "wave".
On 7 nov. 08, at 16:28, Brennon Bortz wrote:
> Emmanuel, I've had lots of problems using "forward slashes" as a
> path delimiter on Windows--it has worked at times, and driven me
> nuts at others. On the other hand, I've never had a problem with
> backslashes. Either way, Miles, you need to escape the double-
> quotes in your [sprintf] with backslashes, for sure. So, using
> forward slashes as your path delimiter, your [sprintf] with
> arguments should be:
>
> sprintf open "C:/Documents and Settings/MilesDavies.AMPHORA/My
> Documents/Audio/%s.wav" wave
like I said, don't do that: generate first the path, with:
sprintf symout C:/Documents and Settings/MilesDavies.AMPHORA/My
Documents/Audio/%s.wav
then [prepend open] and [append wave]. That way this won't affect the
path.
> Note that you are using "wav" as the file type. The documentation
> calls for this to be provided as the symbol "wave", with the "e".
> I'm not sure if this will cause you problems or not, but I'd
> recommend using "wave".
I'm not sure it really matters if the extension is wav or wave, what
matters though is the third argument of the open message which needs
to be written "wave".
ej
Thanks Brennon and EJ for your support.
sprintf symout C:/Documents and Settings/MilesDavies.AMPHORA/My
Documents/Audio/%s.wav works for me on windows xp. It seems wave extension instead of wav extension as shown in the max.help is not recognised on my system for some reason.
Thanks again
Regards,
Miles
On Nov 7, 2008, at 5:52 AM, Filament wrote:
> The follwing patch is saving my random name wav file to: C:Program
> FilesCycling '74Max 5.0 which is all very well, but I want to save
> to this folder: C:Documents and SettingsMilesDavies.AMPHORAMy
> DocumentsAudio
This is hastily extracted from one of my patches, and cobbled together
with your patch:
Chris Muir
cbm@well.com
http://www.xfade.com
Hastily extraced or not, that is a very nice way around my problem. But you have now opened a new can of worms. When I choose root path first, max opens a dialogue to choose a specified folder, but wouldn't it be nice to be able to create a new folder within the dialogue to my choice of folder to save different projects to like cubase offers when you open a new project rather than having to create the folder first.
I mean, I'm out of my depth already and would have no knowledge of how to do this. If there is a simple solution to this please feel free to explain, but if too complicated, I thank you for your already valuable contribution to my problem which I am more than happy with and grateful for.
Best Regards
Miles
Quote: Chris Muir wrote on Fri, 07 November 2008 19:19
----------------------------------------------------
>
> On Nov 7, 2008, at 5:52 AM, Filament wrote:
>
> > The follwing patch is saving my random name wav file to: C:Program
> > FilesCycling '74Max 5.0 which is all very well, but I want to save
> > to this folder: C:Documents and SettingsMilesDavies.AMPHORAMy
> > DocumentsAudio
>
>
> This is hastily extracted from one of my patches, and cobbled together
> with your patch:
>
>
> Chris Muir
> cbm@well.com
> http://www.xfade.com
>
>
>
>
>
>
>
----------------------------------------------------
On Nov 8, 2008, at 2:59 AM, Filament wrote:
> Hastily extraced or not, that is a very nice way around my problem.
> But you have now opened a new can of worms. When I choose root path
> first, max opens a dialogue to choose a specified folder, but
> wouldn't it be nice to be able to create a new folder within the
> dialogue to my choice of folder to save different projects to like
> cubase offers when you open a new project rather than having to
> create the folder first.
That's an operating system dialog that the [folder] object puts up. If
your operating system supports the creation of a new folder from that
dialog you're good to go. OS X does have a "New Folder" button in the
dialog that [folder] presents. I don't know about Windows.
-C
Chris Muir
cbm@well.com
http://www.xfade.com
Are you sure its operating system specific? When I choose a folder within cubase 4 it has a "create new folder" button within the dialogue. I am running windows xp.
Quote: Chris Muir wrote on Sat, 08 November 2008 18:01
----------------------------------------------------
>
> On Nov 8, 2008, at 2:59 AM, Filament wrote:
>
> > Hastily extraced or not, that is a very nice way around my problem.
> > But you have now opened a new can of worms. When I choose root path
> > first, max opens a dialogue to choose a specified folder, but
> > wouldn't it be nice to be able to create a new folder within the
> > dialogue to my choice of folder to save different projects to like
> > cubase offers when you open a new project rather than having to
> > create the folder first.
>
>
> That's an operating system dialog that the [folder] object puts up. If
> your operating system supports the creation of a new folder from that
> dialog you're good to go. OS X does have a "New Folder" button in the
> dialog that [folder] presents. I don't know about Windows.
>
> -C
>
> Chris Muir
> cbm@well.com
> http://www.xfade.com
>
>
>
>
>
>
>
----------------------------------------------------
On Nov 8, 2008, at 11:10 AM, Filament wrote:
> Are you sure its operating system specific? When I choose a folder
> within cubase 4 it has a "create new folder" button within the
> dialogue. I am running windows xp.
I'm sure each operating system provides ways to customize these
dialogs. Maybe Cubase has extended the stock dialog to provide a "new
folder" button. You might want to submit a feature request to Cycling
to add this feature on Windows.
-C
Chris Muir
cbm@well.com
http://www.xfade.com
3 years ago. Wow, sorry for the bump from forever ago. But I feel like this is the right place to put my question.
I have this patch which is supposed to record a numbered audio file into a particular folder. It's working great - except it's being saved into the parent folder (in which the patch itself is located) rather than a specific folder within that I'm designating just for these audio files.
Here's the part of the patch that opens the file - it's connected to an sfrecord~.
Was missing "Macintosh HD" - had only "Macintosh" in the file path created. Weird that the Max window wasn't reporting anything wrong (I guess since it just saved to the parent folder).
Solved.