Page 1 of 1

Responding to incoming midi?

Posted: 27 Jan 2012 19:49
by malkomalko
I've setup an On MIDI execution script to be fired on some pads whenever any note on message is being sent for any range and any channel.

However I don't see anything coming back in my application. I've set the MIDI_ARGS to Monitor.value and nothing is being received. Am I thinking about this the right way or do I need to do something completely different?

I'm basically trying to interpret data being sent from a clip in ableton to 'light up' the correct pads so I can get feedback from playing parts.

Thanks!

Re: Responding to incoming midi?

Posted: 28 Jan 2012 01:55
by Macciza
Hi
It is often difficult to try to determine the problem from text descriptions - please include code or part of project . . .

From what you have written it sounds like you have done - MIDI_ARGS = Monitor.value - it should be the other Monitor.value set to MIDI_ARGS Monitor.value = MIDI_ARGS . . .

Using a Monitor called NoteIn, add a script called Midi_In or whatever you like . . .
Set Execution to On MIDI - 90-NoteOn - MIDI 0 - 0 to 127 (all notes) - 1 -16 (All channels)
NoteIn.value = MIDI_ARGS;

This will display the MIDI_ARGS array in the Monitor object - access via indexing > MIDI_ARGS[0] is NoteNumber ,MIDI_ARGS[1] is Velocity, MIDI_ARGS[2] is channel . . .

To indicate via a Pad called Pad1, add the following
if(MIDI_ARGS[0]){ // If any MIDI note
if(MIDI_ARGS[1] >= 0){ // If velocity > 0
Pad_1.x = 1; // Pad on
}
else Pad_1.x=0; // or else Pad off
}

Hope that helps
MM

Re: Responding to incoming midi?

Posted: 28 Jan 2012 11:23
by malkomalko
Thanks for the reply :D.

This is exactly what I was trying to do but nothing is being received by the lemur. Do I have to do anything special from my DAW to send midi information to the lemur?
When I say nothing is being received by the lemur, I mean that when I have that script and I do Monitor.value='hello', just so I can see that it's responding to the script, nothing is happening.

Re: Responding to incoming midi?

Posted: 28 Jan 2012 11:43
by Macciza
Hi
Anything special - well set up the Lemur Daemon, set MIDI channels & I/O in DAW etc . .

Please send some code or something more tangible . . .
Not sure what you mean about not receiving / responding? Putting Monitor.value='hello' should just show hello in the Monitor - no 'responding' needed . . .

The script I posted works in response to MIDI sent out to the Lemur from a Live MIDI track . . .

Cheers
MM

Re: Responding to incoming midi?

Posted: 04 Mar 2012 19:57
by joebataz
I'm having a similar issue except with both sides, Traktor and Lemur. I've been trying all the code I can find but still nothing. Here's the problem.
When I start playing a song in Traktor from Lemur (this is working) I would like an object to show the song position. In Traktor I have setup a General Midi Out which is sending Seek Position on Channel 1 in cc 23. If I look at the output from Traktor using Midi Monitor it shows:

12:36:58.868 To Daemon Output 0 Control 1 Controller 23 31

The 31 at the end of the line slowly increases with a period of about 2 seconds so it doesn't fit the use (sub second) speed that I need for my function. So I am baffled by how to get this to work and any insight would be greatly appreciated.

TIA,

joeb

Re: Responding to incoming midi?

Posted: 11 Mar 2012 12:43
by Macciza
Hi
Not sure if you got this sorted but I think the issue is that Song Position Pointer is a 14 bit value
So you need to deal with that in your inwards processing-outwards the easiest way is to use pitchbend data.
Cheers
MM

Re: Responding to incoming midi?

Posted: 11 Mar 2012 18:35
by joebataz
Traktor doesn't send song position so I'm trying to fake song location using the midi clock
bah.....

Re: Responding to incoming midi?

Posted: 12 Mar 2012 02:55
by Macciza
Hi
It seems silly to only be able to use a 7 bit controller for SeekPosition
Surely the hardware controllers for Traktor use 14bits for that sort of thing . . .
Are you able to use PitchBend to get 14bit control?
Dont really do much in Traktor sorry . . .

Cheers
MM

Re: Responding to incoming midi?

Posted: 12 Mar 2012 06:12
by joebataz
I spoke to the Traktor folks directly and it doesn't send the time code. The hardware controllers do a bunch of clock manipulation which is kind of what I'm trying to do. There's a lot that's hidden and trying to get answers from the techies at NI is like pulling live shark teeth. I am getting closer. Just trying to idiot-proof the code so users can't make mistakes and throw the clock out of sync.

Thanks,

joeb