Hard-Coded MIDI Toggle Switches (problem with muting gates using akai apc40)

edit: was digging through the archives and found this reply from TroubledMind: Stoermelder's PackOne v1.4.0 - new module INTERMIX

looks like the Count Modula Mute serves this function. it’s a bit messy, but less so than my original attempt as described in the post. still open to other ideas, but i’ll make it work with an array of Count Modula Mutes for now.

~Original Post~

hey, all. long-time lurker, first-time poster. love this software and this community.

i have a headscratcher that i’ve been working on all week:

i use an akai apc40 that i operate in generic mode. it was built for ableton and doesn’t have any kind of remapping options. this means i have 8 channels of midi sliders and knobs running into 8 instances of midi-cat. clunky, but so far so good.

however, several of the pads on the apc40 operate in a hard-coded “toggle” mode that sends midi note “on” when pressed, then sends midi note “off” when pressed again.

i use several of these pads with an instance of mixmaster jr and they function the way i’d prefer – when i hit the button, the mute/solo toggles on and off.

but i want to use some of these pads to enable/disable gate signals, and here’s where i run into issues: i can’t find a module that will accept the “on”/“off” signal in the same way as mixmaster.

for example, the buttons on VCV Mutes will change states when i press the toggle switch on my controller. but if i want to change back to the previous state, i have to double-press the toggle pad to get the midi “on” signal to send again. and it hasn’t been practical for my purposes.

i’ve tried to work around this with virtual midi filtering, but my machine can’t keep up with running a separate midi routing program (and i have absolutely no idea what i’m doing, even after many hours of experimentation). so i’m looking for a workaround using modules inside vcv.

i’ve tried just about every module i could find in the library, but they all have the same problem. the note “off” signal means nothing to them and they wait for another note “on” signal before changing states.

i’ve come close to a solution using bogaudio’s mute8, but the problem is, the mute8’s buttons switch between “off” and “solo” when i press the toggle pad instead of “off” and “on”. if i run an instance of AS Triggers MKI into the cv of the mute8 and map the toggle pad to the momentary switch of Triggers, it works. but this setup requires an instance of triggers for every possible gate. and i have at least 30 gate signals to deal with, which is a plate of spaghetti that i’m not desperate enough for yet.

is there a simple solution to this problem that i’m just not seeing? maybe a module or combination of modules that could work?

If you only want to mute trigger/gate signals, you can pair up your MIDI-GATE’s outputs with the gates to be muted using logical AND.

An AND gate will output high when both its first AND its second input is high.

Here is a polyphonic example using Bool from Bogaudio. Of course you gonna have to split/merge a bit but 30 signals fit into 2 poly cables, in the end you’ll have more of a spaghetti making machine than regular spaghetti :slight_smile:

From the left come the gate signals from the toggle switches, from the right the gates to be muted (here only 2 channels of Clocked with different speeds).

1 Like

thanks for the quick reply! and the detailed information!

i haven’t dug deep on how poly cables work yet (still very new to vcv and modular stuff in general), but i recreated your example setup to try and noodle it out, and the result is definitely a plausible solution. still way less messy than the alternatives i’ve been trying! :sweat_smile:

unfortunately, i can’t seem to get vcv midi-gate to play nice with my controller. the dang face pads on the akai are all grouped by channel and send the same note values. so the whole bottom row of the pads is E3 ch1, E3 ch2, E3 ch3, etc etc etc.

if i set a midi module to “all channels”, every row of buttons is treated like the same input. pressing any one of them is like pressing all of them at the same time.

is there a module or layout that might help with that? something like a multichannel midi module? i haven’t been able to figure out a way around this problem without using many instances of the same midi module (like for my 8 faders, i run 8 instances of midi-cat).

i’m starting to think the only answer to this problem is sitting down and figuring out a way to convert all of my same-note values from multiple channels to different-note values on a single channel. too bad all the software i’ve tried has been some hellacious combination of unstable, expensive, and super noob-unfriendly. but if i could get it to work, using midi-gate with a logical AND would definitely be the way to go.

i really appreciate the help!

unrelated ps. i really dig your modules! awesome design all around :grin:

I’m honestly baffled about why I didn’t think about using polyphony for that ridiculous number of modules in that picture in the linked thread! :flushed:

Anyway, I’ve had similar issues with the channels with my MPD32. Have you tried a different preset? I noticed on my controller that one of them had it set up on the same channel so that solved that problem.

Alternatively, you could use the akai editor (or maybe the menu on the controller itself) to change the midi notes/CC numbers and channels so that they are all on the same channel. I just did this with my Launchcontrol XL after using midizap to create shift states (it now has 5 switchable scenes each with 8x3 knobs, 8 faders etc) and I found it really useful to use a simple excel spreadsheet to list all 128 CC/note numbers to keep track of what is available.

That said, I’m a bit confused as well about why the midi modules (as well as midi-cat) don’t distingish between notes on different channels.

1 Like

Edit: I finally found a tutorial that explains how to filter midi messages to remap the Akai. And as a bonus, it was easy enough to follow that my brain didn’t immediately melt (which happened a few times this week trying to digest other tutorials). I’m using MIDI-OX and loopMIDI as set up in this guide. Turns out it wasn’t a hardware problem with my computer being unable to handle the midi filtering programs. I just had it set up all wrong!

~Original Reply~

Hey, the method still works, spaghetti or not! And I’ll probably end up having to do something similar to get my sequencers and mutes to work.

As for changing the presets or remapping, I thought the exact same thing! And it would work in a perfect world :upside_down_face:

But I was let down when I visited the Akai website to download the mapping software and saw “Akai Professional will not be releasing a separate template editor. You cannot change the midi note numbers and CC numbers that the APC40 is assigned to.”

It’s such a basic thing that comes with most controllers and it would 100% solve all of the problems I’ve been having. But sadly, it looks like the thing was hobbled so that it’d only be practical for use with Ableton. Definitely not designed for general use, which is just ridiculous because it’s a solid controller otherwise.

The APC40 is hard-coded to operate in only three firmware modes (all of which can only be changed by sending midi sysex messages, which was its own adventure to sort out). Basically, you can’t change anything about the notes or channels, only the behaviors of a few of the buttons. And even then, if you change the modes, other stuff stops working, like the preset banking and light functions. So instead of having 8 encoders + 8 encoders with individual banks, you only have 16 encoders total. So a loss of 40+ knobs between modes. Which is just like… why???

Akai’s handling of the firmware is the wellspring from which all other issues are come, haha.

But I’m glad you took the time to make that post in the other thread. So far, it’s been the most practical workaround for my setup, even though unlessgame’s midi-gate setup would probably work great if it weren’t for that firmware.

Oh wow, that’s a real shame. What a crappy way to ‘support’ your product.

In that case, all is not lost. You can use some third party software to do the remapping (I know you said you looked into that though). Did you try Bomes Midi Translator? If you use Windows then I guess that’s the best choice and many years ago you could do some stuff with it for free but I haven’t looked at it in well over 10 years. I’m using linux and it has a super powerful program called Midizap which can do this so I’m sure there must be something on Windows/Mac that can too. If you are on linux, or fancy switching to it, then I can help with midizap.

I’m not sure what else to suggest as I didn’t really explore this side of things after that post I made. At the moment I use my launchpad as a dedicated controller for Iverson Jr. I thought perhaps you could use that with the length set to 1 but that probably won’t work. The great thing about Iverson Jr is that you can map pads to the cells (I haven’t got anything to test with at the moment but I think the mapping respects midi channels).

I just gave that a try with Iverson Jr and a gate modifier and sample & hold, this works for me but I’m not sure it would help because once again you would need a midi module for each channel and it’s probably overly complicated (someone like @unlessgames would be able to massively simplify it I’m sure - or perhaps this is pretty much what they suggested?).

1 Like

I don’t fully understand your setup with the s&h. I haven’t quite internalized everything to do with modular routing yet, so I’m having a hard time visualizing what is happening to the signal. When I get the chance, I’ll copy your setup and noodle through it so I can actually get what’s going on. Basically, hitting the pad updates the value of the s&h, which is constantly passed on to the mute? I think??? I’ll try to understand better. In the meantime, I really appreciate the suggestion.

I did manage to sort out remapping the Akai in a similar method to what you suggested. I can’t afford Bome at the moment, though I did the trial and looks very promising. In the meantime, I found a tutorial for how to get it to work with a pair of Windows applications: MIDI-OX and loopMIDI. Basically, all of my inputs are being rerouted to different CCs and notes on the same channel. A bit of extra up-front work, but it solves the problem of having to run a bunch of instances of MIDI modules. I can condense it all down to one in and one out, which is huge progress :grin:

By the way, I haven’t used Iverson, but it looks really cool and I’m going to check it out when I’m back at my workstation. Have you been able to get feedback on your device as to which pad is lit up? I’ve been trying a bunch of things to get visual feedback on my Akai so that I can use the pads to program a step sequencer, and if I could get that to work, it’d just about make my year.

Yeah that’s it. My logic for that set up is:

Iverson is set to 1 step so it triggers on every clock. This isn’t immediately useful but you can map a pad to the 1st step so we have on/off (I am assuming channels are distinguished here).

We don’t want fast clock gates so put it into Dgate to ‘blur’ or sustain it (gate value on the module set longer than the actual gate length from Iverson). On and off states are quick to establish but the fast clock gate is lost, creating a squarish envelope I guess.

The sample and hold takes this signal and makes it change in time with the on/off midi so that the mute changes correctly (when you press the pad Iverson registers a note on and the S&H triggers to create a gate until it receives the next gate which turns Iverson gate off and changes the S&H value to zero/off).

I very much suspect there is a simpler way to do with within the limits you mentioned but I think it works.

That’s cool, I did look at MIDI-OX, it sounds like it would do the job. That’s great to hear, it makes things a lot easier.

1 Like

I have been watching this thread, as a keen user of midi controllers, and the author of Iverson. I can confirm that Iverson does not distinguish midi channels. Currently the Rack API only allows for a single midi channel per output, however, 23Volt has a workaround the directly access the underlying Midi driver. I am currently undecided if I will follow this route, as I am aware of some upcoming changes to the midi implementation in rack 2.0, and I don’t want to cause more issues in the future.

The 23Volt collection may contain a module that is of use, but I don’t have an apc40 or any controller with multiple midi channels to test with.

2 Likes

After looking around a bit I was about to suggest MIDI-OX too! :smiley: Glad you could solve this! Such a weird way to send midi messages how this controller does it…

I haven’t needed this so far, but I suppose you could set the channel value on the midi::Output before calling sendMessage. Definitely not ideal though.

edit : I realize you might be talking about the stock widget to select midi device/channel

2 Likes

I’m blown away by all the help I’ve received on this topic. You guys rule!

I’ve definitely gotten the solution to the problems that have had me tearing my hair out for days. Still quite a bit of work left before the setup is 100% complete, but for the first time since I hit these roadblocks, I finally have a way forward.

Thanks again for everything! Hopefully I won’t get this badly stumped again in the future, but it’s great to know that if I do, I won’t be alone :grin:

2 Likes

HI as far as using the apc40 mk 2, do all the top 8 knobs and side 8 knobs map in vcv rack with no problems? Can you only use 1 set of 8 knobs or are there user mode switching to select another instance of the 8 knobs? I have to aks because I have the fire controller and its 4 knobs only send on off signals in vcv rack.