Csound Csound-dev Csound-tekno Search About

Mode opcode questions

Date2007-08-19 19:42
FromDave Seidel
SubjectMode opcode questions
Hi all,

I'm having loads of fun with the mode opcode, which I'm using to make 
some very nice bell-like sounds (currently using the set of ratios for 
the 140mm Tibetan bowl[1]).  As a mode newbie, I have a couple of 
questions....

1. Q values -- Is there any rule of thumb for coming with these?  In the 
absence of any better idea, I've been going the 1/pitch-ratio, and the 
results are pretty good, but I'd love to know of there's a better approach.

2. "Natural" decay -- Since I'm working with bell-type sounds, it feels 
wrong to specify the duration of a note.  What I really want to do it is 
to allow the note to decay "naturally", like a physical object that is 
struck.  For now, I'm using the technique of allowing "extra" time in 
p3, and overlapping the notes (i.e, starting the next note before the 
previous note's time is up.  I guess this leads to two questions: First, 
is there any algorithm I can use to derive the resonance time (the 
manual states that "[t]he resonance time is roughly proportional to 
kQ/kfreq", but I'm not sure how to apply that).  Second, is there a 
technique for a Csound instrument to modify it's own duration other than 
"ihold", e.g, can I modify p3 within the instrument itself?

- Dave

[1] http://csounds.com/resources/modalFreqs.html

Date2007-08-19 20:19
From"Steven Yi"
SubjectRe: Mode opcode questions
AttachmentsNone  

Date2007-08-20 00:58
FromDave Seidel
SubjectRe: Mode opcode questions
Thanks, Steven, that's good to know, and it will be useful.  (BTW, I'm 
using a version of your Reson 6 instrument -- which is quite nice -- 
modified to use an exciter based on the one in the mode example in the 
CS5 manual.  If I can get it to an acceptable state, I'll pass it back 
up to Blue Share.)

- Dave

Steven Yi wrote:
> Hi Dave,
> 
> Just a quick answer, you can do:
> 
> p3 = p3 + 10
> 
> or whatever value at the start of the instrument.  It'll have to be
> all itime values.   However, I found that this was problematic with
> blueX7 in the past and removed it though I don't know if that problem
> has been fixed. (Something to do with turning off the notes, it would
> spike the CPU).
> 
> steven
> 
> 
> On 8/19/07, Dave Seidel  wrote:
>> Hi all,
>>
>> I'm having loads of fun with the mode opcode, which I'm using to make
>> some very nice bell-like sounds (currently using the set of ratios for
>> the 140mm Tibetan bowl[1]).  As a mode newbie, I have a couple of
>> questions....
>>
>> 1. Q values -- Is there any rule of thumb for coming with these?  In the
>> absence of any better idea, I've been going the 1/pitch-ratio, and the
>> results are pretty good, but I'd love to know of there's a better approach.
>>
>> 2. "Natural" decay -- Since I'm working with bell-type sounds, it feels
>> wrong to specify the duration of a note.  What I really want to do it is
>> to allow the note to decay "naturally", like a physical object that is
>> struck.  For now, I'm using the technique of allowing "extra" time in
>> p3, and overlapping the notes (i.e, starting the next note before the
>> previous note's time is up.  I guess this leads to two questions: First,
>> is there any algorithm I can use to derive the resonance time (the
>> manual states that "[t]he resonance time is roughly proportional to
>> kQ/kfreq", but I'm not sure how to apply that).  Second, is there a
>> technique for a Csound instrument to modify it's own duration other than
>> "ihold", e.g, can I modify p3 within the instrument itself?
>>
>> - Dave
>>
>> [1] http://csounds.com/resources/modalFreqs.html
>> --
>> Send bugs reports to this list.
>> To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk
>>

Date2007-08-20 01:20
From"Steven Yi"
SubjectRe: Mode opcode questions
AttachmentsNone  

Date2007-08-20 01:37
FromDave Seidel
SubjectRe: Mode opcode questions
Whoops, I misspoke -- I'm using Mode 6, not Reson 6, sorry for the 
confusion!  I'm using it to make tuned bells, and it's great for what I 
have in mind.

For the excitation code, I replaced

	aexc 	mpulse 	inummodes, 0

with

	ifreq11	=	80
	iQ11	=	8
	ifreq12	=	180
	iQ12	=	3
	ashock	mpulse 	inummodes, 0
	aexc1	mode	ashock, ifreq11, iQ11
	aexc1	=	aexc1*(iamp/inummodes)
	aexc2 	mode	ashock, ifreq12, iQ12
	aexc2	=	aexc2*(iamp/inummodes)
	aexc	=	(aexc1+aexc2)/2

which comes almost verbatim from the mode.csd example.  I still need to 
replace the four literal values with parameters and surface it in the UI.

- Dave

Steven Yi wrote:
> Interestingly enough, Reson 6 came about from an instrument I made
> called Mode 5 (later Mode 6).  I had a hard time controlling the
> stability of the instrument as the resonances could last quite long
> for the input which made them not work very well in the situation I
> had where there was a constant input.  I do have a percussion version
> of Mode 6 that does use the mpulse opcode as an exciter with a single
> hit, but I don't really use percussive sounds so I'm not sure I ever
> shared it on blueShare.  Otherwise, I do think using mode opcode for
> percussion is great!
> 
> steven
> 
> 
> On 8/19/07, Dave Seidel  wrote:
>> Thanks, Steven, that's good to know, and it will be useful.  (BTW, I'm
>> using a version of your Reson 6 instrument -- which is quite nice --
>> modified to use an exciter based on the one in the mode example in the
>> CS5 manual.  If I can get it to an acceptable state, I'll pass it back
>> up to Blue Share.)
>>
>> - Dave
>>
>> Steven Yi wrote:
>>> Hi Dave,
>>>
>>> Just a quick answer, you can do:
>>>
>>> p3 = p3 + 10
>>>
>>> or whatever value at the start of the instrument.  It'll have to be
>>> all itime values.   However, I found that this was problematic with
>>> blueX7 in the past and removed it though I don't know if that problem
>>> has been fixed. (Something to do with turning off the notes, it would
>>> spike the CPU).
>>>
>>> steven
>>>
>>>
>>> On 8/19/07, Dave Seidel  wrote:
>>>> Hi all,
>>>>
>>>> I'm having loads of fun with the mode opcode, which I'm using to make
>>>> some very nice bell-like sounds (currently using the set of ratios for
>>>> the 140mm Tibetan bowl[1]).  As a mode newbie, I have a couple of
>>>> questions....
>>>>
>>>> 1. Q values -- Is there any rule of thumb for coming with these?  In the
>>>> absence of any better idea, I've been going the 1/pitch-ratio, and the
>>>> results are pretty good, but I'd love to know of there's a better approach.
>>>>
>>>> 2. "Natural" decay -- Since I'm working with bell-type sounds, it feels
>>>> wrong to specify the duration of a note.  What I really want to do it is
>>>> to allow the note to decay "naturally", like a physical object that is
>>>> struck.  For now, I'm using the technique of allowing "extra" time in
>>>> p3, and overlapping the notes (i.e, starting the next note before the
>>>> previous note's time is up.  I guess this leads to two questions: First,
>>>> is there any algorithm I can use to derive the resonance time (the
>>>> manual states that "[t]he resonance time is roughly proportional to
>>>> kQ/kfreq", but I'm not sure how to apply that).  Second, is there a
>>>> technique for a Csound instrument to modify it's own duration other than
>>>> "ihold", e.g, can I modify p3 within the instrument itself?
>>>>
>>>> - Dave
>>>>
>>>> [1] http://csounds.com/resources/modalFreqs.html
>>>> --
>>>> Send bugs reports to this list.
>>>> To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk
>>>>
>> --
>> Send bugs reports to this list.
>> To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk
>>