[Csnd] Resampling

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[Csnd] Resampling

eddyc
Hi,

What is the best way to resample audio with Csound? Is there an available opcode, also is it possible to set sample rate on a per instrument basis.
Thanks
Ed
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
|

Re: [Csnd] Resampling

Steven Yi
Not my area of expertise, but diskin2 has sinc interpolation as an
option to resample to sr. Is that the kind of thing you're looking
for, resampling from a sound file, or are you looking to take a table
of data and resample in memory to another table?  (Or something else?)

There is no sample-rate per instrument.  It's come up for discussion
before but we never made any decisions on how to implement.  Perhaps
drawing up a set of requirements and collaborating on a proposed
syntax/set of opcodes/etc. would get the ball rolling. (Probably
should be done in CS7.)

On Wed, Apr 4, 2018 at 5:02 AM, Edward Costello <[hidden email]> wrote:

> Hi,
>
> What is the best way to resample audio with Csound? Is there an available opcode, also is it possible to set sample rate on a per instrument basis.
> Thanks
> Ed
> 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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] Resampling

jpff
In reply to this post by eddyc
I always use src_conv on audio files that need resampling.  For on-the-fly resampling I think diskin2 is all we have got.  It might be nice to have an opcode but the obvious way has licencing problems

⁣Sent from TypeApp ​

On Apr 4, 2018, 10:03, at 10:03, Edward Costello <[hidden email]> wrote:

>Hi,
>
>What is the best way to resample audio with Csound? Is there an
>available opcode, also is it possible to set sample rate on a per
>instrument basis.
>Thanks
>Ed
>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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] Resampling

eddyc
@Steven, I’ve implemented an opcode for tracking formants in audio files on a per sample basis, unfortunately it’s very processor intensive so I would like to run it at a lower sample rate (11025) so I can do so in realtime. However, I would also like to take the formant outputs from that opcode and send them to an instrument running at a better sample rate (44100) and have that instrument synthesise the audio.
@Steven & John ff, it seems that libsamplerate can resample audio in a streaming fashion. This could be used to convert sample rates on the fly when running instruments at different rates, it’s 2-clause BSD license, does that interfere with the LGPL? Also I suppose it would add another dependency.
Thanks
Ed

> On 4 Apr 2018, at 13:08, John ff <[hidden email]> wrote:
>
> I always use src_conv on audio files that need resampling.  For on-the-fly resampling I think diskin2 is all we have got.  It might be nice to have an opcode but the obvious way has licencing problems
>
> ⁣Sent from TypeApp ​
>
> On Apr 4, 2018, 10:03, at 10:03, Edward Costello <[hidden email]> wrote:
>> Hi,
>>
>> What is the best way to resample audio with Csound? Is there an
>> available opcode, also is it possible to set sample rate on a per
>> instrument basis.
>> Thanks
>> Ed
>> 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

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
|

Re: [Csnd] Resampling

jpff
All the sources of libsamplerate I have are GPL2 or later

On Wed, 4 Apr 2018, Edward Costello wrote:

> @Steven, I’ve implemented an opcode for tracking formants in audio files on a per sample basis, unfortunately it’s very processor intensive so I would like to run it at a lower sample rate (11025) so I can do so in realtime. However, I would also like to take the formant outputs from that opcode and send them to an instrument running at a better sample rate (44100) and have that instrument synthesise the audio.
> @Steven & John ff, it seems that libsamplerate can resample audio in a streaming fashion. This could be used to convert sample rates on the fly when running instruments at different rates, it’s 2-clause BSD license, does that interfere with the LGPL? Also I suppose it would add another dependency.
> Thanks
> Ed
>
>> On 4 Apr 2018, at 13:08, John ff <[hidden email]> wrote:
>>
>> I always use src_conv on audio files that need resampling.  For on-the-fly resampling I think diskin2 is all we have got.  It might be nice to have an opcode but the obvious way has licencing problems
>>
>> ⁣Sent from TypeApp ​
>>
>> On Apr 4, 2018, 10:03, at 10:03, Edward Costello <[hidden email]> wrote:
>>> Hi,
>>>
>>> What is the best way to resample audio with Csound? Is there an
>>> available opcode, also is it possible to set sample rate on a per
>>> instrument basis.
>>> Thanks
>>> Ed
>>> 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
>
> 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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] Resampling

jpff
I see that there is a later version than 0.1.8 that coes with openSuSE.
How common is 0.1.9?  That could make src_conv easier too

More to do....

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