TOPIC: Support for Relative CC MIDI Control

Support for Relative CC MIDI Control 5 months 3 weeks ago #22823

Most amp modelers (hardware or plug-in) only support Absolute CC MIDI control. If you turn an encoder, the parameter "jumps" to the encoder value. That's not ideal! Because of this, DAWs usually support Relative CC mode; if you turn an encoder clockwise the parameter increases from its current location; if you turn it counterclockwise, the parameter decreases from it current location. It would be great if standalone S-Gear supported relative mode!

Here's a controller I built, with the top row used to control S-Gear, Helix Native, and a Helix Stomp (as well as Logic plug-ins. It uses a bunch of rotary encoders.
Attachments:
  • soundog
  • soundog's Avatar
  • Offline
  • Tone Master
  • Posts: 117
www.johnplainsong.com
Newest album "Strange Tales" now available! S-Gear used throughout the production.
Last edit: 5 months 3 weeks ago by soundog.
SIGN-IN TO REPLY

Support for Relative CC MIDI Control 5 months 2 weeks ago #22840

How have you built it? with arduino board ?? I was wondering if it was the case if the knobs you have incorporated are rotary knobs, or normal knobs. I am looking for an arduino code to make a controller with the rotary knobs, I have managed to make one with normal knobs, but the downside is that when you want to control, the knob is set to the midi value that it has for movement, and not as it is open in the plugin. I don't know if you will understand me. Thank you
SIGN-IN TO REPLY

Support for Relative CC MIDI Control 5 months 2 weeks ago #22844

@Jordi, yes I built it using a Teensy 3.2 Arduino board. The knobs are rotary encoders (not potentiometers; "normal knobs"). Just because you use rotary encoders does not guarantee your software will do what you want. The software has to support "relative" CC values. At this time, S-Gear only supports "absolute" CC values. So if you turn a knob, S-Gear will jump to the "absolute" value being sent instead of increasing or decreasing from its current "relative" position. It won't matter if the controller is using encoders or potentiometers.
  • soundog
  • soundog's Avatar
  • Offline
  • Tone Master
  • Posts: 117
www.johnplainsong.com
Newest album "Strange Tales" now available! S-Gear used throughout the production.
Last edit: 5 months 2 weeks ago by soundog.
SIGN-IN TO REPLY

Support for Relative CC MIDI Control 5 months 2 weeks ago #22846

Hey SoundDog,

I'm sure you will find that there is no such thing as "relative" and "absolute" CC values - as far as MIDI specification is concerned. It's all just (absolute) values from 0 to 127 (or 16,384 - if a parameter is split across 2 separate CC messages). Some devices (physical or software), such as many DAWs, choose to interpret certain values as "deltas" (0-63 as -1 and 64-127 as +1 - or similar) in order to facilitate easier creation of “dumb” controllers.

Generally, guitar multi-fx (and most gear) don’t – they only work in “absolute” terms as they expect to be driven by “state aware” controllers (such as those buttons and knobs they already come equipped with). That doesn’t mean it’s not possible to do it correctly – just that it involves a bit more effort (and pain)… Obviously, it IS possible since, when you connect your Helix Stomp to the computer – both the device and its software you’re running on the computer are staying in sync when parameters are changing (either by physical or software/virtual knobs and buttons).

I believe that the way most devices do this is by using “sysex” messages – i.e. every time any parameter on the device changes (by any means), the device sends out a bunch of sysex messages notifying any connected controller of the parameters that have changed and their current values. You could definitely do the same in your Teensy code – just scan all the incoming sysex messages, filter out (the majority) that are of no interest to you but a handful that are will tell you what the present value of your parameters of interest is.

Then, when your own encoder is turned, you just add (or subtract) an appropriate number (usually 1 but you can also implement a “ramp up” routine where the changes are quicker if multiple consecutive encoder steps are caught – i.e. if the encoder is turned fast) and construct an appropriate CC message. You probably don’t need to update the internal state of the parameter since you will, almost certainly, receive the same sysex back (that you’re already scanning for) as a result of the CC message you sent.

Obviously, this is a fair bit more work but it will result in a more robust controller (albeit one that is “baked for” a specific device – so if you want to switch between controlling, say, Helix Stomp and controlling S-Gear, you will probably have to have separate firmware compiled for each and reflash as needed).

The bigger issue is that most manufacturers don’t readily publish their “sysex” maps. Some do - I think it’s more common with keyboards and synths, but (in my experience) most guitar gear doesn’t. Some might send you some technical info if you ask them. If they don’t (depending on how determined and detail oriented you are) it’s usually possible to interject some kind of a MIDI sniffer (or, worst case scenario, WireShark USB snooper) and build a list of sysex messages corresponding to the parameter of interest.

Duh – what am I saying – you already have a Teensy board (and clearly know how to program it) so it would be probably the simplest to trap the sysex messages you get back each time you send a CC and send them to serial. They will be the same ones that get triggered when the parameter is changed by the hardware knob or by changing to a different patch (that may have a different values for the parameters you are controlling). In that latter case (bulk change) – the sysex may be different as it may combine multiple values into a single sysex (so you might have to figure out where the values for the parameters you’re interested in are located). It’s a tedious work but not overly difficult so it mostly depends on how determined you are…

The big question is – does S-Gear send out sysex messages? No idea… I took a quick look in the manual and there’s no mention of sysex messages, so – probably not… But I’m sure Mike could tell us (and, if not, it would certainly be a nice addition to the “next big release”)…

Cheers,

Marko
SIGN-IN TO REPLY

Support for Relative CC MIDI Control 5 months 2 weeks ago #22847

Thanks, Marko. Good post. I don't run in to too many folks on forums who get the relative encoder thing. Yeah, I get your "no such thing" comment; I should have called it, perhaps, relative and absolute MIDI CC. It really comes down to sending a certain value or range of values when the encoder is turned clockwise, and a certain value when its turned counter clockwise. As you say, many DAWs support this method but, alas, hardware and software amp sims don't (Line 6 Stompbox Modelers like the M9 and M13 are the only ones I've seen recently that do).

One of the workarounds you mention is similar to what I've done. For a given favorite amp sim preset, I wrote separate code that sets the "starting" CC values for each encoder. So, when using that preset, the controls and preset knobs are all starting from the same known state. That works OK, since I usually focus on using just a few favorite amps.

Then, when using the controller with Logic Pro to control plug-ins, and where "relative" encoder control is supported, I load separate "DAW controller code". The Teensy is really easy to upload to via USB, so its pretty painless.
  • soundog
  • soundog's Avatar
  • Offline
  • Tone Master
  • Posts: 117
www.johnplainsong.com
Newest album "Strange Tales" now available! S-Gear used throughout the production.
Last edit: 5 months 2 weeks ago by soundog.
SIGN-IN TO REPLY

Support for Relative CC MIDI Control 5 months 2 weeks ago #22848

The other option this discussion makes me think of are the controllers that support midi feedback from the software.
I have a Behringer X-Touch Mini that works this way, and I think others like the Midi Fighter Twister do as well. They don't need any complex sysex messages, only the same midi CC number the encoder uses sent back to them - they will then update their internal value (and LED rings) to match.
This means that it doesn't matter if you use the controller encoder or update the value in S-Gear directly (or when you change presets) - the absolute value will always be in sync.

I even have this concept working with my Nektar Pacer foot controller to keep the footswitch LED's in sync with S-Gear.

Because S-Gear doesn't provide midi feedback, I use it within Gig Performer, which supports midi feedback when you map an S-Gear parameter to a Gig Performer 'widget'. There's similar options in Ableton Live (and I'm sure other DAWs).

I also bought a midi foot controller based on teensy (which has now become Pirate Midi - check them out!) that also supported midi feedback from the software in order to keep their switch LEDs in sync.

So even if your controller doesn't have LED rings, if it could respond to incoming CC messages and then internally update the value stored against the matching encoder, then you can keep things in sync and essentially achieve the concept of relative mode, but in reality you're still using absolute mode.
  • kierank
  • kierank's Avatar
  • Offline
  • Tone Master
  • Posts: 305
Last edit: 5 months 2 weeks ago by kierank.
SIGN-IN TO REPLY

Support for Relative CC MIDI Control 5 months 2 weeks ago #22849

Excellent!! I have an X-Touch One (also uses Mackie Protocol like your Mini) which does the best job of DAW control I've found (or any similar Mackie-type controller). Mackie Protocol is very robust! The Fighter Twister is can be configured to send absolute or relative CC data, but the relative setting is limited (I think) to 3FH/41H (sends 66 CC value for increments or 64 for decrements). So its pretty much tailored to Ableton Live.

I have Gig Performer 3 which I just got last month on sale, and haven't had time to fiddle with it. It should be fun to experiment with, and when I'm able to start gigging again I may use it. I'm interested to see how it integrates with S-Gear!

I just checked out Pirate Midi's stuff. Very cool and inventive, and they look very solid and reliable. I'm always surprised, though, at the high price of MIDI controllers, but if you decide to build your own you have to be prepared to spend a LOT of time and effort .... especially if you want something reliable and road-worthy. But its sure is fun! Also, I forced myself to learn a little C++ programming during COVID lockdown. It was a good mental excercise...
  • soundog
  • soundog's Avatar
  • Offline
  • Tone Master
  • Posts: 117
www.johnplainsong.com
Newest album "Strange Tales" now available! S-Gear used throughout the production.
SIGN-IN TO REPLY

Support for Relative CC MIDI Control 5 months 1 week ago #22857

Hi soundog, I sent you a private message, I don't know if you received it. Thank you
The following user(s) said Thank You: soundog
SIGN-IN TO REPLY
Time to create page: 0.060 seconds
Powered by Kunena Forum