Csound Csound-dev Csound-tekno Search About

PaulStretch in Csound?

Date2016-04-24 17:53
FromPaul Batchelor
SubjectPaulStretch in Csound?
Hello!

Yesterday, I managed to write my own C implementation of PaulStretch based off the Python commandline implementation. It can be found in the "dev" branch of Soundpipe:

https://github.com/PaulBatchelor/Soundpipe/blob/dev/modules/paulstretch.c

Here is a really small C example using my Soundpipe library:

https://github.com/PaulBatchelor/Soundpipe/blob/dev/examples/ex_paulstretch.c

My implementation takes something analogous to an ftable and then "stretches" it out.

I think it would be neat to turn this into Csound Opcode! It would also be a fun experience for me, as I've never written an opcode before.

The one complication that I see would be in the FFT library used. As far as I can see, the internal Csound FFT algorithm only works with powers of two. Paulstretch needs an FFT algorithm where you can have large arbitrary FFT sizes (you specify window size in seconds). For my implementation, I am using a small BSD licensed FFT library called KissFFT, which could be dropped in along with the paulstretch code. Would that be an okay solution?

Let me know what you guys think of this!

-P
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

Date2016-04-24 18:35
FromVictor Lazzarini
SubjectRe: PaulStretch in Csound?
There is an FFT implementation in Csound for non power of two, you can try using that.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 24 Apr 2016, at 17:53, Paul Batchelor <ralphbluecoat@GMAIL.COM> wrote:

Hello!

Yesterday, I managed to write my own C implementation of PaulStretch based off the Python commandline implementation. It can be found in the "dev" branch of Soundpipe:

https://github.com/PaulBatchelor/Soundpipe/blob/dev/modules/paulstretch.c

Here is a really small C example using my Soundpipe library:

https://github.com/PaulBatchelor/Soundpipe/blob/dev/examples/ex_paulstretch.c

My implementation takes something analogous to an ftable and then "stretches" it out.

I think it would be neat to turn this into Csound Opcode! It would also be a fun experience for me, as I've never written an opcode before.

The one complication that I see would be in the FFT library used. As far as I can see, the internal Csound FFT algorithm only works with powers of two. Paulstretch needs an FFT algorithm where you can have large arbitrary FFT sizes (you specify window size in seconds). For my implementation, I am using a small BSD licensed FFT library called KissFFT, which could be dropped in along with the paulstretch code. Would that be an okay solution?

Let me know what you guys think of this!

-P
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

Date2016-04-24 18:43
FromVictor Lazzarini
SubjectRe: PaulStretch in Csound?
NB: it's in OOps/mxfft.c

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 24 Apr 2016, at 18:35, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:

There is an FFT implementation in Csound for non power of two, you can try using that.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 24 Apr 2016, at 17:53, Paul Batchelor <ralphbluecoat@GMAIL.COM> wrote:

Hello!

Yesterday, I managed to write my own C implementation of PaulStretch based off the Python commandline implementation. It can be found in the "dev" branch of Soundpipe:

https://github.com/PaulBatchelor/Soundpipe/blob/dev/modules/paulstretch.c

Here is a really small C example using my Soundpipe library:

https://github.com/PaulBatchelor/Soundpipe/blob/dev/examples/ex_paulstretch.c

My implementation takes something analogous to an ftable and then "stretches" it out.

I think it would be neat to turn this into Csound Opcode! It would also be a fun experience for me, as I've never written an opcode before.

The one complication that I see would be in the FFT library used. As far as I can see, the internal Csound FFT algorithm only works with powers of two. Paulstretch needs an FFT algorithm where you can have large arbitrary FFT sizes (you specify window size in seconds). For my implementation, I am using a small BSD licensed FFT library called KissFFT, which could be dropped in along with the paulstretch code. Would that be an okay solution?

Let me know what you guys think of this!

-P
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
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

Date2016-04-24 21:03
Fromjoachim heintz
SubjectRe: PaulStretch in Csound?
hi paul -

i always thought it would be so nice to have paulstretch as csound 
opcode!  i even had on my list to write him (paulnasca.com) to ask 
whether he would not be willing to implement it as csound opcode (as he 
did for audacity).

so — great to hear you are about to do so!  in cases of problems, i 
think paul might be willing to assist.

cheers -
	joachim


On 24/04/16 18:53, Paul Batchelor wrote:
> Hello!
>
> Yesterday, I managed to write my own C implementation of PaulStretch
> based off the Python commandline implementation. It can be found in the
> "dev" branch of Soundpipe:
>
> https://github.com/PaulBatchelor/Soundpipe/blob/dev/modules/paulstretch.c
>
> Here is a really small C example using my Soundpipe library:
>
> https://github.com/PaulBatchelor/Soundpipe/blob/dev/examples/ex_paulstretch.c
>
> My implementation takes something analogous to an ftable and then
> "stretches" it out.
>
> I think it would be neat to turn this into Csound Opcode! It would also
> be a fun experience for me, as I've never written an opcode before.
>
> The one complication that I see would be in the FFT library used. As far
> as I can see, the internal Csound FFT algorithm only works with powers
> of two. Paulstretch needs an FFT algorithm where you can have large
> arbitrary FFT sizes (you specify window size in seconds). For my
> implementation, I am using a small BSD licensed FFT library called
> KissFFT, which could be dropped in along with the paulstretch code.
> Would that be an okay solution?
>
> Let me know what you guys think of this!
>
> -P
> 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

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

Date2016-04-25 03:58
FromPaul Batchelor
SubjectRe: PaulStretch in Csound?
Victor: thanks for pointing me in the right direction. Is there an upper limit for how big the FFT size can be?

Joachim: I'll be sure to send you code your way as soon as I have something working. I'll be sure to contact paul if I run into any issues.

-P

On Sun, Apr 24, 2016 at 1:03 PM, joachim heintz <jh@joachimheintz.de> wrote:
hi paul -

i always thought it would be so nice to have paulstretch as csound opcode!  i even had on my list to write him (paulnasca.com) to ask whether he would not be willing to implement it as csound opcode (as he did for audacity).

so — great to hear you are about to do so!  in cases of problems, i think paul might be willing to assist.

cheers -
        joachim



On 24/04/16 18:53, Paul Batchelor wrote:
Hello!

Yesterday, I managed to write my own C implementation of PaulStretch
based off the Python commandline implementation. It can be found in the
"dev" branch of Soundpipe:

https://github.com/PaulBatchelor/Soundpipe/blob/dev/modules/paulstretch.c

Here is a really small C example using my Soundpipe library:

https://github.com/PaulBatchelor/Soundpipe/blob/dev/examples/ex_paulstretch.c

My implementation takes something analogous to an ftable and then
"stretches" it out.

I think it would be neat to turn this into Csound Opcode! It would also
be a fun experience for me, as I've never written an opcode before.

The one complication that I see would be in the FFT library used. As far
as I can see, the internal Csound FFT algorithm only works with powers
of two. Paulstretch needs an FFT algorithm where you can have large
arbitrary FFT sizes (you specify window size in seconds). For my
implementation, I am using a small BSD licensed FFT library called
KissFFT, which could be dropped in along with the paulstretch code.
Would that be an okay solution?

Let me know what you guys think of this!

-P
Csound mailing list Csound@listserv.heanet.ie
<mailto: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

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

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

Date2016-04-25 06:25
FromVictor Lazzarini
SubjectRe: PaulStretch in Csound?
I don't think so. 

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 25 Apr 2016, at 03:58, Paul Batchelor <ralphbluecoat@GMAIL.COM> wrote:

Victor: thanks for pointing me in the right direction. Is there an upper limit for how big the FFT size can be?

Joachim: I'll be sure to send you code your way as soon as I have something working. I'll be sure to contact paul if I run into any issues.

-P

On Sun, Apr 24, 2016 at 1:03 PM, joachim heintz <jh@joachimheintz.de> wrote:
hi paul -

i always thought it would be so nice to have paulstretch as csound opcode!  i even had on my list to write him (paulnasca.com) to ask whether he would not be willing to implement it as csound opcode (as he did for audacity).

so — great to hear you are about to do so!  in cases of problems, i think paul might be willing to assist.

cheers -
        joachim



On 24/04/16 18:53, Paul Batchelor wrote:
Hello!

Yesterday, I managed to write my own C implementation of PaulStretch
based off the Python commandline implementation. It can be found in the
"dev" branch of Soundpipe:

https://github.com/PaulBatchelor/Soundpipe/blob/dev/modules/paulstretch.c

Here is a really small C example using my Soundpipe library:

https://github.com/PaulBatchelor/Soundpipe/blob/dev/examples/ex_paulstretch.c

My implementation takes something analogous to an ftable and then
"stretches" it out.

I think it would be neat to turn this into Csound Opcode! It would also
be a fun experience for me, as I've never written an opcode before.

The one complication that I see would be in the FFT library used. As far
as I can see, the internal Csound FFT algorithm only works with powers
of two. Paulstretch needs an FFT algorithm where you can have large
arbitrary FFT sizes (you specify window size in seconds). For my
implementation, I am using a small BSD licensed FFT library called
KissFFT, which could be dropped in along with the paulstretch code.
Would that be an okay solution?

Let me know what you guys think of this!

-P
Csound mailing list Csound@listserv.heanet.ie
<mailto: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

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

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

Date2016-04-30 07:45
FromPaul Batchelor
SubjectRe: PaulStretch in Csound?
Attachmentstest.csd  
Update:

I have successfully created an initial implementation of paulstretch using the internal FFT library. It can be found in my fork of Csound:

https://github.com/paulbatchelor/csound

Two things I'd like to figure out before I make a PR:

- How to use deferred ftables, if possible
- More defensive coding with memory allocation
- Try to solve the valgrind errors that I'm getting


I've also attached a test CSD, in case someone should want to try it out...

-P

On Sun, Apr 24, 2016 at 10:25 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
I don't think so. 

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 25 Apr 2016, at 03:58, Paul Batchelor <ralphbluecoat@GMAIL.COM> wrote:

Victor: thanks for pointing me in the right direction. Is there an upper limit for how big the FFT size can be?

Joachim: I'll be sure to send you code your way as soon as I have something working. I'll be sure to contact paul if I run into any issues.

-P

On Sun, Apr 24, 2016 at 1:03 PM, joachim heintz <jh@joachimheintz.de> wrote:
hi paul -

i always thought it would be so nice to have paulstretch as csound opcode!  i even had on my list to write him (paulnasca.com) to ask whether he would not be willing to implement it as csound opcode (as he did for audacity).

so — great to hear you are about to do so!  in cases of problems, i think paul might be willing to assist.

cheers -
        joachim



On 24/04/16 18:53, Paul Batchelor wrote:
Hello!

Yesterday, I managed to write my own C implementation of PaulStretch
based off the Python commandline implementation. It can be found in the
"dev" branch of Soundpipe:

https://github.com/PaulBatchelor/Soundpipe/blob/dev/modules/paulstretch.c

Here is a really small C example using my Soundpipe library:

https://github.com/PaulBatchelor/Soundpipe/blob/dev/examples/ex_paulstretch.c

My implementation takes something analogous to an ftable and then
"stretches" it out.

I think it would be neat to turn this into Csound Opcode! It would also
be a fun experience for me, as I've never written an opcode before.

The one complication that I see would be in the FFT library used. As far
as I can see, the internal Csound FFT algorithm only works with powers
of two. Paulstretch needs an FFT algorithm where you can have large
arbitrary FFT sizes (you specify window size in seconds). For my
implementation, I am using a small BSD licensed FFT library called
KissFFT, which could be dropped in along with the paulstretch code.
Would that be an okay solution?

Let me know what you guys think of this!

-P
Csound mailing list Csound@listserv.heanet.ie
<mailto: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

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

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
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

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

Date2016-04-30 07:58
FromVictor Lazzarini
SubjectRe: PaulStretch in Csound?
Great:

1) Ftnp2Find() gives you access to tables of any size
2) Memory allocation: use AuxAlloc() as you
have probably seen in other Csound code

regards

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 30 Apr 2016, at 07:45, Paul Batchelor <ralphbluecoat@GMAIL.COM> wrote:

Update:

I have successfully created an initial implementation of paulstretch using the internal FFT library. It can be found in my fork of Csound:

https://github.com/paulbatchelor/csound

Two things I'd like to figure out before I make a PR:

- How to use deferred ftables, if possible
- More defensive coding with memory allocation
- Try to solve the valgrind errors that I'm getting


I've also attached a test CSD, in case someone should want to try it out...

-P

On Sun, Apr 24, 2016 at 10:25 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
I don't think so. 

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 25 Apr 2016, at 03:58, Paul Batchelor <ralphbluecoat@GMAIL.COM> wrote:

Victor: thanks for pointing me in the right direction. Is there an upper limit for how big the FFT size can be?

Joachim: I'll be sure to send you code your way as soon as I have something working. I'll be sure to contact paul if I run into any issues.

-P

On Sun, Apr 24, 2016 at 1:03 PM, joachim heintz <jh@joachimheintz.de> wrote:
hi paul -

i always thought it would be so nice to have paulstretch as csound opcode!  i even had on my list to write him (paulnasca.com) to ask whether he would not be willing to implement it as csound opcode (as he did for audacity).

so — great to hear you are about to do so!  in cases of problems, i think paul might be willing to assist.

cheers -
        joachim



On 24/04/16 18:53, Paul Batchelor wrote:
Hello!

Yesterday, I managed to write my own C implementation of PaulStretch
based off the Python commandline implementation. It can be found in the
"dev" branch of Soundpipe:

https://github.com/PaulBatchelor/Soundpipe/blob/dev/modules/paulstretch.c

Here is a really small C example using my Soundpipe library:

https://github.com/PaulBatchelor/Soundpipe/blob/dev/examples/ex_paulstretch.c

My implementation takes something analogous to an ftable and then
"stretches" it out.

I think it would be neat to turn this into Csound Opcode! It would also
be a fun experience for me, as I've never written an opcode before.

The one complication that I see would be in the FFT library used. As far
as I can see, the internal Csound FFT algorithm only works with powers
of two. Paulstretch needs an FFT algorithm where you can have large
arbitrary FFT sizes (you specify window size in seconds). For my
implementation, I am using a small BSD licensed FFT library called
KissFFT, which could be dropped in along with the paulstretch code.
Would that be an okay solution?

Let me know what you guys think of this!

-P
Csound mailing list Csound@listserv.heanet.ie
<mailto: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

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

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
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

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
<test.csd>

Date2016-04-30 18:46
FromPaul Batchelor
SubjectRe: PaulStretch in Csound?
Attachmentsout.log  
Ftnp2Find works as intended.

I'm still getting Valgrind errors. I think it might be related to the FFT algorithms in mxfft.c, but I'm not sure.





On Fri, Apr 29, 2016 at 11:58 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Great:

1) Ftnp2Find() gives you access to tables of any size
2) Memory allocation: use AuxAlloc() as you
have probably seen in other Csound code

regards

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 30 Apr 2016, at 07:45, Paul Batchelor <ralphbluecoat@GMAIL.COM> wrote:

Update:

I have successfully created an initial implementation of paulstretch using the internal FFT library. It can be found in my fork of Csound:

https://github.com/paulbatchelor/csound

Two things I'd like to figure out before I make a PR:

- How to use deferred ftables, if possible
- More defensive coding with memory allocation
- Try to solve the valgrind errors that I'm getting


I've also attached a test CSD, in case someone should want to try it out...

-P

On Sun, Apr 24, 2016 at 10:25 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
I don't think so. 

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 25 Apr 2016, at 03:58, Paul Batchelor <ralphbluecoat@GMAIL.COM> wrote:

Victor: thanks for pointing me in the right direction. Is there an upper limit for how big the FFT size can be?

Joachim: I'll be sure to send you code your way as soon as I have something working. I'll be sure to contact paul if I run into any issues.

-P

On Sun, Apr 24, 2016 at 1:03 PM, joachim heintz <jh@joachimheintz.de> wrote:
hi paul -

i always thought it would be so nice to have paulstretch as csound opcode!  i even had on my list to write him (paulnasca.com) to ask whether he would not be willing to implement it as csound opcode (as he did for audacity).

so — great to hear you are about to do so!  in cases of problems, i think paul might be willing to assist.

cheers -
        joachim



On 24/04/16 18:53, Paul Batchelor wrote:
Hello!

Yesterday, I managed to write my own C implementation of PaulStretch
based off the Python commandline implementation. It can be found in the
"dev" branch of Soundpipe:

https://github.com/PaulBatchelor/Soundpipe/blob/dev/modules/paulstretch.c

Here is a really small C example using my Soundpipe library:

https://github.com/PaulBatchelor/Soundpipe/blob/dev/examples/ex_paulstretch.c

My implementation takes something analogous to an ftable and then
"stretches" it out.

I think it would be neat to turn this into Csound Opcode! It would also
be a fun experience for me, as I've never written an opcode before.

The one complication that I see would be in the FFT library used. As far
as I can see, the internal Csound FFT algorithm only works with powers
of two. Paulstretch needs an FFT algorithm where you can have large
arbitrary FFT sizes (you specify window size in seconds). For my
implementation, I am using a small BSD licensed FFT library called
KissFFT, which could be dropped in along with the paulstretch code.
Would that be an okay solution?

Let me know what you guys think of this!

-P
Csound mailing list Csound@listserv.heanet.ie
<mailto: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

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

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
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

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
<test.csd>
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

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

Date2016-04-30 18:55
FromJohn
SubjectRe: PaulStretch in Csound?

Any chance of seeing what valgrind says?

Sent from TypeApp

On 30 Apr 2016, at 18:47, Paul Batchelor <ralphbluecoat@GMAIL.COM> wrote:
Ftnp2Find works as intended.

I'm still getting Valgrind errors. I think it might be related to the FFT algorithms in mxfft.c, but I'm not sure.





On Fri, Apr 29, 2016 at 11:58 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Great:

1) Ftnp2Find() gives you access to tables of any size
2) Memory allocation: use AuxAlloc() as you
have probably seen in other Csound code

regards

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 30 Apr 2016, at 07:45, Paul Batchelor <ralphbluecoat@GMAIL.COM> wrote:

Update:

I have successfully created an initial implementation of paulstretch using the internal FFT library. It can be found in my fork of Csound:

https://github.com/paulbatchelor/csound

Two things I'd like to figure out before I make a PR:

- How to use deferred ftables, if possible
- More defensive coding with memory allocation
- Try to solve the valgrind errors that I'm getting


I've also attached a test CSD, in case someone shoul d want to try it out...

-P

On Sun, Apr 24, 2016 at 10:25 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
I don't think so. 

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 25 Apr 2016, at 03:58, Paul Batchelor <ralphbluecoat@GMAIL.COM> wrote:

Victor: thanks for pointing me in the right direction. Is there an upper limit for how big the FFT size can be?

Joachim: I'll be sure to send you code your way as soon as I have something working. I'll be sure to contact paul if I run into any issues.

-P

On Sun, Apr 24, 2016 at 1:03 PM, joachim heintz <jh@joachimheintz.de> wrote:
hi paul -

i always thought it would be so nice to have paulstretch as csound opcode!  i even had on my list to write him (paulnasca.com) to ask whether he would not be willing to implement it as csound opcode (as he did for audacity).

so — great to hear you are about to do so!  in cases of problems, i think paul might be willing to assist.

cheers -
        joachim



On 24/04/16 18:53, Paul Batchelor wrote:
Hello!

Yesterday, I managed to write my own C implementation of PaulStretch
based off the Python commandline implementation. It can be found in the
"dev" branch of Soundpipe:

https://github.com/PaulBatchelor/Soundpipe/blob/dev/modules/paulstretch.c

Here is a really small C example using my Soundpipe library:

https://github.com/PaulBatchelor/Soundpipe/blob/dev/examples/ex_paulstretch.c

My implementation takes something analogous to an ftable and then
"stretches" it out.

I think it would be neat to turn this into Csound Opcode! It would also
be a fun experience for me, as I've never written an opcode before.

The one complication that I see would be in the FFT library used. As far
as I can see, the internal Csound FFT algorithm only works with powers
of two. Paulstretch needs an FFT algorithm where you can have large
arbitrary FFT sizes (you specify window size in seconds). For my
implementation, I am using a small BSD licensed FFT library called
KissFFT, which could be dropped in along with the paulstretch code.
Would that be an okay solution?

Let me know what you guys think of this!

-P
Csound mailing list Csound@listserv.heanet.ie
<mailto: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

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

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
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

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
<test.csd>
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

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

Date2016-04-30 19:12
FromPaul Batchelor
SubjectRe: PaulStretch in Csound?
I posted the log above. But I fixed it. Just a misallocation on my end.

-P

On Sat, Apr 30, 2016 at 10:55 AM, John <jpff@codemist.co.uk> wrote:

Any chance of seeing what valgrind says?

Sent from TypeApp

On 30 Apr 2016, at 18:47, Paul Batchelor <ralphbluecoat@GMAIL.COM> wrote:
Ftnp2Find works as intended.

I'm still getting Valgrind errors. I think it might be related to the FFT algorithms in mxfft.c, but I'm not sure.





On Fri, Apr 29, 2016 at 11:58 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Great:

1) Ftnp2Find() gives you access to tables of any size
2) Memory allocation: use AuxAlloc() as you
have probably seen in other Csound code

regards

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 30 Apr 2016, at 07:45, Paul Batchelor <ralphbluecoat@GMAIL.COM> wrote:

Update:

I have successfully created an initial implementation of paulstretch using the internal FFT library. It can be found in my fork of Csound:

https://github.com/paulbatchelor/csound

Two things I'd like to figure out before I make a PR:

- How to use deferred ftables, if possible
- More defensive coding with memory allocation
- Try to solve the valgrind errors that I'm getting


I've also attached a test CSD, in case someone should want to try it out...

-P

On Sun, Apr 24, 2016 at 10:25 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
I don't think so. 

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 25 Apr 2016, at 03:58, Paul Batchelor <ralphbluecoat@GMAIL.COM> wrote:

Victor: thanks for pointing me in the right direction. Is there an upper limit for how big the FFT size can be?

Joachim: I'll be sure to send you code your way as soon as I have something working. I'll be sure to contact paul if I run into any issues.

-P

On Sun, Apr 24, 2016 at 1:03 PM, joachim heintz <jh@joachimheintz.de> wrote:
hi paul -

i always thought it would be so nice to have paulstretch as csound opcode!  i even had on my list to write him (paulnasca.com) to ask whether he would not be willing to implement it as csound opcode (as he did for audacity).

so — great to hear you are about to do so!  in cases of problems, i think paul might be willing to assist.

cheers -
        joachim



On 24/04/16 18:53, Paul Batchelor wrote:
Hello!

Yesterday, I managed to write my own C implementation of PaulStretch
based off the Python commandline implementation. It can be found in the
"dev" branch of Soundpipe:

https://github.com/PaulBatchelor/Soundpipe/blob/dev/modules/paulstretch.c

Here is a really small C example using my Soundpipe library:

https://github.com/PaulBatchelor/Soundpipe/blob/dev/examples/ex_paulstretch.c

My implementation takes something analogous to an ftable and then
"stretches" it out.

I think it would be neat to turn this into Csound Opcode! It would also
be a fun experience for me, as I've never written an opcode before.

The one complication that I see would be in the FFT library used. As far
as I can see, the internal Csound FFT algorithm only works with powers
of two. Paulstretch needs an FFT algorithm where you can have large
arbitrary FFT sizes (you specify window size in seconds). For my
implementation, I am using a small BSD licensed FFT library called
KissFFT, which could be dropped in along with the paulstretch code.
Would that be an okay solution?

Let me know what you guys think of this!

-P
Csound mailing list Csound@listserv.heanet.ie
<mailto: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

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

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
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

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
<test.csd>
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

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
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

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

Date2016-04-30 19:38
FromDave Seidel
SubjectRe: PaulStretch in Csound?
I'll be very interested in trying this out, Paul. Thanks for working on it!

Two questions:
- Will it be possible (as it is in the original Paulstretch program) to contract the time period (i.e., by using values smaller than zero for the stretch factor)?
- Will the new opcode have the same windowing options as the original?
- Will the new opcode take an fsig as input, and output a new fsig?

Thanks,
Dave

On Sat, Apr 30, 2016 at 2:12 PM, Paul Batchelor <ralphbluecoat@gmail.com> wrote:
I posted the log above. But I fixed it. Just a misallocation on my end.

-P

On Sat, Apr 30, 2016 at 10:55 AM, John <jpff@codemist.co.uk> wrote:

Any chance of seeing what valgrind says?

Sent from TypeApp

On 30 Apr 2016, at 18:47, Paul Batchelor <ralphbluecoat@GMAIL.COM> wrote:
Ftnp2Find works as intended.

I'm still getting Valgrind errors. I think it might be related to the FFT algorithms in mxfft.c, but I'm not sure.





On Fri, Apr 29, 2016 at 11:58 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Great:

1) Ftnp2Find() gives you access to tables of any size
2) Memory allocation: use AuxAlloc() as you
have probably seen in other Csound code

regards

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 30 Apr 2016, at 07:45, Paul Batchelor <ralphbluecoat@GMAIL.COM> wrote:

Update:

I have successfully created an initial implementation of paulstretch using the internal FFT library. It can be found in my fork of Csound:

https://github.com/paulbatchelor/csound

Two things I'd like to figure out before I make a PR:

- How to use deferred ftables, if possible
- More defensive coding with memory allocation
- Try to solve the valgrind errors that I'm getting


I've also attached a test CSD, in case someone should want to try it out...

-P

On Sun, Apr 24, 2016 at 10:25 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
I don't think so. 

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 25 Apr 2016, at 03:58, Paul Batchelor <ralphbluecoat@GMAIL.COM> wrote:

Victor: thanks for pointing me in the right direction. Is there an upper limit for how big the FFT size can be?

Joachim: I'll be sure to send you code your way as soon as I have something working. I'll be sure to contact paul if I run into any issues.

-P

On Sun, Apr 24, 2016 at 1:03 PM, joachim heintz <jh@joachimheintz.de> wrote:
hi paul -

i always thought it would be so nice to have paulstretch as csound opcode!  i even had on my list to write him (paulnasca.com) to ask whether he would not be willing to implement it as csound opcode (as he did for audacity).

so — great to hear you are about to do so!  in cases of problems, i think paul might be willing to assist.

cheers -
        joachim



On 24/04/16 18:53, Paul Batchelor wrote:
Hello!

Yesterday, I managed to write my own C implementation of PaulStretch
based off the Python commandline implementation. It can be found in the
"dev" branch of Soundpipe:

https://github.com/PaulBatchelor/Soundpipe/blob/dev/modules/paulstretch.c

Here is a really small C example using my Soundpipe library:

https://github.com/PaulBatchelor/Soundpipe/blob/dev/examples/ex_paulstretch.c

My implementation takes something analogous to an ftable and then
"stretches" it out.

I think it would be neat to turn this into Csound Opcode! It would also
be a fun experience for me, as I've never written an opcode before.

The one complication that I see would be in the FFT library used. As far
as I can see, the internal Csound FFT algorithm only works with powers
of two. Paulstretch needs an FFT algorithm where you can have large
arbitrary FFT sizes (you specify window size in seconds). For my
implementation, I am using a small BSD licensed FFT library called
KissFFT, which could be dropped in along with the paulstretch code.
Would that be an okay solution?

Let me know what you guys think of this!

-P
Csound mailing list Csound@listserv.heanet.ie
<mailto: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

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

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
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

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
<test.csd>
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

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
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

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

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

Date2016-04-30 20:24
From"Dr. Richard Boulanger"
SubjectRe: PaulStretch in Csound?
Wonderful news Paul.  Can't wait to check it out.  Cool.

On Sat, Apr 30, 2016 at 2:38 PM, Dave Seidel <dave.seidel@gmail.com> wrote:
I'll be very interested in trying this out, Paul. Thanks for working on it!

Two questions:
- Will it be possible (as it is in the original Paulstretch program) to contract the time period (i.e., by using values smaller than zero for the stretch factor)?
- Will the new opcode have the same windowing options as the original?
- Will the new opcode take an fsig as input, and output a new fsig?

Thanks,
Dave

On Sat, Apr 30, 2016 at 2:12 PM, Paul Batchelor <ralphbluecoat@gmail.com> wrote:
I posted the log above. But I fixed it. Just a misallocation on my end.

-P

On Sat, Apr 30, 2016 at 10:55 AM, John <jpff@codemist.co.uk> wrote:

Any chance of seeing what valgrind says?

Sent from TypeApp

On 30 Apr 2016, at 18:47, Paul Batchelor <ralphbluecoat@GMAIL.COM> wrote:
Ftnp2Find works as intended.

I'm still getting Valgrind errors. I think it might be related to the FFT algorithms in mxfft.c, but I'm not sure.





On Fri, Apr 29, 2016 at 11:58 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Great:

1) Ftnp2Find() gives you access to tables of any size
2) Memory allocation: use AuxAlloc() as you
have probably seen in other Csound code

regards

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 30 Apr 2016, at 07:45, Paul Batchelor <ralphbluecoat@GMAIL.COM> wrote:

Update:

I have successfully created an initial implementation of paulstretch using the internal FFT library. It can be found in my fork of Csound:

https://github.com/paulbatchelor/csound

Two things I'd like to figure out before I make a PR:

- How to use deferred ftables, if possible
- More defensive coding with memory allocation
- Try to solve the valgrind errors that I'm getting


I've also attached a test CSD, in case someone should want to try it out...

-P

On Sun, Apr 24, 2016 at 10:25 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
I don't think so. 

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 25 Apr 2016, at 03:58, Paul Batchelor <ralphbluecoat@GMAIL.COM> wrote:

Victor: thanks for pointing me in the right direction. Is there an upper limit for how big the FFT size can be?

Joachim: I'll be sure to send you code your way as soon as I have something working. I'll be sure to contact paul if I run into any issues.

-P

On Sun, Apr 24, 2016 at 1:03 PM, joachim heintz <jh@joachimheintz.de> wrote:
hi paul -

i always thought it would be so nice to have paulstretch as csound opcode!  i even had on my list to write him (paulnasca.com) to ask whether he would not be willing to implement it as csound opcode (as he did for audacity).

so — great to hear you are about to do so!  in cases of problems, i think paul might be willing to assist.

cheers -
        joachim



On 24/04/16 18:53, Paul Batchelor wrote:
Hello!

Yesterday, I managed to write my own C implementation of PaulStretch
based off the Python commandline implementation. It can be found in the
"dev" branch of Soundpipe:

https://github.com/PaulBatchelor/Soundpipe/blob/dev/modules/paulstretch.c

Here is a really small C example using my Soundpipe library:

https://github.com/PaulBatchelor/Soundpipe/blob/dev/examples/ex_paulstretch.c

My implementation takes something analogous to an ftable and then
"stretches" it out.

I think it would be neat to turn this into Csound Opcode! It would also
be a fun experience for me, as I've never written an opcode before.

The one complication that I see would be in the FFT library used. As far
as I can see, the internal Csound FFT algorithm only works with powers
of two. Paulstretch needs an FFT algorithm where you can have large
arbitrary FFT sizes (you specify window size in seconds). For my
implementation, I am using a small BSD licensed FFT library called
KissFFT, which could be dropped in along with the paulstretch code.
Would that be an okay solution?

Let me know what you guys think of this!

-P
Csound mailing list Csound@listserv.heanet.ie
<mailto: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

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

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
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

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
<test.csd>
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

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
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

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

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



--
_____________________________________________
Dr. Richard Boulanger
Professor of Electronic Production and Design
Professional Writing and Music Technology Division
Berklee College of Music
______________________________________________
President of Boulanger Labs - http://boulangerlabs.com
Author & Editor of The Csound Book - http://mitpress.mit.edu/books/csound-book
Author & Editor of The Audio Programming Book - http://mitpress.mit.edu/books/audio-programming-book
______________________________________________
about: http://www.boulangerlabs.com/about/richardboulanger/
about: http://www.csounds.com/community/developers/dr-richard-boulanger/
music: http://www.csounds.com/community/developers/dr-richard-boulanger/dr-richard-boulanger-music/

______________________________________________
email: rboulanger@berklee.edu
facebook: https://www.facebook.com/richard.boulanger.58
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

Date2016-05-01 15:53
FromPaul Batchelor
SubjectRe: PaulStretch in Csound?
Two answers:

- I *think* you might be able to use values smaller than 1 to contract the time period. You wouldn't use values smaller than 0 though.
- This paulstretch opcode uses only a hanning window. This is the one used in the commandline version of paulstretch built using python, which I used for reference.
- This does not use the FFT type in Csound, it just spits out an a-rate signal.

-P

On Sat, Apr 30, 2016 at 12:24 PM, Dr. Richard Boulanger <rboulanger@berklee.edu> wrote:
Wonderful news Paul.  Can't wait to check it out.  Cool.

On Sat, Apr 30, 2016 at 2:38 PM, Dave Seidel <dave.seidel@gmail.com> wrote:
I'll be very interested in trying this out, Paul. Thanks for working on it!

Two questions:
- Will it be possible (as it is in the original Paulstretch program) to contract the time period (i.e., by using values smaller than zero for the stretch factor)?
- Will the new opcode have the same windowing options as the original?
- Will the new opcode take an fsig as input, and output a new fsig?

Thanks,
Dave

On Sat, Apr 30, 2016 at 2:12 PM, Paul Batchelor <ralphbluecoat@gmail.com> wrote:
I posted the log above. But I fixed it. Just a misallocation on my end.

-P

On Sat, Apr 30, 2016 at 10:55 AM, John <jpff@codemist.co.uk> wrote:

Any chance of seeing what valgrind says?

Sent from TypeApp

On 30 Apr 2016, at 18:47, Paul Batchelor <ralphbluecoat@GMAIL.COM> wrote:
Ftnp2Find works as intended.

I'm still getting Valgrind errors. I think it might be related to the FFT algorithms in mxfft.c, but I'm not sure.





On Fri, Apr 29, 2016 at 11:58 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Great:

1) Ftnp2Find() gives you access to tables of any size
2) Memory allocation: use AuxAlloc() as you
have probably seen in other Csound code

regards

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 30 Apr 2016, at 07:45, Paul Batchelor <ralphbluecoat@GMAIL.COM> wrote:

Update:

I have successfully created an initial implementation of paulstretch using the internal FFT library. It can be found in my fork of Csound:

https://github.com/paulbatchelor/csound

Two things I'd like to figure out before I make a PR:

- How to use deferred ftables, if possible
- More defensive coding with memory allocation
- Try to solve the valgrind errors that I'm getting


I've also attached a test CSD, in case someone should want to try it out...

-P

On Sun, Apr 24, 2016 at 10:25 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
I don't think so. 

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 25 Apr 2016, at 03:58, Paul Batchelor <ralphbluecoat@GMAIL.COM> wrote:

Victor: thanks for pointing me in the right direction. Is there an upper limit for how big the FFT size can be?

Joachim: I'll be sure to send you code your way as soon as I have something working. I'll be sure to contact paul if I run into any issues.

-P

On Sun, Apr 24, 2016 at 1:03 PM, joachim heintz <jh@joachimheintz.de> wrote:
hi paul -

i always thought it would be so nice to have paulstretch as csound opcode!  i even had on my list to write him (paulnasca.com) to ask whether he would not be willing to implement it as csound opcode (as he did for audacity).

so — great to hear you are about to do so!  in cases of problems, i think paul might be willing to assist.

cheers -
        joachim



On 24/04/16 18:53, Paul Batchelor wrote:
Hello!

Yesterday, I managed to write my own C implementation of PaulStretch
based off the Python commandline implementation. It can be found in the
"dev" branch of Soundpipe:

https://github.com/PaulBatchelor/Soundpipe/blob/dev/modules/paulstretch.c

Here is a really small C example using my Soundpipe library:

https://github.com/PaulBatchelor/Soundpipe/blob/dev/examples/ex_paulstretch.c

My implementation takes something analogous to an ftable and then
"stretches" it out.

I think it would be neat to turn this into Csound Opcode! It would also
be a fun experience for me, as I've never written an opcode before.

The one complication that I see would be in the FFT library used. As far
as I can see, the internal Csound FFT algorithm only works with powers
of two. Paulstretch needs an FFT algorithm where you can have large
arbitrary FFT sizes (you specify window size in seconds). For my
implementation, I am using a small BSD licensed FFT library called
KissFFT, which could be dropped in along with the paulstretch code.
Would that be an okay solution?

Let me know what you guys think of this!

-P
Csound mailing list Csound@listserv.heanet.ie
<mailto: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

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

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
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

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
<test.csd>
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

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
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

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

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



--
_____________________________________________
Dr. Richard Boulanger
Professor of Electronic Production and Design
Professional Writing and Music Technology Division
Berklee College of Music
______________________________________________
President of Boulanger Labs - http://boulangerlabs.com
Author & Editor of The Csound Book - http://mitpress.mit.edu/books/csound-book
Author & Editor of The Audio Programming Book - http://mitpress.mit.edu/books/audio-programming-book
______________________________________________
about: http://www.boulangerlabs.com/about/richardboulanger/
about: http://www.csounds.com/community/developers/dr-richard-boulanger/
music: http://www.csounds.com/community/developers/dr-richard-boulanger/dr-richard-boulanger-music/

______________________________________________
email: rboulanger@berklee.edu
facebook: https://www.facebook.com/richard.boulanger.58
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

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

Date2016-05-01 16:43
Fromjpff
SubjectRe: PaulStretch in Csound?
Is there a test program?


On Sun, 1 May 2016, Paul Batchelor wrote:

> Two answers:
> 
> - I *think* you might be able to use values smaller than 1 to contract the
> time period. You wouldn't use values smaller than 0 though.
> - This paulstretch opcode uses only a hanning window. This is the one used in
> the commandline version of paulstretch built using python, which I used for
> reference.
> - This does not use the FFT type in Csound, it just spits out an a-rate
> signal.
> 
> -P
> 
> On Sat, Apr 30, 2016 at 12:24 PM, Dr. Richard Boulanger
>  wrote:
>       Wonderful news Paul.  Can't wait to check it out.  Cool.
> 
> On Sat, Apr 30, 2016 at 2:38 PM, Dave Seidel 
> wrote:
>       I'll be very interested in trying this out, Paul. Thanks for
>       working on it!
> Two questions:
> - Will it be possible (as it is in the original Paulstretch
> program) to contract the time period (i.e., by using values
> smaller than zero for the stretch factor)?
> - Will the new opcode have the same windowing options as the
> original?
> - Will the new opcode take an fsig as input, and output a new
> fsig?
> 
> Thanks,
> Dave
> 
> On Sat, Apr 30, 2016 at 2:12 PM, Paul Batchelor
>  wrote:
>       I posted the log above. But I fixed it. Just a
>       misallocation on my end.
> 
> -P
> 
> On Sat, Apr 30, 2016 at 10:55 AM, John 
> wrote:
>
>       Any chance of seeing what valgrind says?
>
>       Sent from TypeApp
>
>       On 30 Apr 2016, at 18:47, Paul Batchelor
>        wrote:
>             Ftnp2Find works as intended.
> 
> I'm still getting Valgrind errors. I think it
> might be related to the FFT algorithms in
> mxfft.c, but I'm not sure.
> 
> 
> 
> 
> 
> On Fri, Apr 29, 2016 at 11:58 PM, Victor
> Lazzarini  wrote:
>       Great:
> 
> 1) Ftnp2Find() gives you access to tables
> of any size
> 2) Memory allocation: use AuxAlloc() as
> you
> have probably seen in other Csound code
> 
> regards
> 
> Victor LazzariniDean of Arts, Celtic
> Studies, and Philosophy
> Maynooth University
> Ireland
> 
> On 30 Apr 2016, at 07:45, Paul Batchelor
>  wrote:
>
>       Update:
> 
> I have successfully created an
> initial implementation of
> paulstretch using the internal FFT
> library. It can be found in my fork
> of Csound:
> 
> https://github.com/paulbatchelor/csound
> 
> Two things I'd like to figure out
> before I make a PR:
> 
> - How to use deferred ftables, if
> possible
> - More defensive coding with memory
> allocation
> - Try to solve the valgrind errors
> that I'm getting
> 
> 
> I've also attached a test CSD, in
> case someone should want to try it
> out...
> 
> -P
> 
> On Sun, Apr 24, 2016 at 10:25 PM,
> Victor Lazzarini
>  wrote:
>       I don't think so. 
>
>       Victor LazzariniDean of
>       Arts, Celtic Studies,
>       and Philosophy
> Maynooth University
> Ireland
> 
> On 25 Apr 2016, at 03:58, Paul
> Batchelor
> 
> wrote:
>
>       Victor: thanks for
>       pointing me in the
>       right direction.
>       Is there an upper
>       limit for how big
>       the FFT size can
>       be?
>
>       Joachim: I'll be
>       sure to send you
>       code your way as
>       soon as I have
>       something working.
>       I'll be sure to
>       contact paul if I
>       run into any
>       issues.
> 
> -P
> 
> On Sun, Apr 24, 2016 at
> 1:03 PM, joachim heintz
> 
> wrote:
>       hi paul -
>
>       i always
>       thought it
>       would be so
>       nice to have
>       paulstretch
>       as csound
>       opcode!  i
>       even had on
>       my list to
>       write him
>       (paulnasca.com)
>       to ask
>       whether he
>       would not be
>       willing to
>       implement it
>       as csound
>       opcode (as
>       he did for
>       audacity).
>
>       so — great
>       to hear you
>       are about to
>       do so!  in
>       cases of
>       problems, i
>       think paul
>       might be
>       willing to
>       assist.
>
>       cheers -
>              
>       joachim
> 
>
>       On 24/04/16
>       18:53, Paul
>       Batchelor
>       wrote:
>       Hello!
>
>       Yesterday,
>       I
>       managed
>       to
>       write
>       my own
>       C
>       implementation
>       of
>       PaulStretch
>       based
>       off
>       the
>       Python
>       commandline
>       implementation.
>       It can
>       be
>       found
>       in the
>       "dev"
>       branch
>       of
>       Soundpipe:
>
>       https://github.com/PaulBatchelor/Soundpipe/blob/dev/modules/paulstretch.c
>
>       Here
>       is a
>       really
>       small
>       C
>       example
>       using
>       my
>       Soundpipe
>       library:
> 
> https://github.com/PaulBatchelor/Soundpipe/blob/dev/examples/ex_paulstretch.c
> 
>
>       My
>       implementation
>       takes
>       something
>       analogous
>       to an
>       ftable
>       and
>       then
>       "stretches"
>       it
>       out.
>
>       I
>       think
>       it
>       would
>       be
>       neat
>       to
>       turn
>       this
>       into
>       Csound
>       Opcode!
>       It
>       would
>       also
>       be a
>       fun
>       experience
>       for
>       me, as
>       I've
>       never
>       written
>       an
>       opcode
>       before.
>
>       The
>       one
>       complication
>       that I
>       see
>       would
>       be in
>       the
>       FFT
>       library
>       used.
>       As far
>       as I
>       can
>       see,
>       the
>       internal
>       Csound
>       FFT
>       algorithm
>       only
>       works
>       with
>       powers
>       of
>       two.
>       Paulstretch
>       needs
>       an FFT
>       algorithm
>       where
>       you
>       can
>       have
>       large
>       arbitrary
>       FFT
>       sizes
>       (you
>       specify
>       window
>       size
>       in
>       seconds).
>       For my
>       implementation,
>       I am
>       using
>       a
>       small
>       BSD
>       licensed
>       FFT
>       library
>       called
>       KissFFT,
>       which
>       could
>       be
>       dropped
>       in
>       along
>       with
>       the
>       paulstretch
>       code.
>       Would
>       that
>       be an
>       okay
>       solution?
>
>       Let me
>       know
>       what
>       you
>       guys
>       think
>       of
>       this!
>
>       -P
> 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
> 
> 
> 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
> 
> 
> 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
> 
> 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
> 
> 
> 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
>
>       
> 
> 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
> 
> 
> 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
> 
> 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
> 
> 
> 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
> 
> 
> 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
> 
> 
> 
> 
> --
> _____________________________________________
> Dr. Richard Boulanger
> Professor of Electronic Production and Design
> Professional Writing and Music Technology Division
> Berklee College of Music
> ______________________________________________
> President of Boulanger Labs - http://boulangerlabs.com
> Author & Editor of The Csound Book -
> http://mitpress.mit.edu/books/csound-book
> Author & Editor of The Audio Programming Book -
> http://mitpress.mit.edu/books/audio-programming-book
> ______________________________________________
> about: http://www.boulangerlabs.com/about/richardboulanger/
> about: http://www.csounds.com/community/developers/dr-richard-boulanger/
> music:http://www.csounds.com/community/developers/dr-richard-boulanger/dr-richard-b
> oulanger-music/
> ______________________________________________
> email: rboulanger@berklee.edu
> facebook: https://www.facebook.com/richard.boulanger.58
> 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
> 
> 
> 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
>

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

Date2016-05-01 17:07
FromDave Seidel
SubjectRe: PaulStretch in Csound?
Paul, thanks for the answers. Regarding windowing, I was thinking more of the "window size" parameter. WIndow type is interesting too, thought I've only used Hanning with the GUI version.

- Dave

On Sun, May 1, 2016 at 10:53 AM, Paul Batchelor <ralphbluecoat@gmail.com> wrote:
Two answers:

- I *think* you might be able to use values smaller than 1 to contract the time period. You wouldn't use values smaller than 0 though.
- This paulstretch opcode uses only a hanning window. This is the one used in the commandline version of paulstretch built using python, which I used for reference.
- This does not use the FFT type in Csound, it just spits out an a-rate signal.

-P

On Sat, Apr 30, 2016 at 12:24 PM, Dr. Richard Boulanger <rboulanger@berklee.edu> wrote:
Wonderful news Paul.  Can't wait to check it out.  Cool.

On Sat, Apr 30, 2016 at 2:38 PM, Dave Seidel <dave.seidel@gmail.com> wrote:
I'll be very interested in trying this out, Paul. Thanks for working on it!

Two questions:
- Will it be possible (as it is in the original Paulstretch program) to contract the time period (i.e., by using values smaller than zero for the stretch factor)?
- Will the new opcode have the same windowing options as the original?
- Will the new opcode take an fsig as input, and output a new fsig?

Thanks,
Dave

On Sat, Apr 30, 2016 at 2:12 PM, Paul Batchelor <ralphbluecoat@gmail.com> wrote:
I posted the log above. But I fixed it. Just a misallocation on my end.

-P

On Sat, Apr 30, 2016 at 10:55 AM, John <jpff@codemist.co.uk> wrote:

Any chance of seeing what valgrind says?

Sent from TypeApp

On 30 Apr 2016, at 18:47, Paul Batchelor <ralphbluecoat@GMAIL.COM> wrote:
Ftnp2Find works as intended.

I'm still getting Valgrind errors. I think it might be related to the FFT algorithms in mxfft.c, but I'm not sure.





On Fri, Apr 29, 2016 at 11:58 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Great:

1) Ftnp2Find() gives you access to tables of any size
2) Memory allocation: use AuxAlloc() as you
have probably seen in other Csound code

regards

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 30 Apr 2016, at 07:45, Paul Batchelor <ralphbluecoat@GMAIL.COM> wrote:

Update:

I have successfully created an initial implementation of paulstretch using the internal FFT library. It can be found in my fork of Csound:

https://github.com/paulbatchelor/csound

Two things I'd like to figure out before I make a PR:

- How to use deferred ftables, if possible
- More defensive coding with memory allocation
- Try to solve the valgrind errors that I'm getting


I've also attached a test CSD, in case someone should want to try it out...

-P

On Sun, Apr 24, 2016 at 10:25 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
I don't think so. 

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 25 Apr 2016, at 03:58, Paul Batchelor <ralphbluecoat@GMAIL.COM> wrote:

Victor: thanks for pointing me in the right direction. Is there an upper limit for how big the FFT size can be?

Joachim: I'll be sure to send you code your way as soon as I have something working. I'll be sure to contact paul if I run into any issues.

-P

On Sun, Apr 24, 2016 at 1:03 PM, joachim heintz <jh@joachimheintz.de> wrote:
hi paul -

i always thought it would be so nice to have paulstretch as csound opcode!  i even had on my list to write him (paulnasca.com) to ask whether he would not be willing to implement it as csound opcode (as he did for audacity).

so — great to hear you are about to do so!  in cases of problems, i think paul might be willing to assist.

cheers -
        joachim



On 24/04/16 18:53, Paul Batchelor wrote:
Hello!

Yesterday, I managed to write my own C implementation of PaulStretch
based off the Python commandline implementation. It can be found in the
"dev" branch of Soundpipe:

https://github.com/PaulBatchelor/Soundpipe/blob/dev/modules/paulstretch.c

Here is a really small C example using my Soundpipe library:

https://github.com/PaulBatchelor/Soundpipe/blob/dev/examples/ex_paulstretch.c

My implementation takes something analogous to an ftable and then
"stretches" it out.

I think it would be neat to turn this into Csound Opcode! It would also
be a fun experience for me, as I've never written an opcode before.

The one complication that I see would be in the FFT library used. As far
as I can see, the internal Csound FFT algorithm only works with powers
of two. Paulstretch needs an FFT algorithm where you can have large
arbitrary FFT sizes (you specify window size in seconds). For my
implementation, I am using a small BSD licensed FFT library called
KissFFT, which could be dropped in along with the paulstretch code.
Would that be an okay solution?

Let me know what you guys think of this!

-P
Csound mailing list Csound@listserv.heanet.ie
<mailto: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

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

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
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

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
<test.csd>
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

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
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

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

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



--
_____________________________________________
Dr. Richard Boulanger
Professor of Electronic Production and Design
Professional Writing and Music Technology Division
Berklee College of Music
______________________________________________
President of Boulanger Labs - http://boulangerlabs.com
Author & Editor of The Csound Book - http://mitpress.mit.edu/books/csound-book
Author & Editor of The Audio Programming Book - http://mitpress.mit.edu/books/audio-programming-book
______________________________________________
about: http://www.boulangerlabs.com/about/richardboulanger/
about: http://www.csounds.com/community/developers/dr-richard-boulanger/
music: http://www.csounds.com/community/developers/dr-richard-boulanger/dr-richard-boulanger-music/

______________________________________________
email: rboulanger@berklee.edu
facebook: https://www.facebook.com/richard.boulanger.58
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

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

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

Date2016-05-01 17:18
Fromjpff
SubjectRe: PaulStretch in Csound?
Another query.  Why are the stretch, windw size and table number optional 
efaulting to -1?  That is not in the manual and seems unnarural
==J>ohn


On Sun, 1 May 2016, Dave Seidel wrote:

> Paul, thanks for the answers. Regarding windowing, I was thinking more of the
> "window size" parameter. WIndow type is interesting too, thought I've only
> used Hanning with the GUI version.
> - Dave
> 
> On Sun, May 1, 2016 at 10:53 AM, Paul Batchelor 
> wrote:
>       Two answers:
> 
> - I *think* you might be able to use values smaller than 1 to contract
> the time period. You wouldn't use values smaller than 0 though.
> - This paulstretch opcode uses only a hanning window. This is the one
> used in the commandline version of paulstretch built using python, which
> I used for reference.
> - This does not use the FFT type in Csound, it just spits out an a-rate
> signal.
> 
> -P
> 
> On Sat, Apr 30, 2016 at 12:24 PM, Dr. Richard Boulanger
>  wrote:
>       Wonderful news Paul.  Can't wait to check it out.  Cool.
> 
> On Sat, Apr 30, 2016 at 2:38 PM, Dave Seidel
>  wrote:
>       I'll be very interested in trying this out, Paul.
>       Thanks for working on it!
> Two questions:
> - Will it be possible (as it is in the original Paulstretch
> program) to contract the time period (i.e., by using values
> smaller than zero for the stretch factor)?
> - Will the new opcode have the same windowing options as the
> original?
> - Will the new opcode take an fsig as input, and output a
> new fsig?
> 
> Thanks,
> Dave
> 
> On Sat, Apr 30, 2016 at 2:12 PM, Paul Batchelor
>  wrote:
>       I posted the log above. But I fixed it. Just a
>       misallocation on my end.
> 
> -P
> 
> On Sat, Apr 30, 2016 at 10:55 AM, John
>  wrote:
>
>       Any chance of seeing what valgrind says?
>
>       Sent from TypeApp
>
>       On 30 Apr 2016, at 18:47, Paul Batchelor
>        wrote:
>             Ftnp2Find works as intended.
> 
> I'm still getting Valgrind errors. I think
> it might be related to the FFT algorithms
> in mxfft.c, but I'm not sure.
> 
> 
> 
> 
> 
> On Fri, Apr 29, 2016 at 11:58 PM, Victor
> Lazzarini 
> wrote:
>       Great:
> 
> 1) Ftnp2Find() gives you access to
> tables of any size
> 2) Memory allocation: use AuxAlloc()
> as you
> have probably seen in other Csound
> code
> 
> regards
> 
> Victor LazzariniDean of Arts, Celtic
> Studies, and Philosophy
> Maynooth University
> Ireland
> 
> On 30 Apr 2016, at 07:45, Paul
> Batchelor 
> wrote:
>
>       Update:
> 
> I have successfully created an
> initial implementation of
> paulstretch using the internal
> FFT library. It can be found
> in my fork of Csound:
> 
> https://github.com/paulbatchelor/csound
> 
> Two things I'd like to figure
> out before I make a PR:
> 
> - How to use deferred ftables,
> if possible
> - More defensive coding with
> memory allocation
> - Try to solve the valgrind
> errors that I'm getting
> 
> 
> I've also attached a test CSD,
> in case someone should want to
> try it out...
> 
> -P
> 
> On Sun, Apr 24, 2016 at 10:25
> PM, Victor Lazzarini
> 
> wrote:
>       I don't think so. 
>
>       Victor
>       LazzariniDean of
>       Arts, Celtic
>       Studies, and
>       Philosophy
> Maynooth University
> Ireland
> 
> On 25 Apr 2016, at
> 03:58, Paul Batchelor
> 
> wrote:
>
>       Victor:
>       thanks for
>       pointing me
>       in the right
>       direction.
>       Is there an
>       upper limit
>       for how big
>       the FFT size
>       can be?
>
>       Joachim:
>       I'll be sure
>       to send you
>       code your
>       way as soon
>       as I have
>       something
>       working.
>       I'll be sure
>       to contact
>       paul if I
>       run into any
>       issues.
> 
> -P
> 
> On Sun, Apr 24,
> 2016 at 1:03 PM,
> joachim heintz
> 
> wrote:
>       hi
>       paul -
>
>       i
>       always
>       thought
>       it
>       would
>       be so
>       nice
>       to
>       have
>       paulstretch
>       as
>       csound
>       opcode! 
>       i even
>       had on
>       my
>       list
>       to
>       write
>       him
>       (paulnasca.com)
>       to ask
>       whether
>       he
>       would
>       not be
>       willing
>       to
>       implement
>       it as
>       csound
>       opcode
>       (as he
>       did
>       for
>       audacity).
>
>       so —
>       great
>       to
>       hear
>       you
>       are
>       about
>       to do
>       so! 
>       in
>       cases
>       of
>       problems,
>       i
>       think
>       paul
>       might
>       be
>       willing
>       to
>       assist.
>
>       cheers
>       -
>            
>        
>       joachim
> 
>
>       On
>       24/04/16
>       18:53,
>       Paul
>       Batchelor
>       wrote:
>       Hello!
>
>       Yesterday,
>       I
>       managed
>       to
>       write
>       my
>       own
>       C
>       implementation
>       of
>       PaulStretch
>       based
>       off
>       the
>       Python
>       commandline
>       implementation.
>       It
>       can
>       be
>       found
>       in
>       the
>       "dev"
>       branch
>       of
>       Soundpipe:
>
>       https://github.com/PaulBatchelor/Soundpipe/blob/dev/modules/paulstretch.c
>
>       Here
>       is
>       a
>       really
>       small
>       C
>       example
>       using
>       my
>       Soundpipe
>       library:
> 
> https://github.com/PaulBatchelor/Soundpipe/blob/dev/examples/ex_paulstretch.c
> 
>
>       My
>       implementation
>       takes
>       something
>       analogous
>       to
>       an
>       ftable
>       and
>       then
>       "stretches"
>       it
>       out.
>
>       I
>       think
>       it
>       would
>       be
>       neat
>       to
>       turn
>       this
>       into
>       Csound
>       Opcode!
>       It
>       would
>       also
>       be
>       a
>       fun
>       experience
>       for
>       me,
>       as
>       I've
>       never
>       written
>       an
>       opcode
>       before.
>
>       The
>       one
>       complication
>       that
>       I
>       see
>       would
>       be
>       in
>       the
>       FFT
>       library
>       used.
>       As
>       far
>       as
>       I
>       can
>       see,
>       the
>       internal
>       Csound
>       FFT
>       algorithm
>       only
>       works
>       with
>       powers
>       of
>       two.
>       Paulstretch
>       needs
>       an
>       FFT
>       algorithm
>       where
>       you
>       can
>       have
>       large
>       arbitrary
>       FFT
>       sizes
>       (you
>       specify
>       window
>       size
>       in
>       seconds).
>       For
>       my
>       implementation,
>       I
>       am
>       using
>       a
>       small
>       BSD
>       licensed
>       FFT
>       library
>       called
>       KissFFT,
>       which
>       could
>       be
>       dropped
>       in
>       along
>       with
>       the
>       paulstretch
>       code.
>       Would
>       that
>       be
>       an
>       okay
>       solution?
>
>       Let
>       me
>       know
>       what
>       you
>       guys
>       think
>       of
>       this!
>
>       -P
> 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
> 
> 
> 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
> 
> 
> 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
> 
> 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
> 
> 
> 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
>
>       
> 
> 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
> 
> 
> 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
> 
> 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
> 
> 
> 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
> 
> 
> 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
> 
> 
> 
> 
> --
> _____________________________________________
> Dr. Richard Boulanger
> Professor of Electronic Production and Design
> Professional Writing and Music Technology Division
> Berklee College of Music
> ______________________________________________
> President of Boulanger Labs - http://boulangerlabs.com
> Author & Editor of The Csound Book -
> http://mitpress.mit.edu/books/csound-book
> Author & Editor of The Audio Programming Book -
> http://mitpress.mit.edu/books/audio-programming-book
> ______________________________________________
> about: http://www.boulangerlabs.com/about/richardboulanger/
> about:
> http://www.csounds.com/community/developers/dr-richard-boulanger/
> music:http://www.csounds.com/community/developers/dr-richard-boulanger/dr-richard-b
> oulanger-music/
> ______________________________________________
> email: rboulanger@berklee.edu
> facebook: https://www.facebook.com/richard.boulanger.58
> 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
> 
> 
> 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
> 
> 
> 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
>

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

Date2016-05-01 18:55
FromPaul Batchelor
SubjectRe: PaulStretch in Csound?
Attachmentspaulstretch.csd  
More answers:

- Yes, window size is most definitely an option!
- There is a sample program that's part of the manpage repo. I've attached it here for convenience.
- The reason why they are defaulting to -1 is because I implemented it wrong (sorry!). There are no default values. The Opcode entry should read "iii" instead of "jjj": https://github.com/csound/csound/blob/develop/Opcodes/paulstretch.c#L179


On Sun, May 1, 2016 at 9:18 AM, jpff <jpff@codemist.co.uk> wrote:
Another query.  Why are the stretch, windw size and table number optional efaulting to -1?  That is not in the manual and seems unnarural
==J>ohn



On Sun, 1 May 2016, Dave Seidel wrote:

Paul, thanks for the answers. Regarding windowing, I was thinking more of the
"window size" parameter. WIndow type is interesting too, thought I've only
used Hanning with the GUI version.
- Dave

On Sun, May 1, 2016 at 10:53 AM, Paul Batchelor <ralphbluecoat@gmail.com>
wrote:
      Two answers:

- I *think* you might be able to use values smaller than 1 to contract
the time period. You wouldn't use values smaller than 0 though.
- This paulstretch opcode uses only a hanning window. This is the one
used in the commandline version of paulstretch built using python, which
I used for reference.
- This does not use the FFT type in Csound, it just spits out an a-rate
signal.

-P

On Sat, Apr 30, 2016 at 12:24 PM, Dr. Richard Boulanger
<rboulanger@berklee.edu> wrote:
      Wonderful news Paul.  Can't wait to check it out.  Cool.

On Sat, Apr 30, 2016 at 2:38 PM, Dave Seidel
<dave.seidel@gmail.com> wrote:
      I'll be very interested in trying this out, Paul.
      Thanks for working on it!
Two questions:
- Will it be possible (as it is in the original Paulstretch
program) to contract the time period (i.e., by using values
smaller than zero for the stretch factor)?
- Will the new opcode have the same windowing options as the
original?
- Will the new opcode take an fsig as input, and output a
new fsig?

Thanks,
Dave

On Sat, Apr 30, 2016 at 2:12 PM, Paul Batchelor
<ralphbluecoat@gmail.com> wrote:
      I posted the log above. But I fixed it. Just a
      misallocation on my end.

-P

On Sat, Apr 30, 2016 at 10:55 AM, John
<jpff@codemist.co.uk> wrote:

      Any chance of seeing what valgrind says?

      Sent from TypeApp

      On 30 Apr 2016, at 18:47, Paul Batchelor
      <ralphbluecoat@GMAIL.COM> wrote:
            Ftnp2Find works as intended.

I'm still getting Valgrind errors. I think
it might be related to the FFT algorithms
in mxfft.c, but I'm not sure.





On Fri, Apr 29, 2016 at 11:58 PM, Victor
Lazzarini <Victor.Lazzarini@nuim.ie>
wrote:
      Great:

1) Ftnp2Find() gives you access to
tables of any size
2) Memory allocation: use AuxAlloc()
as you
have probably seen in other Csound
code

regards

Victor LazzariniDean of Arts, Celtic

Studies, and Philosophy
Maynooth University
Ireland

On 30 Apr 2016, at 07:45, Paul
Batchelor <ralphbluecoat@GMAIL.COM>
wrote:

      Update:

I have successfully created an
initial implementation of
paulstretch using the internal
FFT library. It can be found
in my fork of Csound:

https://github.com/paulbatchelor/csound

Two things I'd like to figure
out before I make a PR:

- How to use deferred ftables,
if possible
- More defensive coding with
memory allocation
- Try to solve the valgrind
errors that I'm getting


I've also attached a test CSD,
in case someone should want to
try it out...

-P

On Sun, Apr 24, 2016 at 10:25
PM, Victor Lazzarini
<Victor.Lazzarini@nuim.ie>
wrote:
      I don't think so. 

      Victor
      LazzariniDean of

      Arts, Celtic
      Studies, and
      Philosophy
Maynooth University
Ireland

On 25 Apr 2016, at
03:58, Paul Batchelor
<ralphbluecoat@GMAIL.COM>
wrote:

      Victor:
      thanks for
      pointing me
      in the right
      direction.
      Is there an
      upper limit
      for how big
      the FFT size
      can be?

      Joachim:
      I'll be sure
      to send you
      code your
      way as soon
      as I have
      something
      working.
      I'll be sure
      to contact
      paul if I
      run into any
      issues.

-P

On Sun, Apr 24,
2016 at 1:03 PM,
joachim heintz
<jh@joachimheintz.de>
wrote:
      hi
      paul -

      i
      always
      thought
      it
      would
      be so
      nice
      to
      have
      paulstretch
      as
      csound
      opcode! 
      i even
      had on
      my
      list
      to
      write
      him
      (paulnasca.com)
      to ask
      whether
      he
      would
      not be
      willing
      to
      implement
      it as
      csound
      opcode
      (as he
      did
      for
      audacity).

      so —
      great
      to
      hear
      you
      are
      about
      to do
      so! 
      in
      cases
      of
      problems,
      i
      think
      paul
      might
      be
      willing
      to
      assist.

      cheers
      -
           
       
      joachim


      On
      24/04/16
      18:53,
      Paul
      Batchelor
      wrote:
      Hello!

      Yesterday,
      I
      managed
      to
      write
      my
      own
      C
      implementation
      of
      PaulStretch
      based
      off
      the
      Python
      commandline
      implementation.
      It
      can
      be
      found
      in
      the
      "dev"
      branch
      of
      Soundpipe:

      https://github.com/PaulBatchelor/Soundpipe/blob/dev/modules/paulstretch.c

      Here
      is
      a
      really
      small
      C
      example
      using
      my
      Soundpipe
      library:

https://github.com/PaulBatchelor/Soundpipe/blob/dev/examples/ex_paulstretch.c


      My
      implementation
      takes
      something
      analogous
      to
      an
      ftable
      and
      then
      "stretches"
      it
      out.

      I
      think
      it
      would
      be
      neat
      to
      turn
      this
      into
      Csound
      Opcode!
      It
      would
      also
      be
      a
      fun
      experience
      for
      me,
      as
      I've
      never
      written
      an
      opcode
      before.

      The
      one
      complication
      that
      I
      see
      would
      be
      in
      the
      FFT
      library
      used.
      As
      far
      as
      I
      can
      see,
      the
      internal
      Csound
      FFT
      algorithm
      only
      works
      with
      powers
      of
      two.
      Paulstretch
      needs
      an
      FFT
      algorithm
      where
      you
      can
      have
      large
      arbitrary
      FFT
      sizes
      (you
      specify
      window
      size
      in
      seconds).
      For
      my
      implementation,
      I
      am
      using
      a
      small
      BSD
      licensed
      FFT
      library
      called
      KissFFT,
      which
      could
      be
      dropped
      in
      along
      with
      the
      paulstretch
      code.
      Would
      that
      be
      an
      okay
      solution?

      Let
      me
      know
      what
      you
      guys
      think
      of
      this!

      -P
Csound
mailing
list
Csound@listserv.heanet.ie
<mailto: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


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


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

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


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

      <test.csd>

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


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

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


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


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




--
_____________________________________________
Dr. Richard Boulanger
Professor of Electronic Production and Design
Professional Writing and Music Technology Division
Berklee College of Music
______________________________________________
President of Boulanger Labs - http://boulangerlabs.com
Author & Editor of The Csound Book -
http://mitpress.mit.edu/books/csound-book
Author & Editor of The Audio Programming Book -
http://mitpress.mit.edu/books/audio-programming-book
______________________________________________
about: http://www.boulangerlabs.com/about/richardboulanger/
about:
http://www.csounds.com/community/developers/dr-richard-boulanger/
music:http://www.csounds.com/community/developers/dr-richard-boulanger/dr-richard-b
oulanger-music/
______________________________________________
email: rboulanger@berklee.edu
facebook: https://www.facebook.com/richard.boulanger.58
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


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


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


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

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

Date2016-05-02 22:24
FromHlöðver Sigurðsson
SubjectRe: PaulStretch in Csound?
Can't wait for this opcode. (to do something else that stretching Justin Bieber for 24 hours) :-)

2016-05-01 19:55 GMT+02:00 Paul Batchelor <ralphbluecoat@gmail.com>:
More answers:

- Yes, window size is most definitely an option!
- There is a sample program that's part of the manpage repo. I've attached it here for convenience.
- The reason why they are defaulting to -1 is because I implemented it wrong (sorry!). There are no default values. The Opcode entry should read "iii" instead of "jjj": https://github.com/csound/csound/blob/develop/Opcodes/paulstretch.c#L179


On Sun, May 1, 2016 at 9:18 AM, jpff <jpff@codemist.co.uk> wrote:
Another query.  Why are the stretch, windw size and table number optional efaulting to -1?  That is not in the manual and seems unnarural
==J>ohn



On Sun, 1 May 2016, Dave Seidel wrote:

Paul, thanks for the answers. Regarding windowing, I was thinking more of the
"window size" parameter. WIndow type is interesting too, thought I've only
used Hanning with the GUI version.
- Dave

On Sun, May 1, 2016 at 10:53 AM, Paul Batchelor <ralphbluecoat@gmail.com>
wrote:
      Two answers:

- I *think* you might be able to use values smaller than 1 to contract
the time period. You wouldn't use values smaller than 0 though.
- This paulstretch opcode uses only a hanning window. This is the one
used in the commandline version of paulstretch built using python, which
I used for reference.
- This does not use the FFT type in Csound, it just spits out an a-rate
signal.

-P

On Sat, Apr 30, 2016 at 12:24 PM, Dr. Richard Boulanger
<rboulanger@berklee.edu> wrote:
      Wonderful news Paul.  Can't wait to check it out.  Cool.

On Sat, Apr 30, 2016 at 2:38 PM, Dave Seidel
<dave.seidel@gmail.com> wrote:
      I'll be very interested in trying this out, Paul.
      Thanks for working on it!
Two questions:
- Will it be possible (as it is in the original Paulstretch
program) to contract the time period (i.e., by using values
smaller than zero for the stretch factor)?
- Will the new opcode have the same windowing options as the
original?
- Will the new opcode take an fsig as input, and output a
new fsig?

Thanks,
Dave

On Sat, Apr 30, 2016 at 2:12 PM, Paul Batchelor
<ralphbluecoat@gmail.com> wrote:
      I posted the log above. But I fixed it. Just a
      misallocation on my end.

-P

On Sat, Apr 30, 2016 at 10:55 AM, John
<jpff@codemist.co.uk> wrote:

      Any chance of seeing what valgrind says?

      Sent from TypeApp

      On 30 Apr 2016, at 18:47, Paul Batchelor
      <ralphbluecoat@GMAIL.COM> wrote:
            Ftnp2Find works as intended.

I'm still getting Valgrind errors. I think
it might be related to the FFT algorithms
in mxfft.c, but I'm not sure.





On Fri, Apr 29, 2016 at 11:58 PM, Victor
Lazzarini <Victor.Lazzarini@nuim.ie>
wrote:
      Great:

1) Ftnp2Find() gives you access to
tables of any size
2) Memory allocation: use AuxAlloc()
as you
have probably seen in other Csound
code

regards

Victor LazzariniDean of Arts, Celtic

Studies, and Philosophy
Maynooth University
Ireland

On 30 Apr 2016, at 07:45, Paul
Batchelor <ralphbluecoat@GMAIL.COM>
wrote:

      Update:

I have successfully created an
initial implementation of
paulstretch using the internal
FFT library. It can be found
in my fork of Csound:

https://github.com/paulbatchelor/csound

Two things I'd like to figure
out before I make a PR:

- How to use deferred ftables,
if possible
- More defensive coding with
memory allocation
- Try to solve the valgrind
errors that I'm getting


I've also attached a test CSD,
in case someone should want to
try it out...

-P

On Sun, Apr 24, 2016 at 10:25
PM, Victor Lazzarini
<Victor.Lazzarini@nuim.ie>
wrote:
      I don't think so. 

      Victor
      LazzariniDean of

      Arts, Celtic
      Studies, and
      Philosophy
Maynooth University
Ireland

On 25 Apr 2016, at
03:58, Paul Batchelor
<ralphbluecoat@GMAIL.COM>
wrote:

      Victor:
      thanks for
      pointing me
      in the right
      direction.
      Is there an
      upper limit
      for how big
      the FFT size
      can be?

      Joachim:
      I'll be sure
      to send you
      code your
      way as soon
      as I have
      something
      working.
      I'll be sure
      to contact
      paul if I
      run into any
      issues.

-P

On Sun, Apr 24,
2016 at 1:03 PM,
joachim heintz
<jh@joachimheintz.de>
wrote:
      hi
      paul -

      i
      always
      thought
      it
      would
      be so
      nice
      to
      have
      paulstretch
      as
      csound
      opcode! 
      i even
      had on
      my
      list
      to
      write
      him
      (paulnasca.com)
      to ask
      whether
      he
      would
      not be
      willing
      to
      implement
      it as
      csound
      opcode
      (as he
      did
      for
      audacity).

      so —
      great
      to
      hear
      you
      are
      about
      to do
      so! 
      in
      cases
      of
      problems,
      i
      think
      paul
      might
      be
      willing
      to
      assist.

      cheers
      -
           
       
      joachim


      On
      24/04/16
      18:53,
      Paul
      Batchelor
      wrote:
      Hello!

      Yesterday,
      I
      managed
      to
      write
      my
      own
      C
      implementation
      of
      PaulStretch
      based
      off
      the
      Python
      commandline
      implementation.
      It
      can
      be
      found
      in
      the
      "dev"
      branch
      of
      Soundpipe:

      https://github.com/PaulBatchelor/Soundpipe/blob/dev/modules/paulstretch.c

      Here
      is
      a
      really
      small
      C
      example
      using
      my
      Soundpipe
      library:

https://github.com/PaulBatchelor/Soundpipe/blob/dev/examples/ex_paulstretch.c


      My
      implementation
      takes
      something
      analogous
      to
      an
      ftable
      and
      then
      "stretches"
      it
      out.

      I
      think
      it
      would
      be
      neat
      to
      turn
      this
      into
      Csound
      Opcode!
      It
      would
      also
      be
      a
      fun
      experience
      for
      me,
      as
      I've
      never
      written
      an
      opcode
      before.

      The
      one
      complication
      that
      I
      see
      would
      be
      in
      the
      FFT
      library
      used.
      As
      far
      as
      I
      can
      see,
      the
      internal
      Csound
      FFT
      algorithm
      only
      works
      with
      powers
      of
      two.
      Paulstretch
      needs
      an
      FFT
      algorithm
      where
      you
      can
      have
      large
      arbitrary
      FFT
      sizes
      (you
      specify
      window
      size
      in
      seconds).
      For
      my
      implementation,
      I
      am
      using
      a
      small
      BSD
      licensed
      FFT
      library
      called
      KissFFT,
      which
      could
      be
      dropped
      in
      along
      with
      the
      paulstretch
      code.
      Would
      that
      be
      an
      okay
      solution?

      Let
      me
      know
      what
      you
      guys
      think
      of
      this!

      -P
Csound
mailing
list
Csound@listserv.heanet.ie
<mailto: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


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


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

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


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

      <test.csd>

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


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

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


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


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




--
_____________________________________________
Dr. Richard Boulanger
Professor of Electronic Production and Design
Professional Writing and Music Technology Division
Berklee College of Music
______________________________________________
President of Boulanger Labs - http://boulangerlabs.com
Author & Editor of The Csound Book -
http://mitpress.mit.edu/books/csound-book
Author & Editor of The Audio Programming Book -
http://mitpress.mit.edu/books/audio-programming-book
______________________________________________
about: http://www.boulangerlabs.com/about/richardboulanger/
about:
http://www.csounds.com/community/developers/dr-richard-boulanger/
music:http://www.csounds.com/community/developers/dr-richard-boulanger/dr-richard-b
oulanger-music/
______________________________________________
email: rboulanger@berklee.edu
facebook: https://www.facebook.com/richard.boulanger.58
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


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


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


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

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

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

Date2016-05-02 22:27
FromHlöðver Sigurðsson
SubjectRe: PaulStretch in Csound?
Ohh, I see it's on develop branch already. Well, then I'm off to make some noise.

2016-05-02 23:24 GMT+02:00 Hlöðver Sigurðsson <hlolli@gmail.com>:
Can't wait for this opcode. (to do something else that stretching Justin Bieber for 24 hours) :-)

2016-05-01 19:55 GMT+02:00 Paul Batchelor <ralphbluecoat@gmail.com>:
More answers:

- Yes, window size is most definitely an option!
- There is a sample program that's part of the manpage repo. I've attached it here for convenience.
- The reason why they are defaulting to -1 is because I implemented it wrong (sorry!). There are no default values. The Opcode entry should read "iii" instead of "jjj": https://github.com/csound/csound/blob/develop/Opcodes/paulstretch.c#L179


On Sun, May 1, 2016 at 9:18 AM, jpff <jpff@codemist.co.uk> wrote:
Another query.  Why are the stretch, windw size and table number optional efaulting to -1?  That is not in the manual and seems unnarural
==J>ohn



On Sun, 1 May 2016, Dave Seidel wrote:

Paul, thanks for the answers. Regarding windowing, I was thinking more of the
"window size" parameter. WIndow type is interesting too, thought I've only
used Hanning with the GUI version.
- Dave

On Sun, May 1, 2016 at 10:53 AM, Paul Batchelor <ralphbluecoat@gmail.com>
wrote:
      Two answers:

- I *think* you might be able to use values smaller than 1 to contract
the time period. You wouldn't use values smaller than 0 though.
- This paulstretch opcode uses only a hanning window. This is the one
used in the commandline version of paulstretch built using python, which
I used for reference.
- This does not use the FFT type in Csound, it just spits out an a-rate
signal.

-P

On Sat, Apr 30, 2016 at 12:24 PM, Dr. Richard Boulanger
<rboulanger@berklee.edu> wrote:
      Wonderful news Paul.  Can't wait to check it out.  Cool.

On Sat, Apr 30, 2016 at 2:38 PM, Dave Seidel
<dave.seidel@gmail.com> wrote:
      I'll be very interested in trying this out, Paul.
      Thanks for working on it!
Two questions:
- Will it be possible (as it is in the original Paulstretch
program) to contract the time period (i.e., by using values
smaller than zero for the stretch factor)?
- Will the new opcode have the same windowing options as the
original?
- Will the new opcode take an fsig as input, and output a
new fsig?

Thanks,
Dave

On Sat, Apr 30, 2016 at 2:12 PM, Paul Batchelor
<ralphbluecoat@gmail.com> wrote:
      I posted the log above. But I fixed it. Just a
      misallocation on my end.

-P

On Sat, Apr 30, 2016 at 10:55 AM, John
<jpff@codemist.co.uk> wrote:

      Any chance of seeing what valgrind says?

      Sent from TypeApp

      On 30 Apr 2016, at 18:47, Paul Batchelor
      <ralphbluecoat@GMAIL.COM> wrote:
            Ftnp2Find works as intended.

I'm still getting Valgrind errors. I think
it might be related to the FFT algorithms
in mxfft.c, but I'm not sure.





On Fri, Apr 29, 2016 at 11:58 PM, Victor
Lazzarini <Victor.Lazzarini@nuim.ie>
wrote:
      Great:

1) Ftnp2Find() gives you access to
tables of any size
2) Memory allocation: use AuxAlloc()
as you
have probably seen in other Csound
code

regards

Victor LazzariniDean of Arts, Celtic

Studies, and Philosophy
Maynooth University
Ireland

On 30 Apr 2016, at 07:45, Paul
Batchelor <ralphbluecoat@GMAIL.COM>
wrote:

      Update:

I have successfully created an
initial implementation of
paulstretch using the internal
FFT library. It can be found
in my fork of Csound:

https://github.com/paulbatchelor/csound

Two things I'd like to figure
out before I make a PR:

- How to use deferred ftables,
if possible
- More defensive coding with
memory allocation
- Try to solve the valgrind
errors that I'm getting


I've also attached a test CSD,
in case someone should want to
try it out...

-P

On Sun, Apr 24, 2016 at 10:25
PM, Victor Lazzarini
<Victor.Lazzarini@nuim.ie>
wrote:
      I don't think so. 

      Victor
      LazzariniDean of

      Arts, Celtic
      Studies, and
      Philosophy
Maynooth University
Ireland

On 25 Apr 2016, at
03:58, Paul Batchelor
<ralphbluecoat@GMAIL.COM>
wrote:

      Victor:
      thanks for
      pointing me
      in the right
      direction.
      Is there an
      upper limit
      for how big
      the FFT size
      can be?

      Joachim:
      I'll be sure
      to send you
      code your
      way as soon
      as I have
      something
      working.
      I'll be sure
      to contact
      paul if I
      run into any
      issues.

-P

On Sun, Apr 24,
2016 at 1:03 PM,
joachim heintz
<jh@joachimheintz.de>
wrote:
      hi
      paul -

      i
      always
      thought
      it
      would
      be so
      nice
      to
      have
      paulstretch
      as
      csound
      opcode! 
      i even
      had on
      my
      list
      to
      write
      him
      (paulnasca.com)
      to ask
      whether
      he
      would
      not be
      willing
      to
      implement
      it as
      csound
      opcode
      (as he
      did
      for
      audacity).

      so —
      great
      to
      hear
      you
      are
      about
      to do
      so! 
      in
      cases
      of
      problems,
      i
      think
      paul
      might
      be
      willing
      to
      assist.

      cheers
      -
           
       
      joachim


      On
      24/04/16
      18:53,
      Paul
      Batchelor
      wrote:
      Hello!

      Yesterday,
      I
      managed
      to
      write
      my
      own
      C
      implementation
      of
      PaulStretch
      based
      off
      the
      Python
      commandline
      implementation.
      It
      can
      be
      found
      in
      the
      "dev"
      branch
      of
      Soundpipe:

      https://github.com/PaulBatchelor/Soundpipe/blob/dev/modules/paulstretch.c

      Here
      is
      a
      really
      small
      C
      example
      using
      my
      Soundpipe
      library:

https://github.com/PaulBatchelor/Soundpipe/blob/dev/examples/ex_paulstretch.c


      My
      implementation
      takes
      something
      analogous
      to
      an
      ftable
      and
      then
      "stretches"
      it
      out.

      I
      think
      it
      would
      be
      neat
      to
      turn
      this
      into
      Csound
      Opcode!
      It
      would
      also
      be
      a
      fun
      experience
      for
      me,
      as
      I've
      never
      written
      an
      opcode
      before.

      The
      one
      complication
      that
      I
      see
      would
      be
      in
      the
      FFT
      library
      used.
      As
      far
      as
      I
      can
      see,
      the
      internal
      Csound
      FFT
      algorithm
      only
      works
      with
      powers
      of
      two.
      Paulstretch
      needs
      an
      FFT
      algorithm
      where
      you
      can
      have
      large
      arbitrary
      FFT
      sizes
      (you
      specify
      window
      size
      in
      seconds).
      For
      my
      implementation,
      I
      am
      using
      a
      small
      BSD
      licensed
      FFT
      library
      called
      KissFFT,
      which
      could
      be
      dropped
      in
      along
      with
      the
      paulstretch
      code.
      Would
      that
      be
      an
      okay
      solution?

      Let
      me
      know
      what
      you
      guys
      think
      of
      this!

      -P
Csound
mailing
list
Csound@listserv.heanet.ie
<mailto: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


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


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

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


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

      <test.csd>

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


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

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


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


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




--
_____________________________________________
Dr. Richard Boulanger
Professor of Electronic Production and Design
Professional Writing and Music Technology Division
Berklee College of Music
______________________________________________
President of Boulanger Labs - http://boulangerlabs.com
Author & Editor of The Csound Book -
http://mitpress.mit.edu/books/csound-book
Author & Editor of The Audio Programming Book -
http://mitpress.mit.edu/books/audio-programming-book
______________________________________________
about: http://www.boulangerlabs.com/about/richardboulanger/
about:
http://www.csounds.com/community/developers/dr-richard-boulanger/
music:http://www.csounds.com/community/developers/dr-richard-boulanger/dr-richard-b
oulanger-music/
______________________________________________
email: rboulanger@berklee.edu
facebook: https://www.facebook.com/richard.boulanger.58
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


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


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


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

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


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

Date2016-05-03 17:47
Fromjoachim heintz
SubjectRe: PaulStretch in Csound?
hi paul -

i checked your example, but unfortunately it only produces noise for me 
(with fade in and fade out, but noise anyway).  can you check again? 
the csd which i used is pasted below.

best -
	joachim




-o paulstretch.wav -W


sr = 44100
ksmps = 32
0dbfs = 1
nchnls = 2

giwav ftgen 0, 0, 0, 1, "fox.wav", 0, 0, 1

instr 1
aout paulstretch 10, 2.0, giwav
outs aout, aout
endin



i1 0 30








On 30/04/16 08:45, Paul Batchelor wrote:
> Update:
>
> I have successfully created an initial implementation of paulstretch
> using the internal FFT library. It can be found in my fork of Csound:
>
> https://github.com/paulbatchelor/csound
>
> Two things I'd like to figure out before I make a PR:
>
> - How to use deferred ftables, if possible
> - More defensive coding with memory allocation
> - Try to solve the valgrind errors that I'm getting
>
>
> I've also attached a test CSD, in case someone should want to try it out...
>
> -P
>
> On Sun, Apr 24, 2016 at 10:25 PM, Victor Lazzarini
> > wrote:
>
>     I don't think so.
>
>     Victor Lazzarini
>     Dean of Arts, Celtic Studies, and Philosophy
>     Maynooth University
>     Ireland
>
>     On 25 Apr 2016, at 03:58, Paul Batchelor      > wrote:
>
>>     Victor: thanks for pointing me in the right direction. Is there an
>>     upper limit for how big the FFT size can be?
>>
>>     Joachim: I'll be sure to send you code your way as soon as I have
>>     something working. I'll be sure to contact paul if I run into any
>>     issues.
>>
>>     -P
>>
>>     On Sun, Apr 24, 2016 at 1:03 PM, joachim heintz
>>     > wrote:
>>
>>         hi paul -
>>
>>         i always thought it would be so nice to have paulstretch as
>>         csound opcode!  i even had on my list to write him
>>         (paulnasca.com ) to ask whether he would
>>         not be willing to implement it as csound opcode (as he did for
>>         audacity).
>>
>>         so — great to hear you are about to do so!  in cases of
>>         problems, i think paul might be willing to assist.
>>
>>         cheers -
>>                 joachim
>>
>>
>>
>>         On 24/04/16 18:53, Paul Batchelor wrote:
>>
>>             Hello!
>>
>>             Yesterday, I managed to write my own C implementation of
>>             PaulStretch
>>             based off the Python commandline implementation. It can be
>>             found in the
>>             "dev" branch of Soundpipe:
>>
>>             https://github.com/PaulBatchelor/Soundpipe/blob/dev/modules/paulstretch.c
>>
>>             Here is a really small C example using my Soundpipe library:
>>
>>             https://github.com/PaulBatchelor/Soundpipe/blob/dev/examples/ex_paulstretch.c
>>
>>             My implementation takes something analogous to an ftable
>>             and then
>>             "stretches" it out.
>>
>>             I think it would be neat to turn this into Csound Opcode!
>>             It would also
>>             be a fun experience for me, as I've never written an
>>             opcode before.
>>
>>             The one complication that I see would be in the FFT
>>             library used. As far
>>             as I can see, the internal Csound FFT algorithm only works
>>             with powers
>>             of two. Paulstretch needs an FFT algorithm where you can
>>             have large
>>             arbitrary FFT sizes (you specify window size in seconds).
>>             For my
>>             implementation, I am using a small BSD licensed FFT
>>             library called
>>             KissFFT, which could be dropped in along with the
>>             paulstretch code.
>>             Would that be an okay solution?
>>
>>             Let me know what you guys think of this!
>>
>>             -P
>>             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
>>
>>
>>         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
>>
>>
>>     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
>     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
>
>
> 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

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

Date2016-05-03 18:06
FromMenno Knevel
SubjectRe: PaulStretch in Csound?
Joachim, it works here...
Csound version 6.07 (double samples) May  1 2016




--
View this message in context: http://csound.1045644.n5.nabble.com/Csnd-PaulStretch-in-Csound-tp5749205p5749458.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

Date2016-05-03 21:50
FromJohn
SubjectRe: PaulStretch in Csound?


Rather like noise for me also

On 3 May 2016, at 18:07, Menno Knevel <magknevel@GMAIL.COM> wrote:
Joachim, it works here...
Csound version 6.07 (double samples) May 1 2016




--
View this message in context: http://csound.1045644.n5.nabble.com/Csnd-PaulStretch-in-Csound-tp5749205p5749458.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

Date2016-05-03 21:52
From"Dr. Richard Boulanger"
SubjectRe: PaulStretch in Csound?
change 2.0 to .2  or .5  or .1.  change 10 to 3 for now.

On Tue, May 3, 2016 at 12:47 PM, joachim heintz <jh@joachimheintz.de> wrote:
hi paul -

i checked your example, but unfortunately it only produces noise for me (with fade in and fade out, but noise anyway).  can you check again? the csd which i used is pasted below.

best -
        joachim


<CsoundSynthesizer>
<CsOptions>
-o paulstretch.wav -W
</CsOptions>
<CsInstruments>
sr = 44100
ksmps = 32
0dbfs = 1
nchnls = 2

giwav ftgen 0, 0, 0, 1, "fox.wav", 0, 0, 1

instr 1
aout paulstretch 10, 2.0, giwav
outs aout, aout
endin

</CsInstruments>
<CsScore>
i1 0 30

</CsScore>
</CsoundSynthesizer>





On 30/04/16 08:45, Paul Batchelor wrote:
Update:

I have successfully created an initial implementation of paulstretch
using the internal FFT library. It can be found in my fork of Csound:

https://github.com/paulbatchelor/csound

Two things I'd like to figure out before I make a PR:

- How to use deferred ftables, if possible
- More defensive coding with memory allocation
- Try to solve the valgrind errors that I'm getting


I've also attached a test CSD, in case someone should want to try it out...

-P

On Sun, Apr 24, 2016 at 10:25 PM, Victor Lazzarini
<Victor.Lazzarini@nuim.ie <mailto:Victor.Lazzarini@nuim.ie>> wrote:

    I don't think so.

    Victor Lazzarini
    Dean of Arts, Celtic Studies, and Philosophy
    Maynooth University
    Ireland

    On 25 Apr 2016, at 03:58, Paul Batchelor <ralphbluecoat@GMAIL.COM
    <mailto:ralphbluecoat@gmail.com>> wrote:

    Victor: thanks for pointing me in the right direction. Is there an
    upper limit for how big the FFT size can be?

    Joachim: I'll be sure to send you code your way as soon as I have
    something working. I'll be sure to contact paul if I run into any
    issues.

    -P

    On Sun, Apr 24, 2016 at 1:03 PM, joachim heintz
    <jh@joachimheintz.de <mailto:jh@joachimheintz.de>> wrote:

        hi paul -

        i always thought it would be so nice to have paulstretch as
        csound opcode!  i even had on my list to write him
        (paulnasca.com <http://paulnasca.com>) to ask whether he would

        not be willing to implement it as csound opcode (as he did for
        audacity).

        so — great to hear you are about to do so!  in cases of
        problems, i think paul might be willing to assist.

        cheers -
                joachim



        On 24/04/16 18:53, Paul Batchelor wrote:

            Hello!

            Yesterday, I managed to write my own C implementation of
            PaulStretch
            based off the Python commandline implementation. It can be
            found in the
            "dev" branch of Soundpipe:

            https://github.com/PaulBatchelor/Soundpipe/blob/dev/modules/paulstretch.c

            Here is a really small C example using my Soundpipe library:

            https://github.com/PaulBatchelor/Soundpipe/blob/dev/examples/ex_paulstretch.c

            My implementation takes something analogous to an ftable
            and then
            "stretches" it out.

            I think it would be neat to turn this into Csound Opcode!
            It would also
            be a fun experience for me, as I've never written an
            opcode before.

            The one complication that I see would be in the FFT
            library used. As far
            as I can see, the internal Csound FFT algorithm only works
            with powers
            of two. Paulstretch needs an FFT algorithm where you can
            have large
            arbitrary FFT sizes (you specify window size in seconds).
            For my
            implementation, I am using a small BSD licensed FFT
            library called
            KissFFT, which could be dropped in along with the
            paulstretch code.
            Would that be an okay solution?

            Let me know what you guys think of this!

            -P
            Csound mailing list Csound@listserv.heanet.ie
            <mailto:Csound@listserv.heanet.ie>
            <mailto:Csound@listserv.heanet.ie
            <mailto: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


        Csound mailing list
        Csound@listserv.heanet.ie <mailto: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


    Csound mailing list Csound@listserv.heanet.ie
    <mailto: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
    Csound mailing list Csound@listserv.heanet.ie
    <mailto: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


Csound mailing list Csound@listserv.heanet.ie
<mailto: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

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



--
_____________________________________________
Dr. Richard Boulanger
Professor of Electronic Production and Design
Professional Writing and Music Technology Division
Berklee College of Music
______________________________________________
President of Boulanger Labs - http://boulangerlabs.com
Author & Editor of The Csound Book - http://mitpress.mit.edu/books/csound-book
Author & Editor of The Audio Programming Book - http://mitpress.mit.edu/books/audio-programming-book
______________________________________________
about: http://www.boulangerlabs.com/about/richardboulanger/
about: http://www.csounds.com/community/developers/dr-richard-boulanger/
music: http://www.csounds.com/community/developers/dr-richard-boulanger/dr-richard-boulanger-music/

______________________________________________
email: rboulanger@berklee.edu
facebook: https://www.facebook.com/richard.boulanger.58
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

Date2016-05-03 23:58
FromPaul Batchelor
SubjectRe: PaulStretch in Csound?
Attachmentspaulstretch.mp3  
Here's what it's supposed to sound like...

On Tue, May 3, 2016 at 1:52 PM, Dr. Richard Boulanger <rboulanger@berklee.edu> wrote:
change 2.0 to .2  or .5  or .1.  change 10 to 3 for now.

On Tue, May 3, 2016 at 12:47 PM, joachim heintz <jh@joachimheintz.de> wrote:
hi paul -

i checked your example, but unfortunately it only produces noise for me (with fade in and fade out, but noise anyway).  can you check again? the csd which i used is pasted below.

best -
        joachim


<CsoundSynthesizer>
<CsOptions>
-o paulstretch.wav -W
</CsOptions>
<CsInstruments>
sr = 44100
ksmps = 32
0dbfs = 1
nchnls = 2

giwav ftgen 0, 0, 0, 1, "fox.wav", 0, 0, 1

instr 1
aout paulstretch 10, 2.0, giwav
outs aout, aout
endin

</CsInstruments>
<CsScore>
i1 0 30

</CsScore>
</CsoundSynthesizer>





On 30/04/16 08:45, Paul Batchelor wrote:
Update:

I have successfully created an initial implementation of paulstretch
using the internal FFT library. It can be found in my fork of Csound:

https://github.com/paulbatchelor/csound

Two things I'd like to figure out before I make a PR:

- How to use deferred ftables, if possible
- More defensive coding with memory allocation
- Try to solve the valgrind errors that I'm getting


I've also attached a test CSD, in case someone should want to try it out...

-P

On Sun, Apr 24, 2016 at 10:25 PM, Victor Lazzarini
<Victor.Lazzarini@nuim.ie <mailto:Victor.Lazzarini@nuim.ie>> wrote:

    I don't think so.

    Victor Lazzarini
    Dean of Arts, Celtic Studies, and Philosophy
    Maynooth University
    Ireland

    On 25 Apr 2016, at 03:58, Paul Batchelor <ralphbluecoat@GMAIL.COM
    <mailto:ralphbluecoat@gmail.com>> wrote:

    Victor: thanks for pointing me in the right direction. Is there an
    upper limit for how big the FFT size can be?

    Joachim: I'll be sure to send you code your way as soon as I have
    something working. I'll be sure to contact paul if I run into any
    issues.

    -P

    On Sun, Apr 24, 2016 at 1:03 PM, joachim heintz
    <jh@joachimheintz.de <mailto:jh@joachimheintz.de>> wrote:

        hi paul -

        i always thought it would be so nice to have paulstretch as
        csound opcode!  i even had on my list to write him
        (paulnasca.com <http://paulnasca.com>) to ask whether he would

        not be willing to implement it as csound opcode (as he did for
        audacity).

        so — great to hear you are about to do so!  in cases of
        problems, i think paul might be willing to assist.

        cheers -
                joachim



        On 24/04/16 18:53, Paul Batchelor wrote:

            Hello!

            Yesterday, I managed to write my own C implementation of
            PaulStretch
            based off the Python commandline implementation. It can be
            found in the
            "dev" branch of Soundpipe:

            https://github.com/PaulBatchelor/Soundpipe/blob/dev/modules/paulstretch.c

            Here is a really small C example using my Soundpipe library:

            https://github.com/PaulBatchelor/Soundpipe/blob/dev/examples/ex_paulstretch.c

            My implementation takes something analogous to an ftable
            and then
            "stretches" it out.

            I think it would be neat to turn this into Csound Opcode!
            It would also
            be a fun experience for me, as I've never written an
            opcode before.

            The one complication that I see would be in the FFT
            library used. As far
            as I can see, the internal Csound FFT algorithm only works
            with powers
            of two. Paulstretch needs an FFT algorithm where you can
            have large
            arbitrary FFT sizes (you specify window size in seconds).
            For my
            implementation, I am using a small BSD licensed FFT
            library called
            KissFFT, which could be dropped in along with the
            paulstretch code.
            Would that be an okay solution?

            Let me know what you guys think of this!

            -P
            Csound mailing list Csound@listserv.heanet.ie
            <mailto:Csound@listserv.heanet.ie>
            <mailto:Csound@listserv.heanet.ie
            <mailto: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


        Csound mailing list
        Csound@listserv.heanet.ie <mailto: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


    Csound mailing list Csound@listserv.heanet.ie
    <mailto: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
    Csound mailing list Csound@listserv.heanet.ie
    <mailto: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


Csound mailing list Csound@listserv.heanet.ie
<mailto: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

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



--
_____________________________________________
Dr. Richard Boulanger
Professor of Electronic Production and Design
Professional Writing and Music Technology Division
Berklee College of Music
______________________________________________
President of Boulanger Labs - http://boulangerlabs.com
Author & Editor of The Csound Book - http://mitpress.mit.edu/books/csound-book
Author & Editor of The Audio Programming Book - http://mitpress.mit.edu/books/audio-programming-book
______________________________________________
about: http://www.boulangerlabs.com/about/richardboulanger/
about: http://www.csounds.com/community/developers/dr-richard-boulanger/
music: http://www.csounds.com/community/developers/dr-richard-boulanger/dr-richard-boulanger-music/

______________________________________________
email: rboulanger@berklee.edu
facebook: https://www.facebook.com/richard.boulanger.58
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

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

Date2016-05-04 00:25
From"Dr. Richard Boulanger"
SubjectRe: PaulStretch in Csound?
I got that sound with the settings that I suggested.
With 2.0, it did not work for me either.

On Tue, May 3, 2016 at 6:58 PM, Paul Batchelor <ralphbluecoat@gmail.com> wrote:
Here's what it's supposed to sound like...

On Tue, May 3, 2016 at 1:52 PM, Dr. Richard Boulanger <rboulanger@berklee.edu> wrote:
change 2.0 to .2  or .5  or .1.  change 10 to 3 for now.

On Tue, May 3, 2016 at 12:47 PM, joachim heintz <jh@joachimheintz.de> wrote:
hi paul -

i checked your example, but unfortunately it only produces noise for me (with fade in and fade out, but noise anyway).  can you check again? the csd which i used is pasted below.

best -
        joachim


<CsoundSynthesizer>
<CsOptions>
-o paulstretch.wav -W
</CsOptions>
<CsInstruments>
sr = 44100
ksmps = 32
0dbfs = 1
nchnls = 2

giwav ftgen 0, 0, 0, 1, "fox.wav", 0, 0, 1

instr 1
aout paulstretch 10, 2.0, giwav
outs aout, aout
endin

</CsInstruments>
<CsScore>
i1 0 30

</CsScore>
</CsoundSynthesizer>





On 30/04/16 08:45, Paul Batchelor wrote:
Update:

I have successfully created an initial implementation of paulstretch
using the internal FFT library. It can be found in my fork of Csound:

https://github.com/paulbatchelor/csound

Two things I'd like to figure out before I make a PR:

- How to use deferred ftables, if possible
- More defensive coding with memory allocation
- Try to solve the valgrind errors that I'm getting


I've also attached a test CSD, in case someone should want to try it out...

-P

On Sun, Apr 24, 2016 at 10:25 PM, Victor Lazzarini
<Victor.Lazzarini@nuim.ie <mailto:Victor.Lazzarini@nuim.ie>> wrote:

    I don't think so.

    Victor Lazzarini
    Dean of Arts, Celtic Studies, and Philosophy
    Maynooth University
    Ireland

    On 25 Apr 2016, at 03:58, Paul Batchelor <ralphbluecoat@GMAIL.COM
    <mailto:ralphbluecoat@gmail.com>> wrote:

    Victor: thanks for pointing me in the right direction. Is there an
    upper limit for how big the FFT size can be?

    Joachim: I'll be sure to send you code your way as soon as I have
    something working. I'll be sure to contact paul if I run into any
    issues.

    -P

    On Sun, Apr 24, 2016 at 1:03 PM, joachim heintz
    <jh@joachimheintz.de <mailto:jh@joachimheintz.de>> wrote:

        hi paul -

        i always thought it would be so nice to have paulstretch as
        csound opcode!  i even had on my list to write him
        (paulnasca.com <http://paulnasca.com>) to ask whether he would

        not be willing to implement it as csound opcode (as he did for
        audacity).

        so — great to hear you are about to do so!  in cases of
        problems, i think paul might be willing to assist.

        cheers -
                joachim



        On 24/04/16 18:53, Paul Batchelor wrote:

            Hello!

            Yesterday, I managed to write my own C implementation of
            PaulStretch
            based off the Python commandline implementation. It can be
            found in the
            "dev" branch of Soundpipe:

            https://github.com/PaulBatchelor/Soundpipe/blob/dev/modules/paulstretch.c

            Here is a really small C example using my Soundpipe library:

            https://github.com/PaulBatchelor/Soundpipe/blob/dev/examples/ex_paulstretch.c

            My implementation takes something analogous to an ftable
            and then
            "stretches" it out.

            I think it would be neat to turn this into Csound Opcode!
            It would also
            be a fun experience for me, as I've never written an
            opcode before.

            The one complication that I see would be in the FFT
            library used. As far
            as I can see, the internal Csound FFT algorithm only works
            with powers
            of two. Paulstretch needs an FFT algorithm where you can
            have large
            arbitrary FFT sizes (you specify window size in seconds).
            For my
            implementation, I am using a small BSD licensed FFT
            library called
            KissFFT, which could be dropped in along with the
            paulstretch code.
            Would that be an okay solution?

            Let me know what you guys think of this!

            -P
            Csound mailing list Csound@listserv.heanet.ie
            <mailto:Csound@listserv.heanet.ie>
            <mailto:Csound@listserv.heanet.ie
            <mailto: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


        Csound mailing list
        Csound@listserv.heanet.ie <mailto: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


    Csound mailing list Csound@listserv.heanet.ie
    <mailto: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
    Csound mailing list Csound@listserv.heanet.ie
    <mailto: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


Csound mailing list Csound@listserv.heanet.ie
<mailto: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

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



--
_____________________________________________
Dr. Richard Boulanger
Professor of Electronic Production and Design
Professional Writing and Music Technology Division
Berklee College of Music
______________________________________________
President of Boulanger Labs - http://boulangerlabs.com
Author & Editor of The Csound Book - http://mitpress.mit.edu/books/csound-book
Author & Editor of The Audio Programming Book - http://mitpress.mit.edu/books/audio-programming-book
______________________________________________
about: http://www.boulangerlabs.com/about/richardboulanger/
about: http://www.csounds.com/community/developers/dr-richard-boulanger/
music: http://www.csounds.com/community/developers/dr-richard-boulanger/dr-richard-boulanger-music/

______________________________________________
email: rboulanger@berklee.edu
facebook: https://www.facebook.com/richard.boulanger.58
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

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



--
_____________________________________________
Dr. Richard Boulanger
Professor of Electronic Production and Design
Professional Writing and Music Technology Division
Berklee College of Music
______________________________________________
President of Boulanger Labs - http://boulangerlabs.com
Author & Editor of The Csound Book - http://mitpress.mit.edu/books/csound-book
Author & Editor of The Audio Programming Book - http://mitpress.mit.edu/books/audio-programming-book
______________________________________________
about: http://www.boulangerlabs.com/about/richardboulanger/
about: http://www.csounds.com/community/developers/dr-richard-boulanger/
music: http://www.csounds.com/community/developers/dr-richard-boulanger/dr-richard-boulanger-music/

______________________________________________
email: rboulanger@berklee.edu
facebook: https://www.facebook.com/richard.boulanger.58
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

Date2016-05-04 00:33
FromPaul Batchelor
SubjectRe: PaulStretch in Csound?
Audio and/or any error messages would be great.

On Tue, May 3, 2016 at 4:25 PM, Dr. Richard Boulanger <rboulanger@berklee.edu> wrote:
I got that sound with the settings that I suggested.
With 2.0, it did not work for me either.

On Tue, May 3, 2016 at 6:58 PM, Paul Batchelor <ralphbluecoat@gmail.com> wrote:
Here's what it's supposed to sound like...

On Tue, May 3, 2016 at 1:52 PM, Dr. Richard Boulanger <rboulanger@berklee.edu> wrote:
change 2.0 to .2  or .5  or .1.  change 10 to 3 for now.

On Tue, May 3, 2016 at 12:47 PM, joachim heintz <jh@joachimheintz.de> wrote:
hi paul -

i checked your example, but unfortunately it only produces noise for me (with fade in and fade out, but noise anyway).  can you check again? the csd which i used is pasted below.

best -
        joachim


<CsoundSynthesizer>
<CsOptions>
-o paulstretch.wav -W
</CsOptions>
<CsInstruments>
sr = 44100
ksmps = 32
0dbfs = 1
nchnls = 2

giwav ftgen 0, 0, 0, 1, "fox.wav", 0, 0, 1

instr 1
aout paulstretch 10, 2.0, giwav
outs aout, aout
endin

</CsInstruments>
<CsScore>
i1 0 30

</CsScore>
</CsoundSynthesizer>





On 30/04/16 08:45, Paul Batchelor wrote:
Update:

I have successfully created an initial implementation of paulstretch
using the internal FFT library. It can be found in my fork of Csound:

https://github.com/paulbatchelor/csound

Two things I'd like to figure out before I make a PR:

- How to use deferred ftables, if possible
- More defensive coding with memory allocation
- Try to solve the valgrind errors that I'm getting


I've also attached a test CSD, in case someone should want to try it out...

-P

On Sun, Apr 24, 2016 at 10:25 PM, Victor Lazzarini
<Victor.Lazzarini@nuim.ie <mailto:Victor.Lazzarini@nuim.ie>> wrote:

    I don't think so.

    Victor Lazzarini
    Dean of Arts, Celtic Studies, and Philosophy
    Maynooth University
    Ireland

    On 25 Apr 2016, at 03:58, Paul Batchelor <ralphbluecoat@GMAIL.COM
    <mailto:ralphbluecoat@gmail.com>> wrote:

    Victor: thanks for pointing me in the right direction. Is there an
    upper limit for how big the FFT size can be?

    Joachim: I'll be sure to send you code your way as soon as I have
    something working. I'll be sure to contact paul if I run into any
    issues.

    -P

    On Sun, Apr 24, 2016 at 1:03 PM, joachim heintz
    <jh@joachimheintz.de <mailto:jh@joachimheintz.de>> wrote:

        hi paul -

        i always thought it would be so nice to have paulstretch as
        csound opcode!  i even had on my list to write him
        (paulnasca.com <http://paulnasca.com>) to ask whether he would

        not be willing to implement it as csound opcode (as he did for
        audacity).

        so — great to hear you are about to do so!  in cases of
        problems, i think paul might be willing to assist.

        cheers -
                joachim



        On 24/04/16 18:53, Paul Batchelor wrote:

            Hello!

            Yesterday, I managed to write my own C implementation of
            PaulStretch
            based off the Python commandline implementation. It can be
            found in the
            "dev" branch of Soundpipe:

            https://github.com/PaulBatchelor/Soundpipe/blob/dev/modules/paulstretch.c

            Here is a really small C example using my Soundpipe library:

            https://github.com/PaulBatchelor/Soundpipe/blob/dev/examples/ex_paulstretch.c

            My implementation takes something analogous to an ftable
            and then
            "stretches" it out.

            I think it would be neat to turn this into Csound Opcode!
            It would also
            be a fun experience for me, as I've never written an
            opcode before.

            The one complication that I see would be in the FFT
            library used. As far
            as I can see, the internal Csound FFT algorithm only works
            with powers
            of two. Paulstretch needs an FFT algorithm where you can
            have large
            arbitrary FFT sizes (you specify window size in seconds).
            For my
            implementation, I am using a small BSD licensed FFT
            library called
            KissFFT, which could be dropped in along with the
            paulstretch code.
            Would that be an okay solution?

            Let me know what you guys think of this!

            -P
            Csound mailing list Csound@listserv.heanet.ie
            <mailto:Csound@listserv.heanet.ie>
            <mailto:Csound@listserv.heanet.ie
            <mailto: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


        Csound mailing list
        Csound@listserv.heanet.ie <mailto: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


    Csound mailing list Csound@listserv.heanet.ie
    <mailto: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
    Csound mailing list Csound@listserv.heanet.ie
    <mailto: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


Csound mailing list Csound@listserv.heanet.ie
<mailto: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

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



--
_____________________________________________
Dr. Richard Boulanger
Professor of Electronic Production and Design
Professional Writing and Music Technology Division
Berklee College of Music
______________________________________________
President of Boulanger Labs - http://boulangerlabs.com
Author & Editor of The Csound Book - http://mitpress.mit.edu/books/csound-book
Author & Editor of The Audio Programming Book - http://mitpress.mit.edu/books/audio-programming-book
______________________________________________
about: http://www.boulangerlabs.com/about/richardboulanger/
about: http://www.csounds.com/community/developers/dr-richard-boulanger/
music: http://www.csounds.com/community/developers/dr-richard-boulanger/dr-richard-boulanger-music/

______________________________________________
email: rboulanger@berklee.edu
facebook: https://www.facebook.com/richard.boulanger.58
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

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



--
_____________________________________________
Dr. Richard Boulanger
Professor of Electronic Production and Design
Professional Writing and Music Technology Division
Berklee College of Music
______________________________________________
President of Boulanger Labs - http://boulangerlabs.com
Author & Editor of The Csound Book - http://mitpress.mit.edu/books/csound-book
Author & Editor of The Audio Programming Book - http://mitpress.mit.edu/books/audio-programming-book
______________________________________________
about: http://www.boulangerlabs.com/about/richardboulanger/
about: http://www.csounds.com/community/developers/dr-richard-boulanger/
music: http://www.csounds.com/community/developers/dr-richard-boulanger/dr-richard-boulanger-music/

______________________________________________
email: rboulanger@berklee.edu
facebook: https://www.facebook.com/richard.boulanger.58
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

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

Date2016-05-04 08:41
FromMenno Knevel
SubjectRe: PaulStretch in Csound?
i do get the desired sonic result with windowsize = 2, but as i am using
Linux and Jack i also get about 15 warning messages because of xrun errors. 
A bit strange because paulstretch does not use a lot of CPU.

Great to have this opcode integrated in Csound!



--
View this message in context: http://csound.1045644.n5.nabble.com/Csnd-PaulStretch-in-Csound-tp5749205p5749478.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

Date2016-05-04 08:52
FromHlöðver Sigurðsson
SubjectRe: PaulStretch in Csound?
I also got the desired sonic result. Happieness and joy on my side. Cheers to Paul (Batchelor)!

2016-05-04 9:41 GMT+02:00 Menno Knevel <magknevel@gmail.com>:
i do get the desired sonic result with windowsize = 2, but as i am using
Linux and Jack i also get about 15 warning messages because of xrun errors.
A bit strange because paulstretch does not use a lot of CPU.

Great to have this opcode integrated in Csound!



--
View this message in context: http://csound.1045644.n5.nabble.com/Csnd-PaulStretch-in-Csound-tp5749205p5749478.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

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

Date2016-05-04 11:36
FromJohn
SubjectRe: PaulStretch in Csound?

Can the manual example be changed to match?

On 4 May 2016, at 08:42, Menno Knevel <magknevel@GMAIL.COM> wrote:
i do get the desired sonic result with windowsize = 2, but as i am using
Linux and Jack i also get about 15 warning messages because of xrun errors.
A bit strange because paulstretch does not use a lot of CPU.

Great to have this opcode integrated in Csound!



--
View this message in context: http://csound.1045644.n5.nabble.com/Csnd-PaulStretch-in-Csound-tp5749205p5749478.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

Date2016-05-04 11:48
FromVictor Lazzarini
SubjectRe: PaulStretch in Csound?
I tried the opcode and I got the intended result. However, I was trying to see if I could get
the original sound with ‘1’ in the first parameter, but just got a quick run of the stretched sound.

========================
Dr Victor Lazzarini
Dean of Arts, Celtic Studies and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952 

> On 4 May 2016, at 11:36, John  wrote:
> 
> Can the manual example be changed to match?
> 
> On 4 May 2016, at 08:42, Menno Knevel  wrote:
> i do get the desired sonic result with windowsize = 2, but as i am using
> Linux and Jack i also get about 15 warning messages because of xrun errors. 
> A bit strange because paulstretch does not use a lot of CPU.
> 
> Great to have this opcode integrated in Csound!
> 
> 
> 
> --
> View this message in context: http://csound.1045644.n5.nabble.com/Csnd-PaulStretch-in-Csound-tp5749205p5749478.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
> 
> 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

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

Date2016-05-04 11:51
FromVictor Lazzarini
SubjectRe: PaulStretch in Csound?
I see, the other parameter seems to allow for playing it at the original speed. I guess I need to RTF
========================
Dr Victor Lazzarini
Dean of Arts, Celtic Studies and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952 

> On 4 May 2016, at 11:48, Victor Lazzarini  wrote:
> 
> I tried the opcode and I got the intended result. However, I was trying to see if I could get
> the original sound with ‘1’ in the first parameter, but just got a quick run of the stretched sound.
> 
> ========================
> Dr Victor Lazzarini
> Dean of Arts, Celtic Studies and Philosophy,
> Maynooth University,
> Maynooth, Co Kildare, Ireland
> Tel: 00 353 7086936
> Fax: 00 353 1 7086952 
> 
>> On 4 May 2016, at 11:36, John  wrote:
>> 
>> Can the manual example be changed to match?
>> 
>> On 4 May 2016, at 08:42, Menno Knevel  wrote:
>> i do get the desired sonic result with windowsize = 2, but as i am using
>> Linux and Jack i also get about 15 warning messages because of xrun errors. 
>> A bit strange because paulstretch does not use a lot of CPU.
>> 
>> Great to have this opcode integrated in Csound!
>> 
>> 
>> 
>> --
>> View this message in context: http://csound.1045644.n5.nabble.com/Csnd-PaulStretch-in-Csound-tp5749205p5749478.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
>> 
>> 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
> 
> 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

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

Date2016-05-04 12:02
FromVictor Lazzarini
SubjectRe: PaulStretch in Csound?
A suggestion: you should look to see what the allowed FFT sizes are and then pad the data to them,
to avoid  warnings such as these

 WARNING: csoundRealFFTnp2(): invalid FFT size, 121569

and failures in the process.
========================
Dr Victor Lazzarini
Dean of Arts, Celtic Studies and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952 

> On 4 May 2016, at 11:51, Victor Lazzarini  wrote:
> 
> I see, the other parameter seems to allow for playing it at the original speed. I guess I need to RTF
> ========================
> Dr Victor Lazzarini
> Dean of Arts, Celtic Studies and Philosophy,
> Maynooth University,
> Maynooth, Co Kildare, Ireland
> Tel: 00 353 7086936
> Fax: 00 353 1 7086952 
> 
>> On 4 May 2016, at 11:48, Victor Lazzarini  wrote:
>> 
>> I tried the opcode and I got the intended result. However, I was trying to see if I could get
>> the original sound with ‘1’ in the first parameter, but just got a quick run of the stretched sound.
>> 
>> ========================
>> Dr Victor Lazzarini
>> Dean of Arts, Celtic Studies and Philosophy,
>> Maynooth University,
>> Maynooth, Co Kildare, Ireland
>> Tel: 00 353 7086936
>> Fax: 00 353 1 7086952 
>> 
>>> On 4 May 2016, at 11:36, John  wrote:
>>> 
>>> Can the manual example be changed to match?
>>> 
>>> On 4 May 2016, at 08:42, Menno Knevel  wrote:
>>> i do get the desired sonic result with windowsize = 2, but as i am using
>>> Linux and Jack i also get about 15 warning messages because of xrun errors. 
>>> A bit strange because paulstretch does not use a lot of CPU.
>>> 
>>> Great to have this opcode integrated in Csound!
>>> 
>>> 
>>> 
>>> --
>>> View this message in context: http://csound.1045644.n5.nabble.com/Csnd-PaulStretch-in-Csound-tp5749205p5749478.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
>>> 
>>> 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
>> 
>> 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
> 
> 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

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

Date2016-05-04 12:04
FromVictor Lazzarini
SubjectRe: PaulStretch in Csound?
Also make sure the user can’t use parameters that will crash Csound.
========================
Dr Victor Lazzarini
Dean of Arts, Celtic Studies and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952 

> On 4 May 2016, at 12:02, Victor Lazzarini  wrote:
> 
> A suggestion: you should look to see what the allowed FFT sizes are and then pad the data to them,
> to avoid  warnings such as these
> 
> WARNING: csoundRealFFTnp2(): invalid FFT size, 121569
> 
> and failures in the process.
> ========================
> Dr Victor Lazzarini
> Dean of Arts, Celtic Studies and Philosophy,
> Maynooth University,
> Maynooth, Co Kildare, Ireland
> Tel: 00 353 7086936
> Fax: 00 353 1 7086952 
> 
>> On 4 May 2016, at 11:51, Victor Lazzarini  wrote:
>> 
>> I see, the other parameter seems to allow for playing it at the original speed. I guess I need to RTF
>> ========================
>> Dr Victor Lazzarini
>> Dean of Arts, Celtic Studies and Philosophy,
>> Maynooth University,
>> Maynooth, Co Kildare, Ireland
>> Tel: 00 353 7086936
>> Fax: 00 353 1 7086952 
>> 
>>> On 4 May 2016, at 11:48, Victor Lazzarini  wrote:
>>> 
>>> I tried the opcode and I got the intended result. However, I was trying to see if I could get
>>> the original sound with ‘1’ in the first parameter, but just got a quick run of the stretched sound.
>>> 
>>> ========================
>>> Dr Victor Lazzarini
>>> Dean of Arts, Celtic Studies and Philosophy,
>>> Maynooth University,
>>> Maynooth, Co Kildare, Ireland
>>> Tel: 00 353 7086936
>>> Fax: 00 353 1 7086952 
>>> 
>>>> On 4 May 2016, at 11:36, John  wrote:
>>>> 
>>>> Can the manual example be changed to match?
>>>> 
>>>> On 4 May 2016, at 08:42, Menno Knevel  wrote:
>>>> i do get the desired sonic result with windowsize = 2, but as i am using
>>>> Linux and Jack i also get about 15 warning messages because of xrun errors. 
>>>> A bit strange because paulstretch does not use a lot of CPU.
>>>> 
>>>> Great to have this opcode integrated in Csound!
>>>> 
>>>> 
>>>> 
>>>> --
>>>> View this message in context: http://csound.1045644.n5.nabble.com/Csnd-PaulStretch-in-Csound-tp5749205p5749478.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
>>>> 
>>>> 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
>>> 
>>> 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
>> 
>> 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
> 
> 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

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

Date2016-05-04 18:43
FromPaul Batchelor
SubjectRe: PaulStretch in Csound?

the algorithm is optimal for extreme time stretches, and isn't suitable for smaller time stretches. This is due to large window sizes and the fact that the original phase is completely disregarded and scrambled.

Victor, this weekend I will work on making my code more defensive against invalid user arguments and make another PR. Thanks!

On May 4, 2016 04:04, "Victor Lazzarini" <Victor.Lazzarini@nuim.ie> wrote:
Also make sure the user can’t use parameters that will crash Csound.
========================
Dr Victor Lazzarini
Dean of Arts, Celtic Studies and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

> On 4 May 2016, at 12:02, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
>
> A suggestion: you should look to see what the allowed FFT sizes are and then pad the data to them,
> to avoid  warnings such as these
>
> WARNING: csoundRealFFTnp2(): invalid FFT size, 121569
>
> and failures in the process.
> ========================
> Dr Victor Lazzarini
> Dean of Arts, Celtic Studies and Philosophy,
> Maynooth University,
> Maynooth, Co Kildare, Ireland
> Tel: 00 353 7086936
> Fax: 00 353 1 7086952
>
>> On 4 May 2016, at 11:51, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
>>
>> I see, the other parameter seems to allow for playing it at the original speed. I guess I need to RTF
>> ========================
>> Dr Victor Lazzarini
>> Dean of Arts, Celtic Studies and Philosophy,
>> Maynooth University,
>> Maynooth, Co Kildare, Ireland
>> Tel: 00 353 7086936
>> Fax: 00 353 1 7086952
>>
>>> On 4 May 2016, at 11:48, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
>>>
>>> I tried the opcode and I got the intended result. However, I was trying to see if I could get
>>> the original sound with ‘1’ in the first parameter, but just got a quick run of the stretched sound.
>>>
>>> ========================
>>> Dr Victor Lazzarini
>>> Dean of Arts, Celtic Studies and Philosophy,
>>> Maynooth University,
>>> Maynooth, Co Kildare, Ireland
>>> Tel: 00 353 7086936
>>> Fax: 00 353 1 7086952
>>>
>>>> On 4 May 2016, at 11:36, John <jpff@codemist.co.uk> wrote:
>>>>
>>>> Can the manual example be changed to match?
>>>>
>>>> On 4 May 2016, at 08:42, Menno Knevel <magknevel@GMAIL.COM> wrote:
>>>> i do get the desired sonic result with windowsize = 2, but as i am using
>>>> Linux and Jack i also get about 15 warning messages because of xrun errors.
>>>> A bit strange because paulstretch does not use a lot of CPU.
>>>>
>>>> Great to have this opcode integrated in Csound!
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context: http://csound.1045644.n5.nabble.com/Csnd-PaulStretch-in-Csound-tp5749205p5749478.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
>>>>
>>>> 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
>>>
>>> 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
>>
>> 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
>
> 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

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
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

Date2016-05-04 22:43
Fromjoachim heintz
SubjectRe: PaulStretch in Csound?
thanks, that helped.  obviously the problem is in the second parameter; 
should be below 1, at least in this case.

sounds great, paul!  thanks for this!

	joachim



On 03/05/16 22:52, Dr. Richard Boulanger wrote:
> change 2.0 to .2  or .5  or .1.  change 10 to 3 for now.
>
> On Tue, May 3, 2016 at 12:47 PM, joachim heintz   > wrote:
>
> hi paul -
>
> i checked your example, but unfortunately it only produces noise for
> me (with fade in and fade out, but noise anyway).  can you check
> again? the csd which i used is pasted below.
>
> best - joachim
>
>
>   -o paulstretch.wav -W 
>  sr = 44100 ksmps = 32 0dbfs = 1 nchnls = 2
>
> giwav ftgen 0, 0, 0, 1, "fox.wav", 0, 0, 1
>
> instr 1 aout paulstretch 10, 2.0, giwav outs aout, aout endin
>
>   i1 0 30
>
>  
>
>
>
>
>
> On 30/04/16 08:45, Paul Batchelor wrote:
>
> Update:
>
> I have successfully created an initial implementation of paulstretch
> using the internal FFT library. It can be found in my fork of
> Csound:
>
> https://github.com/paulbatchelor/csound
>
> Two things I'd like to figure out before I make a PR:
>
> - How to use deferred ftables, if possible - More defensive coding
> with memory allocation - Try to solve the valgrind errors that I'm
> getting
>
>
> I've also attached a test CSD, in case someone should want to try it
> out...
>
> -P
>
> On Sun, Apr 24, 2016 at 10:25 PM, Victor Lazzarini
> 
> >>
> wrote:
>
> I don't think so.
>
> Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy
> Maynooth University Ireland
>
> On 25 Apr 2016, at 03:58, Paul Batchelor    >> wrote:
>
> Victor: thanks for pointing me in the right direction. Is there an
> upper limit for how big the FFT size can be?
>
> Joachim: I'll be sure to send you code your way as soon as I have
> something working. I'll be sure to contact paul if I run into any
> issues.
>
> -P
>
> On Sun, Apr 24, 2016 at 1:03 PM, joachim heintz    >> wrote:
>
> hi paul -
>
> i always thought it would be so nice to have paulstretch as csound
> opcode!  i even had on my list to write him (paulnasca.com
>  ) to ask whether he
> would
>
> not be willing to implement it as csound opcode (as he did for
> audacity).
>
> so — great to hear you are about to do so!  in cases of problems, i
> think paul might be willing to assist.
>
> cheers - joachim
>
>
>
> On 24/04/16 18:53, Paul Batchelor wrote:
>
> Hello!
>
> Yesterday, I managed to write my own C implementation of PaulStretch
> based off the Python commandline implementation. It can be found in
> the "dev" branch of Soundpipe:
>
> https://github.com/PaulBatchelor/Soundpipe/blob/dev/modules/paulstretch.c
>
>  Here is a really small C example using my Soundpipe library:
>
> https://github.com/PaulBatchelor/Soundpipe/blob/dev/examples/ex_paulstretch.c
>
>  My implementation takes something analogous to an ftable and then
> "stretches" it out.
>
> I think it would be neat to turn this into Csound Opcode! It would
> also be a fun experience for me, as I've never written an opcode
> before.
>
> The one complication that I see would be in the FFT library used. As
> far as I can see, the internal Csound FFT algorithm only works with
> powers of two. Paulstretch needs an FFT algorithm where you can have
> large arbitrary FFT sizes (you specify window size in seconds). For
> my implementation, I am using a small BSD licensed FFT library
> called KissFFT, which could be dropped in along with the paulstretch
> code. Would that be an okay solution?
>
> Let me know what you guys think of this!
>
> -P 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
>
>
> 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
>
>
> 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
>
> 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
>
>
> 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
>
>
> 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
>
>
>
>
> -- _____________________________________________ *Dr. Richard
> Boulanger* Professor of Electronic Production and Design Professional
> Writing and Music Technology Division Berklee College of Music
> ______________________________________________ President of
> *Boulanger Labs* - http://boulangerlabs.com Author & Editor of *The
> Csound Book* - http://mitpress.mit.edu/books/csound-book Author &
> Editor of *The Audio Programming Book* -
> http://mitpress.mit.edu/books/audio-programming-book
> ______________________________________________ about:
> http://www.boulangerlabs.com/about/richardboulanger/ about:
> http://www.csounds.com/community/developers/dr-richard-boulanger/
> music:
> http://www.csounds.com/community/developers/dr-richard-boulanger/dr-richard-boulanger-music/
>
>
______________________________________________
> email: rboulanger@berklee.edu 
> facebook: https://www.facebook.com/richard.boulanger.58 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

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