Skip to content

bus channels with inserts and per-channel output routing - #49

Open
llozd wants to merge 5 commits into
mainfrom
bus-channels
Open

llozd wants to merge 5 commits into
mainfrom
bus-channels

Conversation

@llozd

@llozd llozd commented Nov 24, 2026

Copy link
Copy Markdown
Owner

Summary & Goal

Four buses, each with 3 insert slots and a volume, so a group of channels can share effects. For example, send tracks 1 to 4 to Bus 1 and put one EQ and one compressor on it, instead of one on every track. OpenSpec: openspec/changes/bus-channels/.

Behavior & Changes

  • Routing: every sample track and synth part has an output: Master (the default) or Bus 1 to 4. The signal is taken after the channel's own inserts, volume and pan, and plays only through the bus. Buses feed the master mix before the master inserts and the limiter.
  • Sends: delay and reverb sends stay on the channel, so bus effects work on the dry signal. Stems and USB per-track audio are taken before the bus. The master export includes the buses.
  • UI (Master > Inserts, the same on desktop units and the Mini): Channel picks Track 1-8, Synth 1-3, Bus 1-4 or Master. Turning Slot past 3 gives an Out slot:
    • On a track or synth part: F5 Output.
    • On a bus: F5 Volume (silent to +24 dB, 0 dB default) and F6 Inputs (read only).
    • Delete resets Output to Master and Volume to 0 dB.
  • Engine: MixerAndFxs has 4 stereo bus mixers and 4 AudioEffectInserts (insert channels 12-15). They return into the tracks mixer, which goes from 11 to 15 inputs. Routing is done by mixer gain with the audio interrupt off, and AudioMixer ramps each gain change over one block, so changes don't click.
  • AudioMixer: an input with 0 gain is now dropped without being mixed, so a mixer with every input silenced sends nothing. Without this, every bus insert would run on blocks of zeros whenever any track played.
  • Project file v20: adds channelOutput[11], busVolume[4] and busInsertSlot[4][3]. Older projects open with everything sent to the master. Projects stay portable: the Original keeps the settings and ignores them.
  • Dev console: fx takes b1-b4.

Target Devices

  • Original Polyend Tracker (MK66) (stores the settings only)
  • Polyend Tracker+ (IMX)
  • Polyend Tracker Mini (IMX)

Hardware Testing Status

Device Tested on Hardware by Author Needs Community Hardware Testing Not Applicable Notes / Tested By
Original Tracker (MK66) [ ] [x] [ ] Only check that v19 and v20 projects open
Tracker+ (IMX) [ ] [x] [ ]
Tracker Mini (IMX) [ ] [x] [ ]

How to Test

  1. Open a project saved with 0.1.0 rc 1. It should sound the same as before, with every track on Master.
  2. Master > Inserts: on Track 1, turn Slot to Out and set Output to Bus 1. Do the same for tracks 2 to 4.
  3. Pick Bus 1 as the Channel: Inputs shows 4. Put an EQ in slot 1 and a compressor in slot 2, play the pattern and check that tracks 1 to 4 go through both and the gain reduction meter moves.
  4. Change Bus 1's Volume and check that tracks 1 to 4 move together. Delete returns it to 0 dB.
  5. While playing, switch a track's Output between Master and Bus 1. Listen for clicks.
  6. Give a bused track a reverb send and check that the reverb is not EQ'd or compressed by the bus.
  7. Save, reload and check that the routing, volumes and bus effects come back.
  8. With the dev console (fx, cpu), compare the CPU load with nothing on the buses against tracks on a bus with effects.

Developer Checklist

  • I have read and understood the Contribution & Pull Request Guidelines (CONTRIBUTING.md).
  • This PR implements one single feature or bug fix (no unrelated refactors or formatting sweeps).
  • make all compiles cleanly for all three devices (Original, Plus, Mini).
  • Memory usage (SRAM_DTC, EXTERNAL_RAM, FLASH) was checked and stays within safe hardware headroom.
  • No heap allocations (new/malloc) or SD card I/O were added to real-time audio callbacks.
  • Existing .mt projects, .pti instruments, .pts synth patches, and mtConfig settings remain backward-compatible.

@llozd
llozd marked this pull request as ready for review November 24, 2026 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant