[Feature Request] Add MIDI CC message

I’m glad to see KM can respond to MIDI note messages. It should also respond to MIDI CC! (QuickKeys did that…)

Yes, and please add SysEx support also. This would bring KM to a completely new level. :wink:

What on earth is a SysEx?

MIDI CC send/trigger, and OSC send/trigger is on the todo list.

Unfortunately, I do not have the hardware appropriate to test and develop this stuff, nor much in the way of experience in this stuff, which makes it challenging.

If you want to improve the changes, I’ll need info like:

  • APIs used.
  • Free (or very cheap) applications or hardware that can send/receive this stuff.
  • Comprehensible descriptions of how and where it is used.

Whether the forum is a good place for gathering this stuff, I don’t know. But currently I have almost no knowledge or tools to do any of this kind of thing which significantly increases the time frame of it happening.

Not sure how they'd be used with KM, though.

Also, this looks promising:

http://vmpk.sourceforge.net/

Hi Peter,

thanks for your reply. I’m KM user since about 2009. So we have been in contact via eMail a few times regarding some support issues. Yesterday I firstly recognized this forum, wasn’t aware of that so far. If you feel like this may not the right place to discuss these topics and if you are interested, I can send you some informations via eMail. Just let me know.

Best regards,
hp

Here is fine, it is easier to see if others are interested here. I generally note down any suggestions, whether they are made here or directly to me.

1 Like

OK, sorry for the delay. I had a few very busy weeks.

I can’t answer your question regarding API’s because I’m not a programmer. The wiki describes what SysEx is. Many instruments, expanders - in general almost every kind of MIDI gear - uses SysEx for specific features. Some are being driven remotely, some needs SysEx i.E. for changing specific mode patches which ain’t reachable using PRG change commands or MSB/LSB. I once wrote a small guide on using SysEx for our Music Production Guide. Even if it’s written in German the main informations are English so you might be able to get it.
SysEx for S90XS

If you really should decide to test with some hardware please, let me know. Maybe I can arrange something for you. I can’t promise but I can try.

Just saw this post and I too think I communicated with Peter about this through email, CC by far is what I really miss from several macros that I had in QuicKeys. That might be the simpelest to implement out the gate then propritary SysEx messages.

As far as free applications I would say forsure check out MIDI Monitor https://www.snoize.com/MIDIMonitor
I have thousands of dollars in audio software and use this free utility all the time to quickly spy on MIDI messages and see what information is being sent.

There are several free applications here that work with MIDI

Tryout Reaper
http://www.reaper.fm/download.php

I have attached some images and a MIDI monitor file from a Korg NanoKey I use for launching applications

MIDI for Peter.zip (403.1 KB)

The file can be opened with MIDI monitor and you can see the data displayed two ways with their MIDI name or by the number. Each key in CC mode sends out two messages though CC (Continous Controllers) can send values from 0-127 they are usually used in this way as an on or off for triggers or anything that sends CC as a button press or peddal such as a sustain pedle message for a keyboard (CC64). The button press is 127 in this and the release is 0 so really only the press or the release needs to be recognized in the case of a launch so just look at Data byte 1 which is the CC number to see if any message has been received and if it sends to messages only respond to one of them or to the max value or the off value. You could get more tweaky than that but probably a pretty good start and would cover the most people out of the gate I would think.

I have also attached a handout that might be helpful, in particular page 3. I am more than happy to help in anyway I can with anything you may get stuck on regarding MIDI implementation.

2015-09-12 MIDI Info Handout with Page Numbers for Peter.pdf.zip (864.1 KB)

Fantastic idea! I would be able to make use of my AKAI LPD8 knobs! :smiley:

OK, I am looking at this at the moment. A quick review of all this material leads me to:

  • MIDI Control Change trigger would be useful. Trigger on: Any value, value <, <=, =, >=, > a specified value.
    • Note that the macro is likely to be triggered many times in a row with different values as the value changes.
  • Send MIDI Note/Control Change needs to be expanded to allow calculation fields like other locations in Keyboard Maestro.

However, I cannot see how I can use MIDI SysEx constructively. It seems it each device has its own behaviour. I could define my own and use that as a trigger, but how would that be better than the existing MIDI triggers? And how would I send such a packet constructively. There would need to be some language for describing the packet and by that point it would be better done using a third-party tool.

I also looked at OSC and came to much the same conclusion. MIDI has system support in coreMIDI and supports for MIDI over the net, but I can’t even see how I would make Keyboard Maestro discoverable. And sending OSC seems to have the same sorts of issues as SysEx - what events would I actually send?

So if anyone wants any actions or triggers related to SysEx or OSC, could you please explain what that would look like (a quick mockup of a trigger or an action would be ideal) and how would it work interoperating with other devices?

Done for the next version:

* Added MIDI Control Change trigger.
* Send MIDI action uses calculations so you can send varying notes and control changes.

The MIDI Control Change trigger works nicely over Wi-Fi to TouchOSC. I also added an option to detect a change above or below a specified value just once (until it detects the “off” case) to mitigate against the large number of triggers you’ll otherwise receive for control change events.

As mentioned previously, I can’t see any practical way of supporting OSC or MIDI SysEx messages. If people have specific use cases that can be implemented practically I am happy to hear.

Hi Peter,

I realize that a full MIDI implementation would be a whopper.

  • everything should be both receivable (triggers) and transmittable
    (outbound)

  • you’ve already got devices and MIDI channels and note numbers covered.
    (this has saved me in so many ways.)

  • MIDI note number, key on velocity, key off velocity

  • mono/poly aftertouch

  • PC program changes (bank changes as well as patch changes, a few
    different protocols on this)

  • CC continuous controllers - the whole spec including pitch bend (which
    is a separate spec from mod wheel CC1, volume CC7, etc) (Native
    Instruments Kontakt and Traktor have good flexible implementations for
    wiring CC messages.)

… that would definitely do it for me, but a lot of people would
also want: MIDI SYSEX trigger/packet-send as well.

It would be worth looking at what TouchOSC is doing - if you can match
TouchOSC you’ll be covered for sure.
https://hexler.net/software/touchosc

On another note, I use a Keith McMillen 12-step which allows me to use
my computer with my feet when my hands aren’t going fast enough. Again,
class compliant, no drivers necessary.

cheers
karl

I moved your post over to this topic about MIDI (as opposed to DIY USB controllers).

I don’t have enough information on how PC or mono/poly aftertouch work or how they would be used to implement these.

I don’t see what I would do with SysEx packets. I can’t imagine any useful UI for dealing with this that would not look like most Audio controllers look - ie, insanely complicated.

TouchOSC works fine with the existing MIDI note triggers via WiFi, and in the new version works much better with the CC triggers. I don’t know if it sends any other kinds of MIDI messages - I didn’t see any.

If the Keith McMillen 12-step outputs to coreMIDI and sends notes (or in the next version, CC) messages, then it should trigger macros.

That’s great news Peter. Firing MIDI notes can inadvertently make for a “noisy” system. The MIDI CC option is much better. Thanks!

Would it be possible to send out transport messages, or machine control or whatever it is called?

To dream on even further; i would be totally awesome if KM can emulate the HUI protocol. So we can use our own buttons to control ProTools and Logic etc. Man, you would make me (and a lot others) happy!

1 Like

I suppose there is no particular reason I can’t allow sending out raw packets, then you could do whatever you wanted (including the HUI protocol).

1 Like

I moved your post over to this topic about MIDI (as opposed to DIY USB
controllers).

sorry P, too overloaded to nav the forums.

I don't have enough information on how PC or mono/poly aftertouch work
or how they would be used to implement these.

we need to team you briefly with a MIDI hacker. i don't think it's as
crazy as it sounds. MIDI was developed to be really simple.

I don't see what I would do with SysEx packets. I can't imagine any
useful UI for dealing with this that would not look like most Audio
controllers look - ie, insanely complicated.

MIDI geeks would giggle with glee if you could send out sysex packets,
it means you could build synth editors right within KM. that would be
really rare. more than this though, it means you could adjust synth
parameters at the base level without CC-wiring - this is really great.

in/out would mean you could use KM as a sysex librarian.

by parsing a sysex stream (perhaps MIDI Timecode?) it could wait to hear
certain semantics which would trigger macros - i can't think of a use
for this myself right now, but i know people would want it. It means
the non-continuous controller aspects of MIDI controllers (other knobs,
buttons, features) could be used.

finally, in N.I. Traktor, the wiring of connections is really fleshed
out. essentially if KM could match the implementation of Traktor -
you'd be golden for optimum/most users needs. That would be a good
litmus test of a full kit.

If you wanted to have a celebrity partner/testimonial - i'd talk
directly to Richie Hawtin, who could advise on this better than I could.
To have Traktor style integration merging with the massive power,
hooks and programming of KM, it would be a gamechanger for
audio/video/lighting/artist-related customers.

regular program changes PC and also the various banks -- i feel this is
really important because it would allow and and all patch-changing
devices to get onboard.

TouchOSC works fine with the existing MIDI note triggers via WiFi, and
in the new version works much better with the CC triggers. I don't
know if it sends any other kinds of MIDI messages - I didn't see any.

Interesting. I've avoided the TouchOSC can of worms for years now, but
people all around me are doing cool things with it. A friend was doing
lighting and video diffusion control using touchOSC on an ipad for a
Daniel Myer show.

The idea that KM could be an 'intelligent' / state-dependent go between
from controller to controllable is really exciting. you could have a
button on your MIDI controller light up when a drive comes online and
have turn off when an eject-press renders it ejected. state-feedback
buttons for anything. MIDI patch changes for totally changing your
working desktop environment while leaving the MIDI note keys/buttons to
remain wired for operational tasks, and switching kits based on the
environment.

the idea that you could use a MIDI pitch bend or mod wheel to move
cursor position or scroll a window = amazing

If the Keith McMillen 12-step outputs to coreMIDI and sends notes (or
in the next version, CC) messages, then it should trigger macros.

12step = class compliant √ and fully operational in this way. been
using since 2013. so convenient to use your feet, especially recording
but anything where hands need to focus and feet can just stomp
(deleting, chopping, back buttons, etc)

it's late - apologies if some of this is a little incoherent.

love your work as always
karl

Alright, the MIDI work is complete now.

  • MIDI
    • Added MIDI Control Change trigger.
    • Added MIDI raw packet trigger (SysEx, HUI protocol, etc).
    • Allow MIDI trigger recording when the text fields are focused in background.
    • Added Send MIDI raw packets so you can send any kind of MIDI packet.
    • Send MIDI action uses calculations so you can send varying notes and control changes.
    • Handle and split multiple MIDI packets received in a single system MIDI packet.

No OSC is planned, but that should hopefully add some useful features for MIDI control.

No ETA on release date yet, but it is getting closer.

2 Likes

wow! Looking forward!
For me, especially the HUI part. See if i can use KM to control ProTools through the HUI protocol!

2 Likes