Csound Csound-dev Csound-tekno Search About

[Csnd] The theory of the 'mode' opcode filter

Date2014-02-19 02:37
FromAaron Krister Johnson
Subject[Csnd] The theory of the 'mode' opcode filter

Hi all,

It's been a good while since I've posted...I hope you have all been well.

I notice in the source code that the 'mode' opcode is in 'biquad.c'. Is that because it's considered related to a biquad in its difference equation?

Looking at the math, and looking at the typical biquad filter form, I wouldn't think so, but I'm no expert so perhaps someone can explain it to me.

Anyway, I'm interested in porting the opcode to 'pyo' as an exercise, so I want to make sure I understand not only implementation details, but some of the filter mathematics as well.

Thanks,
Aaron


Date2014-02-19 09:14
Fromjpff
SubjectRe: [Csnd] The theory of the 'mode' opcode filter
There is no special significance in the name of the file.  It started as 
an implementation of a biquad filter but became a reository for a number 
of filters.  Mode is
/* mode opcode - original UDO code by François Blanc, rewritten in C by
  * Steven Yi
  */
as it says in sources


On Tue, 18 Feb 2014, Aaron Krister Johnson wrote:

> 
> Hi all,
> 
> It's been a good while since I've posted...I hope you have all been well.
> 
> I notice in the source code that the 'mode' opcode is in 'biquad.c'. Is that
> because it's considered related to a biquad in its difference equation?
> 
> Looking at the math, and looking at the typical biquad filter form, I wouldn't
> think so, but I'm no expert so perhaps someone can explain it to me.
> 
> Anyway, I'm interested in porting the opcode to 'pyo' as an exercise, so I
> want to make sure I understand not only implementation details, but some of
> the filter mathematics as well.
> 
> Thanks,
> Aaron
> 
> 
>

Date2014-02-19 15:44
FromSteven Yi
SubjectRe: [Csnd] The theory of the 'mode' opcode filter
The original used a biquad with some zeroed out stuff which I just
removed for efficiency:

http://csound.1045644.n5.nabble.com/physical-modelling-resonating-instrument-bodies-td1105233.html



On Wed, Feb 19, 2014 at 4:14 AM, jpff  wrote:
> There is no special significance in the name of the file.  It started as an
> implementation of a biquad filter but became a reository for a number of
> filters.  Mode is
> /* mode opcode - original UDO code by François Blanc, rewritten in C by
>  * Steven Yi
>  */
> as it says in sources
>
>
>
> On Tue, 18 Feb 2014, Aaron Krister Johnson wrote:
>
>>
>> Hi all,
>>
>> It's been a good while since I've posted...I hope you have all been well.
>>
>> I notice in the source code that the 'mode' opcode is in 'biquad.c'. Is
>> that
>> because it's considered related to a biquad in its difference equation?
>>
>> Looking at the math, and looking at the typical biquad filter form, I
>> wouldn't
>> think so, but I'm no expert so perhaps someone can explain it to me.
>>
>> Anyway, I'm interested in porting the opcode to 'pyo' as an exercise, so I
>> want to make sure I understand not only implementation details, but some
>> of
>> the filter mathematics as well.
>>
>> Thanks,
>> Aaron
>>
>>
>>
> Send bugs reports to the Sourceforge bug trackers
> csound6:
>            https://sourceforge.net/p/csound/tickets/
> csound5:
>            https://sourceforge.net/p/csound/bugs/
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>
>


Date2014-02-20 03:37
FromAaron Krister Johnson
SubjectRe: [Csnd] The theory of the 'mode' opcode filter
Thanks for the information, guys.

I was aware that it was originally an UDO that Steven put into the codebase eventually, but I wasn't aware of the relationship of biquad filters to 'mode', not the fact that it was a 2nd-order all-pole resonator.

Onward in the studies of filter theory and design.


On Wed, Feb 19, 2014 at 9:44 AM, Steven Yi <stevenyi@gmail.com> wrote:
The original used a biquad with some zeroed out stuff which I just
removed for efficiency:

http://csound.1045644.n5.nabble.com/physical-modelling-resonating-instrument-bodies-td1105233.html



On Wed, Feb 19, 2014 at 4:14 AM, jpff <jpff@codemist.co.uk> wrote:
> There is no special significance in the name of the file.  It started as an
> implementation of a biquad filter but became a reository for a number of
> filters.  Mode is
> /* mode opcode - original UDO code by François Blanc, rewritten in C by
>  * Steven Yi
>  */
> as it says in sources
>
>
>
> On Tue, 18 Feb 2014, Aaron Krister Johnson wrote:
>
>>
>> Hi all,
>>
>> It's been a good while since I've posted...I hope you have all been well.
>>
>> I notice in the source code that the 'mode' opcode is in 'biquad.c'. Is
>> that
>> because it's considered related to a biquad in its difference equation?
>>
>> Looking at the math, and looking at the typical biquad filter form, I
>> wouldn't
>> think so, but I'm no expert so perhaps someone can explain it to me.
>>
>> Anyway, I'm interested in porting the opcode to 'pyo' as an exercise, so I
>> want to make sure I understand not only implementation details, but some
>> of
>> the filter mathematics as well.
>>
>> Thanks,
>> Aaron
>>
>>
>>
> Send bugs reports to the Sourceforge bug trackers
> csound6:
>            https://sourceforge.net/p/csound/tickets/
> csound5:
>            https://sourceforge.net/p/csound/bugs/
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>
>


Send bugs reports to the Sourceforge bug trackers
csound6:
            https://sourceforge.net/p/csound/tickets/
csound5:
            https://sourceforge.net/p/csound/bugs/
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"





--
Aaron Krister Johnson
http://www.akjmusic.com
http://www.untwelve.org

Date2014-02-20 21:42
FromAndres Cabrera
SubjectRe: [Csnd] The theory of the 'mode' opcode filter
Hi,

Modes in physical models are "resonances" that when excited produce decaying tones centered at the particular frequencies. This can be modeled using the biquads as resonators. This is where the name "mode" for the opcode comes from.

Cheers,
Andrés


On Wed, Feb 19, 2014 at 7:37 PM, Aaron Krister Johnson <aaron@akjmusic.com> wrote:
Thanks for the information, guys.

I was aware that it was originally an UDO that Steven put into the codebase eventually, but I wasn't aware of the relationship of biquad filters to 'mode', not the fact that it was a 2nd-order all-pole resonator.

Onward in the studies of filter theory and design.


On Wed, Feb 19, 2014 at 9:44 AM, Steven Yi <stevenyi@gmail.com> wrote:
The original used a biquad with some zeroed out stuff which I just
removed for efficiency:

http://csound.1045644.n5.nabble.com/physical-modelling-resonating-instrument-bodies-td1105233.html



On Wed, Feb 19, 2014 at 4:14 AM, jpff <jpff@codemist.co.uk> wrote:
> There is no special significance in the name of the file.  It started as an
> implementation of a biquad filter but became a reository for a number of
> filters.  Mode is
> /* mode opcode - original UDO code by François Blanc, rewritten in C by
>  * Steven Yi
>  */
> as it says in sources
>
>
>
> On Tue, 18 Feb 2014, Aaron Krister Johnson wrote:
>
>>
>> Hi all,
>>
>> It's been a good while since I've posted...I hope you have all been well.
>>
>> I notice in the source code that the 'mode' opcode is in 'biquad.c'. Is
>> that
>> because it's considered related to a biquad in its difference equation?
>>
>> Looking at the math, and looking at the typical biquad filter form, I
>> wouldn't
>> think so, but I'm no expert so perhaps someone can explain it to me.
>>
>> Anyway, I'm interested in porting the opcode to 'pyo' as an exercise, so I
>> want to make sure I understand not only implementation details, but some
>> of
>> the filter mathematics as well.
>>
>> Thanks,
>> Aaron
>>
>>
>>
> Send bugs reports to the Sourceforge bug trackers
> csound6:
>            https://sourceforge.net/p/csound/tickets/
> csound5:
>            https://sourceforge.net/p/csound/bugs/
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>
>


Send bugs reports to the Sourceforge bug trackers
csound6:
            https://sourceforge.net/p/csound/tickets/
csound5:
            https://sourceforge.net/p/csound/bugs/
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"





--
Aaron Krister Johnson
http://www.akjmusic.com
http://www.untwelve.org


Date2014-02-21 04:10
FromAaron Krister Johnson
Subject[Csnd] Re: The theory of the 'mode' opcode filter
Hi Andrés,

Yes, I did understand that they are resonators that focus and decay a chosen
frequency, with a 'focus' dependent on the Q-factor. I've used mode many
times, which is why I want to try and implement it in pyo. I love the sound
of such physically-modeled instruments. I also want to urge that 'mode'
finally make it into the table of contents of the Csound documentation. It's
there, but no one would find it except via the index, IIRC.

What I don't understand as well is the math (and hence the implementation)
on a low level. I'm very well versed in the sonics of filters and what they
do; I'm just beginning to understand filter theory and the whole concept of
poles and zeros, etc...I'm beginning to see the math on an intuitive level.

What would really help me is an app that let me fool with filter parameters
and see (via a graph on the complex plane) and hear what they do in real
time!

-Aaron.



--
View this message in context: http://csound.1045644.n5.nabble.com/The-theory-of-the-mode-opcode-filter-tp5732669p5732712.html
Sent from the Csound - General mailing list archive at Nabble.com.


Date2014-02-21 15:16
Fromjpff@cs.bath.ac.uk
Subject[Csnd] Re:
AttachmentsNone  

Date2014-02-21 15:53
FromAaron Krister Johnson
SubjectRe: [Csnd] Re:
That seems like a logical place for it to me.

-AKJ


On Fri, Feb 21, 2014 at 9:16 AM, <jpff@cs.bath.ac.uk> wrote:
Where should it be in the manual?  I guess signal
Modifiets->Specialised Filters but I await advice
==John ff

Quoting Aaron Krister Johnson <aaron@akjmusic.com>:

Hi Andrés,

Yes, I did understand that they are resonators that focus and decay a chosen
frequency, with a 'focus' dependent on the Q-factor. I've used mode many
times, which is why I want to try and implement it in pyo. I love the sound
of such physically-modeled instruments. I also want to urge that 'mode'
finally make it into the table of contents of the Csound documentation. It's
there, but no one would find it except via the index, IIRC.

What I don't understand as well is the math (and hence the implementation)
on a low level. I'm very well versed in the sonics of filters and what they
do; I'm just beginning to understand filter theory and the whole concept of
poles and zeros, etc...I'm beginning to see the math on an intuitive level.

What would really help me is an app that let me fool with filter parameters
and see (via a graph on the complex plane) and hear what they do in real
time!

-Aaron.



--
View this message in context:
http://csound.1045644.n5.nabble.com/The-theory-of-the-mode-opcode-filter-tp5732669p5732712.html
Sent from the Csound - General mailing list archive at Nabble.com.


Send bugs reports to the Sourceforge bug trackers
csound6:
            https://sourceforge.net/p/csound/tickets/
csound5:
            https://sourceforge.net/p/csound/bugs/
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body
"unsubscribe csound"





Send bugs reports to the Sourceforge bug trackers
csound6:
           https://sourceforge.net/p/csound/tickets/
csound5:
           https://sourceforge.net/p/csound/bugs/
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"





--
Aaron Krister Johnson
http://www.akjmusic.com
http://www.untwelve.org