Csound Csound-dev Csound-tekno Search About

Generate Tukey Window for Reverse Delay UDO

Date2017-01-17 06:59
FromEmmett Palaima
SubjectGenerate Tukey Window for Reverse Delay UDO

I recently made a simple reverse delay UDO for use in a larger sound design project I'm working on. It uses delayr and deltapn with a linearly increasing delay time to create the reverse delay effect. In order to prevent clicks when the buffer read position shifts to the beginning of another reversed echo I window the delay output with a sine function. This works to get rid of the clicks, but creates a noticeable tremelo effect in the output. 


I was wondering if there is an easy way within csound to generate something more rectangular like a tukey window based on the buffer postion. Any suggestions?


Included below are my opcode and a test instrument that uses it. 


turnon "revTest"


opcode reverseDelay, a, akki

setksmps 1

ain, kfb, kdel, imaxdel xin


krev init 1


kenv = sin($M_PI*sqrt(krev/kdel))


printks "KENV: %f\n", .1, kenv


abuffer delayr imaxdel

adel deltapn krev

adel *= kenv

delayw ain + adel * kfb

krev += 2

if(krev >= kdel)then

krev -= kdel

endif

xout adel

endop

instr revTest


adry, adry2 ins

adel reverseDelay adry, .5, 24000, 1


outs adel, adel


endin

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

Date2017-01-17 09:05
FromVictor Lazzarini
SubjectRe: Generate Tukey Window for Reverse Delay UDO
If you use table/tablei you can experiment with different windows stored in a function table. GEN20 can generate 
different types, but you can use other GENs or even custom expressions.
========================
Prof. 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 17 Jan 2017, at 06:59, Emmett Palaima  wrote:
> 
> I recently made a simple reverse delay UDO for use in a larger sound design project I'm working on. It uses delayr and deltapn with a linearly increasing delay time to create the reverse delay effect. In order to prevent clicks when the buffer read position shifts to the beginning of another reversed echo I window the delay output with a sine function. This works to get rid of the clicks, but creates a noticeable tremelo effect in the output. 
> 
> I was wondering if there is an easy way within csound to generate something more rectangular like a tukey window based on the buffer postion. Any suggestions?
> 
> Included below are my opcode and a test instrument that uses it. 
> 
> turnon "revTest"
> 
> opcode reverseDelay, a, akki
> setksmps 1
> ain, kfb, kdel, imaxdel xin
> 
> krev init 1
> 
> kenv = sin($M_PI*sqrt(krev/kdel))
> 
> printks "KENV: %f\n", .1, kenv
> 
> abuffer delayr imaxdel
> adel deltapn krev
> adel *= kenv
> delayw ain + adel * kfb
> krev += 2
> if(krev >= kdel)then
> krev -= kdel
> endif
> xout adel
> endop
> instr revTest
> 
> adry, adry2 ins
> adel	reverseDelay adry, .5, 24000, 1
> 
> outs adel, adel
> 
> endin
> 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

Date2017-01-17 21:11
FromOeyvind Brandtsegg
SubjectRe: Generate Tukey Window for Reverse Delay UDO
Hi,
You can get around it by creating two overlapping delay processes, so
that another process is sounding when you reset the delay time.
Oeyvind

2017-01-16 22:59 GMT-08:00 Emmett Palaima :
> I recently made a simple reverse delay UDO for use in a larger sound design
> project I'm working on. It uses delayr and deltapn with a linearly
> increasing delay time to create the reverse delay effect. In order to
> prevent clicks when the buffer read position shifts to the beginning of
> another reversed echo I window the delay output with a sine function. This
> works to get rid of the clicks, but creates a noticeable tremelo effect in
> the output.
>
>
> I was wondering if there is an easy way within csound to generate something
> more rectangular like a tukey window based on the buffer postion. Any
> suggestions?
>
>
> Included below are my opcode and a test instrument that uses it.
>
>
> turnon "revTest"
>
>
> opcode reverseDelay, a, akki
>
> setksmps 1
>
> ain, kfb, kdel, imaxdel xin
>
>
> krev init 1
>
>
> kenv = sin($M_PI*sqrt(krev/kdel))
>
>
> printks "KENV: %f\n", .1, kenv
>
>
> abuffer delayr imaxdel
>
> adel deltapn krev
>
> adel *= kenv
>
> delayw ain + adel * kfb
>
> krev += 2
>
> if(krev >= kdel)then
>
> krev -= kdel
>
> endif
>
> xout adel
>
> endop
>
> instr revTest
>
>
> adry, adry2 ins
>
> adel reverseDelay adry, .5, 24000, 1
>
>
> outs adel, adel
>
>
> endin
>
> 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


Date2017-01-17 21:41
FromIain McCurdy
SubjectRe: Generate Tukey Window for Reverse Delay UDO

For a tukey-type window you could take your envelope signal kenv apply gain and send it through 'clip', the more gain you apply the squarer the window becomes and the clip can be used to prevent kenv exceeding 1. You will need to convert kenv to a-rate first though but this maybe isn't a bad idea anyway.

You could also try powershape with an exponent less than 1. The result of this is slightly different, slightly less aggressive than clipping.

Iain


From: A discussion list for users of Csound <CSOUND@LISTSERV.HEANET.IE> on behalf of Emmett Palaima <epalaima@BERKLEE.EDU>
Sent: 17 January 2017 06:59
To: CSOUND@LISTSERV.HEANET.IE
Subject: [Csnd] Generate Tukey Window for Reverse Delay UDO
 

I recently made a simple reverse delay UDO for use in a larger sound design project I'm working on. It uses delayr and deltapn with a linearly increasing delay time to create the reverse delay effect. In order to prevent clicks when the buffer read position shifts to the beginning of another reversed echo I window the delay output with a sine function. This works to get rid of the clicks, but creates a noticeable tremelo effect in the output. 


I was wondering if there is an easy way within csound to generate something more rectangular like a tukey window based on the buffer postion. Any suggestions?


Included below are my opcode and a test instrument that uses it. 


turnon "revTest"


opcode reverseDelay, a, akki

setksmps 1

ain, kfb, kdel, imaxdel xin


krev init 1


kenv = sin($M_PI*sqrt(krev/kdel))


printks "KENV: %f\n", .1, kenv


abuffer delayr imaxdel

adel deltapn krev

adel *= kenv

delayw ain + adel * kfb

krev += 2

if(krev >= kdel)then

krev -= kdel

endif

xout adel

endop

instr revTest


adry, adry2 ins

adel reverseDelay adry, .5, 24000, 1


outs adel, adel


endin

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