Midi message editing (noob) question
Hi There,
Noob question here:
I want to convert midi messages. I need to send a midi note. For example:
Message Chan Data
Note On 1 1 126
Note Off 1 1 64
And convert it to:
Message Chan Data
Note On 1 126 1
Note Off 1 64 1
I want to use the note number for the velocity value and velocity value for the note number of the NOTE ON message. The note off value is ignored in my system.
Ive done some work on it but can't get it to work properly:
Ive created a midi parse object and connected it to an unpack object. I then connected the first output of the unpack object to the second output of a pack object and connected the second output of the unpack object to the first output of the pack object. I then connected the output of the pack object to a midi format object. See the attached file. This give erratic results. I noticed in my midi monitor that every time ONE note on OR off message is sent this patch generates a note AND off message. It doubles the information!?
So when I send this:
Message Chan Data
Note On 1 1 126
Note Off 1 1 64
I get this:
Message Chan Data
Note Off 1 126 64
Note On 1 126 1
Note Off 1 0 64
Note On 1 0 1
Hope you can help!
(Don't ask me why I want to do this. Its a limitation of my lighting desk that i'm trying to solve)
Manuel
EDIT: I didn't see that you want to filter note-off messages, you can filter those after [pack] using a [Route 64] then connecgt the midi parse to [Route]´s right output.
Your problem is that you are feeding the pack's left input first.
Each tie you get a value at the pack's left input the package is triggered. You need to feed first the pack's right's input then the left input to get a proper pack.
A solution could be to hold the value that goes in the [pack]'s right input on a [message] or [int] object then trigger it after feeding the right [pack]'s input.
.
Best
Hi Gustavo,
Thank you for your input. Actually I don't need to filter the note messages out. My system just ignores them.
I have run the patch you made and found that it, just like my patch, outputs two note on and two note off massages for every individual note on-off message it receives.
Input:
11:55:15.779 To Session 1 Note On 1 1 50
11:55:15.904 To Session 1 Note Off 1 1 64
Results in output:
11:56:14.809 To Session 1 Note Off 1 50 64
11:56:14.809 To Session 1 Note On 1 50 1
11:56:14.934 To Session 1 Note Off 1 0 64
11:56:14.934 To Session 1 Note On 1 0 1
How can I make sure it does not do that?
Thanks again for your input!
Hi Gustavo,
Its very strange. Indeed you are right that the monitoring function in m4l does not print the extra Note On and Off messages but when I use an external app: http://www.snoize.com/MIDIMonitor/ The extra messages do show up and most importantly: my lighting system picks them up also....
I see, I'll try later with the external app.
Ok, the max patch is fine, I testes as stand alone and there are no duplicates.
It is Ableton the one who is adding note off events probably to avoid endless notes our something.
What I suggest to you is to create a standalone app and send MIDI from Live to that app using UDP ports.
That works and it is very reliable, I use this method on my live shows.
If you need help with that just let me know.
Best!
or... you can generate an extra note off for each new note on, may be this can work also.
Trying to make a stand alone app but can't seem to make one. I only have m4l and not Max-MSP. Is it a restricted feature?
there you have, the modded device and the standalone, good luck!
Hi Gustavo,
Thanks for your massive input so far...!
When I run your Ableton and play 4 midi notes sequentially tuned from note 1 to 4 without using your app I get this result when view the output with: http://www.snoize.com/MIDIMonitor/
CH Note Vel
15:53:28.771 To Port 1 Note On 1 1 1
15:53:28.896 To Port 1 Note Off 1 1 64
15:53:28.896 To Port 1 Note On 1 2 1
15:53:29.021 To Port 1 Note Off 1 2 64
15:53:29.021 To Port 1 Note On 1 3 1
15:53:29.146 To Port 1 Note Off 1 3 64
15:53:29.146 To Port 1 Note On 1 4 1
15:53:29.271 To Port 1 Note Off 1 4 64
When I use you app I get this result.
CH Note Vel
15:50:09.182 To Port 1 Note On 1 1 1
15:50:09.299 To Port 1 Note On 1 0 1
15:50:09.299 To Port 1 Note On 1 1 2
15:50:09.426 To Port 1 Note On 1 0 2
15:50:09.426 To Port 1 Note On 1 1 3
15:50:09.554 To Port 1 Note On 1 0 3
15:50:09.554 To Port 1 Note On 1 1 4
15:50:09.682 To Port 1 Note On 1 0 4
I think there is something going on with the note off commando. It is converted to a note on. That does not need to happen... My desk listens al all the note on commandos so it will also respond to the extra messages...
What can i do to fix this?
Cheers,
Manuel
Hi Gustavo,
Do you have a pay pall account?
Hey Deepred.tv,
Appreciated but there is no need of any kind of donation or whatever, just remember eventually to help someone ;)
...may be a like to my Facebook fan page? :P http://facebook.com/gustavobravettilive
heheh, don´t worries, and don't hesitate on ask if you need anything else.
best!
ok, understood.
THANKS!
If you want you can keep up to date on my work at:
facebook.com/deepred.tv
Hi Gustavo,
One last question on the plugin. Now it blocks the original midi message. For my application ti would be more practical If I can send the original data AND the inverted message. Is this something you could implement?
Cheers,
Manuel