Csound Csound-dev Csound-tekno Search About

[Csnd] Instrument design question

Date2011-02-24 09:07
FromErik de Castro Lopo
Subject[Csnd] Instrument design question
Hi all,

I'm trying to synthesize steel drums and I'm getting pretty close
execpt for one particular feature. That feature is that mutiple
notes can sound at once, but that playing any particular pitch
will cut off any currently sounding instance of the same pitch.

How can this feature be emulated in a Csound instrument?

Cheers,
Erik

Date2011-02-24 09:15
FromOeyvind Brandtsegg
SubjectRe: [Csnd] Instrument design question
hm, could you use the note number (pitch) for fractional instr number?
e.g.

instrNum = 3 ; your steel drum instr
iNote = 60 : the note (pitch) to play
event "i", instrNum+(iNote*0.001), ...etc

Oeyvind

2011/2/24 Erik de Castro Lopo :
> Hi all,
>
> I'm trying to synthesize steel drums and I'm getting pretty close
> execpt for one particular feature. That feature is that mutiple
> notes can sound at once, but that playing any particular pitch
> will cut off any currently sounding instance of the same pitch.
>
> How can this feature be emulated in a Csound instrument?
>
> Cheers,
> Erik
> --
> ----------------------------------------------------------------------
> Erik de Castro Lopo
> http://www.mega-nerd.com/
>
>
> 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"


Date2011-02-24 22:45
FromErik de Castro Lopo
SubjectRe: [Csnd] Instrument design question
Oeyvind Brandtsegg wrote:

> hm, could you use the note number (pitch) for fractional instr number?
> e.g.
> 
> instrNum = 3 ; your steel drum instr
> iNote = 60 : the note (pitch) to play
> event "i", instrNum+(iNote*0.001), ...etc

I've looked at the documentation for the event opcode and I'm no
wiser. Is there a fully working example of this somewhere?

Erik

Date2011-02-25 00:46
FromJustin Glenn Smith
SubjectRe: [Csnd] Instrument design question
The way that subinstruments (fractional instrument numbers) and dynamically generated score events (what event generates) interact causes the behavior you asked for.

For example if the base instrument is instrument 1, then midi note 60 would be called as instr 1.06, 61 as 1.061 etc. and if 1.6 is already playing the newly generated note 1.6 replaces it (with new amplitude etc. values as you specify, restarting the envelope etc.), but notes with different subinstrument numbers run in parallel.

What you want will be pretty much automatic with this setup.

Erik de Castro Lopo wrote:
> Oeyvind Brandtsegg wrote:
> 
>> hm, could you use the note number (pitch) for fractional instr number?
>> e.g.
>>
>> instrNum = 3 ; your steel drum instr
>> iNote = 60 : the note (pitch) to play
>> event "i", instrNum+(iNote*0.001), ...etc
> 
> I've looked at the documentation for the event opcode and I'm no
> wiser. Is there a fully working example of this somewhere?
> 
> Erik



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"

Date2011-02-25 03:45
FromAaron Krister Johnson
SubjectRe: [Csnd] Instrument design question
Just to confirm, Erik, that this works; and I've used it with an FM kalimba instrument I've designed....so it's pretty much the same exact application that you are seeking.

Good luck, and do share the code for your instrument when it's done! :)

Best,
AKJ

P.S. thanks for libsndfile, too.

On Thu, Feb 24, 2011 at 6:46 PM, Justin Glenn Smith <noisesmith@gmail.com> wrote:
The way that subinstruments (fractional instrument numbers) and dynamically generated score events (what event generates) interact causes the behavior you asked for.

For example if the base instrument is instrument 1, then midi note 60 would be called as instr 1.06, 61 as 1.061 etc. and if 1.6 is already playing the newly generated note 1.6 replaces it (with new amplitude etc. values as you specify, restarting the envelope etc.), but notes with different subinstrument numbers run in parallel.

What you want will be pretty much automatic with this setup.

Erik de Castro Lopo wrote:
> Oeyvind Brandtsegg wrote:
>
>> hm, could you use the note number (pitch) for fractional instr number?
>> e.g.
>>
>> instrNum = 3 ; your steel drum instr
>> iNote = 60 : the note (pitch) to play
>> event "i", instrNum+(iNote*0.001), ...etc
>
> I've looked at the documentation for the event opcode and I'm no
> wiser. Is there a fully working example of this somewhere?
>
> Erik



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"




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


Date2011-02-25 07:09
FromErik de Castro Lopo
SubjectRe: [Csnd] Instrument design question
Aaron Krister Johnson wrote:

> Just to confirm, Erik, that this works; and I've used it with an FM kalimba
> instrument I've designed....so it's pretty much the same exact application
> that you are seeking.

Yes, you're right.

> Good luck, and do share the code for your instrument when it's done! :)

I get as close as I'd like, I'll post it. If I don't get close enough,
I'll post it as ask for help :-).

Erik