Hey hey,
I would like to save an ftable to an audiofile. ftaudio is almost perfect. But none of the opcodes that I can find allow you to specify the samplerate of the resulting output file. I'm not looking for resampling, just a different header. So if the ftable in question has 32768 samples then that amount of samples should be written, only the file header should specify a different samplerate.
This is part of a UDO, so I won't have control, in advance, of the orchestra sample rate and even so, for good reasons the audio output might differ from the desired format here.
hmm -
i don't think there is any possibility in csound to write an audio file in a different sample rate than the one in the header of the csd file.
it be fout, or the -o myfile.wav option.
i don't know why it is important for you to have a particular sample rate in this saved table, but the only option which comes in my mind is to start another csound process (with the system opcode) which does it. but this looks awkward.
perhaps i overlooked a possibility, curious to know how you can solve it -
joachim
Hi Joachim,
thanks for your reply, albeit a confirmation of my suspicion.
The sample rate is necessary since the saved file is used as a data format to be loaded/imported by external hardware/software and some of the moduels in question come with strict limits, being low in CPU and memory, thus having a simple firmware. I will have to ponder that. an external Csound process might be the only viable solution, as long as I want to keep it purely Csound.