Quantcast

[Csnd] variable rate table writing

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Csnd] variable rate table writing

kghongaku
hey csound friends.

   i've been. trying to write a rate audio to tables at varing speeds.
i've been using tabw and phasor, but i'm noticing that when i write at
speeds < 1, the end of the previous block gets written over by the next
write. is there a way (or an opcode)  to scale the block of audio in
anticipation of the next write being somewhere in the middle of the
current. conversely, is there a table writing opcode that can stretch a
block of audio and write it across multiple blocks if i were to want to
write at speeds greater than 1?

k.

Csound mailing list
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Csnd] variable rate table writing

Oeyvind Brandtsegg-3
Hi Kelly,
It sounds as if you need to make an intermediate buffer for the audio, then you can do those things easily.
The audio block of an a-rate signal "as is" will always be ksmps worth of audio samples, so it is hard to do read/write speed modifications directly with it. If you write it to an array or table, ksmps samples at each k-pass, then you have a buffer you can read from at any speed. You can for example iterate over all samples in a 10-second buffer all within one k-pass, or read them slowly one by one. If it is a continuous process, you could make the intermediate buffer circular, so that it will always contain the most recent N seconds of audio.

2017-05-13 10:02 GMT-07:00 Kelly Hirai <[hidden email]>:
hey csound friends.

   i've been. trying to write a rate audio to tables at varing speeds.
i've been using tabw and phasor, but i'm noticing that when i write at
speeds < 1, the end of the previous block gets written over by the next
write. is there a way (or an opcode)  to scale the block of audio in
anticipation of the next write being somewhere in the middle of the
current. conversely, is there a table writing opcode that can stretch a
block of audio and write it across multiple blocks if i were to want to
write at speeds greater than 1?

k.

Csound mailing list
[hidden email]
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



--
Csound mailing list [hidden email] 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
Loading...