Storing samples with a live set

3 posts / 0 new
Last post
seanzhow
Offline
Joined: 06/10/2010
Storing samples with a live set

 Hi,
 
I have built a sample based drum machine for M4L and was wondering how to save the samples I load into it with my live set so I don't have to reload. I'm sure it must be possible but cant find anything in the documentation.
Just to clarify I have built a sampler where samples can be loaded into a buffer and then modified using the waveform~ objects draw function.
When this object is used in a live set all parameters controlled with live controls remember their positions with the live set but alterations made to the wave shape are lost.
What I need is a way to retain this information with the live set.
Cheers
 
 

Phatline
Offline
Joined: 11/08/2009

hmmm... what you can do:

store the path of the sample (e.g: C:\samples\kick1.wav) > This can be done with the pattr object... - here the sample Location must be fix... (your sample harddisc)
The Reload comes automatic by opening the liveset... there are differnt samplers on maxforlive.com... i have already built an sampler that stores pathes http://www.maxforlive.com/library/device.php?id=309
You could mod it...

but automatic sample copying in the livefolder??> then you have a relativ path - so the sample path changes? hmmm I dont think so...but maybe with java?

negotiator
Offline
Joined: 04/16/2010

the sample is located in the buffer, you can save it with a write message

write filename [symbol]

Saves the contents of buffer~ into an audio file. A standard file dialog is opened for naming the file unless the word write is followed by a symbol, in which case the file is saved in the CURRENT DEFAULT FOLDER, using the symbol as the filename. Unless you change the format with the Format pop-up menu in the standard Save As dialog box, the file will be saved in the format specified by the most recently received filetype message, or the file type of the most recently opened audio file. By default, buffer~ saves in AIFF format.

Then you could open the file using javascripts FILE object, read it and hopefully resave it at your wanted destination.
I wouldnt know about deleting the original file, but you could "replace" the information contained in the original file with a blank symbol, freeing up storage space.