Reading "future" audio file frames beyond ksmps
| Date | 2016-03-07 14:36 |
| From | chensokolovsky |
| Subject | Reading "future" audio file frames beyond ksmps |
Hi,
Is there a way to grab audio frames from a file beyond the k-rate?
For example: to trigger an instrument that reads a file from disk, but
instead of just getting the k number of frames on each processing cycle from
the current file location, somehow send the remaining frames ("future
frames") of the file (or, say, ksmps * (float)someFactor frames) to an audio
output channel, or some other audio output bus / structure? The resulting
buffer would of course be longer than the k rate, and will work as a method
to "look ahead" at the output.
Thanks,
Chen
--
View this message in context: http://csound.1045644.n5.nabble.com/Reading-future-audio-file-frames-beyond-ksmps-tp5747710.html
Sent from the Csound - General mailing list archive at Nabble.com.
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 | 2016-03-07 18:28 |
| From | Oeyvind Brandtsegg |
| Subject | Re: Reading "future" audio file frames beyond ksmps |
Hi Chen, For reading a sound file in this manner you can use a k-rate loop and transfer the audio data to a table. Depending on your use case, you may also just load the whole file directly to a table at init (gen 01), and read the frame you want from there(?) 2016-03-07 15:36 GMT+01:00 chensokolovsky |
| Date | 2016-03-07 21:50 |
| From | chensokolovsky |
| Subject | Re: Reading "future" audio file frames beyond ksmps |
Thanks!
So I can read the full file into the f table.
Is there a way to either:
A. Send the full table to a software bus? Something like chnset of an asig
but getting more samples than the k rate.
B. Send the pointer to the f table first sample so I can read frames outside
of csound: pointer[sampleNumber]
Chen
--
View this message in context: http://csound.1045644.n5.nabble.com/Reading-future-audio-file-frames-beyond-ksmps-tp5747710p5747737.html
Sent from the Csound - General mailing list archive at Nabble.com.
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 | 2016-03-08 08:14 |
| From | Oeyvind Brandtsegg |
| Subject | Re: Reading "future" audio file frames beyond ksmps |
I think method B is the easiest, you could use the API function csoundTableGet() (https://csound.github.io/docs/api/group__TABLE.html) 2016-03-07 22:50 GMT+01:00 chensokolovsky |
| Date | 2016-03-08 09:13 |
| From | chensokolovsky |
| Subject | Re: Reading "future" audio file frames beyond ksmps |
Thank you very much Oeyvind. I'll give it a shot.
--
View this message in context: http://csound.1045644.n5.nabble.com/Reading-future-audio-file-frames-beyond-ksmps-tp5747710p5747750.html
Sent from the Csound - General mailing list archive at Nabble.com.
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 |