On Wed, 04 Oct 2006 18:44:54 +0200 "Marten Rieger" kali.84@gmx.net wrote:
hi everyone, i'm new to this list and pure data itself so please allow me to ask some kinda n00by question.
i want to build a computerkeyboard setup in which i can press many keys at once to play chords and stuff and until now i found no solution to this.
as i want those notes to stop in the moment of the keyup event i made a fix around which sadly stops all notes at the moment i release any key.
could anyone post me something or names of objects i should look at for the moment => thanks
If you want polyphony you will need more than one oscillator. Each key pressed should be routed to a new oscillator. You don't need one oscillator for every key, but you need as many as the degree of polyphony you require.
For example to make 3 note triad chords you need three oscillators.
The unit that helps with this is [poly]. This combines pairs of values which represent the key and its status and prepends a number asigned in round-robin mode to each. Used in combination with a [route] unit you can have these sent to each of the oscillators. The argument to [poly] is the number of voices of polyphony you want.
For example [poly 3] for a 3 note system.
Each event is now a 3 value list.
The [route] separates out each of these into 2 value lists and sends each to its respective output matching the number of an argument.
See attchment... it's not the best way to do it, but hopefully you will understand with a little study.
There is a problem with using the keyboard on many machines. The kernel automatically sends repeated events from the I/O, which isn't what you want for musical use.
You can try setting your key repeat to the lowest rate possible and the longest delay before it starts, on linux/unix
kbdrate -r 2 -d 1000