Re: real-time MIDI scripting?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Saturday 10 March 2007, Larry Troxler wrote:
> Hi. Is there any scripting language out there that can read and write
> Alsa MIDI? I want to do things like remapping, intelligent, dynamic,
> keyboard splitting, assigning certain notes to close-open applications,
> sending alternate notes to different MIDI channels, and things like that.
>
> pd of course is a possibility, but at the moment I'm having problems
> getting pd-extended to run in 64studio, and regardless, I'd like to
> explore the text-language route.
>
> Larry

Well, SuperCollider can hande midi on the language side (the server side of SC 
doesn't even know what midi is)

Implementing a simple midi filtering function should be a three liner once one 
has got a grip on SC.

(
	MIDIIn.connect; 	// init for one port midi interface
// register functions:	
	MIDIIn.noteOff = { arg src, chan, num, vel; 	[chan,num,vel / 127].postln; };
	MIDIIn.noteOn = { arg src, chan, num, vel; 	[chan,num,vel / 127].postln; };
	MIDIIn.polytouch = { arg src, chan, num, vel; 	[chan,num,vel / 
127].postln; };
	MIDIIn.control = { arg src, chan, num, val; 	[chan,num,val].postln; };
	MIDIIn.program = { arg src, chan, prog; 		[chan,prog].postln; };
	MIDIIn.touch = { arg src, chan, pressure; 	[chan,pressure].postln; };
	MIDIIn.bend = { arg src, chan, bend; 			[chan,bend - 8192].postln; };
	MIDIIn.sysex = { arg src, sysex; 			sysex.postln; };
	MIDIIn.sysrt = { arg src, chan, val; 			[chan,val].postln; };
	MIDIIn.smpte = { arg src, chan, val; 			[chan,val].postln; };
)

This code example for example opens a midi port and simply prints some midi 
event informations.

Flo

-- 
Palimm Palimm!
http://tapas.affenbande.org

[Index of Archives]     [Linux Sound]     [ALSA Users]     [Pulse Audio]     [ALSA Devel]     [Sox Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux