Csound Csound-dev Csound-tekno Search About

Re: [Csnd] handeling midi controlers

Date2003-09-16 23:53
From"Iain Duncan"
SubjectRe: [Csnd] handeling midi controlers
If you're getting frustrated with doing it inside of the instruments and you
want to fine tune the control and response, I recommend the following.

- midi input instrument that is always on, listening to ALL incoming midi
messages
- the input parser communicates to other instruments using global variables
of some sort or event or schedule calls
- the other instruments don't listen to midi at all, make sure they are
numbered so that they don't get automatically turned on and off my midi
messages

This introduces some extra overhead and of course you have to keep track of
the global variables, but once you've set it up you won't get annoyed
anymore as you can make any midi message do whatever you want. This also
allows you to add in midi latency compensation with the event calls so that
all the notes have the exact same starting point by delaying the quickies
enough to match the later ones.

Iain

----- Original Message -----
From: "Atte André Jensen" 
To: "csound" 
Sent: Monday, September 15, 2003 11:30 PM
Subject: [Csnd] handeling midi controlers


> Hi all
>
> I'm having a hard time trying to figure out how to setup my realtime
> instruments so that controlers work as I expect. Here's how I would like
> things to work, using the volume control (that sends control 7 on
> current midi channel) as an example:
>
> I have one large .csd file containing my realtime instruments. This is
> controlled over midi from 3 Evolution USB keyboards each set to a
> different midi channel. When I first programchange to an instr I'd like
> it to have a predefined volume (for instance 100), but any change to the
> volume knop should affect the note playing and also notes comming after
> it. Changes should be recognized both if a note is played with the instr
> and if not. If I programchange away from the instr and back I would
> prefer the volume to return to the predefined value.
>
> Right now I use global variables and have:
> gk1_volume init 100
>
> and somewhere in instr 1:
> gk1_volume midictrl 7, 0, 127
>
> This works exactly as I want, except that gk1_volume starts out with
> value 100. But if I insert these lines in instr 1:
> imidich midichn
> ctrlinit imidich, 7, i(gk1_volume)
> gk1_volume is correctly initialized with value 100, but the instrument
> does only recognize changes to the knop when a note is played.
>
> How do I get the desired behaviour? Am I on the right track or...???
>
> --
> peace, love & harmony
> Atte
> --
> Send bugs reports to csound-bugs-sBK8fsN9CKk2EctHIo1CcQ@public.gmane.org
>               (or to http://www.cs.bath.ac.uk/cgi-bin/csound )
> To unsubscribe, send email to csound-unsubscribe-nJFXYWEDAR8wZN84zEGlPg@public.gmane.org

_______________________________________________
csoundtekno mailing list
csoundtekno-N4abDuUB7xo@public.gmane.org

Subscribe, unsubscribe, change mailing list options: