[Csnd] mode opcode and kQ
| Date | 2011-03-17 08:50 |
| From | Stefan Thomas |
| Subject | [Csnd] mode opcode and kQ |
| Dear community, I have a question about the mode opcode. I don't understand exactly what the kQ parameter does. Could be someone so kind to explain it to me? Thanks, Stefan |
| Date | 2011-03-17 14:05 |
| From | Rory Walsh |
| Subject | Re: [Csnd] mode opcode and kQ |
Q is centre frequency over bandwidth. Higher vales for q will make the filter more selective. It can also be used to filter particular musical intervals. A Q value of 1.5 will filter one octave. A perfect fifth is 2.5. Some filters let you set the bandwidth, others let you set the quality factor. It depends on the particular filter opcode you use. On 17 March 2011 08:50, Stefan Thomas |
| Date | 2011-03-17 19:15 |
| From | Stefan Thomas |
| Subject | Re: [Csnd] mode opcode and kQ |
| Dear Rory, thanks for Your explaniations. What I don't understand till now is: why is 1.5 an octave? Shouldn't it be 2? 2011/3/17 Rory Walsh <rorywalsh@ear.ie> Q is centre frequency over bandwidth. Higher vales for q will make the |
| Date | 2011-03-17 22:06 |
| From | Rory Walsh |
| Subject | Re: [Csnd] mode opcode and kQ |
1.5 represents a ratio of 2:1 which is an octave. On 17 March 2011 19:15, Stefan Thomas |
| Date | 2011-03-18 01:53 |
| From | Louis Cohen |
| Subject | Re: [Csnd] mode opcode and kQ |
How does 1.5 represent the ratio 2/1? I would have thought that 1.5 = 1.5/1, not 1.5 = 2/1. -Lou On Mar 17, 2011, at 6:06 PM, Rory Walsh wrote: > 1.5 represents a ratio of 2:1 which is an octave. > > On 17 March 2011 19:15, Stefan Thomas |
| Date | 2011-03-18 05:09 |
| From | Justin Glenn Smith |
| Subject | Re: [Csnd] mode opcode and kQ |
Q is the ratio of the center frequency over the bandwidth. The formula for deriving Q (and the various other formulas that rely on that definition for Q) were designated by engineers to be useful in designing electronic circuits, not by or for musicians (at least not at first). If I recall correctly many digital filters are designed such that Q is linearly linked to a parameter of the algorithm. It may not even be possible to have octaves linked efficiently to those filters (though of course with hardware the definition of efficient has been changing).
http://en.wikipedia.org/wiki/Q_factor
here is a UDO that does that conversion, input is octaves, output is q:
opcode ioct2q,i,i
ioct xin
i2n pow 2, ioct
iq = sqrt(i2n)/(i2n-1)
xout iq
endop
opcode koct2q,k,k
koct xin
k2n pow 2, koct
kq = sqrt(k2n)/(k2n-1)
xout kq
endop
I can see the advantage of not doing all those exponentiations and square roots at k rate (not to mention audio rate), but probably the better way to do it would be an opcode that uses a lookup table like cpsoct and ampdb etc. do.
Louis Cohen wrote:
> How does 1.5 represent the ratio 2/1?
>
> I would have thought that 1.5 = 1.5/1, not 1.5 = 2/1.
>
> -Lou
>
> On Mar 17, 2011, at 6:06 PM, Rory Walsh wrote:
>
>> 1.5 represents a ratio of 2:1 which is an octave.
>>
>> On 17 March 2011 19:15, Stefan Thomas
>> |
| Date | 2011-03-18 08:19 |
| From | Mark Van Peteghem |
| Subject | Re: [Csnd] mode opcode and kQ |
As an example, assume the center frequency is 300. If Q is 1.5, then the
bandwidth is 200, so the band goes from 200 to 400.
Louis Cohen wrote:
> How does 1.5 represent the ratio 2/1?
>
> I would have thought that 1.5 = 1.5/1, not 1.5 = 2/1.
>
> -Lou
>
> On Mar 17, 2011, at 6:06 PM, Rory Walsh wrote:
>
>> 1.5 represents a ratio of 2:1 which is an octave.
Send bugs reports to the Sourceforge bug tracker
https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
|
| Date | 2011-03-18 12:05 |
| From | Justin Glenn Smith |
| Subject | Re: [Csnd] mode opcode and kQ |
To be pedantic, an octave is a Q of ~ 1.414
Mark Van Peteghem wrote:
> As an example, assume the center frequency is 300. If Q is 1.5, then the
> bandwidth is 200, so the band goes from 200 to 400.
>
> Louis Cohen wrote:
>> How does 1.5 represent the ratio 2/1?
>>
>> I would have thought that 1.5 = 1.5/1, not 1.5 = 2/1.
>>
>> -Lou
>>
>> On Mar 17, 2011, at 6:06 PM, Rory Walsh wrote:
>>
>>> 1.5 represents a ratio of 2:1 which is an octave.
>
>
>
> Send bugs reports to the Sourceforge bug tracker
> https://sourceforge.net/tracker/?group_id=81968&atid=564599
> 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 tracker
https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
|
| Date | 2011-03-18 12:23 |
| From | luis jure |
| Subject | Re: [Csnd] mode opcode and kQ |
on 2011-03-18 at 09:19 Mark Van Peteghem wrote:
>As an example, assume the center frequency is 300. If Q is 1.5, then the
>bandwidth is 200, so the band goes from 200 to 400.
i guess that some confusion might arise if you forget for a moment that, in
terms of pitch, the bandwidth is not symmetric. in your example, the
filter would go from the fifth below (2/3) the center frequency to the
fourth above (4/3), thus forming an octave.
(i have no idea if this comment adds anything of interest to the thread...)
Send bugs reports to the Sourceforge bug tracker
https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
|