[Csnd] Pconvolve Addition Questions
Date | 2019-07-04 15:44 |
From | Michael Rhoades |
Subject | [Csnd] Pconvolve Addition Questions |
Hi All, It has been a while since posting.... hope everyone is doing well. In attempting to replace my current distance algorithms with ones using pconvolve I have run into an issue. Hoping one of you can set me straight. It seems that, when rendering, the overall amps do not add up as I expect them to, which makes it difficult to code scaling between wet and dry outputs. For troubleshooting purposes I reduced the code to the bare essentials (see below). The amplitude output values from the renders can be seen in the comments beside the various "out" options. adry2 was used as a control. In this scenario I would expect that awet + adry, or awet + adry2, should equal ~49901.4 but as you see it is 32621.2. Any idea what is happening here? Am I missing something? Using csound 6.05 on Windows 8.1 (had trouble installing 6.12) Thank you... Michael sr = 48000 kr = 48000 ksmps = 1 nchnls = 1 instr 1 ipart = 4096 adry soundin p4, 0 adry2 soundin p4, 0 awet pconvolve, adry, 2020, ipart ; out awet ;overall amps = 32241.4 (overs = 7) ; out adry ;overall amps = 16660 ; out adry2 ;overall amps = 16660 ; out awet + awet ;overall amps = 66482.7 (overs = 2223) ; out adry + adry ;overall amps = 33320 (overs = 7) ; out adry2 + adry2 ;overall amps = 33320 (overs = 7) ; out adry + awet ;overall amps = 32621.2 out adry2 + awet ;overall amps = 32621.2 endin ;sco ;ins time dur p4 i1 0 10 1 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 |
Date | 2019-07-04 20:59 |
From | john |
Subject | Re: [Csnd] Pconvolve Addition Questions |
Why should awet + adry2 have aximum aplituse of the sum of max(awet) + max(adry2)? That would onl be te ase if the axma were aligned and it is unclear why that should happen. ==John ff On Thu, 4 Jul 2019, Michael Rhoades wrote: > Hi All, > > It has been a while since posting.... hope everyone is doing well. > > In attempting to replace my current distance algorithms with ones using > pconvolve I have run into an issue. Hoping one of you can set me straight. It > seems that, when rendering, the overall amps do not add up as I expect them > to, which makes it difficult to code scaling between wet and dry outputs. For > troubleshooting purposes I reduced the code to the bare essentials (see > below). The amplitude output values from the renders can be seen in the > comments beside the various "out" options. adry2 was used as a control. > > In this scenario I would expect that awet + adry, or awet + adry2, should > equal ~49901.4 but as you see it is 32621.2. > > Any idea what is happening here? Am I missing something? > > Using csound 6.05 on Windows 8.1 (had trouble installing 6.12) > > Thank you... > > Michael > > > sr = 48000 > kr = 48000 > ksmps = 1 > nchnls = 1 > > instr 1 > > ipart = 4096 > > adry soundin p4, 0 > adry2 soundin p4, 0 > awet pconvolve, adry, 2020, ipart > > ; out awet ;overall amps = 32241.4 (overs = 7) > ; out adry ;overall amps = 16660 > ; out adry2 ;overall amps = 16660 > ; out awet + awet ;overall amps = 66482.7 (overs = 2223) > ; out adry + adry ;overall amps = 33320 (overs = 7) > ; out adry2 + adry2 ;overall amps = 33320 (overs = 7) > ; out adry + awet ;overall amps = 32621.2 > out adry2 + awet ;overall amps = 32621.2 > > > endin > > ;sco > > ;ins time dur p4 > > i1 0 10 1 > > 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 |
Date | 2019-07-05 02:34 |
From | Michael Rhoades |
Subject | Re: [Csnd] Pconvolve Addition Questions |
Hi John, If nothing changes about awet and adry2 between renders then would not the sum of them be equal to them rendered independently? For instance, if we render awet alone the overall amps in the render window is 32241.2. If we do the same with adry2 the overall amps is 16660. When we sum them as is out awet + adry2, the overall amps displayed at the end of the render should be 49901.4 (32241.2 + 16660) . This holds true if we render awet + awet (32241.2 + 32241.2), which equals 66482.4, or if we render adry + adry2 (16660 + 16660) we get 33320.... Following this pattern, awet + adry2 should equal the sum of their totals independently... but they do not. It is possible I am missing something but this output does not seem to be correct. Summing amplitudes, I think..., should be straightforward. Michael On 7/4/19 3:59 PM, john wrote: > Why should awet + adry2 have aximum aplituse of the sum of max(awet) + > max(adry2)? That would onl be te ase if the axma were aligned and it > is unclear why that should happen. > > ==John ff > > > On Thu, 4 Jul 2019, Michael Rhoades wrote: > >> Hi All, >> >> It has been a while since posting.... hope everyone is doing well. >> >> In attempting to replace my current distance algorithms with ones >> using pconvolve I have run into an issue. Hoping one of you can set >> me straight. It seems that, when rendering, the overall amps do not >> add up as I expect them to, which makes it difficult to code scaling >> between wet and dry outputs. For troubleshooting purposes I reduced >> the code to the bare essentials (see below). The amplitude output >> values from the renders can be seen in the comments beside the >> various "out" options. adry2 was used as a control. >> >> In this scenario I would expect that awet + adry, or awet + adry2, >> should equal ~49901.4 but as you see it is 32621.2. >> >> Any idea what is happening here? Am I missing something? >> >> Using csound 6.05 on Windows 8.1 (had trouble installing 6.12) >> >> Thank you... >> >> Michael >> >> >> sr = 48000 >> kr = 48000 >> ksmps = 1 >> nchnls = 1 >> >> instr 1 >> >> ipart = 4096 >> >> adry soundin p4, 0 >> adry2 soundin p4, 0 >> awet pconvolve, adry, 2020, ipart >> >> ; out awet ;overall amps = 32241.4 (overs = 7) >> ; out adry ;overall amps = 16660 >> ; out adry2 ;overall amps = 16660 >> ; out awet + awet ;overall amps = 66482.7 (overs = 2223) >> ; out adry + adry ;overall amps = 33320 (overs = 7) >> ; out adry2 + adry2 ;overall amps = 33320 (overs = 7) >> ; out adry + awet ;overall amps = 32621.2 >> out adry2 + awet ;overall amps = 32621.2 >> >> >> endin >> >> ;sco >> >> ;ins time dur p4 >> >> i1 0 10 1 >> >> 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 |
Date | 2019-07-05 02:58 |
From | Pablo Zoani Heffele |
Subject | Re: [Csnd] Pconvolve Addition Questions |
The sum would be as you want if signal a == signal b, if dry is not equal to wet (per sample) the sum wont be straightforward. Overall amplitude of 1000 means that the highest sample of the signal is 1000. If you want the sum straight as you say, the highest
sample of dry and the highest sample of wet need to be at exactly the same time, that is at the same index of the vector. I guess this is what you are missing
PZH
From: A discussion list for users of Csound <CSOUND@LISTSERV.HEANET.IE> on behalf of Michael Rhoades <mrhoades@PERCEPTIONFACTORY.COM>
Sent: Thursday, July 4, 2019 10:34:09 PM To: CSOUND@LISTSERV.HEANET.IE Subject: Re: [Csnd] Pconvolve Addition Questions Hi John,
If nothing changes about awet and adry2 between renders then would not the sum of them be equal to them rendered independently? For instance, if we render awet alone the overall amps in the render window is 32241.2. If we do the same with adry2 the overall amps is 16660. When we sum them as is out awet + adry2, the overall amps displayed at the end of the render should be 49901.4 (32241.2 + 16660) . This holds true if we render awet + awet (32241.2 + 32241.2), which equals 66482.4, or if we render adry + adry2 (16660 + 16660) we get 33320.... Following this pattern, awet + adry2 should equal the sum of their totals independently... but they do not. It is possible I am missing something but this output does not seem to be correct. Summing amplitudes, I think..., should be straightforward. Michael On 7/4/19 3:59 PM, john wrote: > Why should awet + adry2 have aximum aplituse of the sum of max(awet) + > max(adry2)? That would onl be te ase if the axma were aligned and it > is unclear why that should happen. > > ==John ff > > > On Thu, 4 Jul 2019, Michael Rhoades wrote: > >> Hi All, >> >> It has been a while since posting.... hope everyone is doing well. >> >> In attempting to replace my current distance algorithms with ones >> using pconvolve I have run into an issue. Hoping one of you can set >> me straight. It seems that, when rendering, the overall amps do not >> add up as I expect them to, which makes it difficult to code scaling >> between wet and dry outputs. For troubleshooting purposes I reduced >> the code to the bare essentials (see below). The amplitude output >> values from the renders can be seen in the comments beside the >> various "out" options. adry2 was used as a control. >> >> In this scenario I would expect that awet + adry, or awet + adry2, >> should equal ~49901.4 but as you see it is 32621.2. >> >> Any idea what is happening here? Am I missing something? >> >> Using csound 6.05 on Windows 8.1 (had trouble installing 6.12) >> >> Thank you... >> >> Michael >> >> >> sr = 48000 >> kr = 48000 >> ksmps = 1 >> nchnls = 1 >> >> instr 1 >> >> ipart = 4096 >> >> adry soundin p4, 0 >> adry2 soundin p4, 0 >> awet pconvolve, adry, 2020, ipart >> >> ; out awet ;overall amps = 32241.4 (overs = 7) >> ; out adry ;overall amps = 16660 >> ; out adry2 ;overall amps = 16660 >> ; out awet + awet ;overall amps = 66482.7 (overs = 2223) >> ; out adry + adry ;overall amps = 33320 (overs = 7) >> ; out adry2 + adry2 ;overall amps = 33320 (overs = 7) >> ; out adry + awet ;overall amps = 32621.2 >> out adry2 + awet ;overall amps = 32621.2 >> >> >> endin >> >> ;sco >> >> ;ins time dur p4 >> >> i1 0 10 1 >> >> 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 |
Date | 2019-07-05 03:23 |
From | Michael Rhoades |
Subject | Re: [Csnd] Pconvolve Addition Questions |
Ahhh... yes that is exactly what I am
missing... perfect... Thank you very much!
Michael
On 7/4/19 9:58 PM, Pablo Zoani Heffele
wrote:
|