Skip to content

feat: Hold Sam clocked CV sample-and-hold to MIDI - #615

Draft
kosmar wants to merge 7 commits into
ATOVproject:mainfrom
kosmar:feat/hold-sam
Draft

feat: Hold Sam clocked CV sample-and-hold to MIDI#615
kosmar wants to merge 7 commits into
ATOVproject:mainfrom
kosmar:feat/hold-sam

Conversation

@kosmar

@kosmar kosmar commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • New 1-channel app Hold Sam (ID 36): clocked sample-and-hold from CV in to MIDI Note/CC
  • Note mode: cut+retrigger each division tick; gate % from Main; velocity = base + sensitivity × |ΔCV|
  • Soft mute / Stop ausklingen; long-press without fader move = panic; Shift+short = manual sample
  • Clippy fix: as_chunks::<4>() in USB MIDI RX path

Test plan

  • Flash firmware and add Hold Sam on one channel
  • Patch CV into the jack; confirm Note mode fires on global clock with gate length from Main
  • Confirm Alt sets division and Third changes velocity with CV jumps
  • Soft mute: note finishes gate; long-press (no fader move): hard Note Off + muted
  • Shift+short manual sample works; CC mode sends scaled CC
  • Stop leaves note to finish; Reset keeps sample/note

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.

kosmar and others added 7 commits July 30, 2026 22:21
Co-authored-by: Cursor <cursoragent@cursor.com>
Add MidiNote base pitch (0V ≈ base) and size gate % in PPQN ticks so
holds track clock tempo instead of short fixed-ms beeps.

Co-authored-by: Cursor <cursoragent@cursor.com>
Note mode dims the button for the gate; CC samples get a short duck.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
The local resolution table and the `res / 345` lookups duplicate
libfp::utils::CLOCK_DIVISIONS and division_at, which also brings the
bounds check this app currently does by hand.

Authored by an AI coding agent on behalf of kosmar.

Co-authored-by: Cursor <cursoragent@cursor.com>
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