Sure, just (save a copy of and) open the branch manager.axp then IIRC go inside the sub patch and delete the string that says “branch manager”
I was playing around with last patch recall, it would involve either
leaving a text file on SD card, then we’d almost be back to patch bank mechanism
or
reworking the display code so you only need the Branch Controller not the startup patch
I am hoping the latter will work somehow, the challenge is to block off any display action of the running patch so the controller can display the list without being constantly overwritten
Might building Branch Manager into the display object itself simplify things?
Especially given every patch optimised for Gills/Big Genes really needs a Display object, anyway (if only to clear the display after any previous patch).
That’s a good idea actually. No more controller object and uploading as startup. Only drawback would be having to pay the Manager’s high salary at all times: hundreds of bytes for the string buffers and manager access to the SD card functions.
But maybe still a reasonable price to pay. Companies are starting to realize that all their employees are worth more than minimum pay.
Indeed! By the way there is a ksoloti/[device]/clear display object which does just that during patch start, then stops consuming resources (as the full-featured display object would do). Only useful if the newly started patch does not use the display, of course.
Any chance of getting a branch manager that works on old school axolotis? I’m currently using one as the usb inteface for a Zynthian with a built in synth patch to boot! That USB Audio was a great feature add-on.
Anyhow I can’t get patch banks to work properly on it in spite of years of making them on the classic axoloti. Admittedly, up until the point where I got the usb audio going it had the axoloti firmware on it so I don’t know if it’s a beta firmware issue or not. A branch manager would be extremely helpful, though.
Yes that’s possible, you can customize the ‘branch controller’ object or branch manager patch. Depends on your hardware setup really, like if you have any sort of display, what buttons you want to use for navigating patches…
I will look into that. I generally only mess with subpatches because my coding skills are almost non-existent, but there only seems to be one object, buried in a subpatch, that is specific to big genes (I believe the one for holding it two seconds to launch the manager?) so maybe I’ll take a crack at it.
I think for a Simple Branch manager that can be triggered via the Axoloti on-board buttons (or any other GPIO if you change the button object), you would modify the branch controller like this:
Operation: you’d long-press any of the two on-board buttons to ENTER the custom branch manager (which is just a glorified SD card startup patch), and during the custom branch manager, you’d press the buttons to navigate the patch in the list, and long-press again to start the selected patch.
Also make sure your preferences point to the custom branch controller you’ve made, or paste it inside every patch you want to use.
This of course assumes that your Axoloti has a display connected… if not you could still use it blind but you’d have to remember the button presses to get to a certain patch I guess. Or you add some LED flashing logic that would blick as many times as the patch number you’re currently branching at (I wouldn’t know how to add this from the top of my head)
UNTESTED! NO GUARANTEE THAT THIS WILL WORK! YOU MAY HAVE TO TEST AND ADJUST IT
Thanks so much! I hadn’t checked the forum in a bit but the min/max portion of the branch manager is what I was having trouble with, so this is great. I’ll definitely test this out tonight and at the very least this should be something I can mess with if it doesn’t work.
It looks like it loads correctly for a second, except displaying 0% CPU load, and then disconnects. I have to then physically dis/reconnect the Axoloti before trying to reconnect on the patcher or it will freeze when I try to connect. Not sure if it’s useful info, but a similar thing happened with an fm synth patch I had made and when I decreased the polyphony it worked fine, however this doesn’t seem like a very intensive patch with regard to cpu or sram. This is what is displayed when I try to load:
Generating code…
Done generating code.
Creating directory on SD card… /branch manager_axoloti_buttons
Done creating directory.
Changing working directory on SD card… /branch manager_axoloti_buttons
Done changing working directory.
Compiling patch… branch manager_axoloti_buttons.axp
! /Users/fasri/ksoloti/1.1.0/build/xpatch.h.gch
. /Users/fasri/ksoloti/1.1.0/ksoloti-objects/objects/ksoloti/gills/font5x8_offset.h
Memory region Used Size Region Size %age Used
CCMSRAM: 44360 B 50 KB 86.64%
SRAM1: 6344 B 44 KB 14.08%
SRAM2: 140 B 8 KB 1.71%
SRAM3: 0 B 64 KB 0.00%
SDRAM: 0 B 8 MB 0.00%
Done compiling patch.
Same crashes here! It turns out some more number handling was required. The math/min did not do a good job as it let the number go down to -1, which caused a classic ‘array out of bounds’ crash.
The counter wasn’t performing too well either - first of all I didn’t set the maximum to something larger than 0, so no counting was happening in the first place.
But then the counter would count up to that maximum no matter how many patches are detected - so we hack it and let it wrap around the max number of detected patches.
It seems to work now! However it will crash when there are no detected patches and you press the decrement button. It’s a useless situation anyway so I can’t be bothered to handle that.
lol but using the branch manager with zero patches is exactly the use case I intended! Seriously though, thank you so much! This worked absolutely swimmingly. And as a plus I didn’t know that I could use the gills display object on my axoloti, so that’ll save me a couple clicks on all my future patches.
I was just trying to give separate names to the two parts required to make it work.
Branch controller: a traditional controller object that needs to run in the background in every patch (usually set up via the preferences setting “controller object“)
Branch manager: The SD startup patch the controller takes you back to so you can select a new patch.
I was trying to simplify this even more at some point with a functionality like ‘select a new patch while the old one is still running’, but the separated approach saves memory and ensures there are no display conflicts.
I’ll have to take another look next time, see if there is an easy way to make it remember which patch you selected last
If anyone is interested, I added MIDI program change to both Branch Manager and Branch Contoller.
This means that, beside using the original functionality of selecting a patch with the encoder, you can alternatively send MIDI program change to load any patch.
Be sure to “Reload objects” (to update the controller) then re-upload all your patches with the updated controller.