Csound Csound-dev Csound-tekno Search About

[Csnd] balance opcode sound artifact

Date2018-02-27 14:43
Fromsjakops
Subject[Csnd] balance opcode sound artifact
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?



-o dac


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


f 123 0 0 -1 "loop.wav" 0 0 0
i 1 0 5
e



loop.wav   



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

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

Date2018-02-27 14:48
FromVictor Lazzarini
SubjectRe: [Csnd] balance opcode sound artifact
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  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?
> 
> 
> 
> -o dac
> 
> 
> 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
> 
> 
> f 123 0 0 -1 "loop.wav" 0 0 0
> i 1 0 5
> e
> 
> 
> 
> loop.wav   
> 
> 
> 
> --
> Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html
> 
> 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

Date2018-02-27 20:39
FromOeyvind Brandtsegg
SubjectRe: [Csnd] balance opcode sound artifact
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 <Victor.Lazzarini@mu.ie>:
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 <sorenkj@gmail.com> 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
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/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

Date2018-02-27 21:04
FromVictor Lazzarini
SubjectRe: [Csnd] balance opcode sound artifact
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 <oyvind.brandtsegg@NTNU.NO> 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 <Victor.Lazzarini@mu.ie>:
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 <sorenkj@gmail.com> 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
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/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

Date2018-02-27 21:16
FromSøren Jakobsen
SubjectRe: [Csnd] balance opcode sound artifact
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  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 :
>
>> 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  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?
>> >
>> > 
>> > 
>> > -o dac
>> > 
>> > 
>> > 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
>> > 
>> > 
>> > f 123 0 0 -1 "loop.wav" 0 0 0
>> > i 1 0 5
>> > e
>> > 
>> > 
>> >
>> > loop.wav 
>> >
>> >
>> >
>> > --
>> > Sent from: http://csound.1045644.n5.nabble.com/Csound-General-
>> f1093014.html
>> >
>> > 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
>>
>
>
>
> --
>
> 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
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/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

Date2018-03-01 17:02
FromSøren Jakobsen
SubjectRe: [Csnd] balance opcode sound artifact
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  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  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 :
>>
>>> 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  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?
>>> >
>>> > 
>>> > 
>>> > -o dac
>>> > 
>>> > 
>>> > 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
>>> > 
>>> > 
>>> > f 123 0 0 -1 "loop.wav" 0 0 0
>>> > i 1 0 5
>>> > e
>>> > 
>>> > 
>>> >
>>> > loop.wav 
>>> >
>>> >
>>> >
>>> > --
>>> > Sent from: http://csound.1045644.n5.nabble.com/Csound-General-
>>> f1093014.html
>>> >
>>> > 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
>>>
>>
>>
>>
>> --
>>
>> 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
>> Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/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

Date2018-03-01 18:12
FromVictor Lazzarini
SubjectRe: [Csnd] balance opcode sound artifact
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  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  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  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 :
>>> 
>>>> 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  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?
>>>>> 
>>>>> 
>>>>> 
>>>>> -o dac
>>>>> 
>>>>> 
>>>>> 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
>>>>> 
>>>>> 
>>>>> f 123 0 0 -1 "loop.wav" 0 0 0
>>>>> i 1 0 5
>>>>> e
>>>>> 
>>>>> 
>>>>> 
>>>>> loop.wav 
>>>>> 
>>>>> 
>>>>> 
>>>>> --
>>>>> Sent from: http://csound.1045644.n5.nabble.com/Csound-General-
>>>> f1093014.html
>>>>> 
>>>>> 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
>>>> 
>>> 
>>> 
>>> 
>>> --
>>> 
>>> 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
>>> Csound@listserv.heanet.ie
>>> https://listserv.heanet.ie/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

Date2018-03-01 20:25
FromSøren Jakobsen
SubjectRe: [Csnd] balance opcode sound artifact
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  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  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  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  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 :
>>>>
>>>>> 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  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?
>>>>>>
>>>>>> 
>>>>>> 
>>>>>> -o dac
>>>>>> 
>>>>>> 
>>>>>> 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
>>>>>> 
>>>>>> 
>>>>>> f 123 0 0 -1 "loop.wav" 0 0 0
>>>>>> i 1 0 5
>>>>>> e
>>>>>> 
>>>>>> 
>>>>>>
>>>>>> loop.wav 
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Sent from: http://csound.1045644.n5.nabble.com/Csound-General-
>>>>> f1093014.html
>>>>>>
>>>>>> 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
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> 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
>>>> Csound@listserv.heanet.ie
>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>> Send bugs reports to
>>>>        https://github.com/csound/csound/issues
>>>> Discussions of bugs and features can be posted here
>>>>
>>>
>>
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>        https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>

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

Date2018-03-02 10:06
FromVictor Lazzarini
SubjectRe: [Csnd] balance opcode sound artifact
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  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  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  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  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  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 :
>>>>> 
>>>>>> 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  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?
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> -o dac
>>>>>>> 
>>>>>>> 
>>>>>>> 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
>>>>>>> 
>>>>>>> 
>>>>>>> f 123 0 0 -1 "loop.wav" 0 0 0
>>>>>>> i 1 0 5
>>>>>>> e
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> loop.wav 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> --
>>>>>>> Sent from: http://csound.1045644.n5.nabble.com/Csound-General-
>>>>>> f1093014.html
>>>>>>> 
>>>>>>> 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
>>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> --
>>>>> 
>>>>> 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
>>>>> Csound@listserv.heanet.ie
>>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>>> Send bugs reports to
>>>>>       https://github.com/csound/csound/issues
>>>>> Discussions of bugs and features can be posted here
>>>>> 
>>>> 
>>> 
>>> Csound mailing list
>>> Csound@listserv.heanet.ie
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>>       https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>> 
>> 
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>        https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>> 
> 
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here


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

Date2018-03-02 14:34
Fromjoachim heintz
SubjectRe: [Csnd] balance opcode sound artifact
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  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  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  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  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  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 :
>>>>>>
>>>>>>> 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  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?
>>>>>>>>
>>>>>>>> 
>>>>>>>> 
>>>>>>>> -o dac
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 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
>>>>>>>> 
>>>>>>>> 
>>>>>>>> f 123 0 0 -1 "loop.wav" 0 0 0
>>>>>>>> i 1 0 5
>>>>>>>> e
>>>>>>>> 
>>>>>>>> 
>>>>>>>>
>>>>>>>> loop.wav 
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Sent from: http://csound.1045644.n5.nabble.com/Csound-General-
>>>>>>> f1093014.html
>>>>>>>>
>>>>>>>> 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
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>>
>>>>>> 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
>>>>>> Csound@listserv.heanet.ie
>>>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>>>> Send bugs reports to
>>>>>>       https://github.com/csound/csound/issues
>>>>>> Discussions of bugs and features can be posted here
>>>>>>
>>>>>
>>>>
>>>> Csound mailing list
>>>> Csound@listserv.heanet.ie
>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>> Send bugs reports to
>>>>       https://github.com/csound/csound/issues
>>>> Discussions of bugs and features can be posted here
>>>
>>>
>>> Csound mailing list
>>> Csound@listserv.heanet.ie
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>>        https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>>>
>>
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>        https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>

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

Date2018-03-02 15:41
FromSøren Jakobsen
SubjectRe: [Csnd] balance opcode sound artifact
Sounds great, thanks - looking forward to the next successful build:)

On 3/2/18, joachim heintz  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  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  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  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  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  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
>>>>>>> :
>>>>>>>
>>>>>>>> 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  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?
>>>>>>>>>
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> -o dac
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 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
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> f 123 0 0 -1 "loop.wav" 0 0 0
>>>>>>>>> i 1 0 5
>>>>>>>>> e
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>>
>>>>>>>>> loop.wav
>>>>>>>>> 
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Sent from: http://csound.1045644.n5.nabble.com/Csound-General-
>>>>>>>> f1093014.html
>>>>>>>>>
>>>>>>>>> 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
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>>
>>>>>>> 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
>>>>>>> Csound@listserv.heanet.ie
>>>>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>>>>> Send bugs reports to
>>>>>>>       https://github.com/csound/csound/issues
>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>
>>>>>>
>>>>>
>>>>> Csound mailing list
>>>>> Csound@listserv.heanet.ie
>>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>>> Send bugs reports to
>>>>>       https://github.com/csound/csound/issues
>>>>> Discussions of bugs and features can be posted here
>>>>
>>>>
>>>> Csound mailing list
>>>> Csound@listserv.heanet.ie
>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>> Send bugs reports to
>>>>        https://github.com/csound/csound/issues
>>>> Discussions of bugs and features can be posted here
>>>>
>>>
>>> Csound mailing list
>>> Csound@listserv.heanet.ie
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>>        https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>>
>>
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>         https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>>
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>

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

Date2018-03-02 15:47
From"Dr. Richard Boulanger"
SubjectRe: [Csnd] balance opcode sound artifact
balance2 will be a nice addition.  Thanks

Sent from my iPhone

> On Mar 2, 2018, at 5:06 AM, 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  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  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  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  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  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 :
>>>>>> 
>>>>>>> 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  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?
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> -o dac
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 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
>>>>>>>> 
>>>>>>>> 
>>>>>>>> f 123 0 0 -1 "loop.wav" 0 0 0
>>>>>>>> i 1 0 5
>>>>>>>> e
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> loop.wav 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> --
>>>>>>>> Sent from: http://csound.1045644.n5.nabble.com/Csound-General-
>>>>>>> f1093014.html
>>>>>>>> 
>>>>>>>> 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
>>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> --
>>>>>> 
>>>>>> 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
>>>>>> Csound@listserv.heanet.ie
>>>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>>>> Send bugs reports to
>>>>>>      https://github.com/csound/csound/issues
>>>>>> Discussions of bugs and features can be posted here
>>>>>> 
>>>>> 
>>>> 
>>>> Csound mailing list
>>>> Csound@listserv.heanet.ie
>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>> Send bugs reports to
>>>>      https://github.com/csound/csound/issues
>>>> Discussions of bugs and features can be posted here
>>> 
>>> 
>>> Csound mailing list
>>> Csound@listserv.heanet.ie
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>>       https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>>> 
>> 
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>       https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
> 
> 
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

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