spectral delay
Date | 2007-10-16 12:54 |
From | peiman |
Subject | spectral delay |
Hi all, Following from yesterday's post, I have been wandering how to do the following operations in csound, using the pvs opcodes. After thinking for some hours about this I still cannot come up with an answer. 1-spectral delay, where the amount of delay for individual bins is defined in a function table (prefebally this would also include feedback with control over the amount of feedback). 2-the ability to change the rate at which fft frames are updated so to average the time resolution of the input. So in short I cannot work out how to do time-domain operations on pvs streams or fft bins. Any comments are very much welcome :-) Many Thanks Peiman -- View this message in context: http://www.nabble.com/spectral-delay-tf4633685.html#a13231682 Sent from the Csound - General mailing list archive at Nabble.com. |
Date | 2007-10-16 13:02 |
From | Victor Lazzarini |
Subject | Re: spectral delay |
At 12:54 16/10/2007, you wrote: >Hi all, > >Following from yesterday's post, I have been wandering how to do the >following operations in csound, using the pvs opcodes. After thinking for >some hours about this I still cannot come up with an answer. > >1-spectral delay, where the amount of delay for individual bins is defined >in a function table (prefebally this would also include feedback with >control over the amount of feedback). Use the new opcodes pvsbuffer and pvsbufread >2-the ability to change the rate at which fft frames are updated so to >average the time resolution of the input. Also pvsbuffer and pvsbufread. These are the two prime target operations for the new opcodes. Hope they do what you want. Victor >So in short I cannot work out how to do time-domain operations on pvs >streams or fft bins. > >Any comments are very much welcome :-) > >Many Thanks >Peiman >-- >View this message in context: >http://www.nabble.com/spectral-delay-tf4633685.html#a13231682 >Sent from the Csound - General mailing list archive at Nabble.com. > >-- >Send bugs reports to this list. >To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk Victor Lazzarini Music Technology Laboratory Music Department National University of Ireland, Maynooth |
Date | 2007-10-16 13:07 |
From | peiman |
Subject | Re: spectral delay |
Great! Thanks Victor. I will look at them right now. Best Peiman Victor Lazzarini wrote: > > At 12:54 16/10/2007, you wrote: > >>Hi all, >> >>Following from yesterday's post, I have been wandering how to do the >>following operations in csound, using the pvs opcodes. After thinking for >>some hours about this I still cannot come up with an answer. >> >>1-spectral delay, where the amount of delay for individual bins is defined >>in a function table (prefebally this would also include feedback with >>control over the amount of feedback). > > Use the new opcodes pvsbuffer and pvsbufread > > >>2-the ability to change the rate at which fft frames are updated so to >>average the time resolution of the input. > > Also pvsbuffer and pvsbufread. These are the two prime target > operations for the new opcodes. Hope they do what you want. > > Victor > > > >>So in short I cannot work out how to do time-domain operations on pvs >>streams or fft bins. >> >>Any comments are very much welcome :-) >> >>Many Thanks >>Peiman >>-- >>View this message in context: >>http://www.nabble.com/spectral-delay-tf4633685.html#a13231682 >>Sent from the Csound - General mailing list archive at Nabble.com. >> >>-- >>Send bugs reports to this list. >>To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk > > Victor Lazzarini > Music Technology Laboratory > Music Department > National University of Ireland, Maynooth > > -- > Send bugs reports to this list. > To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk > > -- View this message in context: http://www.nabble.com/spectral-delay-tf4633685.html#a13231958 Sent from the Csound - General mailing list archive at Nabble.com. |
Date | 2007-10-16 13:21 |
From | peiman |
Subject | Re: spectral delay |
Wow! this is amazing. Just what I was after :-) Victor Lazzarini wrote: > > At 12:54 16/10/2007, you wrote: > >>Hi all, >> >>Following from yesterday's post, I have been wandering how to do the >>following operations in csound, using the pvs opcodes. After thinking for >>some hours about this I still cannot come up with an answer. >> >>1-spectral delay, where the amount of delay for individual bins is defined >>in a function table (prefebally this would also include feedback with >>control over the amount of feedback). > > Use the new opcodes pvsbuffer and pvsbufread > > >>2-the ability to change the rate at which fft frames are updated so to >>average the time resolution of the input. > > Also pvsbuffer and pvsbufread. These are the two prime target > operations for the new opcodes. Hope they do what you want. > > Victor > > > >>So in short I cannot work out how to do time-domain operations on pvs >>streams or fft bins. >> >>Any comments are very much welcome :-) >> >>Many Thanks >>Peiman >>-- >>View this message in context: >>http://www.nabble.com/spectral-delay-tf4633685.html#a13231682 >>Sent from the Csound - General mailing list archive at Nabble.com. >> >>-- >>Send bugs reports to this list. >>To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk > > Victor Lazzarini > Music Technology Laboratory > Music Department > National University of Ireland, Maynooth > > -- > Send bugs reports to this list. > To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk > > -- View this message in context: http://www.nabble.com/spectral-delay-tf4633685.html#a13232538 Sent from the Csound - General mailing list archive at Nabble.com. |
Date | 2007-10-16 18:13 |
From | Rory Walsh |
Subject | Re: spectral delay |
>1-spectral delay, where the amount of delay for individual bins is >defined in a function table (prefebally this would also include >feedback with control over the amount of feedback). If you have a simple example of what you describe above I would love to see it, would you mind posting it? Rory. peiman wrote: > Wow! this is amazing. Just what I was after :-) > > > Victor Lazzarini wrote: >> At 12:54 16/10/2007, you wrote: >> >>> Hi all, >>> >>> Following from yesterday's post, I have been wandering how to do the >>> following operations in csound, using the pvs opcodes. After thinking for >>> some hours about this I still cannot come up with an answer. >>> >>> 1-spectral delay, where the amount of delay for individual bins is defined >>> in a function table (prefebally this would also include feedback with >>> control over the amount of feedback). >> Use the new opcodes pvsbuffer and pvsbufread >> >> >>> 2-the ability to change the rate at which fft frames are updated so to >>> average the time resolution of the input. >> Also pvsbuffer and pvsbufread. These are the two prime target >> operations for the new opcodes. Hope they do what you want. >> >> Victor >> >> >> >>> So in short I cannot work out how to do time-domain operations on pvs >>> streams or fft bins. >>> >>> Any comments are very much welcome :-) >>> >>> Many Thanks >>> Peiman >>> -- >>> View this message in context: >>> http://www.nabble.com/spectral-delay-tf4633685.html#a13231682 >>> Sent from the Csound - General mailing list archive at Nabble.com. >>> >>> -- >>> Send bugs reports to this list. >>> To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk >> Victor Lazzarini >> Music Technology Laboratory >> Music Department >> National University of Ireland, Maynooth >> >> -- >> Send bugs reports to this list. >> To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk >> >> > |
Date | 2007-10-16 22:48 |
From | peiman |
Subject | Re: spectral delay |
Hi, Sure! I have been very busy to make the instrument today but I will probably do it tonight and send a copy tomorrow. Best Peiman PS I have just finished a blue plug-in instrument that kind of does the same thing as the GRM frequency warp plugin http://www.grmtools.org/quicktour/vstqtst/warp.html you can find it here in the folder spectral blue. I'd be interested to see what you think about it: http://idisk.mac.com/peimankh-Public?view=web rory walsh wrote: > > >1-spectral delay, where the amount of delay for individual bins is > >defined in a function table (prefebally this would also include > >feedback with control over the amount of feedback). > > If you have a simple example of what you describe above I would love to > see it, would you mind posting it? > > Rory. > > > > peiman wrote: >> Wow! this is amazing. Just what I was after :-) >> >> >> Victor Lazzarini wrote: >>> At 12:54 16/10/2007, you wrote: >>> >>>> Hi all, >>>> >>>> Following from yesterday's post, I have been wandering how to do the >>>> following operations in csound, using the pvs opcodes. After thinking >>>> for >>>> some hours about this I still cannot come up with an answer. >>>> >>>> 1-spectral delay, where the amount of delay for individual bins is >>>> defined >>>> in a function table (prefebally this would also include feedback with >>>> control over the amount of feedback). >>> Use the new opcodes pvsbuffer and pvsbufread >>> >>> >>>> 2-the ability to change the rate at which fft frames are updated so to >>>> average the time resolution of the input. >>> Also pvsbuffer and pvsbufread. These are the two prime target >>> operations for the new opcodes. Hope they do what you want. >>> >>> Victor >>> >>> >>> >>>> So in short I cannot work out how to do time-domain operations on pvs >>>> streams or fft bins. >>>> >>>> Any comments are very much welcome :-) >>>> >>>> Many Thanks >>>> Peiman >>>> -- >>>> View this message in context: >>>> http://www.nabble.com/spectral-delay-tf4633685.html#a13231682 >>>> Sent from the Csound - General mailing list archive at Nabble.com. >>>> >>>> -- >>>> Send bugs reports to this list. >>>> To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk >>> Victor Lazzarini >>> Music Technology Laboratory >>> Music Department >>> National University of Ireland, Maynooth >>> >>> -- >>> Send bugs reports to this list. >>> To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk >>> >>> >> > -- > Send bugs reports to this list. > To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk > > -- View this message in context: http://www.nabble.com/spectral-delay-tf4633685.html#a13243058 Sent from the Csound - General mailing list archive at Nabble.com. |
Date | 2007-10-22 22:37 |
From | peiman |
Subject | Re: spectral delay (unexplained behavour) |
Hi, I have finally managed to put together a spectral delay instrument (sorry for the delay!). It is working ;-) but I can't work out why changing the control-rate or buffer size of csound, effects the delay time relatively (e.g. moving from ksmps=100 to 10 increases the delay time for every bin by over half!). This is I am sure as a result of the vecdelay opcode which I am using to delay different fft bins according to a function table. Am I doing something wrong though? Many Thanks Peiman PLEASE SEE BELLOW FOR CSD |
Date | 2007-10-23 01:09 |
From | Rory Walsh |
Subject | Re: spectral delay (unexplained behavour) |
Thanks for posting your example, I can't wait to have a look at it. Just yesterday I looked at pvsbuff and pvsbuffread for the first time, great opcodes. I had a lot of fun with my class today looking at different things that can be done with them. Thanks again to Victor for implementing them. Rory. peiman wrote: > Hi, > > I have finally managed to put together a spectral delay instrument (sorry > for the delay!). It is working ;-) but I can't work out why changing the > control-rate or buffer size of csound, effects the delay time relatively > (e.g. moving from ksmps=100 to 10 increases the delay time for every bin by > over half!). > > This is I am sure as a result of the vecdelay opcode which I am using to > delay different fft bins according to a function table. Am I doing something > wrong though? > > Many Thanks > Peiman > > PLEASE SEE BELLOW FOR CSD > > |
Date | 2007-10-23 02:20 |
From | peiman |
Subject | Re: spectral delay (unexplained behavour) |
No problems :-) I found the error: Just delete the conditional (if) statements along with the corresponding labels and the problem is gone! Best Peiman rory walsh wrote: > > Thanks for posting your example, I can't wait to have a look at it. Just > yesterday I looked at pvsbuff and pvsbuffread for the first time, great > opcodes. I had a lot of fun with my class today looking at different > things that can be done with them. Thanks again to Victor for > implementing them. > > Rory. > > > peiman wrote: >> Hi, >> >> I have finally managed to put together a spectral delay instrument (sorry >> for the delay!). It is working ;-) but I can't work out why changing the >> control-rate or buffer size of csound, effects the delay time relatively >> (e.g. moving from ksmps=100 to 10 increases the delay time for every bin >> by >> over half!). >> >> This is I am sure as a result of the vecdelay opcode which I am using to >> delay different fft bins according to a function table. Am I doing >> something >> wrong though? >> >> Many Thanks >> Peiman >> >> PLEASE SEE BELLOW FOR CSD >> >> |
Date | 2007-10-23 08:04 |
From | Rory Walsh |
Subject | Re: spectral delay (unexplained behavour) |
I just tried that instrument, that's a really nice effect, thanks again for posting. Rory. peiman wrote: > No problems :-) I found the error: > > Just delete the conditional (if) statements along with the corresponding > labels and the problem is gone! > > Best |
Date | 2007-10-23 09:32 |
From | Tim Mortimer |
Subject | Re: spectral delay (unexplained behavour) |
yes well done peiman. I haven't upped to 5.07 yet - but when i do this will be pretty much at the top of my list. -- View this message in context: http://www.nabble.com/spectral-delay-tf4633685.html#a13359589 Sent from the Csound - General mailing list archive at Nabble.com. |
Date | 2007-10-23 10:33 |
From | Richard Dobson |
Subject | Re: spectral delay (unexplained behavour) |
peiman wrote: > No problems :-) I found the error: > > Just delete the conditional (if) statements along with the corresponding > labels and the problem is gone! > This is a slightly deceptive solution, but maybe inescapable at present when combining vecdelay with the pvs routines. The use of the kflag test is in principle correct, as a new analysis frame is only generated every ten or so control cycles (depending on the ratio of ksmps to overlap); putting it another way, this means the pvs control rate is somewhat lower than a typical Csound kr. But vecdelay runs at the Csound kr (and of course will be implemented on that basis internally), so in the absence of the kflag controls, it wastefully overwrites the tables multiple times before they are actually used by pvsynth. Which means there is still a case for having a dedicated pvs version, one way or another. Also note that as written, when kflag activates, it jumps over the code associated with kflag1. In this case it is benign because the two signals run at the same frame rate; I suspect that if they were different (and thus updating in different control periods) a more elaborate testing scheme would be needed so that each analysis stream can be tested independently of the other. It is too early in the morning for me do do more than "leave this as an exercise"! Richard Dobson .. >>>kflag pvsftw fsig1,ifn1 >>>kflag1 pvsftw fsig2,ifn2 >>> >>>if kflag==0 kgoto contin1 >>> >>> vecdelay ifncopy1, ifn1, ifndel, 512, 20 >>> pvsftr fsig1,ifncopy1 >>> >>> >>> >>>if kflag1==0 kgoto contin2 >>> >>> vecdelay ifncopy2, ifn2, ifndel, 512, 20 >>> pvsftr fsig2,ifncopy2 >>> .. |
Date | 2007-10-23 11:08 |
From | peiman |
Subject | Re: spectral delay (unexplained behavour) |
Thanks very much for your explanation Richard. It now all makes sense :-) Best Peiman Richard Dobson wrote: > > peiman wrote: >> No problems :-) I found the error: >> >> Just delete the conditional (if) statements along with the corresponding >> labels and the problem is gone! >> > > This is a slightly deceptive solution, but maybe inescapable at present > when combining vecdelay with the pvs routines. The use of the kflag test > is in principle correct, as a new analysis frame is only generated every > ten or so control cycles (depending on the ratio of ksmps to overlap); > putting it another way, this means the pvs control rate is somewhat > lower than a typical Csound kr. But vecdelay runs at the Csound kr (and > of course will be implemented on that basis internally), so in the > absence of the kflag controls, it wastefully overwrites the tables > multiple times before they are actually used by pvsynth. Which means > there is still a case for having a dedicated pvs version, one way or > another. > > Also note that as written, when kflag activates, it jumps over the code > associated with kflag1. In this case it is benign because the two > signals run at the same frame rate; I suspect that if they were > different (and thus updating in different control periods) a more > elaborate testing scheme would be needed so that each analysis stream > can be tested independently of the other. It is too early in the morning > for me do do more than "leave this as an exercise"! > > > > Richard Dobson > > > > > .. >>>>kflag pvsftw fsig1,ifn1 >>>>kflag1 pvsftw fsig2,ifn2 >>>> >>>>if kflag==0 kgoto contin1 >>>> >>>> vecdelay ifncopy1, ifn1, ifndel, 512, 20 >>>> pvsftr fsig1,ifncopy1 >>>> >>>> >>>> >>>>if kflag1==0 kgoto contin2 >>>> >>>> vecdelay ifncopy2, ifn2, ifndel, 512, 20 >>>> pvsftr fsig2,ifncopy2 >>>> > .. > > -- > Send bugs reports to this list. > To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk > > -- View this message in context: http://www.nabble.com/spectral-delay-tf4633685.html#a13360848 Sent from the Csound - General mailing list archive at Nabble.com. |
Date | 2007-10-23 11:23 |
From | Victor Lazzarini |
Subject | Re: spectral delay (unexplained behavour) |
I'd say if you use pvsbufread and pvsbuffer you would be able to make a much simpler spectral delay, without the kr side-effect. Victor At 22:37 22/10/2007, you wrote: >Hi, > >I have finally managed to put together a spectral delay instrument (sorry >for the delay!). It is working ;-) but I can't work out why changing the >control-rate or buffer size of csound, effects the delay time relatively >(e.g. moving from ksmps=100 to 10 increases the delay time for every bin by >over half!). > >This is I am sure as a result of the vecdelay opcode which I am using to >delay different fft bins according to a function table. Am I doing something >wrong though? > >Many Thanks >Peiman > >PLEASE SEE BELLOW FOR CSD > > |
Date | 2007-10-23 11:25 |
From | Victor Lazzarini |
Subject | Re: spectral delay (unexplained behavour) |
pvbsbuffer and pvsbufread implement delay lines for f-sigs. I don't think there is a need for an extra vecdelay version. Victor At 10:33 23/10/2007, you wrote: >peiman wrote: >>No problems :-) I found the error: >>Just delete the conditional (if) statements along with the corresponding >>labels and the problem is gone! > >This is a slightly deceptive solution, but maybe inescapable at present >when combining vecdelay with the pvs routines. The use of the kflag test >is in principle correct, as a new analysis frame is only generated every >ten or so control cycles (depending on the ratio of ksmps to overlap); >putting it another way, this means the pvs control rate is somewhat lower >than a typical Csound kr. But vecdelay runs at the Csound kr (and of >course will be implemented on that basis internally), so in the absence of >the kflag controls, it wastefully overwrites the tables multiple times >before they are actually used by pvsynth. Which means there is still a >case for having a dedicated pvs version, one way or another. > >Also note that as written, when kflag activates, it jumps over the code >associated with kflag1. In this case it is benign because the two signals >run at the same frame rate; I suspect that if they were different (and >thus updating in different control periods) a more elaborate testing >scheme would be needed so that each analysis stream can be tested >independently of the other. It is too early in the morning for me do do >more than "leave this as an exercise"! > > > >Richard Dobson > > > > >.. >>>>kflag pvsftw fsig1,ifn1 >>>>kflag1 pvsftw fsig2,ifn2 >>>> >>>>if kflag==0 kgoto contin1 >>>> >>>> vecdelay ifncopy1, ifn1, ifndel, 512, 20 >>>> pvsftr fsig1,ifncopy1 >>>> >>>> >>>> >>>>if kflag1==0 kgoto contin2 >>>> >>>> vecdelay ifncopy2, ifn2, ifndel, 512, 20 >>>> pvsftr fsig2,ifncopy2 >.. > >-- >Send bugs reports to this list. >To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk Victor Lazzarini Music Technology Laboratory Music Department National University of Ireland, Maynooth |
Date | 2007-10-23 12:13 |
From | Victor Lazzarini |
Subject | simple pvsbuffer example |
So that we are clear what I mean, here's a trivial pvsbuffer example: |
Date | 2007-10-23 12:50 |
From | Richard Dobson |
Subject | Re: spectral delay (unexplained behavour) |
Victor Lazzarini wrote: > pvbsbuffer and pvsbufread implement delay lines for f-sigs. I don't > think there is a need for an extra vecdelay version. > I am ~still~ downloading the latest manual from CVS (so much of it!), so don't have the spec to hand. Does pvsbufread support varying the delay of individual bins (e.g. via an ftable)? I think that is what peiman is after (following in the footsteps of the Native Instrument "Spektral Delay" (which allowed you to draw an arbitrary delay envelope over the analysis bins) etc. Even a simple slope from low to high, so low bins are delayed (smoothed, gated, etc) more (or less) than high bins, say, can be very "interesting". Richard Dobson |
Date | 2007-10-23 13:18 |
From | peiman |
Subject | Re: spectral delay (unexplained behavour) |
Correct me if I am wrong. I cannot find a way to control the delay for individual bins with pvsbuf opcodes. Is this possible? Thanks Peiman Victor Lazzarini wrote: > > pvbsbuffer and pvsbufread implement delay lines for f-sigs. I don't > think there is a need for an extra vecdelay version. > > Victor > > At 10:33 23/10/2007, you wrote: >>peiman wrote: >>>No problems :-) I found the error: >>>Just delete the conditional (if) statements along with the corresponding >>>labels and the problem is gone! >> >>This is a slightly deceptive solution, but maybe inescapable at present >>when combining vecdelay with the pvs routines. The use of the kflag test >>is in principle correct, as a new analysis frame is only generated every >>ten or so control cycles (depending on the ratio of ksmps to overlap); >>putting it another way, this means the pvs control rate is somewhat lower >>than a typical Csound kr. But vecdelay runs at the Csound kr (and of >>course will be implemented on that basis internally), so in the absence of >>the kflag controls, it wastefully overwrites the tables multiple times >>before they are actually used by pvsynth. Which means there is still a >>case for having a dedicated pvs version, one way or another. >> >>Also note that as written, when kflag activates, it jumps over the code >>associated with kflag1. In this case it is benign because the two signals >>run at the same frame rate; I suspect that if they were different (and >>thus updating in different control periods) a more elaborate testing >>scheme would be needed so that each analysis stream can be tested >>independently of the other. It is too early in the morning for me do do >>more than "leave this as an exercise"! >> >> >> >>Richard Dobson >> >> >> >> >>.. >>>>>kflag pvsftw fsig1,ifn1 >>>>>kflag1 pvsftw fsig2,ifn2 >>>>> >>>>>if kflag==0 kgoto contin1 >>>>> >>>>> vecdelay ifncopy1, ifn1, ifndel, 512, 20 >>>>> pvsftr fsig1,ifncopy1 >>>>> >>>>> >>>>> >>>>>if kflag1==0 kgoto contin2 >>>>> >>>>> vecdelay ifncopy2, ifn2, ifndel, 512, 20 >>>>> pvsftr fsig2,ifncopy2 >>.. >> >>-- >>Send bugs reports to this list. >>To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk > > Victor Lazzarini > Music Technology Laboratory > Music Department > National University of Ireland, Maynooth > > -- > Send bugs reports to this list. > To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk > > -- View this message in context: http://www.nabble.com/spectral-delay-tf4633685.html#a13363041 Sent from the Csound - General mailing list archive at Nabble.com. |
Date | 2007-10-23 14:14 |
From | Victor Lazzarini |
Subject | Re: spectral delay (unexplained behavour) |
See my example. At 13:18 23/10/2007, you wrote: >Correct me if I am wrong. I cannot find a way to control the delay for >individual bins with pvsbuf opcodes. Is this possible? > >Thanks >Peiman > > >Victor Lazzarini wrote: > > > > pvbsbuffer and pvsbufread implement delay lines for f-sigs. I don't > > think there is a need for an extra vecdelay version. > > > > Victor > > > > At 10:33 23/10/2007, you wrote: > >>peiman wrote: > >>>No problems :-) I found the error: > >>>Just delete the conditional (if) statements along with the corresponding > >>>labels and the problem is gone! > >> > >>This is a slightly deceptive solution, but maybe inescapable at present > >>when combining vecdelay with the pvs routines. The use of the kflag test > >>is in principle correct, as a new analysis frame is only generated every > >>ten or so control cycles (depending on the ratio of ksmps to overlap); > >>putting it another way, this means the pvs control rate is somewhat lower > >>than a typical Csound kr. But vecdelay runs at the Csound kr (and of > >>course will be implemented on that basis internally), so in the absence of > >>the kflag controls, it wastefully overwrites the tables multiple times > >>before they are actually used by pvsynth. Which means there is still a > >>case for having a dedicated pvs version, one way or another. > >> > >>Also note that as written, when kflag activates, it jumps over the code > >>associated with kflag1. In this case it is benign because the two signals > >>run at the same frame rate; I suspect that if they were different (and > >>thus updating in different control periods) a more elaborate testing > >>scheme would be needed so that each analysis stream can be tested > >>independently of the other. It is too early in the morning for me do do > >>more than "leave this as an exercise"! > >> > >> > >> > >>Richard Dobson > >> > >> > >> > >> > >>.. > >>>>>kflag pvsftw fsig1,ifn1 > >>>>>kflag1 pvsftw fsig2,ifn2 > >>>>> > >>>>>if kflag==0 kgoto contin1 > >>>>> > >>>>> vecdelay ifncopy1, ifn1, ifndel, 512, 20 > >>>>> pvsftr fsig1,ifncopy1 > >>>>> > >>>>> > >>>>> > >>>>>if kflag1==0 kgoto contin2 > >>>>> > >>>>> vecdelay ifncopy2, ifn2, ifndel, 512, 20 > >>>>> pvsftr fsig2,ifncopy2 > >>.. > >> > >>-- > >>Send bugs reports to this list. > >>To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk > > > > Victor Lazzarini > > Music Technology Laboratory > > Music Department > > National University of Ireland, Maynooth > > > > -- > > Send bugs reports to this list. > > To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk > > > > > >-- >View this message in context: >http://www.nabble.com/spectral-delay-tf4633685.html#a13363041 >Sent from the Csound - General mailing list archive at Nabble.com. > >-- >Send bugs reports to this list. >To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk Victor Lazzarini Music Technology Laboratory Music Department National University of Ireland, Maynooth |
Date | 2007-10-23 14:16 |
From | Victor Lazzarini |
Subject | Re: spectral delay (unexplained behavour) |
See the pages: http://www.csounds.com/manual/html/pvsbuffer.html http://www.csounds.com/manual/html/pvsbufread.html By using several readers you can get different delays over a range of frequencies. Victor At 12:50 23/10/2007, you wrote: >Victor Lazzarini wrote: >>pvbsbuffer and pvsbufread implement delay lines for f-sigs. I don't >>think there is a need for an extra vecdelay version. > > >I am ~still~ downloading the latest manual from CVS (so much of it!), so >don't have the spec to hand. Does pvsbufread support varying the delay of >individual bins (e.g. via an ftable)? I think that is what peiman is after >(following in the footsteps of the Native Instrument "Spektral Delay" >(which allowed you to draw an arbitrary delay envelope over the analysis >bins) etc. Even a simple slope from low to high, so low bins are delayed >(smoothed, gated, etc) more (or less) than high bins, say, can be very >"interesting". > > >Richard Dobson > >-- >Send bugs reports to this list. >To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk Victor Lazzarini Music Technology Laboratory Music Department National University of Ireland, Maynooth |
Date | 2007-10-23 14:50 |
From | peiman |
Subject | Re: spectral delay (unexplained behavour) |
Thanks Victor, Yes I see what you mean. However still this is more or less like filtering + delay as opposed to arbitrarily delaying fft bins (as Richard mentioned) independently from the actual frequencies. Also I am working with 512 delay lines (one for each bin) and this can change easily with the fft-size (by using the same variable). Using pvsbufread one needs to write an instance of the opcode for every delay line which means writing 512 pvsburead lines. I tried to this using loops but then the problem is that they need to be named differently and csound doesn't allow that (to use the string opcodes to name them doesn't work as the names end up inside " "). Maybe an opcode to index variable names would do the job? Thanks very much for the advice Peiman Victor Lazzarini wrote: > > See my example. > > At 13:18 23/10/2007, you wrote: > >>Correct me if I am wrong. I cannot find a way to control the delay for >>individual bins with pvsbuf opcodes. Is this possible? >> >>Thanks >>Peiman >> >> >>Victor Lazzarini wrote: >> > >> > pvbsbuffer and pvsbufread implement delay lines for f-sigs. I don't >> > think there is a need for an extra vecdelay version. >> > >> > Victor >> > >> > At 10:33 23/10/2007, you wrote: >> >>peiman wrote: >> >>>No problems :-) I found the error: >> >>>Just delete the conditional (if) statements along with the >> corresponding >> >>>labels and the problem is gone! >> >> >> >>This is a slightly deceptive solution, but maybe inescapable at present >> >>when combining vecdelay with the pvs routines. The use of the kflag >> test >> >>is in principle correct, as a new analysis frame is only generated >> every >> >>ten or so control cycles (depending on the ratio of ksmps to overlap); >> >>putting it another way, this means the pvs control rate is somewhat >> lower >> >>than a typical Csound kr. But vecdelay runs at the Csound kr (and of >> >>course will be implemented on that basis internally), so in the absence >> of >> >>the kflag controls, it wastefully overwrites the tables multiple times >> >>before they are actually used by pvsynth. Which means there is still >> a >> >>case for having a dedicated pvs version, one way or another. >> >> >> >>Also note that as written, when kflag activates, it jumps over the >> code >> >>associated with kflag1. In this case it is benign because the two >> signals >> >>run at the same frame rate; I suspect that if they were different (and >> >>thus updating in different control periods) a more elaborate testing >> >>scheme would be needed so that each analysis stream can be tested >> >>independently of the other. It is too early in the morning for me do do >> >>more than "leave this as an exercise"! >> >> >> >> >> >> >> >>Richard Dobson >> >> >> >> >> >> >> >> >> >>.. >> >>>>>kflag pvsftw fsig1,ifn1 >> >>>>>kflag1 pvsftw fsig2,ifn2 >> >>>>> >> >>>>>if kflag==0 kgoto contin1 >> >>>>> >> >>>>> vecdelay ifncopy1, ifn1, ifndel, 512, 20 >> >>>>> pvsftr fsig1,ifncopy1 >> >>>>> >> >>>>> >> >>>>> >> >>>>>if kflag1==0 kgoto contin2 >> >>>>> >> >>>>> vecdelay ifncopy2, ifn2, ifndel, 512, 20 >> >>>>> pvsftr fsig2,ifncopy2 >> >>.. >> >> >> >>-- >> >>Send bugs reports to this list. >> >>To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk >> > >> > Victor Lazzarini >> > Music Technology Laboratory >> > Music Department >> > National University of Ireland, Maynooth >> > >> > -- >> > Send bugs reports to this list. >> > To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk >> > >> > >> >>-- >>View this message in context: >>http://www.nabble.com/spectral-delay-tf4633685.html#a13363041 >>Sent from the Csound - General mailing list archive at Nabble.com. >> >>-- >>Send bugs reports to this list. >>To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk > > Victor Lazzarini > Music Technology Laboratory > Music Department > National University of Ireland, Maynooth > > -- > Send bugs reports to this list. > To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk > > -- View this message in context: http://www.nabble.com/spectral-delay-tf4633685.html#a13364711 Sent from the Csound - General mailing list archive at Nabble.com. |
Date | 2007-10-23 14:51 |
From | "Rory Walsh" |
Subject | Re: spectral delay (unexplained behavour) |
By slowing down the rate of read-back is one not just simply delaying the contents of the bins? > > Correct me if I am wrong. I cannot find a way to control the delay for > individual bins with pvsbuf opcodes. Is this possible? > > Thanks > Peiman > > > Victor Lazzarini wrote: |
Date | 2007-10-23 15:15 |
From | peiman |
Subject | Re: spectral delay (unexplained behavour) |
Yes but how do you delay each bin (as opposed to frequency region)? say you have 512 bins then you would need 512 pvsbufread opcodes. But what if you want to change the fft size? I see that pvsburead would be ideal for spectral delay if there was a way to use it in a loop block. Best Peiman rory walsh wrote: > > By slowing down the rate of read-back is one not just simply delaying the > contents of the bins? > >> >> Correct me if I am wrong. I cannot find a way to control the delay for >> individual bins with pvsbuf opcodes. Is this possible? >> >> Thanks >> Peiman >> >> >> Victor Lazzarini wrote: > > -- > Send bugs reports to this list. > To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk > > -- View this message in context: http://www.nabble.com/spectral-delay-tf4633685.html#a13365405 Sent from the Csound - General mailing list archive at Nabble.com. |
Date | 2007-10-23 17:24 |
From | Victor Lazzarini |
Subject | Re: spectral delay (unexplained behavour) |
But the only difference is that I am setting the ranges in freqs not bins (to make it simpler for the user); if you use the bin bandwith + cfreq, you can delay an individual bin. Note that delaying each bin might sometimes be overkill. You can of course have one instrument and 512 instances of it running in parallel. Here's an example of what I mean. You only need to add the i-statements for each read. |
Date | 2007-10-23 17:44 |
From | Victor Lazzarini |
Subject | Re: spectral delay (unexplained behavour) |
In fact, I have automated this now. A bit on the heavy processing side though. But it does bin by bin, see: |
Date | 2007-10-23 18:18 |
From | peiman |
Subject | Re: spectral delay (unexplained behavour) |
Thanks Victor, I am going to study this instrument to see what exactly is going on :-) Thanks again for posting it Best Peiman Victor Lazzarini wrote: > > In fact, I have automated this now. A bit on the heavy processing > side though. But it does bin by bin, see: > > |
Date | 2007-10-23 18:20 |
From | Victor Lazzarini |
Subject | Re: spectral delay (unexplained behavour) |
yet another variation, making bands a little larger (but they can be as small as one bin). This one does not struggle to run. The delay time for each band is set by the function table. I actually quite like the effect. Use any mono file you like. |
Date | 2007-10-23 18:39 |
From | Rory Walsh |
Subject | Re: spectral delay (unexplained behavour) |
How hard would it be to implement a pvsbufread with k-rate ilo and ihi arguments. I'm guessing not so easy otherwise you probably would have implemented it already? Rory. Victor Lazzarini wrote: > In fact, I have automated this now. A bit on the heavy processing > side though. But it does bin by bin, see: > > |
Date | 2007-10-23 18:57 |
From | peiman |
Subject | Re: spectral delay (unexplained behavour) |
Thanks very much this is nice! and I think I know how it is working! Best Victor Lazzarini wrote: > > yet another variation, making bands a little larger (but they > can be as small as one bin). This one does not struggle > to run. > > The delay time for each band is set by the function table. > > I actually quite like the effect. Use any mono file you like. > > |
Date | 2007-10-23 19:43 |
From | Rory Walsh |
Subject | Re: simple pvsbuffer example |
Here's another example. These opcodes are a lot of fun. I've been playing around with a mic for this one but a soundfile will work too... |
Date | 2007-10-23 21:46 |
From | Jean-Pierre Lemoine |
Subject | Re: simple pvsbuffer example - segment violation |
This example doesn't run on my system (Vista+csound 5.07 double precision). Segment violation! I have tried other examples posted on the list and this is the same error. I have tried to comment lines for finding the culprit; and it seems to be pvsbufread. CsOptions is -odac6 -b2048 I have tried with a wav file, and also using vco2. No way jean-pierre Rory Walsh a écrit : > Here's another example. These opcodes are a lot of fun. I've been > playing around with a mic for this one but a soundfile will work too... > > > |
Date | 2007-10-23 22:00 |
From | Rory Walsh |
Subject | Re: simple pvsbuffer example - segment violation |
That's strange. I am using the latest build from the CVS, float precision, winxp and it runs fine, so does Victor's sample? Jean-Pierre Lemoine wrote: > This example doesn't run on my system (Vista+csound 5.07 double > precision). Segment violation! > I have tried other examples posted on the list and this is the same > error. I have tried to comment lines for finding the culprit; and it > seems to be pvsbufread. > CsOptions is -odac6 -b2048 > I have tried with a wav file, and also using vco2. No way > > jean-pierre > > Rory Walsh a écrit : >> Here's another example. These opcodes are a lot of fun. I've been >> playing around with a mic for this one but a soundfile will work too... >> >> >> |
Date | 2007-10-23 22:02 |
From | "Steven Yi" |
Subject | Re: simple pvsbuffer example - segment violation |
Attachments | None |
Date | 2007-10-23 22:16 |
From | Jean-Pierre Lemoine |
Subject | Re: simple pvsbuffer example - segment violation |
I have done more tests, fsb1 pvsbufread 0, khan1, 0, 2500 -> segment violation fsb1 pvsbufread 2.1, khan1, 0, 2500 -> no violation, but out of range samples jean-pierre Steven Yi a écrit : > I got a Segmentation Violation here on WinXP. Latest compiled from > CVS but for double precision. Perhaps there is a hardcoaded float > somewhere? > > On 10/23/07, Rory Walsh |
Date | 2007-10-24 00:47 |
From | Tim Mortimer |
Subject | Re: spectral delay (unexplained behavour) |
My god, you go to sleep & you wake up & the csound list has spiralled into carnage! ; ) I have to concur with Richard Dobson here - certainly my expectations of what a "spectral delay" is all about would be something along the lines of a "vecdelay" (what i had always intended to try & use before these latest opcodes came along) - 1 ftable bin proving delay time for its corresponding analysis bin range. ditto feedback. just like the n*tive *nstruments "model". if it was simply a question of returning individual fsig streams delayed by different amounts, then surely you could split the fsig into ranges using pvsmaska (or any similar) & then just delay the various (& now multiple) asig streams? there is certainly no rush on my part. still on 5.06 & increasingly looking like i might stay that way for the moment... there is no ingratitude or malice on my part. just another observation from someone who likes to hear the sound of his own keyboard clacking.... -- View this message in context: http://www.nabble.com/spectral-delay-tf4633685.html#a13376210 Sent from the Csound - General mailing list archive at Nabble.com. |
Date | 2007-10-24 03:37 |
From | "Steven Yi" |
Subject | Re: [Cs-dev] [Csnd] simple pvsbuffer example - segment violation |
Attachments | None |
Date | 2007-10-24 09:21 |
From | jpff |
Subject | Re: [Cs-dev] [Csnd] simple pvsbuffer example - segment violation |
Hum... My first attempt says SECTION 1: ftable 1: new alloc for instr 1: *** internal error: mcalloc() called with zero nbytes Csound tidy up: Segmentation fault inactive allocs returned to freespace end of score. overall amps: 0.0 0.0 overall samples out of range: 0 0 0 errors in performance Second attempt under gdb is worse.... SECTION 1: ftable 1: new alloc for instr 1: *** internal error: mcalloc() called with zero nbytes *** internal error: mcalloc() called with zero nbytes INIT ERROR in instr 1: invalid window type aout1 pvsynth fsb1 0 *** internal error: mcalloc() called with zero nbytes INIT ERROR in instr 1: invalid window type aout2 pvsynth fsb2 0 B 0.000 - note deleted. i1 had 2 init errors Seems as if something is very wrong somewhere! ==John ffitch ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2007-10-24 10:11 |
From | Iain McCurdy |
Subject | Re: simple pvsbuffer example - segment violation |
I have also encountered segmentation violation problems when using a sound file as input (diskin). The problem immediately goes away when live input (ins) is used instead... Iain > Date: Tue, 23 Oct 2007 14:02:43 -0700 > From: stevenyi@gmail.com > To: csound@lists.bath.ac.uk > Subject: Re: [Csnd] simple pvsbuffer example - segment violation > > I got a Segmentation Violation here on WinXP. Latest compiled from > CVS but for double precision. Perhaps there is a hardcoaded float > somewhere? > > On 10/23/07, Rory Walsh <rorywalsh@ear.ie> wrote: > > That's strange. I am using the latest build from the CVS, float > > precision, winxp and it runs fine, so does Victor's sample? > > > > Jean-Pierre Lemoine wrote: > > > This example doesn't run on my system (Vista+csound 5.07 double > > > precision). Segment violation! > > > I have tried other examples posted on the list and this is the same > > > error. I have tried to comment lines for finding the culprit; and it > > > seems to be pvsbufread. > > > CsOptions is -odac6 -b2048 > > > I have tried with a wav file, and also using vco2. No way > > > > > > jean-pierre > > > > > > Rory Walsh a écrit : > > >> Here's another example. These opcodes are a lot of fun. I've been > > >> playing around with a mic for this one but a soundfile will work too... > > >> > > >> > > >> <CsoundSynthesizer> > > >> <CsOptions> > > >> -odevaudio -b64 -idevaudio > > >> </CsOptions> > > >> <CsInstruments> > > >> sr = 44100 > > >> ksmps = 1 > > >> nchnls = 2 > > >> > > >> instr 1 > > >> igain = 0.6 > > >> > > >> afdb1 init 0 > > >> afdb2 init 0 > > >> afdb3 init 0 > > >> > > >> asig inch 1 > > >> ;asig soundin "D:/MyDocuments/csoundfiles/Old/Radiohead.wav" > > >> > > >> k1 phasor 0.5 > > >> > > >> kdel1 randi 1, 0.5, 0.2 > > >> kdel2 randi 1, 1, 0.4 > > >> kdel3 randi 1, 1.5, 0.5 > > >> > > >> fsig1 pvsanal asig+afdb1,1024, 512,1024,1 > > >> fsig2 pvsanal asig+afdb2,1024, 512,1024,1 > > >> fsig3 pvsanal asig+afdb3,1024, 512,1024,1 > > >> > > >> ibuf1,kt1 pvsbuffer fsig1, 2 > > >> ibuf2,kt1 pvsbuffer fsig2, 2 > > >> ibuf3,kt1 pvsbuffer fsig3, 2 > > >> > > >> khan1 init ibuf1 > > >> khan2 init ibuf2 > > >> khan3 init ibuf3 > > >> > > >> fsb1 pvsbufread k1-kdel1, khan1, 0, 2500 > > >> fsb2 pvsbufread k1-kdel2, khan2, 2500, 7000 > > >> fsb3 pvsbufread k1-kdel3, khan3, 7000, 18000 > > >> > > >> aout1 pvsynth fsb1 > > >> aout2 pvsynth fsb2 > > >> aout3 pvsynth fsb3 > > >> > > >> afdb1 = (afdb1+aout1)*igain > > >> afdb2 = (afdb2+aout2)*igain > > >> afdb3 = (afdb3+aout3)*igain > > >> > > >> aLeft = (afdb1*kdel1)+(afdb2*kdel2)+(afdb3*kdel3) > > >> aRight = (afdb1*(1-kdel1))+(afdb2*(1-kdel2))+(afdb3*(1-kdel3)) > > >> outs aLeft, aRight > > >> > > >> endin > > >> > > >> > > >> </CsInstruments> > > >> <CsScore> > > >> f1 0 1024 10 1 > > >> i1 0 100 > > >> </CsScore> > > >> </CsoundSynthesizer> > > > > > > > > > > > -- > > Send bugs reports to this list. > > To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk > > > -- > Send bugs reports to this list. > To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk Boo! Scare away worms, viruses and so much more! Try Windows Live OneCare! Try now! |