thirdspace Posted February 27, 2022 Share Posted February 27, 2022 I feel like I'm really missing something obvious here so any help with this would be appreciated. I have a MIDI footswitch that is set up so the buttons can be setup as either two state (On/Off) or one state (trigger). I wish to map a two state button on the foot switch to a two state parameter such as a specific channel mute in Logic Pro. Example MIDI - the two state button might send the following two messages: On CH1 CC#60 Value 127 Off CH1 CC#60 Value 0 So what I thought was the method - open Controller Assignments, click Learn, Click the Mute button on the channel in Logic, press the footswitch, but this records the first value it receives, but not the second. And Logic's mute button only does the one thing as it only knows two respond to the one message it has learned. Thanks in advance Quote Link to comment Share on other sites More sharing options...
simoncroft Posted February 27, 2022 Share Posted February 27, 2022 Better to click the Mute first, then activate Learn, then press the switch on the MIDI unit. (Then switch off Learn, before you accidentally store anything else...) Two things you could try to get the off state assigned. One, click the switch on, then off again, before deactivating Learn. If that doesn't work, my second suggestion is to go into the Controller Assignments window, and change the Mode. It's perfectly safe to try each turn (Direct, Toggled, Scaled etc) to see if one of them does what you want. Good luck! Quote Link to comment Share on other sites More sharing options...
des99 Posted February 27, 2022 Share Posted February 27, 2022 Click the Mute button on the channel in Logic, press the footswitch, but this records the first value it receives, but not the second. Or you don't need to rely on the "Learnt" message, if you know what MIDI message you want that assignment to respond to - just edit the learnt message, or enter it directly into the message field. Quote Link to comment Share on other sites More sharing options...
thirdspace Posted February 28, 2022 Author Share Posted February 28, 2022 Great replies - thanks. Seems like the key is to 'click the switch on, then off again, before deactivating Learn.' This changes the MIDI message learned from Control Change CH1, 60, 0 to Control Change CH1, 60, Lo7. So yes I could type this in (in Hex of course - thanks Logic) - but what does Lo7 mean? Presumably some kind of variable? If typing in values I guess I would replace the 5th/6th hex numbers in the string with Lo7 ie B0 3C Lo7. Can you recommend a HEX generator that can convert MIDI messages in standard format to Logic's version of what I presume is Hex? The two generators I have found so far give B0 60 Lo7 for this example, where Logic wants B0 3C Lo7 Also - to 'reverse' the effect of the switch (Mute On becomes Mute Off and vice versa) - presumably the way to enter this in the Controller Assignments is to enter a Multiply value of -1.00? or is there a better way? Thanks for the help on this Quote Link to comment Share on other sites More sharing options...
des99 Posted February 28, 2022 Share Posted February 28, 2022 Lo7 is a variable for a 7-bit data value - it essentially means "match any value of 0-127 for this byte". The calculator in MacOS has a "Programmer" mode where you can do conversions between Dec and Hex. I'm not sure what you mean by "Logic's version of hex" - Logic's version of hex is just hex... Quote Link to comment Share on other sites More sharing options...
thirdspace Posted February 28, 2022 Author Share Posted February 28, 2022 Thanks - apologies I wasn't being clear! Logic's hex is hex agreed, but these two online converters I found seem to give non hex outputs: http://www.xmlizer.net/hansLindauer/midiapp.html https://gigperformer.com/support/midi-to-hexstring-generator.html So starting with say 16 60 127 I'm wondering if there's one that gives an output that works in Logic without having to convert each number manually? The above converters give BF 60 127 of which only the first part is correct. Thanks for the tip re Calculator - never knew that! Quote Link to comment Share on other sites More sharing options...
des99 Posted February 28, 2022 Share Posted February 28, 2022 A (regular, keeping this simple for now) MIDI message, say a note, contains three bytes. The first byte contains the type of message (eg a note on, or note off), and it also contains the MIDI channel. The second byte is the note number, and the third is the velocity. In the case of a CC message, the first byte is Bn - which is "a control change message on MIDI channel n+1". The second byte is the CC number (0-127, though some are reserved) and the third byte is the value. So BF 60 127 is "a CC #60 message on MIDI channel 16, with a value of 127". The same message on MIDI channel 1 would be: B0 60 127. So starting with say 16 60 127 That's not a valid MIDI message that means anything in MIDI terms. Remember, these are not arbitrary numbers, they are MIDI standard defined communications messages that adhere to a strict protocol that everybody understands. You can learn more about MIDI in my archive, which contains loads of stuff under the "MIDI" topic back from when MIDI first emerged, and there were lots of articles explaining how it works at the byte level. Quote Link to comment Share on other sites More sharing options...
thirdspace Posted February 28, 2022 Author Share Posted February 28, 2022 You are correct! Again my error - I missed the message type in my shorthand! What I meant to say was Type:Controller, Channel=16, CC #60, Value=127 Entering this info into the online 'converters' above gives an output of BF 60 127, where the hex (and what Logic wants) is BF 3C 7F. So what would make this easier is a converter that gives a true hex output given the above information - if you know of one? (or wouldn't it be nicer if Logic itself allowed the manual entry of the information without having to convert?) Quote Link to comment Share on other sites More sharing options...
des99 Posted February 28, 2022 Share Posted February 28, 2022 Sorry, yes, I forgot to convert the 60 to actual hex values, my bad. 60 in decimal, 3C in hex - it's the same byte either way. In the first generator above, it's misleading as it's giving you both hex and decimal values, probably why you got confused. "0x" means "hex", so in the generator "0xBF 60 127" is saying just the first number is in hex, the last two are given in decimal. So all in hex would be: "0xBF 0x3C 0x7F", or "191 60 127" in decimals. Quote Link to comment Share on other sites More sharing options...
thirdspace Posted February 28, 2022 Author Share Posted February 28, 2022 well that explains it - thanks - but doesn't help in terms of providing numbers for Logic Pro of course - oh well, back to the calculator... Quote Link to comment Share on other sites More sharing options...
simoncroft Posted February 28, 2022 Share Posted February 28, 2022 Just a quick, very low-brow, observation from me. I have never managed to make a CA work in Logic by entering the MIDI message manually. I'm talking about those really simple instances where if the Note On for the first channel is 90 39 7F, you know that the Note On for the button next to it on the right is going to be 91 39 7F. Fairly soon, I gave up trying to be clever and just deleted assignments I'd messed up, and used Learn to do them again correctly. Quote Link to comment Share on other sites More sharing options...
des99 Posted February 28, 2022 Share Posted February 28, 2022 I'm probably entering MIDI message strings 98% of the time manually... it's much more predictable than learning, which can go in all kinds of directions. Of course, you need to be au fait with the desired MIDI bytes, but I've been doing that since the Atari ST days, so I'm fine with that..! Quote Link to comment Share on other sites More sharing options...
simoncroft Posted February 28, 2022 Share Posted February 28, 2022 Then I shall try again, as I'm clearly missing a trick. Of course, I defer totally to you on this, as my knowledge of MIDI is far shallower than your's. For many years, I didn't get much further than: "When I do this on my keyboard, sound comes out of that module, and the note gets written into Cubase!" Quote Link to comment Share on other sites More sharing options...
JakobP Posted February 28, 2022 Share Posted February 28, 2022 (edited) ...those really simple instances where if the Note On for the first channel is 90 39 7F, you know that the Note On for the button next to it on the right is going to be 91 39 7F... Actually that's not it, the next note would be 90 3A 7F. The 9 for note on, the 0 for midi channel 1, 3A is next pitch from 39, 7F being value 127. Hth EDIT If you meant the same note on the next midi channel you are correct, not sure I read your post correctly now... Edited March 1, 2022 by JakobP Quote Link to comment Share on other sites More sharing options...
JakobP Posted March 1, 2022 Share Posted March 1, 2022 well that explains it - thanks - but doesn't help in terms of providing numbers for Logic Pro of course - oh well, back to the calculator... Instead of calculating the hex values for your entered midi, I'd recommend using Snoizes MIDI Monitor, where you simply set it to "Expert mode" to see the midi in hex format. https://www.snoize.com/midimonitor/ Quote Link to comment Share on other sites More sharing options...
des99 Posted March 1, 2022 Share Posted March 1, 2022 Yep, Snoize is invaluable, both of their MIDI apps are indispensable for MIDI monitoring and sysex transmission on the Mac... Quote Link to comment Share on other sites More sharing options...
simoncroft Posted March 1, 2022 Share Posted March 1, 2022 well that explains it - thanks - but doesn't help in terms of providing numbers for Logic Pro of course - oh well, back to the calculator... Instead of calculating the hex values for your entered midi, I'd recommend using Snoizes MIDI Monitor, where you simply set it to "Expert mode" to see the midi in hex format. https://www.snoize.com/midimonitor/ Normal mode.png Expert mode.png Absolutely this! The only MIDI messages that matter in the context of this thread are the ones your controller actually sends. In the case of my Akai APC40, which is arranged as an 8-Channel mixer with an 8 x 5 matrix of assignment buttons above it, the next button along from 90 3A 7F is 91 3A 7F, but I'm sorry if I was unclear in what I was trying to say. Man, I'm grateful this community exists. This is the only place I know of where you can have an informed discussion about CAs. Quote Link to comment Share on other sites More sharing options...
thirdspace Posted March 1, 2022 Author Share Posted March 1, 2022 Thanks for the tip on Snoize - looks a useful utility and I'll give it a go. However, as a MIID monitor, for the example above I guess it will show me two messages, one for Switch On (BF 3C 7F) and one for Switch Off (BF 3C 00). What Logic wants however is a single message: BF 3C Lo7, so only guess the Learn function will show me that by pressing the switch twice - OK now I've 'learned' about Lo7 though as I can use that next time. Thanks for all the help - it's becoming clearer! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.