Trying to access/change the Midi Ports for objects like Note in, Note out, midi in, midi out. Could you please help?

Daniel Klimkowski's icon

Daniel Klimkowski

4月 03 2018 | 5:50 午後

Hi

I’m trying to access/change the Midi Ports for objects like Note in, Note out, midi in, midi out. Could you please help?

The manual says, " A simple way select a MIDI device is to double-click on the MIDI object you want to assign”. When I double click any of these objects, I get mixed results and it usually doesn’t work right. Here’s whats happening:

- Often, double clicking does absolutely nothing. I tried copy and pasting the examples for note in and note out object onto an otherwise blank Max midi effect, and when I double click any of the 4, there is no response. I am not in Edit mode or Presentation mode, but have tried them too. Here is a picture of my patch:

-When I double click one of these objects in the actual example in help (without copy and pasting anything), however, it does show me Midi Devices. However, the only midi device that it is currently showing is called “Max Midi Device”. I have several midi controllers that are connected to my computer and working fine with other applications like Ableton live, but Max is not showing me any of these. I have also gone into Audio and Midi Settings on my Mac to add a few more IAC buses ( as shown here https://www.dropbox.com/s/z9ed8xr7m9xp437/Screenshot%202018-04-03%2013.44.13.png?dl=0 ) , but none of these are showing up either.

I also tried seeing/changing the Midi devices a few days ago but had similar issues. At some point, I was able to see the full list of Midi devices when I double clicked these objects, but I don’t know how or why what changed that is now stopping me from seeing them. I am new to Max so maybe I’m missing something simple?

What do I need to do?

Thanks, Dan

Roman Thilenius's icon

Roman Thilenius

4月 03 2018 | 8:48 午後

doubleclicking should always work when there is no other problem in your midi setup.

but of course doubleclicking stops beeing the solution when you have the object in a subpatcher or when you dont want to show it to the user.

since you cant open the default port window of [midiin] and his sisters by a message, you have to change port by sending "port b".

that is where omsinfo/midiinfo is coming to play, which can fill you a menu with the "real" names of your midi ports.

Daniel Klimkowski's icon

Daniel Klimkowski

4月 04 2018 | 4:22 午後


Thank you!

I can now see all of my midi devices in a menu that is receiving inputs from a midiinfo object. However, there are other menus that also receive inputs from other midiinfo objects in the same patcher that are not showing most of my midi devices and i don't know why. Also, double clicking is still not working for any of the objects in my patcher.

In the screenshot below, i have copy and pasted the examples from the help section for the midi in, note in, and midi info objects. The menu from the midiin object help (towards the left of the patch) example is working perfectly, but the menus from the midiinfo help example (on the right) are only showing a few devices like MaxMSP 1 and 2 and AU DLS Synth 1.

but of course doubleclicking stops beeing the solution when you have the object in a subpatcher or when you dont want to show it to the user.
since you cant open the default port window of [midiin] and his sisters by a message, you have to change port by sending "port b".
that is where omsinfo/midiinfo is coming to play, which can fill you a menu with the "real" names of your midi ports.

Can you please explain more about what this means? I don't think that its in a subpatcher- the midi objects are directly in a midi Max for Live device loaded in ableton, not a patch within the patch. I'm not sure why i would not want to show it to the user (or who the user is), but i haven't purposely done anything to do hide it from the user.

I see that the menu that is working has a midiin b (as well as a midiin a) object that prints to port b (and port a). I'm not sure how the ports work though, and i don't see how these are connected to the midi info or how they allow the menu to see all of the midi devices. What do you mean by 'open the default port window of {midiin} and his sisters" and how do i changing the port to port b?

Also, i don't see any object called omsinfo anywhere- was that a typo or am i missing something?

What do i need to do to be able to see all of the midi devices in all of the menus and/or via double clicking the objects?

Roman Thilenius's icon

Roman Thilenius

4月 04 2018 | 8:59 午後

some of the midiinfo work and others not? are these others eventually in other patcher windows and you turned the midi button off in these windows?

omsinfo is the same thing just the older name. i thought it would still be linked in 7.3

Roman Thilenius's icon

Roman Thilenius

4月 04 2018 | 9:00 午後

with "default port window" i meant that window which opens when you doubleclick :)

Roman Thilenius's icon

Roman Thilenius

4月 04 2018 | 9:05 午後

it might be that doubleclicking doesnt work at all in max4live. probably because it all goes automatic anyway nowaday.

Evan's icon

Evan

4月 05 2018 | 1:36 午後

You can't change the MIDI port of midiin/midiout in M4L, that is handled by the track the device is on.

There are updates in Live 10 that allow for grabbing midi from other tracks, but its a different process than simply double clicking (iirc).

Daniel Klimkowski's icon

Daniel Klimkowski

4月 06 2018 | 3:26 午後

some of the midiinfo work and others not? are these others eventually in other patcher windows and you turned the midi button off in these windows?
omsinfo is the same thing just the older name. i thought it would still be linked in 7.3

with "default port window" i meant that window which opens when you doubleclick :)

Ok thanks for clarifying. Yes, in the patcher in the last screenshot i posted, one of the midiinfo is working fully and showing all midi devices, and the other two midiinfo objects (on the right) are only showing a couple midi devices (maxmsp1 and 2 and audls synth 1) in the outputted menu. The other midiinfo objects are not in other patcher windows, only this one (and i tried the same thing from the help window example patcher for midi objects too). I don't know how i would turn off the midi button, but i did not do this on purpose if i did.

If i can't access thru my midi devices thru double clicking, thats ok as long i can access them thru the menu or elsewhere.

You can't change the MIDI port of midiin/midiout in M4L, that is handled by the track the device is on.
There are updates in Live 10 that allow for grabbing midi from other tracks, but its a different process than simply double clicking (iirc).

Thanks. I don't think that i need to grab midi from other tracks in ableton and not sure if i should even be accessing this through ableton and max for live. I'm also using Max for Live for several other ableton related purposes (ie floating mixer window device) and that is the only way that i've used Max so far, so thats why i was going through a max for live device originally, but not sure if i should be doing this through a max for live device or a regular max device. However, i just tried changing the midi port in a new patcher that i didn't open through a max for live device in ableton and i'm still having similar issues in seeing my midi devices.

I feel like i should be able to see the midi devices whether i'm in regular max or max for live accessed through ableton, and i must be missing something simple. I'll explain more specifically what im trying to do here, i think that will make this easier:

In this case, i want to use Max to :

A) send midi commands to Keyboard Maestro trigger Keyboard Maestro actions/macros

B) receive midi commands from Keyboard Maestro to monitor the state of Keyboard Maestro actions/macros

Keyboard Maestro is an general purpose app that can create macros that can run actions for basically any type of computer function on whatever application/purpose on my mac and it is capable of both sending out midi commands as part of the macro and triggering macros with midi commands.

I figure that i can use the make note object in Max along with the midi out object to send midi commands to Keyboard Maestro via an IAC Driver Bus trigger these macros, as well as receive midi commands from Keyboard Maestro with a midi in object recieving midi from an IAC Driver Bus to monitor the state of Keyboard Maestro macros. I've never used IAC driver bus before so i'm not sure if this is the right way to do it, but i saw a tutorial that seemed to show that it will work for this purpose .

So i think that all that i need to do is set up Max to send and receive midi commands. I'm just assuming that i need to specify the Midi Device (to a IAC Driver bus) in max in order to send and receive these midi commands, because right now i'm not seeing any outgoing midi notes/commands/signals from Max in my midi monitor at all and I dont think that Max is receiving any midi notes/commands/signals. However, Max isn't allowing me to pick a midi device to send or receive to because its not showing my midi devices.

Does that make sense? Am i thinking this through in the right way or am i missing something? How can i make this kind of workflow/system work correctly? And, with this specific purpose in mind, does it affect the answer to my original question about why Max won't show me all of my midi devices?

Daniel Klimkowski's icon

Daniel Klimkowski

5月 17 2018 | 12:34 午後

Hi, can anybody please help? I'm still having this issue, its been holding me back from using Max and would really appreciate some help!

Source Audio's icon

Source Audio

5月 17 2018 | 3:37 午後

Post the simple patch that You use for midi send - receive, nothing else.
This is trivial task, something must be wrong in the patch.
And let's keep it Max only-> no Live involved.

Daniel Klimkowski's icon

Daniel Klimkowski

5月 17 2018 | 8:15 午後

Thank you, I just tried it again with just Max and not Live and now these functions are working perfectly! Not sure what the issue was last time that I tried max without opening it from Live, but regardless its working now and I now understand how changing the Midi Port of these objects only work with Max, not Max for Live. Just like the first part of what Evan said about Max for Live:

"You can't change the MIDI port of midiin/midiout in M4L, that is handled by the track the device is on.

There are updates in Live 10 that allow for grabbing midi from other tracks, but its a different process than simply double clicking (iirc).”

The only question that I have now is this: How can I include objects/functions that use different MIDI in/out Ports in the same patcher/window as controls that are currently in a Max for Live device (one that pops up into a separate max window via the pcontrol object)? 

 For example, I use a Floating Mixer device in Max for Live to show me the levels of my audio in a seperate window as I play music in Live. In that same window, I also want to include some buttons that allow me to trigger functions with other midi controllers/functions (like I described above with Keyboard Maestro).   How can I do this?  

Evan's icon

Evan

5月 17 2018 | 8:25 午後

the MIDI input and output of a max device is handled by the track, so you can take MIDI input into your device, and direct that MDII data to carry out certain functions. . Or you can just make the buttons MIDI mappable,

Source Audio's icon

Source Audio

5月 18 2018 | 6:14 午前

If Max has started from Live, by editing some max4live device,
than it looses own control of audio and midi setup.
--------
As for intercommunication between functions in max4live objects -
one can also use send - receive to communicate between devices.
And last but not least, You can use OSC to communicate with
anything capable of sending/receiving it , and without limitations
of Live - Midi or whatever.

Daniel Klimkowski's icon

Daniel Klimkowski

5月 21 2018 | 10:20 午後

“the MIDI input and output of a max device is handled by the track, so you can take MIDI input into your device, and direct that MDII data to carry out certain functions.”

It looks like i can only do this on a midi track, which would mean that this limits the buttons i can program in Max to just the one or two midi in/outputs that is routing into/out of the track in live. Is this correct? I want to make buttons/indicators/macros for several tracks ,in addition to buttons that aren’t related to Live, in one max window/patch

For example, I want to max window/page/patch that includes:

a) the mixer for all tracks in Live

b) a transposing effect/patch for ‘applying a capo’ to my midi piano

c) buttons for triggering actions/macros in Keyboard Maestro that are not related to Live

d) I might also want the flexibility to add more effects for different instruments/tracks, (ie a transposing effect/patch for a second midi keyboard)

I’m imagining that doing this would not be possible by taking a MIDI input into my Live device, and then directing that MDI data to carry out certain functions because it would require many midi routings (and Live will only allow me to route one MIDI input or output into the track). Is this correct?

___________________________________________

"Or you can just make the buttons MIDI mappable,”

What do you mean by this? How?

___________________________________________

"As for intercommunication between functions in max4live objects - one can also use send - receive to communicate between devices.”

Hmm I think this could work well. I just tried doing it and was able to get it working well between 2 different patches of regular Max. When i try connecting between a regular Max patch and a Max for Live patch, however, they are not sending/communicating (as shown below). I’m not sure if it is because i’m doing something wrong, it is 2 different version of Max (the Max for Live seems to launch in Max 8, whereas regular Max is Max 7), or this is some other reason. Why aren’t they sending/receiving and how can i make it work?

___________________________________________

"And last but not least, You can use OSC to communicate with anything capable of sending/receiving it , and without limitations of Live - Midi or whatever.”

Hmm, i just looked at Keyboard Maestro and found that it doesn’t accept OSC yet, only midi. Are there any simple OSC to midi converters that could translate it?

___________________________________________

Two general questions:

1) Do you have any recommendation on which method(s) may be the best for my purposes? Looking for simplicity and flexibility.

2) Do i need to buy a full license of Max to do what i’m trying to do? I was trying to do it all with Max for Live partially because it came free with Ableton Live 10, but it looks like I might need to use regular Max (along with Max for Live) in order to flexibly route midi within Max (so that i trigger the kinds of macros/functions that I described earlier with Keyboard Maestro). Is this correct or is it possible to do all that i’m trying to do with just Max for Live?

Source Audio's icon

Source Audio

5月 22 2018 | 6:16 午前

Converting midi messages to OSC messages would be an easy task.
A standalone max app that receives raw midi and sends it out as OSC
keeping same syntax would be easy to programm.
I am not a live user so can't help You much with questions about live routings etc.
but it would be helpfull to read live API documentation, because
it could be well possible that one could communicate between
max4Live devices with lower latency and more flexible ways using live objects.

Source Audio's icon

Source Audio

5月 22 2018 | 6:21 午前

Max Standalone
midiin -> thresh -> {prepend /midi/} -> {udpsend 127.0.0.1 6666}
if massive midi input data is expected, then one would maybe have
to use midiparse instead of thresh, and prepend midi status byte

Max4live device
{udpreceive 6666} -> {route /midi/}

then {route 144 } for midi note on chan 1, etc
-------
If more midi devices need to be envolved, than one could prepend
/midi/xy/ or /midi/1/ to separate them.
------
If midi channels play no role, one could drop it and
use /midi/note/ or /midi/controller/ to route different kinds
of midi messages.

Daniel Klimkowski's icon

Daniel Klimkowski

5月 22 2018 | 12:42 午後

Thanks again!

“it would be helpfull to read live API documentation, because

it could be well possible that one could communicate between

max4Live devices with lower latency and more flexible ways using live objects.”

Yes, just checked out the API and it seems helpful, also does seem possible to use it to communicate between max4Live devices. However, what i’m wondering right now is how to communicate between regular/standalone maxforlive device, and i’m not seeing how that can help with this yet. Unless i use it in addition to send/receive (or maybe OSC) i’m guessing, but still not sure how to make these work yet.

“Max Standalone

midiin -> thresh -> {prepend /midi/} -> {udpsend 127.0.0.1 6666}

if massive midi input data is expected, then one would maybe have

to use midiparse instead of thresh, and prepend midi status byte

Max4live device

{udpreceive 6666} -> {route /midi/}

then {route 144 } for midi note on chan 1, etc

-------

If more midi devices need to be envolved, than one could prepend

/midi/xy/ or /midi/1/ to separate them.

------

If midi channels play no role, one could drop it and

use /midi/note/ or /midi/controller/ to route different kinds

of midi messages.”

Could you please clarify what these instructions are for? Is it to make the send/receive work between Max standalone/regular and Max for Live devices? Or something else?

i just tried putting it into max/maxforlive and got confused at several steps. Here are questions about the things i didn’t understand and picture of my attempt below:

  1. I see two types of thresh- thresh and thresh~… i just use regular thresh, correct?

2 “prepend /midi/“ . What does this mean? I can make a prepend object but not “prepend /midi/“ object?

3 “route /midi/“ . What does this mean? I can make a prepend object but not “route /midi/“ object?

4 “then {route 144 } for midi note on chan 1, etc “- how do i do this?

Also, I’m wondering if might better to route the MaxforLive patch into Max standalone/regular (rather than the other way around) , so that i have more flexibility. Does this make sense/ make a difference?

Source Audio's icon

Source Audio

5月 22 2018 | 2:22 午後

From Your questions I now realise that You have not used OSC and midi much,
so I'm sorry to have simplified my answers. I just assumed You were familiar with that stuff.
I think You should learn to use Live Api to talk
between max4Live devices and Live itself.
To get Midi form external hardware into that circle, I suggested to make max standalone which would receive midi and send it out as OSC messages. Or receive OSC messages and send midi out
to hardware.
---------
If You don't use any midi hardware but only Apps, then max4Live device could do the job alltogether.
Set keyboard maestro to send midi on IAC buss of Your choice.
Make Max4Live midi device that listens to that IAC buss.
Then convert midi to OSC messages or send / receive messages.
Midi comes in as serial communication, byte after byte.
OSC needs to send and receive a list, so that's why thresh between midi in and udpsend.
/midi/ or /midi/notes/ are just prepended vaues.



Source Audio's icon

Source Audio

5月 22 2018 | 2:37 午後

and here few links
https://docs.cycling74.com/max7/vignettes/MIDI_topic
https://www.midi.org/specifications-old/item/table-2-expanded-messages-list-status-bytes
from old max 4 pdf :


Daniel Klimkowski's icon

Daniel Klimkowski

5月 22 2018 | 5:16 午後

Thanks again. No problem, I appreciate your help, yes I’ve never used OSC before and am relatively new to anything beyond basic midi commands. 

"I think You should learn to use Live Api to talk between max4Live devices and Live itself. To get Midi form external hardware into that circle, I suggested to make max standalone which would receive midi and send it out as OSC messages. Or receive OSC messages and send midi out to hardware. --------- If You don't use any midi hardware but only Apps, then max4Live device could do the job alltogether. Set keyboard maestro to send midi on IAC buss of Your choice. Make Max4Live midi device that listens to that IAC buss. Then convert midi to OSC messages or send / receive messages. Midi comes in as serial communication, byte after byte. OSC needs to send and receive a list, so that's why thresh between midi in and udpsend. /midi/ or /midi/notes/ are just prepended vaues.”

Yes I will learn Live API. I don’t plan on using MIDI from external hardware in these patches. I want to just use it with software, so glad to hear that the max4live device can do it all. But I dont know how to do the second step you said, "Make Max4Live midi device that listens to that IAC buss.”  That was my original issue- how can I make a Max4Live midi device that listens an audio bus if I can’t change the midi input routing of the MaxforLive device to the IAC bus? Or is this by routing the midi from IAC bus into the Live Track? If so, can this also work in the same device as the other functions that I want in my patch/window (ie the mixer and transposing function for keyboards, which are currently on different midi channels than Keyboard Maestro)?

Or do you mean that i can use 1 max4live device that is on an ableton track routed to receive midi from Keyboard Maestro via IAC driver, then use the Live API to receive all of the other data/controls from other Live devices into that 1 max for live device?

Edit: I'm thinking that this last question described what you mean, it seems to make sense now. Is this correct?

Thanks for links. Also, I remade the patch in your screenshot and was able to trigger a message (called 1 in the screenshot below) from Max standalone to Max for Live. However, I don’t understand alot of how this works yet or how I would apply it in my own setup . But i don't need to use this if i just use Max4Live (and not standalone Max), is this correct?

Daniel Klimkowski's icon

Daniel Klimkowski

5月 31 2018 | 1:01 午後

Following up with my next attempt, could you please help me figure out what i need to do?

I tried doing what seemed to make the most sense, as i described in my last post:

“I can use 1 max4live device that is on an ableton track routed to receive midi from Keyboard Maestro via IAC driver, then use the Live API to receive all of the other data/controls from other Live devices into that 1 max for live device”

So I just tried setting that up to see if I could get it to work, but got stuck. First, Keyboard Maestro doesn’t allow me to specify the IAC bus, not sure if this matters. Here's a pic showing that it is sending out midi data (when i hit keyboard shortcut) that midi monitor is picking up on.

Secondly, I tried making a track that receives midi input from IAC driver bus and a max midi instrument, but it is not receiving the midi message from Keyboard Maestro. I tried attaching it directly to the Midi in from live object from the m4l instrument and also tried making an inlet, but i couldn’t get it to work.

I also tried using the midiin patch in Max help, and printing the incoming midi note, but the console isn’t showing anything (even though midi monitor is saying that Keyboard Maestro is successfully sending out a midi note). I also tried changing the MIDI in to "all ins" in Live, and also tried using a midi effect instead of a midi instrument. You can see this below. None of this worked.

What do i need to do to make this work?

Source Audio's icon

Source Audio

5月 31 2018 | 1:25 午後

I think You are making mistakes all over the place, that's why it does not work.
To avoid talking nonsense, I just downloaded demo of keyboardmaestro,
old version as I use 10.6.8, but that does not matter.

As first I noticed that that app has no midi setup, it creates own virtual port called Keyboard Maestro. So select that in Max , and You are good to go.
I took me 5 seconds to set a trigger that sends midi note 60 when esc key is pressed, and got that note into Max.
About Live -sorry I don't use live and have no interest in it,
but it must be a simple thing to get 1 track respond to midi input ???
And another question - why do You need keyboardmaestro at all ?
Max4Live can also accept keyboard strokes to execute functions,
have a look at key and keyup objects.

Source Audio's icon

Source Audio

5月 31 2018 | 3:15 午後

And I suppose Midi Track in Live needs to have Monitor set to In , in order
to receive midi without being recorded...
And You could try to use midiparse to avoid using thresh.

Daniel Klimkowski's icon

Daniel Klimkowski

7月 03 2018 | 7:05 午後

Thank you again.

Thanks for sharing that max can do many of the functions of Keyboard Maestro. I'll keep Keyboard Maestro in the equation for now because i know it better, but will remember that for later.

I just tried connecting Max to Keyboard Maestro as you described and it works well for both midi in and midi out. Also tried connecting a M4L device to Keyboard Maestro and had partial success. Was able to set up Midi In from Keyboard Maestro without issue but havent been able to send out Midi from M4L to Keyboard Maestro because the midi track in live won't let me route to it.

This is might be more of a Live question than a M4L question, not sure, but why is Keyboard Maestro (or any of the IAC drivers) not showing up in the midi out for the track in ableton?

I've set the track, remote, and sync are all on for these midi devices in the Live settings. It seems that only control surfaces are showing up in the midi out, but i can't add Keyboard Maestro or IAC drivers in control surfaces.


Source Audio's icon

Source Audio

7月 04 2018 | 11:28 午前

If You use Live and max4Live You need to learn it well, at least the basics.
I am not using it, I don't like it and have no use for it.
But if You do, You need to learn how it deals with midi I/O, tracks
and all that stuff.
Maybe one track can't have midi output if it is set to monitor input ?
Just a guess, I don't know if it is so, but if You want to use Live, You need to know.