This is prob really simple but how do you bring in a wav file into a patch so that you can use the patch to process the file. I'm using a crosss-synthesis patch to play a soundfile but I don't know how to get the sound file in. Any help? Thanks
-
How do you bring in a wav file?
-
hello liz
first of all you have to create a table (an array)
table sound-file-array 256 for example
next you have to load a file in that table . to do that you have to use the soundfiler object.
you could do that to choose the file you want to load.:
bang (message type)
'
openpanel (object type)
'
-read -resize $1 sound-file-array (message type)
'
soundfiler
that's all. soundfiler 's outlet outputs the filesize.
if you want to use stereo samples , you have to create two arrays and change the message sent to the soundfiler in that way:
-read -resize $1 sound-file-array.L sound-file-array.R (message type)
(it could also be -read -resize $1 table1 table2 )
at least using that way you 'll be limited to 4mb files . if you want to load huge samples , you should rather send this:
-read -maxsize 1e07 $1 sound-file-array (message type)
that 's the way to do that.
but if you want to apply some fx in realtime you could stream a file directly from the harddisk , using sfplay from zexylib.
to output the file you'll have to use sfrecord , i don't recommend tabwrite for such a function . in my opinion it's easier to bounce the file directly to the hdd. else you have to take care of the filesize and to do a mechanism to record sound in a table and after to export it to the hdd.
let me know if it does the job the way you want.
see ya -
OR -
just open the help menu, and look for a sampler,
cut and paste the sampler into one of your own patches, and load the sample into that.
voila! -
Or-
you could buy a s6000 sampler akai.
just kiddin...
as hardoff said (in a way...) you should have a look at the audio exemples folder in the doc folder. look for all patch named sampler.