# Branch Manager - Runtime Patch Selector

**URL:** <https://ksoloti.discourse.group/t/branch-manager-runtime-patch-selector/71>\
**Category:** Patching\
**Created:** [August 26, 2024, 9:49am UTC](https://ksoloti.discourse.group/t/branch-manager-runtime-patch-selector/71 "2024-08-26T09:49:39Z")\
**Posts on this page:** 16\
**Page:** 2

<div class="post-metadata">

**Author:** ![Ksoloti](https://yyz2.discourse-cdn.com/free1/user_avatar/ksoloti.discourse.group/ksoloti/32/71_2.png) [@Ksoloti](https://ksoloti.discourse.group/u/Ksoloti)\
**Post date:** [October 26, 2024, 9:20am UTC](https://ksoloti.discourse.group/t/branch-manager-runtime-patch-selector/71/21 "2024-10-26T09:20:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![toneburst](https://avatars.discourse-cdn.com/v4/letter/t/b9e5f3/32.png) [@toneburst](https://ksoloti.discourse.group/u/toneburst)\
**Post date:** [October 26, 2024, 10:10am UTC](https://ksoloti.discourse.group/t/branch-manager-runtime-patch-selector/71/22 "2024-10-26T10:10:12Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![Ksoloti](https://yyz2.discourse-cdn.com/free1/user_avatar/ksoloti.discourse.group/ksoloti/32/71_2.png) [@Ksoloti](https://ksoloti.discourse.group/u/Ksoloti)\
**Post date:** [October 27, 2024, 6:43am UTC](https://ksoloti.discourse.group/t/branch-manager-runtime-patch-selector/71/23 "2024-10-27T06:43:13Z")

</div>

> [@toneburst](#):
>
> Might building Branch Manager into the display object itself simplify things?

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.

---

<div class="post-metadata">

**Author:** ![toneburst](https://avatars.discourse-cdn.com/v4/letter/t/b9e5f3/32.png) [@toneburst](https://ksoloti.discourse.group/u/toneburst)\
**Post date:** [October 27, 2024, 11:17am UTC](https://ksoloti.discourse.group/t/branch-manager-runtime-patch-selector/71/24 "2024-10-27T11:17:54Z")

</div>

You could keep the current display-only object for those who don’t need preset-management.

Or add an option you can turn off, and the preset-management code will be compiled out of the patch binary.

---

<div class="post-metadata">

**Author:** ![Ksoloti](https://yyz2.discourse-cdn.com/free1/user_avatar/ksoloti.discourse.group/ksoloti/32/71_2.png) [@Ksoloti](https://ksoloti.discourse.group/u/Ksoloti)\
**Post date:** [October 29, 2024, 4:27am UTC](https://ksoloti.discourse.group/t/branch-manager-runtime-patch-selector/71/25 "2024-10-29T04:27:50Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![MrK](https://avatars.discourse-cdn.com/v4/letter/m/7ba0ec/32.png) [@MrK](https://ksoloti.discourse.group/u/MrK)\
**Post date:** [August 19, 2025, 9:44pm UTC](https://ksoloti.discourse.group/t/branch-manager-runtime-patch-selector/71/26 "2025-08-19T21:44:47Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Ksoloti](https://yyz2.discourse-cdn.com/free1/user_avatar/ksoloti.discourse.group/ksoloti/32/71_2.png) [@Ksoloti](https://ksoloti.discourse.group/u/Ksoloti)\
**Post date:** [August 20, 2025, 4:34am UTC](https://ksoloti.discourse.group/t/branch-manager-runtime-patch-selector/71/27 "2025-08-20T04:34:50Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![MrK](https://avatars.discourse-cdn.com/v4/letter/m/7ba0ec/32.png) [@MrK](https://ksoloti.discourse.group/u/MrK)\
**Post date:** [August 21, 2025, 3:17am UTC](https://ksoloti.discourse.group/t/branch-manager-runtime-patch-selector/71/28 "2025-08-21T03:17:40Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Ksoloti](https://yyz2.discourse-cdn.com/free1/user_avatar/ksoloti.discourse.group/ksoloti/32/71_2.png) [@Ksoloti](https://ksoloti.discourse.group/u/Ksoloti)\
**Post date:** [August 21, 2025, 5:42am UTC](https://ksoloti.discourse.group/t/branch-manager-runtime-patch-selector/71/29 "2025-08-21T05:42:52Z")

</div>

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:

 ![Screenshot from 2025-08-21 13-32-00](https://global.discourse-cdn.com/free1/uploads/ksoloti1/original/1X/0e3fc1fbdead1c1be712aa98c0457c2570ef5c5e.png)

Then you’d create a copy of the **branch manager** utility patch (or try attached .axp below):

(File \> Library \> ksoloti-objects \> … \> gills \> … \> branch manager, then **Save As…** to your location)

Open the “internals” subpatch and exchange the _gills\_encoder_ object inside there for some button logic…

 ![Screenshot from 2025-08-21 13-29-09](https://global.discourse-cdn.com/free1/uploads/ksoloti1/original/1X/be5f1fc45ee5f71de38a1b464662f2d12f120d03.png)

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

[branch manager\_axoloti\_buttons.axp](https://ksoloti.discourse.group/uploads/short-url/8gx7yZ9KGA3s1CcihKFIIFYK0V8.axp) (17.6 KB)

Curious as to how this works out, let me know if you get anywhere!

---

<div class="post-metadata">

**Author:** ![MrK](https://avatars.discourse-cdn.com/v4/letter/m/7ba0ec/32.png) [@MrK](https://ksoloti.discourse.group/u/MrK)\
**Post date:** [August 23, 2025, 2:03pm UTC](https://ksoloti.discourse.group/t/branch-manager-runtime-patch-selector/71/30 "2025-08-23T14:03:52Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![MrK](https://avatars.discourse-cdn.com/v4/letter/m/7ba0ec/32.png) [@MrK](https://ksoloti.discourse.group/u/MrK)\
**Post date:** [August 24, 2025, 2:24am UTC](https://ksoloti.discourse.group/t/branch-manager-runtime-patch-selector/71/31 "2025-08-24T02:24:18Z")

</div>

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.

Uploading patch…  
/Users/fasri/ksoloti/1.1.0/build/xpatch.bin  
Block uploaded @ 0x20011000 length 6344  
Done uploading patch.

Starting patch…  
Done starting patch.

Locking…  
Done locking.

Ping: Sync timeout, disconnecting now  
Disconnected

---

<div class="post-metadata">

**Author:** ![Ksoloti](https://yyz2.discourse-cdn.com/free1/user_avatar/ksoloti.discourse.group/ksoloti/32/71_2.png) [@Ksoloti](https://ksoloti.discourse.group/u/Ksoloti)\
**Post date:** [August 24, 2025, 10:06am UTC](https://ksoloti.discourse.group/t/branch-manager-runtime-patch-selector/71/32 "2025-08-24T10:06:54Z")

</div>

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.

[branch manager\_axoloti\_buttons\_fixed.axp](https://ksoloti.discourse.group/uploads/short-url/2HMzCIOuapbTHK4ZtgHoW3rMhbp.axp) (19.6 KB)

---

<div class="post-metadata">

**Author:** ![MrK](https://avatars.discourse-cdn.com/v4/letter/m/7ba0ec/32.png) [@MrK](https://ksoloti.discourse.group/u/MrK)\
**Post date:** [August 24, 2025, 6:58pm UTC](https://ksoloti.discourse.group/t/branch-manager-runtime-patch-selector/71/33 "2025-08-24T18:58:19Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![adnauseam](https://avatars.discourse-cdn.com/v4/letter/a/7ba0ec/32.png) [@adnauseam](https://ksoloti.discourse.group/u/adnauseam)\
**Post date:** [August 29, 2025, 9:44pm UTC](https://ksoloti.discourse.group/t/branch-manager-runtime-patch-selector/71/34 "2025-08-29T21:44:44Z")

</div>

Just loading this up and realized the module is called “branch controller” instead of “Branch manager” (which I thought was cool).

Any reasoning behind this?

---

<div class="post-metadata">

**Author:** ![Ksoloti](https://yyz2.discourse-cdn.com/free1/user_avatar/ksoloti.discourse.group/ksoloti/32/71_2.png) [@Ksoloti](https://ksoloti.discourse.group/u/Ksoloti)\
**Post date:** [August 30, 2025, 4:46am UTC](https://ksoloti.discourse.group/t/branch-manager-runtime-patch-selector/71/35 "2025-08-30T04:46:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![AScaredPilot](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@AScaredPilot](https://ksoloti.discourse.group/u/AScaredPilot)\
**Post date:** [January 19, 2026, 8:11am UTC](https://ksoloti.discourse.group/t/branch-manager-runtime-patch-selector/71/36 "2026-01-19T08:11:31Z")

</div>

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.

[branch controller.axs](https://ksoloti.discourse.group/uploads/short-url/xdy1nGRqEq0IaV4bDAW5i5s8cgG.axs) (2.6 KB)

[Gills-BranchManager.axp](https://ksoloti.discourse.group/uploads/short-url/3afdJUHyo9h3XewkAEUqg1WLTwN.axp) (19.8 KB)

EDIT: You probably need to upload a Patch Bank for the Program Change object to work.

[Previous page](https://ksoloti.discourse.group/t/branch-manager-runtime-patch-selector/71.md?page=1)
