Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] opcode/api proposal

Date2006-03-13 22:14
From"Steven Yi"
SubjectRe: [Cs-dev] opcode/api proposal
AttachmentsNone  

Date2006-03-14 05:38
FromIain Duncan
Subject[Cs-dev] opcode/api proposal
I have been thinking of this for a while but politely keeping quiet
until 5.00 was released. ;)

Would it be possible to add a new opcode (and equivalent api function)
that acted as event does, but returned a guaranteed unique value that is
a handle to that particular note instance, along with a second that acts
like turnoff but accepts an argument of an instance to turn off? This
combined with the extra time features would IMHO dramatically improve
csound for realtime use. Even better would be the change to signal an
already running instance. For me personally, it would allow me to handle
midi controlled and score controlled events in the exact same manner and
make per note polyphonic legato much easier to implement.

Thoughts?

Iain


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2006-03-14 07:18
FromIain Duncan
SubjectRe: [Cs-dev] opcode/api proposal
> Perhaps I'm not quite understanding exactly what you are doing, but
> couldn't you do what you are requesting by using notes with fractional
> instrument numbers, using turnoff2 in an instrument, and perhaps one
> extra instrument that does the turning off?  You could use line events
> to signal the turn off instrument what instrument number to disable,
> and then manage yourself (in python or csound code) the assignment of
> instances by the fraction part of the note number.

The problem is that I would like to be able to grab this handle without
knowing ( or limiting ) which instance of the instrument we are using. I
am under the impression that fractional inums require me to specify
which one I am using, correct? One could hack around that, but manually
tracking a dynamically allocated note pool was a real pain and ugly. I'd
like to be able to have an event come in at random and be able to easily
 signal that specific instance without deciding ahead of time on the
fractional inum.

> Not as tight a coupling as assigned unique ID's, but I think it'd be a
> lot of the same logic whether within Csound itself or outside of it,
> and I'd imagine a lot easier to implement outside of it.

I imagine it would be a lot of work, which is why I bring it up now,
after the release. ;) Nontheless, I personally think it would be really
useful to be able to use a handle to an event and signal it, I can't
think of how many times I've wished I could communicate with a "note"
without knowing anything else about it. Would it really be that hard to
do? I assume that on a low level a new note creates a new thread, and
the pthread library does use thread handles that can be used to
terminate threads individually.

Iain


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net