Forums > Max For Live

Midi message editing (noob) question

May 25, 2014 | 3:01 am

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

  • This topic was modified 3 months by  deepRED.tv.

May 27, 2014 | 8:11 am

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

  • This reply was modified 2 months by  gbravetti.

May 28, 2014 | 1:11 am

Max 6 MIDI Note & Velocity Swap


June 6, 2014 | 2:58 am

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!


June 6, 2014 | 3:09 am

Hi Julinessi,

Thank you for you input.

I’ve made the patch you suggested. See the attachment. The patch does not transmit any midi. Maybe i’ve made a mistake. Could you take e look?

Thanks!


June 6, 2014 | 7:36 am

My patch is not sending duplicates.

You must have something else that is doing that.

I just added a monitoring function to the patch s!o you can see for yourself.

Best!


June 10, 2014 | 4:12 am

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….


June 10, 2014 | 4:46 am

I see, I’ll try later with the external app.


June 10, 2014 | 7:42 am

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!


June 10, 2014 | 8:22 am

or… you can generate an extra note off for each new note on, may be this can work also.


June 10, 2014 | 8:41 am

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?


June 10, 2014 | 10:47 am

there you have, the modded device and the standalone, good luck!

http://www.sendspace.com/file/8xk9v8


June 12, 2014 | 7:03 am

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


June 12, 2014 | 10:29 am

just filter the note off events placing a [route 0] after the [pack] and connecting the right output to the [udpsend]


June 13, 2014 | 1:07 am

Hi Gustavo,

Do you have a pay pall account?


June 13, 2014 | 6:40 am

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!


June 13, 2014 | 7:17 am

ok, understood.

THANKS!

If you want you can keep up to date on my work at:

facebook.com/deepred.tv

  • This reply was modified 2 months by  deepRED.tv.

Viewing 17 posts - 1 through 17 (of 17 total)