[Csnd] Save an ftable to audiofile with samplerate control
Date | 2024-02-22 18:49 |
From | "Jeanette C." |
Subject | [Csnd] Save an ftable to audiofile with samplerate control |
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. Any help would be very much appreciated. Thanks and best wishes, Jeanette -- * Website: http://juliencoder.de - for summer is a state of sound * Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g * Audiobombs: https://www.audiobombs.com/users/jeanette_c * GitHub: https://github.com/jeanette-c But now I'm stronger than yesterday <3 (Britney Spears) Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here |
Date | 2024-02-22 19:09 |
From | joachim heintz |
Subject | Re: [Csnd] Save an ftable to audiofile with samplerate control |
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 On 22/02/2024 19:49, Jeanette C. wrote: > 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. > > Any help would be very much appreciated. > > Thanks and best wishes, > > Jeanette > Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here |
Date | 2024-02-22 19:19 |
From | "Jeanette C." |
Subject | Re: [Csnd] Save an ftable to audiofile with samplerate control |
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. Best wishes and thanks again, Jeanette Feb 22 2024, joachim heintz has written: > 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 > > > On 22/02/2024 19:49, Jeanette C. wrote: >> 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. >> >> Any help would be very much appreciated. >> >> Thanks and best wishes, >> >> Jeanette >> > > Csound mailing list > Csound@listserv.heanet.ie > https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND > Send bugs reports to > https://github.com/csound/csound/issues > Discussions of bugs and features can be posted here > > -- * Website: http://juliencoder.de - for summer is a state of sound * Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g * Audiobombs: https://www.audiobombs.com/users/jeanette_c * GitHub: https://github.com/jeanette-c But now I'm stronger than yesterday <3 (Britney Spears) Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here |