This patch was something I first made several years ago in Max/MSP, inspired by Leon Gruenbaum's Samchillian controller. Here it is in cleaned-up Pd form:
http://www.lubbertdas.org/rela.pd
And here's an example of how to connect it to an instrument: http://www.lubbertdas.org/relaphasor.pd
Basically what you do is use the QWERTYUIOP keys (not sure if you need to change the patch for different keyboard layouts) to go up and down a scale by different degrees. The space bar repeats the last note, the - and = keys temporarily transpose the current note up or down a semitone, and the ` key turns sustain on and off. You can also change the musical key and scale.
It's hard to play a melody with this patch, but it's good for wanky prog theatrics, especially if you connect it to a more expressive-sounding instrument.
Modifications you may want to make:
-try adding keyboard shortcuts for certain key/scale changes, or to certain notes of the scale
-assign two keys to take you up/down one degree of the current scale without retriggering the note attack. This adds a great hammer-on/pull-off functionality to guitaristic shredding.
-figure out how to use a MIDI keyboard with it so you can play a note on the MIDI keyboard and go up or down from there on the QWERTY keyboard
EDIT: Forgot to mention that this probably only works right in Pd-extended, as it uses [sort] from Zexy.