Skip to content

dsp: violins and horns, four players a note - #334

Merged
mishan merged 2 commits into
masterfrom
ensemble
Oct 4, 2026
Merged

mishan merged 2 commits into
masterfrom
ensemble

Conversation

@mishan

@mishan mishan commented Oct 4, 2026

Copy link
Copy Markdown
Owner

Item 6 of the instrument list: ensembles. Stacked on #333, since both graphs use osc::blep.

strings.dsp and section.dsp widen one voice with a chorus. These are four discrete players per note, each with its own:

  • detune (Detune) and slow wander (Drift, seeded from the note so pieces replay exactly)

  • vibrato rate, coming in after Vibrato Delay

  • entry time (Stagger)

  • seat across the stereo field (Width)

  • dsp/violins.dsp: saw players through a note-tracking tone filter that opens with velocity. A violin-body resonance (290 Hz and 2.8 kHz, Body) is applied once per side of the summed section.

  • dsp/horns.dsp: each player scoops up from Scoop cents flat over Scoop Time, with a filter that opens with its own envelope by Bite × velocity. The cutoff is a multiple of the note, so the timbre holds up the range.

Testing

  • ctest -R "dsp|fx|catalog|gencheck|nodes": 18/18 pass.
  • Rendered a phrase on each: no clipping or NaN; peaks are 0.43 and 0.36 at channel amp 90.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Fixed sustain levels erase velocity dynamics, while Stagger changes attack and scoop duration rather than delaying player entry.

Review effort: Balanced
Findings: 5 Medium severity

Open (5)
What changed in this PR

Adds two four-player ensemble instruments using osc::blep, deterministic drift, vibrato, and stereo seating.

Changes:

  • Adds a resonant violin-section graph.
  • Adds a velocity-sensitive horn-section graph with pitch scoops.
File Description
dsp/​violins.dsp Defines the four-player violin ensemble.
dsp/​horns.dsp Defines the four-player horn ensemble.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread dsp/horns.dsp Outdated
Comment thread dsp/horns.dsp Outdated
Comment thread dsp/horns.dsp Outdated
Comment thread dsp/violins.dsp Outdated
Comment thread dsp/violins.dsp Outdated
@mishan

mishan commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner Author

Addressed in 055387b: sustain now scales with velocity, and Stagger delays each player's entry through a gate rather than stretching its attack and scoop. The delayed gate needs env::adsr to wait for a wired trigger, which is #337; merge that first. With it applied, player 4 at Stagger = 200 ms is silent until 180 ms and enters then, while player 1 starts at once.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The ADSR trigger semantics prevent the staggered players from starting at their intended delayed entry times.

Review effort: Balanced
Findings: 2 Medium severity

Open (2)
Resolved since last review (5)

Comment thread dsp/horns.dsp
Comment thread dsp/violins.dsp
mishan added 2 commits October 4, 2026 12:21
Each player is its own osc::blep with its own detune, drift, vibrato
rate and entry time, panned to a seat across the stereo field. The
violins share a body resonance at 290 Hz and 2.8 kHz; each horn
scoops up into the note and brightens with velocity.
Sustain scales with velocity, so a soft note does not swell up to the
sustain level. Stagger is an entry: each player's attack, filter and
scoop wait on a gate a timer envelope opens Stagger times its share
after the key, rather than the attack being stretched and the scoop
lengthened. Needs env::adsr to wait for a wired trigger (#337); until
then every player enters with the first.
Base automatically changed from warmth to master October 4, 2026 19:25
@mishan
mishan requested a balanced review from Copilot October 4, 2026 19:47

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The staggered gates rely on the behavioral changes in unmerged PR #337.

Review effort: Balanced
Findings: None

Resolved since last review (2)

@mishan
mishan merged commit d827f37 into master Oct 4, 2026
17 checks passed
@mishan
mishan deleted the ensemble branch October 4, 2026 20:53
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