[Csnd] balance opcode sound artifact

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

[Csnd] balance opcode sound artifact

sjakops
The 'balance' opcode (also) seems to be introducing some noise, which I think
should not be there - happens with v6.10 and also with v6.07 on Windows
10/x64. Can someone please try the following code and confirm whether there
is a bug?

<CsoundSynthesizer>
<CsOptions>
-o dac
</CsOptions>
<CsInstruments>
sr = 44100
ksmps = 32
nchnls = 2
0dbfs  = 1
instr 1
as loscil3 1.0, 1.0, 123, 1, 1
ap tone as, 100
ap balance ap, as
outs ap, ap
endin
</CsInstruments>
<CsScore>
f 123 0 0 -1 "loop.wav" 0 0 0
i 1 0 5
e
</CsScore>
</CsoundSynthesizer>

loop.wav <http://csound.1045644.n5.nabble.com/file/t339749/loop.wav>  



--
Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] balance opcode sound artifact

Victor Lazzarini-2
it sounds as I would expect on MacOs. I hear no artefact, just a low-pass filtered sound
========================
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 27 Feb 2018, at 14:43, sjakops <[hidden email]> wrote:
>
> The 'balance' opcode (also) seems to be introducing some noise, which I think
> should not be there - happens with v6.10 and also with v6.07 on Windows
> 10/x64. Can someone please try the following code and confirm whether there
> is a bug?
>
> <CsoundSynthesizer>
> <CsOptions>
> -o dac
> </CsOptions>
> <CsInstruments>
> sr = 44100
> ksmps = 32
> nchnls = 2
> 0dbfs  = 1
> instr 1
> as loscil3 1.0, 1.0, 123, 1, 1
> ap tone as, 100
> ap balance ap, as
> outs ap, ap
> endin
> </CsInstruments>
> <CsScore>
> f 123 0 0 -1 "loop.wav" 0 0 0
> i 1 0 5
> e
> </CsScore>
> </CsoundSynthesizer>
>
> loop.wav <http://csound.1045644.n5.nabble.com/file/t339749/loop.wav>  
>
>
>
> --
> Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html
>
> Csound mailing list
> [hidden email]
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] balance opcode sound artifact

Oeyvind Brandtsegg-3
Sounds fine here too as far as I can see.... actually seeing more than listening right now, as I only have the laptop speakers.
Comparing the three different signals (clean from loscil, filtered, and balanced) show the type of output I would expect from these opcodes. Could you describe the artifact you hear more in detail?
best
Oeyvind

2018-02-27 15:48 GMT+01:00 Victor Lazzarini <[hidden email]>:
it sounds as I would expect on MacOs. I hear no artefact, just a low-pass filtered sound
========================
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 27 Feb 2018, at 14:43, sjakops <[hidden email]> wrote:
>
> The 'balance' opcode (also) seems to be introducing some noise, which I think
> should not be there - happens with v6.10 and also with v6.07 on Windows
> 10/x64. Can someone please try the following code and confirm whether there
> is a bug?
>
> <CsoundSynthesizer>
> <CsOptions>
> -o dac
> </CsOptions>
> <CsInstruments>
> sr = 44100
> ksmps = 32
> nchnls = 2
> 0dbfs  = 1
> instr 1
> as loscil3 1.0, 1.0, 123, 1, 1
> ap tone as, 100
> ap balance ap, as
> outs ap, ap
> endin
> </CsInstruments>
> <CsScore>
> f 123 0 0 -1 "loop.wav" 0 0 0
> i 1 0 5
> e
> </CsScore>
> </CsoundSynthesizer>
>
> loop.wav <http://csound.1045644.n5.nabble.com/file/t339749/loop.wav>
>
>
>
> --
> Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html
>
> Csound mailing list
> [hidden email]
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here



--
Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] balance opcode sound artifact

Victor Lazzarini-2
just noting that this opcode has not changed 
since 6.00.

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

On 27 Feb 2018, at 20:40, Oeyvind Brandtsegg <[hidden email]> wrote:

Sounds fine here too as far as I can see.... actually seeing more than listening right now, as I only have the laptop speakers.
Comparing the three different signals (clean from loscil, filtered, and balanced) show the type of output I would expect from these opcodes. Could you describe the artifact you hear more in detail?
best
Oeyvind

2018-02-27 15:48 GMT+01:00 Victor Lazzarini <[hidden email]>:
it sounds as I would expect on MacOs. I hear no artefact, just a low-pass filtered sound
========================
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 27 Feb 2018, at 14:43, sjakops <[hidden email]> wrote:
>
> The 'balance' opcode (also) seems to be introducing some noise, which I think
> should not be there - happens with v6.10 and also with v6.07 on Windows
> 10/x64. Can someone please try the following code and confirm whether there
> is a bug?
>
> <CsoundSynthesizer>
> <CsOptions>
> -o dac
> </CsOptions>
> <CsInstruments>
> sr = 44100
> ksmps = 32
> nchnls = 2
> 0dbfs  = 1
> instr 1
> as loscil3 1.0, 1.0, 123, 1, 1
> ap tone as, 100
> ap balance ap, as
> outs ap, ap
> endin
> </CsInstruments>
> <CsScore>
> f 123 0 0 -1 "loop.wav" 0 0 0
> i 1 0 5
> e
> </CsScore>
> </CsoundSynthesizer>
>
> loop.wav <http://csound.1045644.n5.nabble.com/file/t339749/loop.wav>
>
>
>
> --
> Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html
>
> Csound mailing list
> [hidden email]
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here



--
Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] balance opcode sound artifact

sjakops
In reply to this post by Oeyvind Brandtsegg-3
I think what I'm hearing is some crackling 'incontinuity distortion'
which - I now realize - is dependent on ksmps. If I make ksmps smaller
there is less distortion, but even with ksmps = 1 (I guess then
control rate is equal to audio rate) I believe am still hearing a
small bit of distortion.

I wonder if this is just a limitation of digital filters - there will
always be a bit of distortion? (and ksmps = 1 is probably not
feasible)

Anyhow, I will try to find a friend's Mac to test with..

Søren

On 2/27/18, Oeyvind Brandtsegg <[hidden email]> wrote:

> Sounds fine here too as far as I can see.... actually seeing more than
> listening right now, as I only have the laptop speakers.
> Comparing the three different signals (clean from loscil, filtered, and
> balanced) show the type of output I would expect from these opcodes. Could
> you describe the artifact you hear more in detail?
> best
> Oeyvind
>
> 2018-02-27 15:48 GMT+01:00 Victor Lazzarini <[hidden email]>:
>
>> it sounds as I would expect on MacOs. I hear no artefact, just a low-pass
>> filtered sound
>> ========================
>> 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 27 Feb 2018, at 14:43, sjakops <[hidden email]> wrote:
>> >
>> > The 'balance' opcode (also) seems to be introducing some noise, which I
>> think
>> > should not be there - happens with v6.10 and also with v6.07 on Windows
>> > 10/x64. Can someone please try the following code and confirm whether
>> there
>> > is a bug?
>> >
>> > <CsoundSynthesizer>
>> > <CsOptions>
>> > -o dac
>> > </CsOptions>
>> > <CsInstruments>
>> > sr = 44100
>> > ksmps = 32
>> > nchnls = 2
>> > 0dbfs  = 1
>> > instr 1
>> > as loscil3 1.0, 1.0, 123, 1, 1
>> > ap tone as, 100
>> > ap balance ap, as
>> > outs ap, ap
>> > endin
>> > </CsInstruments>
>> > <CsScore>
>> > f 123 0 0 -1 "loop.wav" 0 0 0
>> > i 1 0 5
>> > e
>> > </CsScore>
>> > </CsoundSynthesizer>
>> >
>> > loop.wav <http://csound.1045644.n5.nabble.com/file/t339749/loop.wav>
>> >
>> >
>> >
>> > --
>> > Sent from: http://csound.1045644.n5.nabble.com/Csound-General-
>> f1093014.html
>> >
>> > Csound mailing list
>> > [hidden email]
>> > https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> > Send bugs reports to
>> >        https://github.com/csound/csound/issues
>> > Discussions of bugs and features can be posted here
>>
>> Csound mailing list
>> [hidden email]
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>         https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>>
>
>
>
> --
>
> Oeyvind Brandtsegg
> Professor of Music Technology
> NTNU
> 7491 Trondheim
> Norway
> Cell: +47 92 203 205
>
> http://www.partikkelaudio.com/
> http://crossadaptive.hf.ntnu.no
> http://gdsp.hf.ntnu.no/
> http://soundcloud.com/brandtsegg
> http://flyndresang.no/
> http://soundcloud.com/t-emp
>
> Csound mailing list
> [hidden email]
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] balance opcode sound artifact

sjakops
I just had a chance to test it on a Mac and I'm hearing the same
noise. And when I change ksmps from 32 to 1 it goes away. I'm
beginning to think the problem is that balance is based on the rms
opcode (?) which is running at k-rate only. There should be an a-rate
version of rms, and balance should be based (optionally) on that?
(that way I would not have to set ksmps = 1)
Or balance should internally use some a-rate interpolation?
Best regards,
Søren

On 2/27/18, Søren Jakobsen <[hidden email]> wrote:

> I think what I'm hearing is some crackling 'incontinuity distortion'
> which - I now realize - is dependent on ksmps. If I make ksmps smaller
> there is less distortion, but even with ksmps = 1 (I guess then
> control rate is equal to audio rate) I believe am still hearing a
> small bit of distortion.
>
> I wonder if this is just a limitation of digital filters - there will
> always be a bit of distortion? (and ksmps = 1 is probably not
> feasible)
>
> Anyhow, I will try to find a friend's Mac to test with..
>
> Søren
>
> On 2/27/18, Oeyvind Brandtsegg <[hidden email]> wrote:
>> Sounds fine here too as far as I can see.... actually seeing more than
>> listening right now, as I only have the laptop speakers.
>> Comparing the three different signals (clean from loscil, filtered, and
>> balanced) show the type of output I would expect from these opcodes.
>> Could
>> you describe the artifact you hear more in detail?
>> best
>> Oeyvind
>>
>> 2018-02-27 15:48 GMT+01:00 Victor Lazzarini <[hidden email]>:
>>
>>> it sounds as I would expect on MacOs. I hear no artefact, just a
>>> low-pass
>>> filtered sound
>>> ========================
>>> 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 27 Feb 2018, at 14:43, sjakops <[hidden email]> wrote:
>>> >
>>> > The 'balance' opcode (also) seems to be introducing some noise, which
>>> > I
>>> think
>>> > should not be there - happens with v6.10 and also with v6.07 on
>>> > Windows
>>> > 10/x64. Can someone please try the following code and confirm whether
>>> there
>>> > is a bug?
>>> >
>>> > <CsoundSynthesizer>
>>> > <CsOptions>
>>> > -o dac
>>> > </CsOptions>
>>> > <CsInstruments>
>>> > sr = 44100
>>> > ksmps = 32
>>> > nchnls = 2
>>> > 0dbfs  = 1
>>> > instr 1
>>> > as loscil3 1.0, 1.0, 123, 1, 1
>>> > ap tone as, 100
>>> > ap balance ap, as
>>> > outs ap, ap
>>> > endin
>>> > </CsInstruments>
>>> > <CsScore>
>>> > f 123 0 0 -1 "loop.wav" 0 0 0
>>> > i 1 0 5
>>> > e
>>> > </CsScore>
>>> > </CsoundSynthesizer>
>>> >
>>> > loop.wav <http://csound.1045644.n5.nabble.com/file/t339749/loop.wav>
>>> >
>>> >
>>> >
>>> > --
>>> > Sent from: http://csound.1045644.n5.nabble.com/Csound-General-
>>> f1093014.html
>>> >
>>> > Csound mailing list
>>> > [hidden email]
>>> > https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> > Send bugs reports to
>>> >        https://github.com/csound/csound/issues
>>> > Discussions of bugs and features can be posted here
>>>
>>> Csound mailing list
>>> [hidden email]
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>>         https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>>>
>>
>>
>>
>> --
>>
>> Oeyvind Brandtsegg
>> Professor of Music Technology
>> NTNU
>> 7491 Trondheim
>> Norway
>> Cell: +47 92 203 205
>>
>> http://www.partikkelaudio.com/
>> http://crossadaptive.hf.ntnu.no
>> http://gdsp.hf.ntnu.no/
>> http://soundcloud.com/brandtsegg
>> http://flyndresang.no/
>> http://soundcloud.com/t-emp
>>
>> Csound mailing list
>> [hidden email]
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>         https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>>
>

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] balance opcode sound artifact

Victor Lazzarini-2
Balance finds the rms of the two signals at k-rate, but it applies
the amplitude changes by interpolating linearly between k-rate
values.

It could well be that in the particular way you are using you hear
some artefact. However that’s the behaviour of balance, and not
a bug.
========================
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 1 Mar 2018, at 17:02, Søren Jakobsen <[hidden email]> wrote:
>
> I just had a chance to test it on a Mac and I'm hearing the same
> noise. And when I change ksmps from 32 to 1 it goes away. I'm
> beginning to think the problem is that balance is based on the rms
> opcode (?) which is running at k-rate only. There should be an a-rate
> version of rms, and balance should be based (optionally) on that?
> (that way I would not have to set ksmps = 1)
> Or balance should internally use some a-rate interpolation?
> Best regards,
> Søren
>
> On 2/27/18, Søren Jakobsen <[hidden email]> wrote:
>> I think what I'm hearing is some crackling 'incontinuity distortion'
>> which - I now realize - is dependent on ksmps. If I make ksmps smaller
>> there is less distortion, but even with ksmps = 1 (I guess then
>> control rate is equal to audio rate) I believe am still hearing a
>> small bit of distortion.
>>
>> I wonder if this is just a limitation of digital filters - there will
>> always be a bit of distortion? (and ksmps = 1 is probably not
>> feasible)
>>
>> Anyhow, I will try to find a friend's Mac to test with..
>>
>> Søren
>>
>> On 2/27/18, Oeyvind Brandtsegg <[hidden email]> wrote:
>>> Sounds fine here too as far as I can see.... actually seeing more than
>>> listening right now, as I only have the laptop speakers.
>>> Comparing the three different signals (clean from loscil, filtered, and
>>> balanced) show the type of output I would expect from these opcodes.
>>> Could
>>> you describe the artifact you hear more in detail?
>>> best
>>> Oeyvind
>>>
>>> 2018-02-27 15:48 GMT+01:00 Victor Lazzarini <[hidden email]>:
>>>
>>>> it sounds as I would expect on MacOs. I hear no artefact, just a
>>>> low-pass
>>>> filtered sound
>>>> ========================
>>>> 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 27 Feb 2018, at 14:43, sjakops <[hidden email]> wrote:
>>>>>
>>>>> The 'balance' opcode (also) seems to be introducing some noise, which
>>>>> I
>>>> think
>>>>> should not be there - happens with v6.10 and also with v6.07 on
>>>>> Windows
>>>>> 10/x64. Can someone please try the following code and confirm whether
>>>> there
>>>>> is a bug?
>>>>>
>>>>> <CsoundSynthesizer>
>>>>> <CsOptions>
>>>>> -o dac
>>>>> </CsOptions>
>>>>> <CsInstruments>
>>>>> sr = 44100
>>>>> ksmps = 32
>>>>> nchnls = 2
>>>>> 0dbfs  = 1
>>>>> instr 1
>>>>> as loscil3 1.0, 1.0, 123, 1, 1
>>>>> ap tone as, 100
>>>>> ap balance ap, as
>>>>> outs ap, ap
>>>>> endin
>>>>> </CsInstruments>
>>>>> <CsScore>
>>>>> f 123 0 0 -1 "loop.wav" 0 0 0
>>>>> i 1 0 5
>>>>> e
>>>>> </CsScore>
>>>>> </CsoundSynthesizer>
>>>>>
>>>>> loop.wav <http://csound.1045644.n5.nabble.com/file/t339749/loop.wav>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Sent from: http://csound.1045644.n5.nabble.com/Csound-General-
>>>> f1093014.html
>>>>>
>>>>> Csound mailing list
>>>>> [hidden email]
>>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>>> Send bugs reports to
>>>>>       https://github.com/csound/csound/issues
>>>>> Discussions of bugs and features can be posted here
>>>>
>>>> Csound mailing list
>>>> [hidden email]
>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>> Send bugs reports to
>>>>        https://github.com/csound/csound/issues
>>>> Discussions of bugs and features can be posted here
>>>>
>>>
>>>
>>>
>>> --
>>>
>>> Oeyvind Brandtsegg
>>> Professor of Music Technology
>>> NTNU
>>> 7491 Trondheim
>>> Norway
>>> Cell: +47 92 203 205
>>>
>>> http://www.partikkelaudio.com/
>>> http://crossadaptive.hf.ntnu.no
>>> http://gdsp.hf.ntnu.no/
>>> http://soundcloud.com/brandtsegg
>>> http://flyndresang.no/
>>> http://soundcloud.com/t-emp
>>>
>>> Csound mailing list
>>> [hidden email]
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>>        https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>>>
>>
>
> Csound mailing list
> [hidden email]
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here


Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] balance opcode sound artifact

sjakops
Aha! But then what can be causing this noise..? I am using the opcode
exactly as shown - did you try with the soundfile I attached?
If the balance opcode is supposed to add noise, is there perhaps
nother way I can achieve this same effect without added noise? (and
without changing ksmps)
Søren

On 3/1/18, Victor Lazzarini <[hidden email]> wrote:

> Balance finds the rms of the two signals at k-rate, but it applies
> the amplitude changes by interpolating linearly between k-rate
> values.
>
> It could well be that in the particular way you are using you hear
> some artefact. However that’s the behaviour of balance, and not
> a bug.
> ========================
> 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 1 Mar 2018, at 17:02, Søren Jakobsen <[hidden email]> wrote:
>>
>> I just had a chance to test it on a Mac and I'm hearing the same
>> noise. And when I change ksmps from 32 to 1 it goes away. I'm
>> beginning to think the problem is that balance is based on the rms
>> opcode (?) which is running at k-rate only. There should be an a-rate
>> version of rms, and balance should be based (optionally) on that?
>> (that way I would not have to set ksmps = 1)
>> Or balance should internally use some a-rate interpolation?
>> Best regards,
>> Søren
>>
>> On 2/27/18, Søren Jakobsen <[hidden email]> wrote:
>>> I think what I'm hearing is some crackling 'incontinuity distortion'
>>> which - I now realize - is dependent on ksmps. If I make ksmps smaller
>>> there is less distortion, but even with ksmps = 1 (I guess then
>>> control rate is equal to audio rate) I believe am still hearing a
>>> small bit of distortion.
>>>
>>> I wonder if this is just a limitation of digital filters - there will
>>> always be a bit of distortion? (and ksmps = 1 is probably not
>>> feasible)
>>>
>>> Anyhow, I will try to find a friend's Mac to test with..
>>>
>>> Søren
>>>
>>> On 2/27/18, Oeyvind Brandtsegg <[hidden email]> wrote:
>>>> Sounds fine here too as far as I can see.... actually seeing more than
>>>> listening right now, as I only have the laptop speakers.
>>>> Comparing the three different signals (clean from loscil, filtered, and
>>>> balanced) show the type of output I would expect from these opcodes.
>>>> Could
>>>> you describe the artifact you hear more in detail?
>>>> best
>>>> Oeyvind
>>>>
>>>> 2018-02-27 15:48 GMT+01:00 Victor Lazzarini <[hidden email]>:
>>>>
>>>>> it sounds as I would expect on MacOs. I hear no artefact, just a
>>>>> low-pass
>>>>> filtered sound
>>>>> ========================
>>>>> 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 27 Feb 2018, at 14:43, sjakops <[hidden email]> wrote:
>>>>>>
>>>>>> The 'balance' opcode (also) seems to be introducing some noise, which
>>>>>> I
>>>>> think
>>>>>> should not be there - happens with v6.10 and also with v6.07 on
>>>>>> Windows
>>>>>> 10/x64. Can someone please try the following code and confirm whether
>>>>> there
>>>>>> is a bug?
>>>>>>
>>>>>> <CsoundSynthesizer>
>>>>>> <CsOptions>
>>>>>> -o dac
>>>>>> </CsOptions>
>>>>>> <CsInstruments>
>>>>>> sr = 44100
>>>>>> ksmps = 32
>>>>>> nchnls = 2
>>>>>> 0dbfs  = 1
>>>>>> instr 1
>>>>>> as loscil3 1.0, 1.0, 123, 1, 1
>>>>>> ap tone as, 100
>>>>>> ap balance ap, as
>>>>>> outs ap, ap
>>>>>> endin
>>>>>> </CsInstruments>
>>>>>> <CsScore>
>>>>>> f 123 0 0 -1 "loop.wav" 0 0 0
>>>>>> i 1 0 5
>>>>>> e
>>>>>> </CsScore>
>>>>>> </CsoundSynthesizer>
>>>>>>
>>>>>> loop.wav <http://csound.1045644.n5.nabble.com/file/t339749/loop.wav>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Sent from: http://csound.1045644.n5.nabble.com/Csound-General-
>>>>> f1093014.html
>>>>>>
>>>>>> Csound mailing list
>>>>>> [hidden email]
>>>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>>>> Send bugs reports to
>>>>>>       https://github.com/csound/csound/issues
>>>>>> Discussions of bugs and features can be posted here
>>>>>
>>>>> Csound mailing list
>>>>> [hidden email]
>>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>>> Send bugs reports to
>>>>>        https://github.com/csound/csound/issues
>>>>> Discussions of bugs and features can be posted here
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Oeyvind Brandtsegg
>>>> Professor of Music Technology
>>>> NTNU
>>>> 7491 Trondheim
>>>> Norway
>>>> Cell: +47 92 203 205
>>>>
>>>> http://www.partikkelaudio.com/
>>>> http://crossadaptive.hf.ntnu.no
>>>> http://gdsp.hf.ntnu.no/
>>>> http://soundcloud.com/brandtsegg
>>>> http://flyndresang.no/
>>>> http://soundcloud.com/t-emp
>>>>
>>>> Csound mailing list
>>>> [hidden email]
>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>> Send bugs reports to
>>>>        https://github.com/csound/csound/issues
>>>> Discussions of bugs and features can be posted here
>>>>
>>>
>>
>> Csound mailing list
>> [hidden email]
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>        https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>
>
> Csound mailing list
> [hidden email]
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] balance opcode sound artifact

Victor Lazzarini-2
I tried your soundfile but could not hear anything (which does not mean it is not there).
What I am saying is that the opcode is what it is, it has been used in lots of applications
and we should not change its behaviour (backwards compatibility).

I have added a balance2 opcode (untested yet) that calculates the amplitude scaling
on a sample-by-sample basis. It is slightly more (but I expect not too much) expensive,
as it calls a sqrt() per sample. I suspect this saving was the original motivation for balance
(way back in MUSIC 11) being the way it is.

Once sourceforge is back up and appveyor is building again, you’re welcome to try this
opcode (just replace balance by balance2).
========================
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 1 Mar 2018, at 20:25, Søren Jakobsen <[hidden email]> wrote:
>
> Aha! But then what can be causing this noise..? I am using the opcode
> exactly as shown - did you try with the soundfile I attached?
> If the balance opcode is supposed to add noise, is there perhaps
> nother way I can achieve this same effect without added noise? (and
> without changing ksmps)
> Søren
>
> On 3/1/18, Victor Lazzarini <[hidden email]> wrote:
>> Balance finds the rms of the two signals at k-rate, but it applies
>> the amplitude changes by interpolating linearly between k-rate
>> values.
>>
>> It could well be that in the particular way you are using you hear
>> some artefact. However that’s the behaviour of balance, and not
>> a bug.
>> ========================
>> 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 1 Mar 2018, at 17:02, Søren Jakobsen <[hidden email]> wrote:
>>>
>>> I just had a chance to test it on a Mac and I'm hearing the same
>>> noise. And when I change ksmps from 32 to 1 it goes away. I'm
>>> beginning to think the problem is that balance is based on the rms
>>> opcode (?) which is running at k-rate only. There should be an a-rate
>>> version of rms, and balance should be based (optionally) on that?
>>> (that way I would not have to set ksmps = 1)
>>> Or balance should internally use some a-rate interpolation?
>>> Best regards,
>>> Søren
>>>
>>> On 2/27/18, Søren Jakobsen <[hidden email]> wrote:
>>>> I think what I'm hearing is some crackling 'incontinuity distortion'
>>>> which - I now realize - is dependent on ksmps. If I make ksmps smaller
>>>> there is less distortion, but even with ksmps = 1 (I guess then
>>>> control rate is equal to audio rate) I believe am still hearing a
>>>> small bit of distortion.
>>>>
>>>> I wonder if this is just a limitation of digital filters - there will
>>>> always be a bit of distortion? (and ksmps = 1 is probably not
>>>> feasible)
>>>>
>>>> Anyhow, I will try to find a friend's Mac to test with..
>>>>
>>>> Søren
>>>>
>>>> On 2/27/18, Oeyvind Brandtsegg <[hidden email]> wrote:
>>>>> Sounds fine here too as far as I can see.... actually seeing more than
>>>>> listening right now, as I only have the laptop speakers.
>>>>> Comparing the three different signals (clean from loscil, filtered, and
>>>>> balanced) show the type of output I would expect from these opcodes.
>>>>> Could
>>>>> you describe the artifact you hear more in detail?
>>>>> best
>>>>> Oeyvind
>>>>>
>>>>> 2018-02-27 15:48 GMT+01:00 Victor Lazzarini <[hidden email]>:
>>>>>
>>>>>> it sounds as I would expect on MacOs. I hear no artefact, just a
>>>>>> low-pass
>>>>>> filtered sound
>>>>>> ========================
>>>>>> 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 27 Feb 2018, at 14:43, sjakops <[hidden email]> wrote:
>>>>>>>
>>>>>>> The 'balance' opcode (also) seems to be introducing some noise, which
>>>>>>> I
>>>>>> think
>>>>>>> should not be there - happens with v6.10 and also with v6.07 on
>>>>>>> Windows
>>>>>>> 10/x64. Can someone please try the following code and confirm whether
>>>>>> there
>>>>>>> is a bug?
>>>>>>>
>>>>>>> <CsoundSynthesizer>
>>>>>>> <CsOptions>
>>>>>>> -o dac
>>>>>>> </CsOptions>
>>>>>>> <CsInstruments>
>>>>>>> sr = 44100
>>>>>>> ksmps = 32
>>>>>>> nchnls = 2
>>>>>>> 0dbfs  = 1
>>>>>>> instr 1
>>>>>>> as loscil3 1.0, 1.0, 123, 1, 1
>>>>>>> ap tone as, 100
>>>>>>> ap balance ap, as
>>>>>>> outs ap, ap
>>>>>>> endin
>>>>>>> </CsInstruments>
>>>>>>> <CsScore>
>>>>>>> f 123 0 0 -1 "loop.wav" 0 0 0
>>>>>>> i 1 0 5
>>>>>>> e
>>>>>>> </CsScore>
>>>>>>> </CsoundSynthesizer>
>>>>>>>
>>>>>>> loop.wav <http://csound.1045644.n5.nabble.com/file/t339749/loop.wav>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Sent from: http://csound.1045644.n5.nabble.com/Csound-General-
>>>>>> f1093014.html
>>>>>>>
>>>>>>> Csound mailing list
>>>>>>> [hidden email]
>>>>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>>>>> Send bugs reports to
>>>>>>>      https://github.com/csound/csound/issues
>>>>>>> Discussions of bugs and features can be posted here
>>>>>>
>>>>>> Csound mailing list
>>>>>> [hidden email]
>>>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>>>> Send bugs reports to
>>>>>>       https://github.com/csound/csound/issues
>>>>>> Discussions of bugs and features can be posted here
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>> Oeyvind Brandtsegg
>>>>> Professor of Music Technology
>>>>> NTNU
>>>>> 7491 Trondheim
>>>>> Norway
>>>>> Cell: +47 92 203 205
>>>>>
>>>>> http://www.partikkelaudio.com/
>>>>> http://crossadaptive.hf.ntnu.no
>>>>> http://gdsp.hf.ntnu.no/
>>>>> http://soundcloud.com/brandtsegg
>>>>> http://flyndresang.no/
>>>>> http://soundcloud.com/t-emp
>>>>>
>>>>> Csound mailing list
>>>>> [hidden email]
>>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>>> Send bugs reports to
>>>>>       https://github.com/csound/csound/issues
>>>>> Discussions of bugs and features can be posted here
>>>>>
>>>>
>>>
>>> Csound mailing list
>>> [hidden email]
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>>       https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>>
>>
>> Csound mailing list
>> [hidden email]
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>        https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>>
>
> Csound mailing list
> [hidden email]
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here


Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] balance opcode sound artifact

joachim-3
thanks, victor; i think this balance2 is a very good idea anyway.
        joachim



On 02/03/18 11:06, Victor Lazzarini wrote:

> I tried your soundfile but could not hear anything (which does not mean it is not there).
> What I am saying is that the opcode is what it is, it has been used in lots of applications
> and we should not change its behaviour (backwards compatibility).
>
> I have added a balance2 opcode (untested yet) that calculates the amplitude scaling
> on a sample-by-sample basis. It is slightly more (but I expect not too much) expensive,
> as it calls a sqrt() per sample. I suspect this saving was the original motivation for balance
> (way back in MUSIC 11) being the way it is.
>
> Once sourceforge is back up and appveyor is building again, you’re welcome to try this
> opcode (just replace balance by balance2).
> ========================
> 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 1 Mar 2018, at 20:25, Søren Jakobsen <[hidden email]> wrote:
>>
>> Aha! But then what can be causing this noise..? I am using the opcode
>> exactly as shown - did you try with the soundfile I attached?
>> If the balance opcode is supposed to add noise, is there perhaps
>> nother way I can achieve this same effect without added noise? (and
>> without changing ksmps)
>> Søren
>>
>> On 3/1/18, Victor Lazzarini <[hidden email]> wrote:
>>> Balance finds the rms of the two signals at k-rate, but it applies
>>> the amplitude changes by interpolating linearly between k-rate
>>> values.
>>>
>>> It could well be that in the particular way you are using you hear
>>> some artefact. However that’s the behaviour of balance, and not
>>> a bug.
>>> ========================
>>> 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 1 Mar 2018, at 17:02, Søren Jakobsen <[hidden email]> wrote:
>>>>
>>>> I just had a chance to test it on a Mac and I'm hearing the same
>>>> noise. And when I change ksmps from 32 to 1 it goes away. I'm
>>>> beginning to think the problem is that balance is based on the rms
>>>> opcode (?) which is running at k-rate only. There should be an a-rate
>>>> version of rms, and balance should be based (optionally) on that?
>>>> (that way I would not have to set ksmps = 1)
>>>> Or balance should internally use some a-rate interpolation?
>>>> Best regards,
>>>> Søren
>>>>
>>>> On 2/27/18, Søren Jakobsen <[hidden email]> wrote:
>>>>> I think what I'm hearing is some crackling 'incontinuity distortion'
>>>>> which - I now realize - is dependent on ksmps. If I make ksmps smaller
>>>>> there is less distortion, but even with ksmps = 1 (I guess then
>>>>> control rate is equal to audio rate) I believe am still hearing a
>>>>> small bit of distortion.
>>>>>
>>>>> I wonder if this is just a limitation of digital filters - there will
>>>>> always be a bit of distortion? (and ksmps = 1 is probably not
>>>>> feasible)
>>>>>
>>>>> Anyhow, I will try to find a friend's Mac to test with..
>>>>>
>>>>> Søren
>>>>>
>>>>> On 2/27/18, Oeyvind Brandtsegg <[hidden email]> wrote:
>>>>>> Sounds fine here too as far as I can see.... actually seeing more than
>>>>>> listening right now, as I only have the laptop speakers.
>>>>>> Comparing the three different signals (clean from loscil, filtered, and
>>>>>> balanced) show the type of output I would expect from these opcodes.
>>>>>> Could
>>>>>> you describe the artifact you hear more in detail?
>>>>>> best
>>>>>> Oeyvind
>>>>>>
>>>>>> 2018-02-27 15:48 GMT+01:00 Victor Lazzarini <[hidden email]>:
>>>>>>
>>>>>>> it sounds as I would expect on MacOs. I hear no artefact, just a
>>>>>>> low-pass
>>>>>>> filtered sound
>>>>>>> ========================
>>>>>>> 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 27 Feb 2018, at 14:43, sjakops <[hidden email]> wrote:
>>>>>>>>
>>>>>>>> The 'balance' opcode (also) seems to be introducing some noise, which
>>>>>>>> I
>>>>>>> think
>>>>>>>> should not be there - happens with v6.10 and also with v6.07 on
>>>>>>>> Windows
>>>>>>>> 10/x64. Can someone please try the following code and confirm whether
>>>>>>> there
>>>>>>>> is a bug?
>>>>>>>>
>>>>>>>> <CsoundSynthesizer>
>>>>>>>> <CsOptions>
>>>>>>>> -o dac
>>>>>>>> </CsOptions>
>>>>>>>> <CsInstruments>
>>>>>>>> sr = 44100
>>>>>>>> ksmps = 32
>>>>>>>> nchnls = 2
>>>>>>>> 0dbfs  = 1
>>>>>>>> instr 1
>>>>>>>> as loscil3 1.0, 1.0, 123, 1, 1
>>>>>>>> ap tone as, 100
>>>>>>>> ap balance ap, as
>>>>>>>> outs ap, ap
>>>>>>>> endin
>>>>>>>> </CsInstruments>
>>>>>>>> <CsScore>
>>>>>>>> f 123 0 0 -1 "loop.wav" 0 0 0
>>>>>>>> i 1 0 5
>>>>>>>> e
>>>>>>>> </CsScore>
>>>>>>>> </CsoundSynthesizer>
>>>>>>>>
>>>>>>>> loop.wav <http://csound.1045644.n5.nabble.com/file/t339749/loop.wav>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Sent from: http://csound.1045644.n5.nabble.com/Csound-General-
>>>>>>> f1093014.html
>>>>>>>>
>>>>>>>> Csound mailing list
>>>>>>>> [hidden email]
>>>>>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>>>>>> Send bugs reports to
>>>>>>>>      https://github.com/csound/csound/issues
>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>
>>>>>>> Csound mailing list
>>>>>>> [hidden email]
>>>>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>>>>> Send bugs reports to
>>>>>>>       https://github.com/csound/csound/issues
>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>>
>>>>>> Oeyvind Brandtsegg
>>>>>> Professor of Music Technology
>>>>>> NTNU
>>>>>> 7491 Trondheim
>>>>>> Norway
>>>>>> Cell: +47 92 203 205
>>>>>>
>>>>>> http://www.partikkelaudio.com/
>>>>>> http://crossadaptive.hf.ntnu.no
>>>>>> http://gdsp.hf.ntnu.no/
>>>>>> http://soundcloud.com/brandtsegg
>>>>>> http://flyndresang.no/
>>>>>> http://soundcloud.com/t-emp
>>>>>>
>>>>>> Csound mailing list
>>>>>> [hidden email]
>>>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>>>> Send bugs reports to
>>>>>>       https://github.com/csound/csound/issues
>>>>>> Discussions of bugs and features can be posted here
>>>>>>
>>>>>
>>>>
>>>> Csound mailing list
>>>> [hidden email]
>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>> Send bugs reports to
>>>>       https://github.com/csound/csound/issues
>>>> Discussions of bugs and features can be posted here
>>>
>>>
>>> Csound mailing list
>>> [hidden email]
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>>        https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>>>
>>
>> Csound mailing list
>> [hidden email]
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>        https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>
>
> Csound mailing list
> [hidden email]
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] balance opcode sound artifact

sjakops
Sounds great, thanks - looking forward to the next successful build:)

On 3/2/18, joachim heintz <[hidden email]> wrote:

> thanks, victor; i think this balance2 is a very good idea anyway.
> joachim
>
>
>
> On 02/03/18 11:06, Victor Lazzarini wrote:
>> I tried your soundfile but could not hear anything (which does not mean it
>> is not there).
>> What I am saying is that the opcode is what it is, it has been used in
>> lots of applications
>> and we should not change its behaviour (backwards compatibility).
>>
>> I have added a balance2 opcode (untested yet) that calculates the
>> amplitude scaling
>> on a sample-by-sample basis. It is slightly more (but I expect not too
>> much) expensive,
>> as it calls a sqrt() per sample. I suspect this saving was the original
>> motivation for balance
>> (way back in MUSIC 11) being the way it is.
>>
>> Once sourceforge is back up and appveyor is building again, you’re welcome
>> to try this
>> opcode (just replace balance by balance2).
>> ========================
>> 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 1 Mar 2018, at 20:25, Søren Jakobsen <[hidden email]> wrote:
>>>
>>> Aha! But then what can be causing this noise..? I am using the opcode
>>> exactly as shown - did you try with the soundfile I attached?
>>> If the balance opcode is supposed to add noise, is there perhaps
>>> nother way I can achieve this same effect without added noise? (and
>>> without changing ksmps)
>>> Søren
>>>
>>> On 3/1/18, Victor Lazzarini <[hidden email]> wrote:
>>>> Balance finds the rms of the two signals at k-rate, but it applies
>>>> the amplitude changes by interpolating linearly between k-rate
>>>> values.
>>>>
>>>> It could well be that in the particular way you are using you hear
>>>> some artefact. However that’s the behaviour of balance, and not
>>>> a bug.
>>>> ========================
>>>> 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 1 Mar 2018, at 17:02, Søren Jakobsen <[hidden email]> wrote:
>>>>>
>>>>> I just had a chance to test it on a Mac and I'm hearing the same
>>>>> noise. And when I change ksmps from 32 to 1 it goes away. I'm
>>>>> beginning to think the problem is that balance is based on the rms
>>>>> opcode (?) which is running at k-rate only. There should be an a-rate
>>>>> version of rms, and balance should be based (optionally) on that?
>>>>> (that way I would not have to set ksmps = 1)
>>>>> Or balance should internally use some a-rate interpolation?
>>>>> Best regards,
>>>>> Søren
>>>>>
>>>>> On 2/27/18, Søren Jakobsen <[hidden email]> wrote:
>>>>>> I think what I'm hearing is some crackling 'incontinuity distortion'
>>>>>> which - I now realize - is dependent on ksmps. If I make ksmps
>>>>>> smaller
>>>>>> there is less distortion, but even with ksmps = 1 (I guess then
>>>>>> control rate is equal to audio rate) I believe am still hearing a
>>>>>> small bit of distortion.
>>>>>>
>>>>>> I wonder if this is just a limitation of digital filters - there will
>>>>>> always be a bit of distortion? (and ksmps = 1 is probably not
>>>>>> feasible)
>>>>>>
>>>>>> Anyhow, I will try to find a friend's Mac to test with..
>>>>>>
>>>>>> Søren
>>>>>>
>>>>>> On 2/27/18, Oeyvind Brandtsegg <[hidden email]> wrote:
>>>>>>> Sounds fine here too as far as I can see.... actually seeing more
>>>>>>> than
>>>>>>> listening right now, as I only have the laptop speakers.
>>>>>>> Comparing the three different signals (clean from loscil, filtered,
>>>>>>> and
>>>>>>> balanced) show the type of output I would expect from these opcodes.
>>>>>>> Could
>>>>>>> you describe the artifact you hear more in detail?
>>>>>>> best
>>>>>>> Oeyvind
>>>>>>>
>>>>>>> 2018-02-27 15:48 GMT+01:00 Victor Lazzarini
>>>>>>> <[hidden email]>:
>>>>>>>
>>>>>>>> it sounds as I would expect on MacOs. I hear no artefact, just a
>>>>>>>> low-pass
>>>>>>>> filtered sound
>>>>>>>> ========================
>>>>>>>> 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 27 Feb 2018, at 14:43, sjakops <[hidden email]> wrote:
>>>>>>>>>
>>>>>>>>> The 'balance' opcode (also) seems to be introducing some noise,
>>>>>>>>> which
>>>>>>>>> I
>>>>>>>> think
>>>>>>>>> should not be there - happens with v6.10 and also with v6.07 on
>>>>>>>>> Windows
>>>>>>>>> 10/x64. Can someone please try the following code and confirm
>>>>>>>>> whether
>>>>>>>> there
>>>>>>>>> is a bug?
>>>>>>>>>
>>>>>>>>> <CsoundSynthesizer>
>>>>>>>>> <CsOptions>
>>>>>>>>> -o dac
>>>>>>>>> </CsOptions>
>>>>>>>>> <CsInstruments>
>>>>>>>>> sr = 44100
>>>>>>>>> ksmps = 32
>>>>>>>>> nchnls = 2
>>>>>>>>> 0dbfs  = 1
>>>>>>>>> instr 1
>>>>>>>>> as loscil3 1.0, 1.0, 123, 1, 1
>>>>>>>>> ap tone as, 100
>>>>>>>>> ap balance ap, as
>>>>>>>>> outs ap, ap
>>>>>>>>> endin
>>>>>>>>> </CsInstruments>
>>>>>>>>> <CsScore>
>>>>>>>>> f 123 0 0 -1 "loop.wav" 0 0 0
>>>>>>>>> i 1 0 5
>>>>>>>>> e
>>>>>>>>> </CsScore>
>>>>>>>>> </CsoundSynthesizer>
>>>>>>>>>
>>>>>>>>> loop.wav
>>>>>>>>> <http://csound.1045644.n5.nabble.com/file/t339749/loop.wav>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Sent from: http://csound.1045644.n5.nabble.com/Csound-General-
>>>>>>>> f1093014.html
>>>>>>>>>
>>>>>>>>> Csound mailing list
>>>>>>>>> [hidden email]
>>>>>>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>>>>>>> Send bugs reports to
>>>>>>>>>      https://github.com/csound/csound/issues
>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>
>>>>>>>> Csound mailing list
>>>>>>>> [hidden email]
>>>>>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>>>>>> Send bugs reports to
>>>>>>>>       https://github.com/csound/csound/issues
>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>>
>>>>>>> Oeyvind Brandtsegg
>>>>>>> Professor of Music Technology
>>>>>>> NTNU
>>>>>>> 7491 Trondheim
>>>>>>> Norway
>>>>>>> Cell: +47 92 203 205
>>>>>>>
>>>>>>> http://www.partikkelaudio.com/
>>>>>>> http://crossadaptive.hf.ntnu.no
>>>>>>> http://gdsp.hf.ntnu.no/
>>>>>>> http://soundcloud.com/brandtsegg
>>>>>>> http://flyndresang.no/
>>>>>>> http://soundcloud.com/t-emp
>>>>>>>
>>>>>>> Csound mailing list
>>>>>>> [hidden email]
>>>>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>>>>> Send bugs reports to
>>>>>>>       https://github.com/csound/csound/issues
>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>
>>>>>>
>>>>>
>>>>> Csound mailing list
>>>>> [hidden email]
>>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>>> Send bugs reports to
>>>>>       https://github.com/csound/csound/issues
>>>>> Discussions of bugs and features can be posted here
>>>>
>>>>
>>>> Csound mailing list
>>>> [hidden email]
>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>> Send bugs reports to
>>>>        https://github.com/csound/csound/issues
>>>> Discussions of bugs and features can be posted here
>>>>
>>>
>>> Csound mailing list
>>> [hidden email]
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>>        https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>>
>>
>> Csound mailing list
>> [hidden email]
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>         https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>>
>
> Csound mailing list
> [hidden email]
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] balance opcode sound artifact

Doctor B
In reply to this post by Victor Lazzarini-2
balance2 will be a nice addition.  Thanks

Sent from my iPhone

> On Mar 2, 2018, at 5:06 AM, Victor Lazzarini <[hidden email]> wrote:
>
> I tried your soundfile but could not hear anything (which does not mean it is not there).
> What I am saying is that the opcode is what it is, it has been used in lots of applications
> and we should not change its behaviour (backwards compatibility).
>
> I have added a balance2 opcode (untested yet) that calculates the amplitude scaling
> on a sample-by-sample basis. It is slightly more (but I expect not too much) expensive,
> as it calls a sqrt() per sample. I suspect this saving was the original motivation for balance
> (way back in MUSIC 11) being the way it is.
>
> Once sourceforge is back up and appveyor is building again, you’re welcome to try this
> opcode (just replace balance by balance2).
> ========================
> 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 1 Mar 2018, at 20:25, Søren Jakobsen <[hidden email]> wrote:
>>
>> Aha! But then what can be causing this noise..? I am using the opcode
>> exactly as shown - did you try with the soundfile I attached?
>> If the balance opcode is supposed to add noise, is there perhaps
>> nother way I can achieve this same effect without added noise? (and
>> without changing ksmps)
>> Søren
>>
>>> On 3/1/18, Victor Lazzarini <[hidden email]> wrote:
>>> Balance finds the rms of the two signals at k-rate, but it applies
>>> the amplitude changes by interpolating linearly between k-rate
>>> values.
>>>
>>> It could well be that in the particular way you are using you hear
>>> some artefact. However that’s the behaviour of balance, and not
>>> a bug.
>>> ========================
>>> 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 1 Mar 2018, at 17:02, Søren Jakobsen <[hidden email]> wrote:
>>>>
>>>> I just had a chance to test it on a Mac and I'm hearing the same
>>>> noise. And when I change ksmps from 32 to 1 it goes away. I'm
>>>> beginning to think the problem is that balance is based on the rms
>>>> opcode (?) which is running at k-rate only. There should be an a-rate
>>>> version of rms, and balance should be based (optionally) on that?
>>>> (that way I would not have to set ksmps = 1)
>>>> Or balance should internally use some a-rate interpolation?
>>>> Best regards,
>>>> Søren
>>>>
>>>>> On 2/27/18, Søren Jakobsen <[hidden email]> wrote:
>>>>> I think what I'm hearing is some crackling 'incontinuity distortion'
>>>>> which - I now realize - is dependent on ksmps. If I make ksmps smaller
>>>>> there is less distortion, but even with ksmps = 1 (I guess then
>>>>> control rate is equal to audio rate) I believe am still hearing a
>>>>> small bit of distortion.
>>>>>
>>>>> I wonder if this is just a limitation of digital filters - there will
>>>>> always be a bit of distortion? (and ksmps = 1 is probably not
>>>>> feasible)
>>>>>
>>>>> Anyhow, I will try to find a friend's Mac to test with..
>>>>>
>>>>> Søren
>>>>>
>>>>>> On 2/27/18, Oeyvind Brandtsegg <[hidden email]> wrote:
>>>>>> Sounds fine here too as far as I can see.... actually seeing more than
>>>>>> listening right now, as I only have the laptop speakers.
>>>>>> Comparing the three different signals (clean from loscil, filtered, and
>>>>>> balanced) show the type of output I would expect from these opcodes.
>>>>>> Could
>>>>>> you describe the artifact you hear more in detail?
>>>>>> best
>>>>>> Oeyvind
>>>>>>
>>>>>> 2018-02-27 15:48 GMT+01:00 Victor Lazzarini <[hidden email]>:
>>>>>>
>>>>>>> it sounds as I would expect on MacOs. I hear no artefact, just a
>>>>>>> low-pass
>>>>>>> filtered sound
>>>>>>> ========================
>>>>>>> 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 27 Feb 2018, at 14:43, sjakops <[hidden email]> wrote:
>>>>>>>>
>>>>>>>> The 'balance' opcode (also) seems to be introducing some noise, which
>>>>>>>> I
>>>>>>> think
>>>>>>>> should not be there - happens with v6.10 and also with v6.07 on
>>>>>>>> Windows
>>>>>>>> 10/x64. Can someone please try the following code and confirm whether
>>>>>>> there
>>>>>>>> is a bug?
>>>>>>>>
>>>>>>>> <CsoundSynthesizer>
>>>>>>>> <CsOptions>
>>>>>>>> -o dac
>>>>>>>> </CsOptions>
>>>>>>>> <CsInstruments>
>>>>>>>> sr = 44100
>>>>>>>> ksmps = 32
>>>>>>>> nchnls = 2
>>>>>>>> 0dbfs  = 1
>>>>>>>> instr 1
>>>>>>>> as loscil3 1.0, 1.0, 123, 1, 1
>>>>>>>> ap tone as, 100
>>>>>>>> ap balance ap, as
>>>>>>>> outs ap, ap
>>>>>>>> endin
>>>>>>>> </CsInstruments>
>>>>>>>> <CsScore>
>>>>>>>> f 123 0 0 -1 "loop.wav" 0 0 0
>>>>>>>> i 1 0 5
>>>>>>>> e
>>>>>>>> </CsScore>
>>>>>>>> </CsoundSynthesizer>
>>>>>>>>
>>>>>>>> loop.wav <http://csound.1045644.n5.nabble.com/file/t339749/loop.wav>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Sent from: http://csound.1045644.n5.nabble.com/Csound-General-
>>>>>>> f1093014.html
>>>>>>>>
>>>>>>>> Csound mailing list
>>>>>>>> [hidden email]
>>>>>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>>>>>> Send bugs reports to
>>>>>>>>     https://github.com/csound/csound/issues
>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>
>>>>>>> Csound mailing list
>>>>>>> [hidden email]
>>>>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>>>>> Send bugs reports to
>>>>>>>      https://github.com/csound/csound/issues
>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>>
>>>>>> Oeyvind Brandtsegg
>>>>>> Professor of Music Technology
>>>>>> NTNU
>>>>>> 7491 Trondheim
>>>>>> Norway
>>>>>> Cell: +47 92 203 205
>>>>>>
>>>>>> http://www.partikkelaudio.com/
>>>>>> http://crossadaptive.hf.ntnu.no
>>>>>> http://gdsp.hf.ntnu.no/
>>>>>> http://soundcloud.com/brandtsegg
>>>>>> http://flyndresang.no/
>>>>>> http://soundcloud.com/t-emp
>>>>>>
>>>>>> Csound mailing list
>>>>>> [hidden email]
>>>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>>>> Send bugs reports to
>>>>>>      https://github.com/csound/csound/issues
>>>>>> Discussions of bugs and features can be posted here
>>>>>>
>>>>>
>>>>
>>>> Csound mailing list
>>>> [hidden email]
>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>> Send bugs reports to
>>>>      https://github.com/csound/csound/issues
>>>> Discussions of bugs and features can be posted here
>>>
>>>
>>> Csound mailing list
>>> [hidden email]
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>>       https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>>>
>>
>> Csound mailing list
>> [hidden email]
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>       https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>
>
> Csound mailing list
> [hidden email]
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here