Csound Csound-dev Csound-tekno Search About

minabs at audiorate without loosing the sign

Date2016-04-20 17:51
FromPeter Burgess
Subjectminabs at audiorate without loosing the sign
How would I go about performing a minabs comparrison beteen audio rate
variables, without losing the original sign? Every way I can think of
to solve this problem eventually requires an if statement

Pete

Date2016-04-20 20:51
FromIain McCurdy
SubjectRe: minabs at audiorate without loosing the sign
Assuming that you are comparing audio signals at 0dbfs=1, does this do what you want?

 amin minabs a1+1,a2+1
 amin -= 1


> Date: Wed, 20 Apr 2016 17:51:35 +0100
> From: pete.soundtechnician@GMAIL.COM
> Subject: [Csnd] minabs at audiorate without loosing the sign
> To: CSOUND@LISTSERV.HEANET.IE
>
> How would I go about performing a minabs comparrison beteen audio rate
> variables, without losing the original sign? Every way I can think of
> to solve this problem eventually requires an if statement
>
> Pete
>
> --
> http://algorythmradio.com
> https://soundcloud.com/algorythmradio
>
> 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

Date2016-04-21 14:14
FromPeter Burgess
SubjectRe: minabs at audiorate without loosing the sign
That wouldn't compare the absolute values anymore. I've just realised
that what I need isn't a signed output necessarily, but I need to be
able to retrieve the sign after the operation. If an if statement
worked at audio rate, I'd be doing something like this:

; Threshold for both positive and negative parts of the signal
kThreshold init 0.4

; If signal is above threshold, output threshold
aBelowThreshold  minabs  aSig, a(kThreshold)

; Make negative if aSig was negative
if (aSig < 0) then
    aBelowTheshold *= -1
endif

On Wed, Apr 20, 2016 at 8:51 PM, Iain McCurdy  wrote:
> Assuming that you are comparing audio signals at 0dbfs=1, does this do what
> you want?
>
>  amin minabs a1+1,a2+1
>  amin -= 1
>
>
>> Date: Wed, 20 Apr 2016 17:51:35 +0100
>> From: pete.soundtechnician@GMAIL.COM
>> Subject: [Csnd] minabs at audiorate without loosing the sign
>> To: CSOUND@LISTSERV.HEANET.IE
>
>>
>> How would I go about performing a minabs comparrison beteen audio rate
>> variables, without losing the original sign? Every way I can think of
>> to solve this problem eventually requires an if statement
>>
>> Pete
>>
>> --
>> http://algorythmradio.com
>> https://soundcloud.com/algorythmradio
>>
>> 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


Date2016-04-21 14:24
FromTarmo Johannes
SubjectRe: minabs at audiorate without loosing the sign

Not sure but would not opcode limit do the job?
Tarmo

21.04.2016 16:14 kirjutas kuupäeval "Peter Burgess" <pete.soundtechnician@gmail.com>:
That wouldn't compare the absolute values anymore. I've just realised
that what I need isn't a signed output necessarily, but I need to be
able to retrieve the sign after the operation. If an if statement
worked at audio rate, I'd be doing something like this:

; Threshold for both positive and negative parts of the signal
kThreshold init 0.4

; If signal is above threshold, output threshold
aBelowThreshold  minabs  aSig, a(kThreshold)

; Make negative if aSig was negative
if (aSig < 0) then
    aBelowTheshold *= -1
endif

On Wed, Apr 20, 2016 at 8:51 PM, Iain McCurdy <i_mccurdy@hotmail.com> wrote:
> Assuming that you are comparing audio signals at 0dbfs=1, does this do what
> you want?
>
>  amin minabs a1+1,a2+1
>  amin -= 1
>
>
>> Date: Wed, 20 Apr 2016 17:51:35 +0100
>> From: pete.soundtechnician@GMAIL.COM
>> Subject: [Csnd] minabs at audiorate without loosing the sign
>> To: CSOUND@LISTSERV.HEANET.IE
>
>>
>> How would I go about performing a minabs comparrison beteen audio rate
>> variables, without losing the original sign? Every way I can think of
>> to solve this problem eventually requires an if statement
>>
>> Pete
>>
>> --
>> http://algorythmradio.com
>> https://soundcloud.com/algorythmradio
>>
>> 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



--
http://algorythmradio.com
https://soundcloud.com/algorythmradio

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

Date2016-04-21 14:26
FromPeter Burgess
SubjectRe: minabs at audiorate without loosing the sign
.................... oh yeah! Lol :D

And I just finished devising some cranky complex way to do this that
actually involved limit later on. Doh!

Thanks man ;)

Pete

On Thu, Apr 21, 2016 at 2:24 PM, Tarmo Johannes
 wrote:
> Not sure but would not opcode limit do the job?
> Tarmo
>
> 21.04.2016 16:14 kirjutas kuupäeval "Peter Burgess"
> :
>>
>> That wouldn't compare the absolute values anymore. I've just realised
>> that what I need isn't a signed output necessarily, but I need to be
>> able to retrieve the sign after the operation. If an if statement
>> worked at audio rate, I'd be doing something like this:
>>
>> ; Threshold for both positive and negative parts of the signal
>> kThreshold init 0.4
>>
>> ; If signal is above threshold, output threshold
>> aBelowThreshold  minabs  aSig, a(kThreshold)
>>
>> ; Make negative if aSig was negative
>> if (aSig < 0) then
>>     aBelowTheshold *= -1
>> endif
>>
>> On Wed, Apr 20, 2016 at 8:51 PM, Iain McCurdy 
>> wrote:
>> > Assuming that you are comparing audio signals at 0dbfs=1, does this do
>> > what
>> > you want?
>> >
>> >  amin minabs a1+1,a2+1
>> >  amin -= 1
>> >
>> >
>> >> Date: Wed, 20 Apr 2016 17:51:35 +0100
>> >> From: pete.soundtechnician@GMAIL.COM
>> >> Subject: [Csnd] minabs at audiorate without loosing the sign
>> >> To: CSOUND@LISTSERV.HEANET.IE
>> >
>> >>
>> >> How would I go about performing a minabs comparrison beteen audio rate
>> >> variables, without losing the original sign? Every way I can think of
>> >> to solve this problem eventually requires an if statement
>> >>
>> >> Pete
>> >>
>> >> --
>> >> http://algorythmradio.com
>> >> https://soundcloud.com/algorythmradio
>> >>
>> >> 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
>>
>>
>>
>> --
>> http://algorythmradio.com
>> https://soundcloud.com/algorythmradio
>>
>> 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



-- 
http://algorythmradio.com
https://soundcloud.com/algorythmradio

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

Date2016-04-21 14:28
FromPeter Burgess
SubjectRe: minabs at audiorate without loosing the sign
I just tried to do it like this, hahahah!

; Threshold for both positive and negative parts of the signal
kThreshold init 0.4

; If signal is above threshold, output threshold
aBelowThreshold  minabs  aSig, a(kThreshold)

; Make negative if aSig was negative
if (aSig < 0) then
    aBelowTheshold *= -1
endif

;;; Retrieve sign of original signal
; Has to be less than 1.0, and greater than -1.0 to work
aLimit limit aSig, -0.9, 0.9
; Returns 0 if positive, and -1 if negative
aFloor = floor(aLimit)
; Returns 1 if positive, and 0 if negative
aCeil = ceil(aLimit)
; Adding floor and ceiling gets -1 if negative, and 1 if positive
aSignMult = aFloor + aCeil
; Multiply to get original sign
aBelowTheshold *= aSignMult

On Thu, Apr 21, 2016 at 2:26 PM, Peter Burgess
 wrote:
> .................... oh yeah! Lol :D
>
> And I just finished devising some cranky complex way to do this that
> actually involved limit later on. Doh!
>
> Thanks man ;)
>
> Pete
>
> On Thu, Apr 21, 2016 at 2:24 PM, Tarmo Johannes
>  wrote:
>> Not sure but would not opcode limit do the job?
>> Tarmo
>>
>> 21.04.2016 16:14 kirjutas kuupäeval "Peter Burgess"
>> :
>>>
>>> That wouldn't compare the absolute values anymore. I've just realised
>>> that what I need isn't a signed output necessarily, but I need to be
>>> able to retrieve the sign after the operation. If an if statement
>>> worked at audio rate, I'd be doing something like this:
>>>
>>> ; Threshold for both positive and negative parts of the signal
>>> kThreshold init 0.4
>>>
>>> ; If signal is above threshold, output threshold
>>> aBelowThreshold  minabs  aSig, a(kThreshold)
>>>
>>> ; Make negative if aSig was negative
>>> if (aSig < 0) then
>>>     aBelowTheshold *= -1
>>> endif
>>>
>>> On Wed, Apr 20, 2016 at 8:51 PM, Iain McCurdy 
>>> wrote:
>>> > Assuming that you are comparing audio signals at 0dbfs=1, does this do
>>> > what
>>> > you want?
>>> >
>>> >  amin minabs a1+1,a2+1
>>> >  amin -= 1
>>> >
>>> >
>>> >> Date: Wed, 20 Apr 2016 17:51:35 +0100
>>> >> From: pete.soundtechnician@GMAIL.COM
>>> >> Subject: [Csnd] minabs at audiorate without loosing the sign
>>> >> To: CSOUND@LISTSERV.HEANET.IE
>>> >
>>> >>
>>> >> How would I go about performing a minabs comparrison beteen audio rate
>>> >> variables, without losing the original sign? Every way I can think of
>>> >> to solve this problem eventually requires an if statement
>>> >>
>>> >> Pete
>>> >>
>>> >> --
>>> >> http://algorythmradio.com
>>> >> https://soundcloud.com/algorythmradio
>>> >>
>>> >> 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
>>>
>>>
>>>
>>> --
>>> http://algorythmradio.com
>>> https://soundcloud.com/algorythmradio
>>>
>>> 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
>
>
>
> --
> http://algorythmradio.com
> https://soundcloud.com/algorythmradio



-- 
http://algorythmradio.com
https://soundcloud.com/algorythmradio

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

Date2016-04-21 15:21
FromAnders Genell
SubjectRe: minabs at audiorate without loosing the sign
Don't worry, it could be worse:

Regards,
Anders

On Thu, Apr 21, 2016 at 3:28 PM, Peter Burgess <pete.soundtechnician@gmail.com> wrote:
I just tried to do it like this, hahahah!

; Threshold for both positive and negative parts of the signal
kThreshold init 0.4

; If signal is above threshold, output threshold
aBelowThreshold  minabs  aSig, a(kThreshold)

; Make negative if aSig was negative
if (aSig < 0) then
    aBelowTheshold *= -1
endif

;;; Retrieve sign of original signal
; Has to be less than 1.0, and greater than -1.0 to work
aLimit limit aSig, -0.9, 0.9
; Returns 0 if positive, and -1 if negative
aFloor = floor(aLimit)
; Returns 1 if positive, and 0 if negative
aCeil = ceil(aLimit)
; Adding floor and ceiling gets -1 if negative, and 1 if positive
aSignMult = aFloor + aCeil
; Multiply to get original sign
aBelowTheshold *= aSignMult

On Thu, Apr 21, 2016 at 2:26 PM, Peter Burgess
<pete.soundtechnician@gmail.com> wrote:
> .................... oh yeah! Lol :D
>
> And I just finished devising some cranky complex way to do this that
> actually involved limit later on. Doh!
>
> Thanks man ;)
>
> Pete
>
> On Thu, Apr 21, 2016 at 2:24 PM, Tarmo Johannes
> <tarmo.johannes@otsakool.edu.ee> wrote:
>> Not sure but would not opcode limit do the job?
>> Tarmo
>>
>> 21.04.2016 16:14 kirjutas kuupäeval "Peter Burgess"
>> <pete.soundtechnician@gmail.com>:
>>>
>>> That wouldn't compare the absolute values anymore. I've just realised
>>> that what I need isn't a signed output necessarily, but I need to be
>>> able to retrieve the sign after the operation. If an if statement
>>> worked at audio rate, I'd be doing something like this:
>>>
>>> ; Threshold for both positive and negative parts of the signal
>>> kThreshold init 0.4
>>>
>>> ; If signal is above threshold, output threshold
>>> aBelowThreshold  minabs  aSig, a(kThreshold)
>>>
>>> ; Make negative if aSig was negative
>>> if (aSig < 0) then
>>>     aBelowTheshold *= -1
>>> endif
>>>
>>> On Wed, Apr 20, 2016 at 8:51 PM, Iain McCurdy <i_mccurdy@hotmail.com>
>>> wrote:
>>> > Assuming that you are comparing audio signals at 0dbfs=1, does this do
>>> > what
>>> > you want?
>>> >
>>> >  amin minabs a1+1,a2+1
>>> >  amin -= 1
>>> >
>>> >
>>> >> Date: Wed, 20 Apr 2016 17:51:35 +0100
>>> >> From: pete.soundtechnician@GMAIL.COM
>>> >> Subject: [Csnd] minabs at audiorate without loosing the sign
>>> >> To: CSOUND@LISTSERV.HEANET.IE
>>> >
>>> >>
>>> >> How would I go about performing a minabs comparrison beteen audio rate
>>> >> variables, without losing the original sign? Every way I can think of
>>> >> to solve this problem eventually requires an if statement
>>> >>
>>> >> Pete
>>> >>
>>> >> --
>>> >> http://algorythmradio.com
>>> >> https://soundcloud.com/algorythmradio
>>> >>
>>> >> 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
>>>
>>>
>>>
>>> --
>>> http://algorythmradio.com
>>> https://soundcloud.com/algorythmradio
>>>
>>> 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
>
>
>
> --
> http://algorythmradio.com
> https://soundcloud.com/algorythmradio



--
http://algorythmradio.com
https://soundcloud.com/algorythmradio

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

Date2016-04-21 15:46
FromPeter Burgess
SubjectRe: minabs at audiorate without loosing the sign
Hahahaha. Is this a job you've applied for?

On Thu, Apr 21, 2016 at 3:21 PM, Anders Genell  wrote:
> Don't worry, it could be worse:
> http://www.seek.com.au/job/30771191
>
> Regards,
> Anders
>
> On Thu, Apr 21, 2016 at 3:28 PM, Peter Burgess
>  wrote:
>>
>> I just tried to do it like this, hahahah!
>>
>> ; Threshold for both positive and negative parts of the signal
>> kThreshold init 0.4
>>
>> ; If signal is above threshold, output threshold
>> aBelowThreshold  minabs  aSig, a(kThreshold)
>>
>> ; Make negative if aSig was negative
>> if (aSig < 0) then
>>     aBelowTheshold *= -1
>> endif
>>
>> ;;; Retrieve sign of original signal
>> ; Has to be less than 1.0, and greater than -1.0 to work
>> aLimit limit aSig, -0.9, 0.9
>> ; Returns 0 if positive, and -1 if negative
>> aFloor = floor(aLimit)
>> ; Returns 1 if positive, and 0 if negative
>> aCeil = ceil(aLimit)
>> ; Adding floor and ceiling gets -1 if negative, and 1 if positive
>> aSignMult = aFloor + aCeil
>> ; Multiply to get original sign
>> aBelowTheshold *= aSignMult
>>
>> On Thu, Apr 21, 2016 at 2:26 PM, Peter Burgess
>>  wrote:
>> > .................... oh yeah! Lol :D
>> >
>> > And I just finished devising some cranky complex way to do this that
>> > actually involved limit later on. Doh!
>> >
>> > Thanks man ;)
>> >
>> > Pete
>> >
>> > On Thu, Apr 21, 2016 at 2:24 PM, Tarmo Johannes
>> >  wrote:
>> >> Not sure but would not opcode limit do the job?
>> >> Tarmo
>> >>
>> >> 21.04.2016 16:14 kirjutas kuupäeval "Peter Burgess"
>> >> :
>> >>>
>> >>> That wouldn't compare the absolute values anymore. I've just realised
>> >>> that what I need isn't a signed output necessarily, but I need to be
>> >>> able to retrieve the sign after the operation. If an if statement
>> >>> worked at audio rate, I'd be doing something like this:
>> >>>
>> >>> ; Threshold for both positive and negative parts of the signal
>> >>> kThreshold init 0.4
>> >>>
>> >>> ; If signal is above threshold, output threshold
>> >>> aBelowThreshold  minabs  aSig, a(kThreshold)
>> >>>
>> >>> ; Make negative if aSig was negative
>> >>> if (aSig < 0) then
>> >>>     aBelowTheshold *= -1
>> >>> endif
>> >>>
>> >>> On Wed, Apr 20, 2016 at 8:51 PM, Iain McCurdy 
>> >>> wrote:
>> >>> > Assuming that you are comparing audio signals at 0dbfs=1, does this
>> >>> > do
>> >>> > what
>> >>> > you want?
>> >>> >
>> >>> >  amin minabs a1+1,a2+1
>> >>> >  amin -= 1
>> >>> >
>> >>> >
>> >>> >> Date: Wed, 20 Apr 2016 17:51:35 +0100
>> >>> >> From: pete.soundtechnician@GMAIL.COM
>> >>> >> Subject: [Csnd] minabs at audiorate without loosing the sign
>> >>> >> To: CSOUND@LISTSERV.HEANET.IE
>> >>> >
>> >>> >>
>> >>> >> How would I go about performing a minabs comparrison beteen audio
>> >>> >> rate
>> >>> >> variables, without losing the original sign? Every way I can think
>> >>> >> of
>> >>> >> to solve this problem eventually requires an if statement
>> >>> >>
>> >>> >> Pete
>> >>> >>
>> >>> >> --
>> >>> >> http://algorythmradio.com
>> >>> >> https://soundcloud.com/algorythmradio
>> >>> >>
>> >>> >> 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
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>> http://algorythmradio.com
>> >>> https://soundcloud.com/algorythmradio
>> >>>
>> >>> 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
>> >
>> >
>> >
>> > --
>> > http://algorythmradio.com
>> > https://soundcloud.com/algorythmradio
>>
>>
>>
>> --
>> http://algorythmradio.com
>> https://soundcloud.com/algorythmradio
>>
>> 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



-- 
http://algorythmradio.com
https://soundcloud.com/algorythmradio

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

Date2016-04-21 15:49
FromAnders Genell
SubjectRe: minabs at audiorate without loosing the sign
No, but that is of course only because I'm not qualified...

On Thu, Apr 21, 2016 at 4:46 PM, Peter Burgess <pete.soundtechnician@gmail.com> wrote:
Hahahaha. Is this a job you've applied for?

On Thu, Apr 21, 2016 at 3:21 PM, Anders Genell <anders.genell@gmail.com> wrote:
> Don't worry, it could be worse:
> http://www.seek.com.au/job/30771191
>
> Regards,
> Anders
>
> On Thu, Apr 21, 2016 at 3:28 PM, Peter Burgess
> <pete.soundtechnician@gmail.com> wrote:
>>
>> I just tried to do it like this, hahahah!
>>
>> ; Threshold for both positive and negative parts of the signal
>> kThreshold init 0.4
>>
>> ; If signal is above threshold, output threshold
>> aBelowThreshold  minabs  aSig, a(kThreshold)
>>
>> ; Make negative if aSig was negative
>> if (aSig < 0) then
>>     aBelowTheshold *= -1
>> endif
>>
>> ;;; Retrieve sign of original signal
>> ; Has to be less than 1.0, and greater than -1.0 to work
>> aLimit limit aSig, -0.9, 0.9
>> ; Returns 0 if positive, and -1 if negative
>> aFloor = floor(aLimit)
>> ; Returns 1 if positive, and 0 if negative
>> aCeil = ceil(aLimit)
>> ; Adding floor and ceiling gets -1 if negative, and 1 if positive
>> aSignMult = aFloor + aCeil
>> ; Multiply to get original sign
>> aBelowTheshold *= aSignMult
>>
>> On Thu, Apr 21, 2016 at 2:26 PM, Peter Burgess
>> <pete.soundtechnician@gmail.com> wrote:
>> > .................... oh yeah! Lol :D
>> >
>> > And I just finished devising some cranky complex way to do this that
>> > actually involved limit later on. Doh!
>> >
>> > Thanks man ;)
>> >
>> > Pete
>> >
>> > On Thu, Apr 21, 2016 at 2:24 PM, Tarmo Johannes
>> > <tarmo.johannes@otsakool.edu.ee> wrote:
>> >> Not sure but would not opcode limit do the job?
>> >> Tarmo
>> >>
>> >> 21.04.2016 16:14 kirjutas kuupäeval "Peter Burgess"
>> >> <pete.soundtechnician@gmail.com>:
>> >>>
>> >>> That wouldn't compare the absolute values anymore. I've just realised
>> >>> that what I need isn't a signed output necessarily, but I need to be
>> >>> able to retrieve the sign after the operation. If an if statement
>> >>> worked at audio rate, I'd be doing something like this:
>> >>>
>> >>> ; Threshold for both positive and negative parts of the signal
>> >>> kThreshold init 0.4
>> >>>
>> >>> ; If signal is above threshold, output threshold
>> >>> aBelowThreshold  minabs  aSig, a(kThreshold)
>> >>>
>> >>> ; Make negative if aSig was negative
>> >>> if (aSig < 0) then
>> >>>     aBelowTheshold *= -1
>> >>> endif
>> >>>
>> >>> On Wed, Apr 20, 2016 at 8:51 PM, Iain McCurdy <i_mccurdy@hotmail.com>
>> >>> wrote:
>> >>> > Assuming that you are comparing audio signals at 0dbfs=1, does this
>> >>> > do
>> >>> > what
>> >>> > you want?
>> >>> >
>> >>> >  amin minabs a1+1,a2+1
>> >>> >  amin -= 1
>> >>> >
>> >>> >
>> >>> >> Date: Wed, 20 Apr 2016 17:51:35 +0100
>> >>> >> From: pete.soundtechnician@GMAIL.COM
>> >>> >> Subject: [Csnd] minabs at audiorate without loosing the sign
>> >>> >> To: CSOUND@LISTSERV.HEANET.IE
>> >>> >
>> >>> >>
>> >>> >> How would I go about performing a minabs comparrison beteen audio
>> >>> >> rate
>> >>> >> variables, without losing the original sign? Every way I can think
>> >>> >> of
>> >>> >> to solve this problem eventually requires an if statement
>> >>> >>
>> >>> >> Pete
>> >>> >>
>> >>> >> --
>> >>> >> http://algorythmradio.com
>> >>> >> https://soundcloud.com/algorythmradio
>> >>> >>
>> >>> >> 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
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>> http://algorythmradio.com
>> >>> https://soundcloud.com/algorythmradio
>> >>>
>> >>> 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
>> >
>> >
>> >
>> > --
>> > http://algorythmradio.com
>> > https://soundcloud.com/algorythmradio
>>
>>
>>
>> --
>> http://algorythmradio.com
>> https://soundcloud.com/algorythmradio
>>
>> 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



--
http://algorythmradio.com
https://soundcloud.com/algorythmradio

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

Date2016-04-21 15:50
FromRory Walsh
SubjectRe: minabs at audiorate without loosing the sign

I'm not sure anyone has ever applied for such a position, yet plenty find themselves in them!

On 21 Apr 2016 3:46 pm, "Peter Burgess" <pete.soundtechnician@gmail.com> wrote:
Hahahaha. Is this a job you've applied for?

On Thu, Apr 21, 2016 at 3:21 PM, Anders Genell <anders.genell@gmail.com> wrote:
> Don't worry, it could be worse:
> http://www.seek.com.au/job/30771191
>
> Regards,
> Anders
>
> On Thu, Apr 21, 2016 at 3:28 PM, Peter Burgess
> <pete.soundtechnician@gmail.com> wrote:
>>
>> I just tried to do it like this, hahahah!
>>
>> ; Threshold for both positive and negative parts of the signal
>> kThreshold init 0.4
>>
>> ; If signal is above threshold, output threshold
>> aBelowThreshold  minabs  aSig, a(kThreshold)
>>
>> ; Make negative if aSig was negative
>> if (aSig < 0) then
>>     aBelowTheshold *= -1
>> endif
>>
>> ;;; Retrieve sign of original signal
>> ; Has to be less than 1.0, and greater than -1.0 to work
>> aLimit limit aSig, -0.9, 0.9
>> ; Returns 0 if positive, and -1 if negative
>> aFloor = floor(aLimit)
>> ; Returns 1 if positive, and 0 if negative
>> aCeil = ceil(aLimit)
>> ; Adding floor and ceiling gets -1 if negative, and 1 if positive
>> aSignMult = aFloor + aCeil
>> ; Multiply to get original sign
>> aBelowTheshold *= aSignMult
>>
>> On Thu, Apr 21, 2016 at 2:26 PM, Peter Burgess
>> <pete.soundtechnician@gmail.com> wrote:
>> > .................... oh yeah! Lol :D
>> >
>> > And I just finished devising some cranky complex way to do this that
>> > actually involved limit later on. Doh!
>> >
>> > Thanks man ;)
>> >
>> > Pete
>> >
>> > On Thu, Apr 21, 2016 at 2:24 PM, Tarmo Johannes
>> > <tarmo.johannes@otsakool.edu.ee> wrote:
>> >> Not sure but would not opcode limit do the job?
>> >> Tarmo
>> >>
>> >> 21.04.2016 16:14 kirjutas kuupäeval "Peter Burgess"
>> >> <pete.soundtechnician@gmail.com>:
>> >>>
>> >>> That wouldn't compare the absolute values anymore. I've just realised
>> >>> that what I need isn't a signed output necessarily, but I need to be
>> >>> able to retrieve the sign after the operation. If an if statement
>> >>> worked at audio rate, I'd be doing something like this:
>> >>>
>> >>> ; Threshold for both positive and negative parts of the signal
>> >>> kThreshold init 0.4
>> >>>
>> >>> ; If signal is above threshold, output threshold
>> >>> aBelowThreshold  minabs  aSig, a(kThreshold)
>> >>>
>> >>> ; Make negative if aSig was negative
>> >>> if (aSig < 0) then
>> >>>     aBelowTheshold *= -1
>> >>> endif
>> >>>
>> >>> On Wed, Apr 20, 2016 at 8:51 PM, Iain McCurdy <i_mccurdy@hotmail.com>
>> >>> wrote:
>> >>> > Assuming that you are comparing audio signals at 0dbfs=1, does this
>> >>> > do
>> >>> > what
>> >>> > you want?
>> >>> >
>> >>> >  amin minabs a1+1,a2+1
>> >>> >  amin -= 1
>> >>> >
>> >>> >
>> >>> >> Date: Wed, 20 Apr 2016 17:51:35 +0100
>> >>> >> From: pete.soundtechnician@GMAIL.COM
>> >>> >> Subject: [Csnd] minabs at audiorate without loosing the sign
>> >>> >> To: CSOUND@LISTSERV.HEANET.IE
>> >>> >
>> >>> >>
>> >>> >> How would I go about performing a minabs comparrison beteen audio
>> >>> >> rate
>> >>> >> variables, without losing the original sign? Every way I can think
>> >>> >> of
>> >>> >> to solve this problem eventually requires an if statement
>> >>> >>
>> >>> >> Pete
>> >>> >>
>> >>> >> --
>> >>> >> http://algorythmradio.com
>> >>> >> https://soundcloud.com/algorythmradio
>> >>> >>
>> >>> >> 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
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>> http://algorythmradio.com
>> >>> https://soundcloud.com/algorythmradio
>> >>>
>> >>> 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
>> >
>> >
>> >
>> > --
>> > http://algorythmradio.com
>> > https://soundcloud.com/algorythmradio
>>
>>
>>
>> --
>> http://algorythmradio.com
>> https://soundcloud.com/algorythmradio
>>
>> 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



--
http://algorythmradio.com
https://soundcloud.com/algorythmradio

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

Date2016-04-21 15:55
FromVictor Lazzarini
SubjectRe: minabs at audiorate without loosing the sign
That has to go straight to social media...
========================
Dr 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 21 Apr 2016, at 15:21, Anders Genell  wrote:
> 
> Don't worry, it could be worse:
> http://www.seek.com.au/job/30771191
> 
> Regards,
> Anders
> 
> On Thu, Apr 21, 2016 at 3:28 PM, Peter Burgess  wrote:
> I just tried to do it like this, hahahah!
> 
> ; Threshold for both positive and negative parts of the signal
> kThreshold init 0.4
> 
> ; If signal is above threshold, output threshold
> aBelowThreshold  minabs  aSig, a(kThreshold)
> 
> ; Make negative if aSig was negative
> if (aSig < 0) then
>     aBelowTheshold *= -1
> endif
> 
> ;;; Retrieve sign of original signal
> ; Has to be less than 1.0, and greater than -1.0 to work
> aLimit limit aSig, -0.9, 0.9
> ; Returns 0 if positive, and -1 if negative
> aFloor = floor(aLimit)
> ; Returns 1 if positive, and 0 if negative
> aCeil = ceil(aLimit)
> ; Adding floor and ceiling gets -1 if negative, and 1 if positive
> aSignMult = aFloor + aCeil
> ; Multiply to get original sign
> aBelowTheshold *= aSignMult
> 
> On Thu, Apr 21, 2016 at 2:26 PM, Peter Burgess
>  wrote:
> > .................... oh yeah! Lol :D
> >
> > And I just finished devising some cranky complex way to do this that
> > actually involved limit later on. Doh!
> >
> > Thanks man ;)
> >
> > Pete
> >
> > On Thu, Apr 21, 2016 at 2:24 PM, Tarmo Johannes
> >  wrote:
> >> Not sure but would not opcode limit do the job?
> >> Tarmo
> >>
> >> 21.04.2016 16:14 kirjutas kuupäeval "Peter Burgess"
> >> :
> >>>
> >>> That wouldn't compare the absolute values anymore. I've just realised
> >>> that what I need isn't a signed output necessarily, but I need to be
> >>> able to retrieve the sign after the operation. If an if statement
> >>> worked at audio rate, I'd be doing something like this:
> >>>
> >>> ; Threshold for both positive and negative parts of the signal
> >>> kThreshold init 0.4
> >>>
> >>> ; If signal is above threshold, output threshold
> >>> aBelowThreshold  minabs  aSig, a(kThreshold)
> >>>
> >>> ; Make negative if aSig was negative
> >>> if (aSig < 0) then
> >>>     aBelowTheshold *= -1
> >>> endif
> >>>
> >>> On Wed, Apr 20, 2016 at 8:51 PM, Iain McCurdy 
> >>> wrote:
> >>> > Assuming that you are comparing audio signals at 0dbfs=1, does this do
> >>> > what
> >>> > you want?
> >>> >
> >>> >  amin minabs a1+1,a2+1
> >>> >  amin -= 1
> >>> >
> >>> >
> >>> >> Date: Wed, 20 Apr 2016 17:51:35 +0100
> >>> >> From: pete.soundtechnician@GMAIL.COM
> >>> >> Subject: [Csnd] minabs at audiorate without loosing the sign
> >>> >> To: CSOUND@LISTSERV.HEANET.IE
> >>> >
> >>> >>
> >>> >> How would I go about performing a minabs comparrison beteen audio rate
> >>> >> variables, without losing the original sign? Every way I can think of
> >>> >> to solve this problem eventually requires an if statement
> >>> >>
> >>> >> Pete
> >>> >>
> >>> >> --
> >>> >> http://algorythmradio.com
> >>> >> https://soundcloud.com/algorythmradio
> >>> >>
> >>> >> 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
> >>>
> >>>
> >>>
> >>> --
> >>> http://algorythmradio.com
> >>> https://soundcloud.com/algorythmradio
> >>>
> >>> 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
> >
> >
> >
> > --
> > http://algorythmradio.com
> > https://soundcloud.com/algorythmradio
> 
> 
> 
> --
> http://algorythmradio.com
> https://soundcloud.com/algorythmradio
> 
> 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