[chuck-users] Keyboard Stuff

Hans Aberg haberg at math.su.se
Fri Apr 17 15:22:28 EDT 2009


On 17 Apr 2009, at 20:45, Kassen wrote:

>  In this case though we are dealing with input from the computer  
> keyboard which we send internally to a set of voices in ChucK so we  
> aren't limited by MIDI's rather out-dated concepts.

Exactly. If I could, I would bypass all MIDI stuff. The organ patch is  
fully sufficient for my purposes - so I have already at least a  
minimum in sound patches.

> What we do need is some way to translate key numbers to pitches. I'd  
> do that with a simple array of floats mapping key-numbers to  
> pitches. I'd likely deal with pitchbend using some sort of scaling  
> on those values, if I needed pitchbend, that could then get rid of  
> any issues arising from non-equal spacing between notes.
>
> To clarify; what is interesting about the polyphonic examples in the  
> MIDI dir is how they deal with polyphony, not the MIDI as such.

yes, I understood that. Thanks.

> From your other mail;
>
> > It strikes me that Chuck may not be good for mixing key numbers  
> with the translated "AsCII" numbers. Ir seems one has to make choice  
> of what to use. When mixing, one may want to pick up the event first  
> and looking at both the key and the (eventual) Unicode number.
>
> Well, both methods can be used in a single set of keyboard parsing  
> rules though that would mean that we'd need to make sure we0re not  
> mixing up all the numbers that will be flying around. We might, for  
> example, look at the key number only when there is no character  
> associated with the key that was pressed, for example. Many other  
> strategies are possible.

The problem is that it might not be possible, if some keys are used  
for playing and other for manipulating data.

> ChucK may be build on decades of knowledge about sound and  
> computation but sadly we are also stuck with decades of legacy and  
> semi-standards that occasionally make our life more annoying than it  
> would ideally be. Personally I hate writing tens if not hundreds of  
> lines parsing the keyboard because it's so boring and there are so  
> many nearly random numbers yet it all needs to be exactly right. I'm  
> terribly sorry but I don't think there is anything I can do for you  
> there aside from showing understanding.

Some things are similar to a Swedish Electronic Music Studio computer  
from 1970, which sported digitally controlled analog oscillators and  
filters.

But as for the voice assignment problem, perhaps there might be the  
need of some structure handling it. Hope for the future :-).

   Hans





More information about the chuck-users mailing list