Skip to content

feat: add Heat Pump app - #603

Closed
kosmar wants to merge 1 commit into
ATOVproject:mainfrom
kosmar:feat/heat-pump
Closed

kosmar wants to merge 1 commit into
ATOVproject:mainfrom
kosmar:feat/heat-pump

Conversation

@kosmar

@kosmar kosmar commented Jul 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Adds Heat Pump (app ID 29): one-channel clock-synced sidechain ducking with hold + log-shaped release, depth, invert, MIDI CC/NRPN out, and CV jack In/Out.
  • Fader = release; Shift+fader = depth; Button+fader (Third) = division (1/1 → fast).
  • Button short = manual duck; Button long = mute (freezes envelope at current level — does not snap to idle).
  • Mute only fires if the fader stayed still during the hold (so Button+fader division scrubbing does not mute).
  • Shift+short cycles CV dest when Jack=CV In (division is fader-only); Shift+long toggles invert.
  • Configurator manual entry + markdown table rendering; listed under long-press mute in Apps muting overview.

Test plan

  • Flash firmware; load Heat Pump on a channel
  • Idle CV high; each division ducks (hold ~⅛ period), then log release (release / Shift+depth)
  • Button+fader scrubs division without muting; Top LED shows division color while held
  • Shift+short does not cycle division (CV Out); still cycles CV Dest (CV In)
  • Button long with fader still: mute freezes level (scope stays put, no jump to max)
  • Unmute resumes from frozen level; Shift+long invert; MIDI CC tracks envelope when enabled
  • Configurator Manual → Heat Pump tables render correctly

Prerequisites

The platform pieces this app needs are under review as their own PRs, so that
each app PR stays small enough to review on its own.

Required — these APIs do not exist on current main:

This branch is still based on an older main that still had the removed clock
helper, which is why it builds on its own but not after a rebase.

On top of the PRs above there is an app-side change: ClockEvent::Tick became
Tick(u64) in #579, so the match arm here has to be updated.

Building any of this on a current Rust nightly also needs the toolchain fix in
#632.

@ArthurGibert
ArthurGibert requested review from ArthurGibert and chmanie and removed request for ArthurGibert and chmanie July 23, 2026 20:07
@kosmar
kosmar marked this pull request as draft July 24, 2026 14:17
@kosmar

kosmar commented Aug 15, 2026

Copy link
Copy Markdown
Contributor Author

Written by an AI coding agent on @kosmar's behalf.

Two commits pushed.

f87d43ef gets the branch building again. Clock::get_ticker went away and ClockEvent::Tick now carries the absolute tick, so the branch stopped compiling once main landed here. The count now lives in an app global that the clock handler writes on every tick, and the button blink phase reads it exactly where it used to call the ticker closure.

af20b24c raises the CV Att ceiling from 100 to 400. A modulator that never reaches its rails could previously only nudge the destination, since CV Att could at most pass the input through unchanged. Allowing gain up to 4x lets a tame LFO drive the parameter across the full range; the existing clamp in attenuate_bipolar turns the excess into a hold at the end stops. The scale stays linear and 100 still means unity, so stored presets keep their behaviour.

The same CV Att change went out to the other apps that expose the parameter — #633, #634, #605, #607, #609 and #648.

@kosmar
kosmar marked this pull request as ready for review August 22, 2026 08:48
Wave-1 scope: app source, registry line, and docs/apps manual only.

Authored by an AI coding agent on behalf of kosmar.

Co-authored-by: Cursor <cursoragent@cursor.com>
@kosmar

kosmar commented Aug 22, 2026

Copy link
Copy Markdown
Contributor Author

Written by an AI coding agent on @kosmar's behalf.

Force-pushed a Wave-1 scope cleanup onto this branch (single commit vs main):

Please re-run CI on this branch. Happy to adjust anything for review.

@ArthurGibert

Copy link
Copy Markdown
Member

Hey @kosmar — two things, one about where this belongs and one about the manual format you're using.

Where it belongs: this looks like a great fit for faderpunk-community-apps, which just went public. New on-device apps are meant to land there rather than here directly — see CONTRIBUTING.md's "Standalone companion tools" section, and the pointer it promised once that repo was live.

Ran heat_pump.rs against the actual submission gate (pr-scope-check.sh) — clean, no unsafe code, no panics, no MAX11300/storage bypass, no un-yielding loop — and did a real cargo build against current main with it dropped in, which passed too. It does have 9 .unwrap()/.expect() calls without a justification comment, which the gate soft-flags for human judgment rather than blocking (same treatment some existing official apps get) — worth a look before resubmitting, not a blocker.

About docs/apps/29-heat-pump/manual.{json,md}: this one's on us, not you — it was listed as a sanctioned option in CONTRIBUTING.md/the scope-check script without anyone actually verifying it was backed by real tooling, and it wasn't: nothing in the configurator reads it (confirmed against #606; its entry doesn't show up on the /#/manual page at all). You followed the policy as documented — the policy was wrong. Filed as #656, and #657 has already removed it as an option here. So faderpunk-community-apps isn't just a better fit organizationally — right now it's the only place this content would actually end up visible anywhere.

To resubmit there: just the app file itself (no mod.rs/registration changes — those are generated), a community app ID in the 100+ range, and a manual-tab.json entry built from your existing manual.{json,md}. Most of it maps over directly (manual.md is the entry's text field verbatim; name→title; description/color/icon/params/storage and most of channels are already the same shape) — but the schema also has fnPlusShiftTitle/ledTopPlusShift/ledBottomPlusShift-style fields for documenting combined Shift/Fn/Button behavior, which your format doesn't have dedicated slots for; where that's described inline in fnDescription/ledTop today, it'd need pulling out into those fields for parity with how official apps are documented. Happy to help with the conversion if useful. Whether/when to close this one is up to you or a maintainer — just flagging where it belongs.

@kosmar

kosmar commented Aug 23, 2026

Copy link
Copy Markdown
Contributor Author

Moving this to faderpunk-community-apps as requested: ATOVproject/faderpunk-community-apps#3

Closing here. App ID remapped 29 → 100 (community range).

@kosmar kosmar closed this Aug 23, 2026
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.

2 participants