Skip to content

armgit / nota

Public Imported from GitHub
0

Nota — a free DAW for macOS, Windows and Linux. No subscription, no account — just open it and make music.

(feat) Fold Nota Bass and Nota Synth into Nota Volt (#199)

Chris Laupama929e1c4e1279
diff --git a/CHANGELOG.md b/CHANGELOG.md
index fd73b8f5..5e767830 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -23,6 +23,17 @@ Entry categories: `Added`, `Changed`, `Fixed`, `Removed`.
## [Unreleased]
### Added
+- **Nota Volt does what Nota Bass and Nota Synth did** (nota-daw/nota#195): each oscillator
+ has a **Shape** knob that morphs its wave toward the next one (sine → triangle → saw →
+ square) and a **Pulse Width** for the square; a **Drive** in front of both filters and one on
+ the output; a **Unison** choice of 1 / 2 / 4 / 7 voices, where 2 to 7 stack detuned copies of
+ each oscillator and **Spread** pans them across the stereo field; **Poly / Mono / Legato**,
+ where Mono falls back to the key you are still holding when you let go of the top one; and
+ **Wheel → LFO**, which opens each filter's LFO onto its cutoff as you raise the mod wheel.
+ The 49 Nota Synth and Nota Bass factory presets are now Volt presets too, in Volt's folders
+ (Bass's in Sub Bass, Analog Bass, Acid, Growl & Wobble and Electric Bass). A Volt patch you
+ already have sounds the same, except that in Mono a note played while the last one is
+ fading out now starts afresh instead of fading with it.
- **Hear notes while you edit them in the piano roll** (nota-daw/nota#46): with the new
speaker switch in the clip editor's header on (it is by default), a note sounds on the
track's instrument while you place it, click it or drag it, and re-sounds at each new pitch
@@ -248,6 +259,12 @@ Entry categories: `Added`, `Changed`, `Fixed`, `Removed`.
take, for keyboard and MIDI input and for MIDI routed in from another track.
### Changed
+- **Nota Volt is the default instrument; Nota Bass and Nota Synth leave the browser**
+ (nota-daw/nota#195): a new instrument track, a new project, an imported MIDI file, an
+ audio-to-MIDI conversion and a new Instrument Rack now start on Nota Volt. Nota Bass and
+ Nota Synth are no longer offered in the browser, the command palette, the rack and Drum Rack
+ menus or MCP's `list_instrument_kinds`, since Volt now covers both. Projects and presets that
+ use them still open, play and show their own card.
- **Hosted plug-ins get every MIDI controller** (nota-daw/nota#69): the mod wheel and any
other CC from your keyboard now reach a plug-in instrument (before, only the wheel, pressure,
CC74 and the sustain pedal did), and the sustain pedal arrives with its real value, so a
diff --git a/DESIGN.md b/DESIGN.md
index c9a84e91..0d7e950a 100644
--- a/DESIGN.md
+++ b/DESIGN.md
@@ -557,6 +557,9 @@ All live in one **graph window** (`Controls/NotaGraph.cs`):
Every built-in device is a **700 × 260** card (`DeviceCardKit.CardH`, width from
`IDeviceBody.Width`): panel body, radius 3, a 1 px seam frame. A selected card carries a
1.5 px accent ring outside its frame.
+Width exceptions: the parameter stubs and the generic "Open GUI" card are narrow; Nota Bass and
+Nota Physical keep their wider layouts; **Nota Volt is 790** since it took over Nota Synth and
+Nota Bass (specs/026) and its Osc rows carry Shape and Pulse Width.
- **Header 22** (`HeaderH`, built by `DeviceChainView.Shell.cs` `BuildCardShell`): a
raised strip with the `Shadow.Raised` bevel and a seam under it, in **fixed slots, left to
diff --git a/FEATURES.md b/FEATURES.md
index 36d2a06e..ffbe40b9 100644
--- a/FEATURES.md
+++ b/FEATURES.md
@@ -53,7 +53,7 @@ JUCE module; the engine core is JUCE-free.
Mute, solo, sends and devices inside racks are not in the history; automation playback,
opening a project and freezing add no steps.
- **New project template**: a new project (and the workspace Nota opens with) starts with an
- instrument track (Nota Synth), an audio track and two returns — **Reverb** (Nota Reverb)
+ instrument track (Nota Volt), an audio track and two returns — **Reverb** (Nota Reverb)
and **Delay** (Nota Delay), both Wet Only — ready to send to; it opens unmodified, with
nothing to undo.
- **Version history**: every save records a version inside the project. The browser's
@@ -367,7 +367,7 @@ track count and closes with Escape.
installed (Settings → Downloads → AI Models), Melody and Harmony use it instead: every note,
chords included, with velocities from the playing; Melody keeps the strongest note where notes
overlap. Without it they use the DSP below, and the Convert menu offers the model.
- - **Convert Melody** — monophonic pitch detection (YIN) → a new Nota Synth track.
+ - **Convert Melody** — monophonic pitch detection (YIN) → a new Nota Volt track.
- **Convert Harmony** — polyphonic (STFT + spectral peak picking) → chords: overtones,
chorus shimmer and slight detune don't add stray notes, held chords stay whole, and
notes start on the audio's attacks.
@@ -474,7 +474,8 @@ and hosted plug-ins) have the same on/off switch as effects: off silences the in
audio effects after it keep running and keep their settings; saved with the project.
### Instruments
-- **Nota Synth** — subtractive synthesizer (the basic one): one oscillator
+- **Nota Synth** — *no longer offered for new tracks: Nota Volt covers it and carries its
+ presets (specs/026); saved tracks still load and play.* Subtractive synthesizer (the basic one): one oscillator
(Saw/Square/Triangle/Sine) with pulse width, detune, octave and a 1/2/4/7-voice unison
stack with stereo spread; ADSR; a filter with type Off/LP/HP/BP, resonance and an
Env → Cutoff amount; voice modes Poly 16 / Mono / Legato with glide, pan and Vel→Vol.
@@ -498,12 +499,16 @@ audio effects after it keep running and keep their settings; saved with the proj
presets in nine folders; every preset outside Basics brings its own source (29 synthesized
on first use — choir, strings, bells, kalimba, a drum break, an arpeggio, ocean, radio …),
while Basics shape whatever sample is loaded.
-- **Nota Volt** — subtractive synth, two paths: two oscillators and noise, each routed to
- one of two filters (LP/HP/BP/Notch, 12/24 dB, with Filter 1 able to feed Filter 2) and
- its own amp; amp and filter envelopes, two LFOs (shapes, depth, fade-in, tempo sync), a
- dedicated vibrato that can ride the mod wheel, a 7×6 modulation matrix, 8 macros over 12
- destinations, unison, glide, oscillator start phase, pitch-bend (±2/±5/±12) and
- modulation wheels, VEL→AMP, VEL→FILTER, Mono/Poly. 25 factory presets.
+- **Nota Volt** — the default instrument. Subtractive synth, two paths: two oscillators
+ (saw/square/triangle/sine, a Shape knob that morphs toward the next wave, pulse width) and
+ noise, each routed to one of two filters (LP/HP/BP/Notch, 12/24 dB, with Filter 1 able to
+ feed Filter 2, a drive in front of both) and its own amp; amp and filter envelopes, two
+ LFOs (shapes, depth, fade-in, tempo sync) that the mod wheel can open onto the cutoffs
+ (Wheel → LFO), a dedicated vibrato that can ride the mod wheel, a 7×6 modulation matrix,
+ 8 macros over 12 destinations, unison (one detuned partner, or a 2/4/7-voice stack with
+ stereo spread), output drive, glide, oscillator start phase, pitch-bend (±2/±5/±12) and
+ modulation wheels, VEL→AMP, VEL→FILTER, Poly/Mono/Legato (Mono falls back to a held key).
+ 74 factory presets: its own 25 plus the Nota Synth and Nota Bass libraries.
- **Nota Aurora** — wavetable synth: two wavetable oscillators (16 frames per bank, warp
Off/Sync/Bend/PWM/Fold) plus a sub oscillator and a stereo unison stack (voices, detune
in cents, spread), two filters (LP/HP/BP/Notch/Morph, 12/24 dB) with per-source routing,
@@ -520,7 +525,8 @@ audio effects after it keep running and keep their settings; saved with the proj
Note, Reset, Humanize and Pan Spread. The card draws one lane per ball from the engine's
telemetry (direction, the wall it strikes, the time to the next one) over a bar strip of
the generated notes; 28 factory presets; MCP `read_pendulum` / `set_pendulum`.
-- **Nota Bass** — mono-first bass synth: a morphing oscillator (sine → tri → saw → pulse,
+- **Nota Bass** — *no longer offered for new tracks: Nota Volt covers it and carries its
+ presets (specs/026); saved tracks still load and play.* Mono-first bass synth: a morphing oscillator (sine → tri → saw → pulse,
pulse width), a sub oscillator (sine/square/tri, −1/−2 oct), a filter (LP/HP/BP/Notch,
12/24 dB) with pre-drive, its own envelope, key tracking and LFO, amp envelope, LFO to
cutoff and pitch, unison, output drive and pan, glide, Legato, pitch-bend (±2/±5/±12)
diff --git a/specs/026-volt-absorbs-bass-synth/spec.md b/specs/026-volt-absorbs-bass-synth/spec.md
new file mode 100644
index 00000000..525e83b7
--- /dev/null
+++ b/specs/026-volt-absorbs-bass-synth/spec.md
@@ -0,0 +1,76 @@
+# Feature Specification: Fold Nota Bass and Nota Synth into Nota Volt
+
+**Feature Branch**: `feat/volt-absorbs-bass-synth`
+
+**Created**: 2026-10-19
+
+**Status**: Implemented
+
+**Input**: nota-daw/nota#195. Nota Bass and Nota Synth are one-oscillator, one-filter
+versions of Nota Volt: the same oscillators, state-variable filter, envelopes, unison and
+glide. Give Volt the few things only they have, move their factory presets into Volt, and
+take them out of the browser. Old projects that use them must still open and sound the same.
+
+## Nota Context
+
+**Feature area**: engine (`VoltSynth.h`), Volt device card, factory presets, browser /
+palette / rack menus / MCP, the default instrument of a new track.
+
+**Audio thread**: Volt's render gains a few per-block branches; the new paths (drive,
+pulse width, shape morph, the unison stack) are allocation-free and only cost when used.
+A patch that leaves the new parameters at their defaults renders sample-for-sample as before.
+
+**Persistence**: Volt's parameters are appended (133 → 143), so older Volt state loads with
+the new ones at neutral defaults. Projects store Nota Synth (kind 0) and Nota Bass (kind 7)
+tracks by kind; both engines stay, so those tracks load and play unchanged. No format bump.
+
+## Clarifications
+
+### Session 2026-10-19
+
+- Q: Hide or convert? → A: Hide. Bass and Synth leave the browser, palette, rack / pad
+ menus and MCP's instrument list; their engines, cards and presets stay for old tracks.
+ Converting saved projects on load is a later step if the code is worth removing.
+- Q: How does a Synth/Bass preset become a Volt preset? → A: Through one converter
+ (`VoltPort`) that turns each instrument's normalized parameters into Volt's, matching the
+ ranges (cutoff, envelope times, glide, octave, reso, loudness) rather than copying numbers.
+- Q: Bass's continuous oscillator shape? → A: A per-oscillator **Shape** knob on Volt that
+ morphs from the chosen wave toward the next one in sine → triangle → saw → square order.
+ 0 = the wave chip exactly as before.
+- Q: Bass's sub oscillator? → A: Osc 2 an octave (or two) down, sine / square / triangle.
+- Q: Synth's 1 / 2 / 4 / 7 unison? → A: A **Voices** choice on Volt: 1 keeps Volt's single
+ detuned partner (the Unison knob, as before); 2 / 4 / 7 stack copies of each oscillator
+ across ±(Unison × 50) cents, panned by a new **Spread** knob (stereo through the filters).
+- Q: Synth's filter Off? → A: Ported as Volt's low-pass fully open, no resonance, no
+ envelope. No new filter type.
+- Q: Saw LFO? → A: Not added: no Bass preset uses it.
+- Q: Mono behaviour? → A: Volt's Mono keeps a held-note stack (releasing the top key falls
+ back to the one under it) and gains a **Legato** choice: Poly / Mono / Legato. Legato only
+ slides while another key is held and the voice is still sounding. Existing mono Volt
+ patches load as Legato, which is what they did; a note struck on a releasing voice now
+ retriggers instead of fading out.
+- Q: Default instrument? → A: Nota Volt for every new instrument track (toolbar, new project,
+ MIDI import, audio-to-MIDI, the fallback when a plug-in or sample can't be reloaded) and the
+ first chain of a new Instrument Rack. Loading a saved Nota Synth track still makes a Nota Synth.
+- Q: Card width? → A: 790 (a documented exception to the 700 frame, like Bass and Physical):
+ the Osc rows need two more knob columns.
+
+## Requirements
+
+- **FR-001**: Volt MUST add Shape (per oscillator), Pulse Width (per oscillator), Filter
+ Drive (before both filters), Drive (output), Voices (1/2/4/7), Spread, Legato and
+ Wheel → LFO (the mod wheel opens each filter's LFO onto its cutoff, up to ±2 octaves).
+- **FR-002**: A Volt patch saved before this change MUST render the same in Poly (checked
+ sample for sample against the previous engine). Mono changes on purpose: a note struck on a
+ releasing voice retriggers, releasing the top key falls back to a key still held, and a
+ legato note's key tracking follows the new note.
+- **FR-003**: Every Nota Synth and Nota Bass factory preset MUST exist as a Volt preset.
+- **FR-004**: Nota Synth and Nota Bass MUST NOT appear in the browser, the command palette,
+ rack chain / drum pad menus or `list_instrument_kinds`; projects and presets that use them
+ MUST still load, play and show their own card.
+- **FR-005**: New instrument tracks MUST be Nota Volt.
+- **FR-006**: The Volt card MUST show the new controls without overflowing.
+
+## Out of scope
+
+Converting saved Synth/Bass tracks to Volt; removing `Synth.h` / `BassSynth.h`; a saw LFO.
diff --git a/specs/026-volt-absorbs-bass-synth/tasks.md b/specs/026-volt-absorbs-bass-synth/tasks.md
new file mode 100644
index 00000000..9c5b1ef1
--- /dev/null
+++ b/specs/026-volt-absorbs-bass-synth/tasks.md
@@ -0,0 +1,19 @@
+# Tasks: Fold Nota Bass and Nota Synth into Nota Volt
+
+**Spec**: [spec.md](spec.md)
+
+- [x] T001 Engine: append Osc1/2 Shape, Osc1/2 PW, Filter Drive, Drive, Unison Voices, Unison
+ Spread, Legato, Wheel → LFO to `VoltSynth.h` (133 → 143); render paths only when used.
+- [x] T002 Engine: mono held-note stack, Legato switch, retrigger on a releasing voice.
+- [x] T003 Engine: Instrument Rack's default chain is Volt.
+- [x] T004 `VoltPort` converter (Synth / Bass → Volt) and `PortToVolt` in the factory catalog;
+ 49 presets filed into Volt folders, colliding names renamed.
+- [x] T005 Hide Synth / Bass: `BuiltinDeviceCatalog`, `DeviceCategories`, rack chain and Drum
+ Rack pad menus, MCP `list_instrument_kinds` (kinds 0 / 7 still accepted).
+- [x] T006 New-track call sites → `AddVoltSynthTrack` (toolbar, template, MIDI import, convert,
+ MCP, load fallbacks).
+- [x] T007 Volt card: Shape / PW columns, Filter Drive and Wheel → LFO, Poly/Mono/Legato, output
+ Drive, unison voices / detune / spread; 790 wide (DESIGN.md exception).
+- [x] T008 Smoke tests: param count, v6 controls audible + finite, defaults neutral, stereo
+ stack, mono fallback, retrigger, every port plays; tests that assumed Synth as default.
+- [x] T009 CHANGELOG, FEATURES, DESIGN; nota-docs EN + RU.
diff --git a/src/managed/Nota.App/DeviceCards/Instruments/VoltInstrumentCard.cs b/src/managed/Nota.App/DeviceCards/Instruments/VoltInstrumentCard.cs
index 8c2bcba0..4bfaea22 100644
--- a/src/managed/Nota.App/DeviceCards/Instruments/VoltInstrumentCard.cs
+++ b/src/managed/Nota.App/DeviceCards/Instruments/VoltInstrumentCard.cs
@@ -2,23 +2,26 @@
// Copyright (c) 2026 Egor Khindikaynen (Nota). See LICENSES/ for license terms.
//
// Detail · Devices — built-in Nota Volt editor (instrument kind 6): a two-path subtractive
-// synth in the 700 × 260 card the almanac draws for it.
+// synth in a 790 × 260 card (the almanac drew it 700 wide; it grew when Volt took over Nota
+// Synth and Nota Bass, specs/026).
//
// Wheels 56 pitch bend and mod wheel, on screen on every tab — the two hand controls
// a player reaches for first.
// Centre six tabs:
// Osc — Osc 1 / Osc 2 / Noise as a table: wave, octave, semi, fine,
-// start phase, level, and which filter the source is sent to.
+// shape (a morph toward the next wave), pulse width, start phase,
+// level, and which filter the source is sent to.
// Filter — the response of the selected filter as a drag pad, with type,
// slope, cutoff, resonance, env / key / LFO amounts and, on
-// Filter 1, how much of it spills into Filter 2.
+// Filter 1, how much of it spills into Filter 2; the drive in
+// front of both filters and Wheel → LFO sit beside them.
// Env — the amp and filter envelopes side by side, drawn and draggable.
// LFO — LFO 1 / LFO 2 / Vibrato as a table, each naming where it lands.
// Mod — the 7 × 6 matrix: drag a cell up for +, down for −.
// Macro — eight macros, each a value, an amount and one of twelve targets.
-// Rail 186 Global (voice mode, bend range, cutoff, resonance, glide, gain, pan and
-// the track's meter) or Voice (both output amps, unison and the two
-// velocity amounts).
+// Rail 186 Global (Poly / Mono / Legato, bend range, cutoff, resonance, glide, gain,
+// output drive, pan and the track's meter) or Voice (both output amps, the
+// unison stack — voices, detune, spread — and the two velocity amounts).
//
// Neutral ink is the parameter itself; teal is modulation and what receives it; the accent
// marks only live or chosen state. Everything is a
@@ -40,7 +43,7 @@ internal sealed class VoltInstrumentCard : IInstrumentCard
{
public bool BodyOnly => true;
public string Subtitle => "Subtractive";
- public double CardWidth => 700;
+ public double CardWidth => 790;
private const double WheelsW = 56, RailW = 186, TabH = 20, StatusH = 18, BodyH = 186;
@@ -53,6 +56,8 @@ internal sealed class VoltInstrumentCard : IInstrumentCard
private static readonly float[] RouteStops = { 0f, 1f };
private static readonly string[] ShapeNames = { "sin", "tri", "sqr", "S&H" };
private static readonly string[] SyncNames = { "free", "1 bar", "1/2", "1/4", "1/8", "1/16", "1/32", "1/64" };
+ private static readonly string[] VoiceModes = { "Poly", "Mono", "Legato" };
+ private static readonly string[] UniNames = { "1", "2", "4", "7" };
private static readonly string[] BendNames = { "±2", "±5", "±12" };
private static readonly float[] BendStops = { 1f / 11f, 4f / 11f, 1f };
private static readonly string[] SrcNames = { "Amp Env", "Flt Env", "LFO 1", "LFO 2", "Velocity", "Key", "Mod Whl" };
@@ -85,6 +90,8 @@ internal sealed class VoltInstrumentCard : IInstrumentCard
private static string Oct(float v) => NotaNum.Str(Math.Round((v - 0.5) * 6), "+0;−0;0");
private static string Semi(float v) => NotaNum.Str(Math.Round((v - 0.5) * 24), "+0;−0;0");
private static string Cents(float v) => NotaNum.Unit(Math.Round((v - 0.5) * 100), "+0;−0;0", "c");
+ private static string ShapeText(float v) => v <= 0.001f ? "off" : NotaNum.Pct(v);
+ private static string PwText(float v) => NotaNum.Pct(v == 0.5f ? 0.5f : 0.05f + 0.9f * v);
private static string Phase(float v) => v <= 0.001f ? "free" : NotaNum.Unit(v * 360, "0", "°");
private static string GlideT(float v) => v <= 0.001f ? "off" : NotaNum.Time(ExpMap(v, 0.005, 0.6));
private static string FadeT(float v) => v <= 0.001f ? "off" : NotaNum.Time(ExpMap(v, 0.01, 5.0));
@@ -320,7 +327,7 @@ internal sealed class VoltInstrumentCard : IInstrumentCard
// One grid for all three sources, so the column headers sit over their own cells.
var oscGrid = new Grid
{
- ColumnDefinitions = new ColumnDefinitions("46,Auto,*,*,*,*,*,Auto"), ColumnSpacing = 4,
+ ColumnDefinitions = new ColumnDefinitions("46,Auto,*,*,*,*,*,*,*,Auto"), ColumnSpacing = 4,
RowDefinitions = new RowDefinitions("*,*,*"),
};
void OscCell(Control c, int row, int col, int span = 1)
@@ -342,24 +349,26 @@ internal sealed class VoltInstrumentCard : IInstrumentCard
if (o > 0)
{
var rule = new Border { BorderBrush = NotaPalette.GraphBorder, BorderThickness = new Thickness(0, 1, 0, 0) };
- Grid.SetRow(rule, o); Grid.SetColumnSpan(rule, 8); oscGrid.Children.Add(rule);
+ Grid.SetRow(rule, o); Grid.SetColumnSpan(rule, 10); oscGrid.Children.Add(rule);
}
OscCell(Section(nm), o, 0);
OscCell(WaveChips(pre + "wave"), o, 1);
OscCell(PKnob(pre + "octave", "OCT", nm + " Octave", Oct, 26, 40), o, 2);
OscCell(PKnob(pre + "semi", "SEMI", nm + " Semi", Semi, 26, 40), o, 3);
OscCell(PKnob(pre + "detune", "FINE", nm + " Fine", Cents, 26, 40, Teal), o, 4);
- OscCell(PKnob(pre + "phase", "PHASE", nm + " Phase", Phase, 26, 40), o, 5);
- OscCell(PKnob(pre + "level", "LEVEL", nm + " Level", Pct, 26, 40), o, 6);
- OscCell(RouteCell(pre + "route"), o, 7);
+ OscCell(PKnob(pre + "shape", "SHAPE", nm + " Shape", ShapeText, 26, 40), o, 5);
+ OscCell(PKnob(pre + "pw", "PW", nm + " Pulse Width", PwText, 26, 40), o, 6);
+ OscCell(PKnob(pre + "phase", "PHASE", nm + " Phase", Phase, 26, 40), o, 7);
+ OscCell(PKnob(pre + "level", "LEVEL", nm + " Level", Pct, 26, 40), o, 8);
+ OscCell(RouteCell(pre + "route"), o, 9);
}
{
var rule = new Border { BorderBrush = NotaPalette.GraphBorder, BorderThickness = new Thickness(0, 1, 0, 0) };
- Grid.SetRow(rule, 2); Grid.SetColumnSpan(rule, 8); oscGrid.Children.Add(rule);
+ Grid.SetRow(rule, 2); Grid.SetColumnSpan(rule, 10); oscGrid.Children.Add(rule);
OscCell(Section("NOISE"), 2, 0);
OscCell(Chips("noisecolor", NoiseNames, () => NoiseBand(G("noisecolor")), iv => { SetP("noisecolor", NoiseStops[iv]); Refresh(); }), 2, 1);
OscCell(PKnob("noisecolor", "COLOR", "Noise Color", Pct, 26, 40), 2, 2);
- OscCell(PKnob("noise", "LEVEL", "Noise Level", Pct, 26, 40), 2, 6);
+ OscCell(PKnob("noise", "LEVEL", "Noise Level", Pct, 26, 40), 2, 8);
var mixBar = new MixBar(engine, track, new[] { I("osc1level"), I("osc2level"), I("noise") });
readouts.Add(mixBar.Refresh);
@@ -374,8 +383,8 @@ internal sealed class VoltInstrumentCard : IInstrumentCard
Spacing = 2, VerticalAlignment = VerticalAlignment.Center, Margin = new Thickness(6, 0),
Children = { Cap("MIX SUM"), mixBar, mixVal },
};
- OscCell(mixCell, 2, 3, 3);
- OscCell(RouteCell("noiseroute"), 2, 7);
+ OscCell(mixCell, 2, 3, 5);
+ OscCell(RouteCell("noiseroute"), 2, 9);
}
var oscBody = new Border { Padding = new Thickness(7, 3), Child = oscGrid };
@@ -388,15 +397,24 @@ internal sealed class VoltInstrumentCard : IInstrumentCard
string[] filtLbl = { "Cutoff", "Reso", "Env", "Key", "LFO", "To F2" };
var filtKnobGrid = new Grid
{
- ColumnDefinitions = new ColumnDefinitions("*,*,*"), RowDefinitions = new RowDefinitions("*,*"),
+ ColumnDefinitions = new ColumnDefinitions("*,*,*,*"), RowDefinitions = new RowDefinitions("*,*"),
VerticalAlignment = VerticalAlignment.Stretch,
};
+ // Cutoff Reso Env | Drive over Key LFO | Wheel To F2 — Drive and Wheel → LFO act on
+ // both filters, so they stay put when the 1 / 2 pick swaps the rest.
+ (int Col, int Row)[] filtAt = { (0, 0), (1, 0), (2, 0), (0, 1), (1, 1), (3, 1) };
for (int k = 0; k < 6; k++)
{
filtCells[k] = new Panel();
- Grid.SetColumn(filtCells[k], k % 3); Grid.SetRow(filtCells[k], k / 3);
+ Grid.SetColumn(filtCells[k], filtAt[k].Col); Grid.SetRow(filtCells[k], filtAt[k].Row);
filtKnobGrid.Children.Add(filtCells[k]);
}
+ {
+ var drive = PKnob("fildrive", "Drive", "Filter Drive", Pct, 26, 44);
+ Grid.SetColumn(drive, 3); filtKnobGrid.Children.Add(drive);
+ var wheel = PKnob("wheellfo", "Wheel", "Wheel → LFO", Pct, 26, 44, Teal);
+ Grid.SetColumn(wheel, 2); Grid.SetRow(wheel, 1); filtKnobGrid.Children.Add(wheel);
+ }
for (int f = 0; f < 2; f++)
{
string pre = f == 0 ? "fil1" : "fil2";
@@ -441,7 +459,7 @@ internal sealed class VoltInstrumentCard : IInstrumentCard
var filtSlopeStack = new Panel();
foreach (var h in filtSlopeHosts) filtSlopeStack.Children.Add(h);
- var filtRight = new Grid { RowDefinitions = new RowDefinitions("Auto,Auto,Auto,*"), RowSpacing = 4, Width = 136 };
+ var filtRight = new Grid { RowDefinitions = new RowDefinitions("Auto,Auto,Auto,*"), RowSpacing = 4, Width = 180 };
var filtRightRows = new Control[] { filtHead, filtTypeStack, filtSlopeStack, filtKnobGrid };
for (int i = 0; i < filtRightRows.Length; i++) { Grid.SetRow(filtRightRows[i], i); filtRight.Children.Add(filtRightRows[i]); }
@@ -740,7 +758,9 @@ internal sealed class VoltInstrumentCard : IInstrumentCard
var tabPanel = SectionBox(tabGrid);
// ---- rail · Global ----------------------------------------------------
- var monoChips = Chips("mono", new[] { "Poly", "Mono" }, () => G("mono") >= 0.5f ? 1 : 0, iv => { SetP("mono", iv); Refresh(); });
+ // Poly / Mono / Legato over two params: Mono, and Legato (which only acts in Mono).
+ var monoChips = Chips("mono", VoiceModes, () => G("mono") < 0.5f ? 0 : G("legato") >= 0.5f ? 2 : 1,
+ iv => { SetP("mono", iv > 0 ? 1f : 0f); if (iv > 0) SetP("legato", iv == 2 ? 1f : 0f); Refresh(); });
monoChips.HorizontalAlignment = HorizontalAlignment.Right;
var monoRow = new Grid { ColumnDefinitions = new ColumnDefinitions("Auto,*") };
monoRow.Children.Add(Cap("VOICES"));
@@ -775,12 +795,14 @@ internal sealed class VoltInstrumentCard : IInstrumentCard
meterBlock.Children.Add(meter);
Grid.SetColumn(meterScale, 1); meterBlock.Children.Add(meterScale);
- var globalBottom = new Grid { ColumnDefinitions = new ColumnDefinitions("Auto,Auto,*"), VerticalAlignment = VerticalAlignment.Stretch };
- var gainCell = PKnob("volume", "GAIN", "Gain", Pct, NotaSize.KnobMain, 48);
- var panCell = PKnob("outpan", "PAN", "Out Pan", PanText, NotaSize.KnobRegular, 44);
+ var globalBottom = new Grid { ColumnDefinitions = new ColumnDefinitions("Auto,Auto,Auto,*"), VerticalAlignment = VerticalAlignment.Stretch };
+ var gainCell = PKnob("volume", "GAIN", "Gain", Pct, NotaSize.KnobMain, 44);
+ var driveCell = PKnob("drive", "DRIVE", "Drive", Pct, NotaSize.KnobRegular, 40);
+ var panCell = PKnob("outpan", "PAN", "Out Pan", PanText, NotaSize.KnobRegular, 40);
globalBottom.Children.Add(gainCell);
- Grid.SetColumn(panCell, 1); globalBottom.Children.Add(panCell);
- Grid.SetColumn(meterBlock, 2); globalBottom.Children.Add(meterBlock);
+ Grid.SetColumn(driveCell, 1); globalBottom.Children.Add(driveCell);
+ Grid.SetColumn(panCell, 2); globalBottom.Children.Add(panCell);
+ Grid.SetColumn(meterBlock, 3); globalBottom.Children.Add(meterBlock);
var globalTop = new StackPanel
{
@@ -804,41 +826,51 @@ internal sealed class VoltInstrumentCard : IInstrumentCard
Grid.SetRow(globalBottomFrame, 1); globalGrid.Children.Add(globalBottomFrame);
// ---- rail · Voice -----------------------------------------------------
- Control AmpRow(string title, string levelId, string panId, string name)
+ // A row of four small knobs under its captions — the rail is 186 wide.
+ Grid KnobRow(params Control[] cells)
{
- var knobs = new StackPanel
- {
- Orientation = Orientation.Horizontal, Spacing = 4, VerticalAlignment = VerticalAlignment.Center,
- Children = { PKnob(levelId, "LEVEL", name + " Level", Pct, 30, 44), PKnob(panId, "PAN", name + " Pan", PanText, 30, 44) },
- };
- knobs.HorizontalAlignment = HorizontalAlignment.Right;
- var g = new Grid { ColumnDefinitions = new ColumnDefinitions("Auto,*") };
- g.Children.Add(Cap(title));
- Grid.SetColumn(knobs, 1); g.Children.Add(knobs);
+ var g = new Grid { ColumnDefinitions = new ColumnDefinitions("*,*,*,*") };
+ for (int k = 0; k < cells.Length; k++) { Grid.SetColumn(cells[k], k); g.Children.Add(cells[k]); }
+ return g;
+ }
+ Grid CapRow(string a, string b)
+ {
+ var g = new Grid { ColumnDefinitions = new ColumnDefinitions("*,*") };
+ var ca = Cap(a); ca.HorizontalAlignment = HorizontalAlignment.Center;
+ var cb = Cap(b); cb.HorizontalAlignment = HorizontalAlignment.Center;
+ g.Children.Add(ca); Grid.SetColumn(cb, 1); g.Children.Add(cb);
return g;
}
+ Border Rule(Control child) => new()
+ {
+ BorderBrush = NotaPalette.GraphBorder, BorderThickness = new Thickness(0, 1, 0, 0),
+ Padding = new Thickness(0, 4, 0, 0), Child = child,
+ };
+ var uniChips = Chips("univoices", UniNames);
+ uniChips.HorizontalAlignment = HorizontalAlignment.Right;
+ var uniRow = new Grid { ColumnDefinitions = new ColumnDefinitions("Auto,*") };
+ uniRow.Children.Add(Cap("UNISON"));
+ Grid.SetColumn(uniChips, 1); uniRow.Children.Add(uniChips);
var voiceGrid = new StackPanel
{
- Spacing = 4, Margin = new Thickness(8, 5),
+ Spacing = 3, Margin = new Thickness(8, 5),
Children =
{
- AmpRow("AMP 1", "amp1level", "amp1pan", "Amp 1"),
- AmpRow("AMP 2", "amp2level", "amp2pan", "Amp 2"),
- new Border
+ CapRow("AMP 1", "AMP 2"),
+ KnobRow(PKnob("amp1level", "LEVEL", "Amp 1 Level", Pct, 24, 40), PKnob("amp1pan", "PAN", "Amp 1 Pan", PanText, 24, 40),
+ PKnob("amp2level", "LEVEL", "Amp 2 Level", Pct, 24, 40), PKnob("amp2pan", "PAN", "Amp 2 Pan", PanText, 24, 40)),
+ Rule(new StackPanel
{
- BorderBrush = NotaPalette.GraphBorder, BorderThickness = new Thickness(0, 1, 0, 0),
- Padding = new Thickness(0, 5, 0, 0),
- Child = new StackPanel
+ Spacing = 3,
+ Children =
{
- Spacing = 5,
- Children =
- {
- Slider("UNISON", "unison", () => Pct(G("unison")), labelW: 46),
- Slider("VEL→AMP", "velamp", () => Pct(G("velamp")), labelW: 46),
- Slider("VEL→FIL", "velfilter", () => Pct(G("velfilter")), labelW: 46),
- },
+ uniRow,
+ // With one voice Detune is the partner oscillator's distance (up to 25 c);
+ // with 2 / 4 / 7 it is the spread of the stack (±50 c) and Spread pans it.
+ KnobRow(PKnob("unison", "DETUNE", "Unison", Pct, 24, 40, Teal), PKnob("unispread", "SPREAD", "Unison Spread", Pct, 24, 40),
+ PKnob("velamp", "VEL AMP", "Vel→Amp", Pct, 24, 40), PKnob("velfilter", "VEL FIL", "Vel→Filter", Pct, 24, 40)),
},
- },
+ }),
},
};
@@ -921,8 +953,9 @@ internal sealed class VoltInstrumentCard : IInstrumentCard
};
string Meta()
{
- string mode = G("mono") >= 0.5f ? "Mono" : "Poly 16";
- return $"{mode} · ±{BendRange(G("bendrange"))}\u2009st · gain {Pct(G("volume"))}";
+ string mode = G("mono") < 0.5f ? "Poly 16" : G("legato") >= 0.5f ? "Legato" : "Mono";
+ string uni = Sel("univoices", 4) is var u and > 0 ? $" ×{UniNames[u]}" : "";
+ return $"{mode}{uni} · ±{BendRange(G("bendrange"))}\u2009st · gain {Pct(G("volume"))}";
}
var statusBar = new Grid { Height = StatusH, ColumnDefinitions = new ColumnDefinitions("*,Auto"), ColumnSpacing = 10 };
statusBar.Children.Add(status);
diff --git a/src/managed/Nota.App/DeviceCards/Rack/RackCardView.Drum.cs b/src/managed/Nota.App/DeviceCards/Rack/RackCardView.Drum.cs
index c5e80928..1fa2ec68 100644
--- a/src/managed/Nota.App/DeviceCards/Rack/RackCardView.Drum.cs
+++ b/src/managed/Nota.App/DeviceCards/Rack/RackCardView.Drum.cs
@@ -800,11 +800,9 @@ internal sealed partial class RackCardView
}
Add("Nota Sampler", 1);
f.Items.Add(new Separator());
- Add("Nota Synth", 0);
+ Add("Nota Volt", 6);
Add("Nota Physical", 2);
Add("Nota Aurora", 5);
- Add("Nota Volt", 6);
- Add("Nota Bass", 7);
Add("Nota Pendulum", 8);
Add("Nota Operator", 9);
Add("Nota Grain", 10);
diff --git a/src/managed/Nota.App/DeviceCards/Rack/RackCardView.cs b/src/managed/Nota.App/DeviceCards/Rack/RackCardView.cs
index 5eecf92b..0dc8a567 100644
--- a/src/managed/Nota.App/DeviceCards/Rack/RackCardView.cs
+++ b/src/managed/Nota.App/DeviceCards/Rack/RackCardView.cs
@@ -609,8 +609,8 @@ internal sealed partial class RackCardView(DeviceCardContext ctx)
{
var f = new MenuFlyout();
void Add(string h, int k) { var mi = new MenuItem { Header = h }; mi.Click += (_, _) => { int c = a.AddChain(k); if (c >= 0) Sel = c; _ctx.RequestRebuild(); }; f.Items.Add(mi); }
- Add("Nota Synth", 0); Add("Nota Sampler", 1); Add("Nota Physical", 2); Add("Nota Aurora", 5);
- Add("Nota Volt", 6); Add("Nota Bass", 7); Add("Nota Pendulum", 8); Add("Nota Operator", 9); Add("Nota Grain", 10); Add("Nota Flux", 11); Add("Nota Monolith", 13); Add("Nota Pentad", 14); Add("Nota Consort", 15); Add("Nota Keys", 16);
+ Add("Nota Volt", 6); Add("Nota Sampler", 1); Add("Nota Physical", 2); Add("Nota Aurora", 5);
+ Add("Nota Pendulum", 8); Add("Nota Operator", 9); Add("Nota Grain", 10); Add("Nota Flux", 11); Add("Nota Monolith", 13); Add("Nota Pentad", 14); Add("Nota Consort", 15); Add("Nota Keys", 16);
f.ShowAt(anchor, showAtPointer: true);
}
@@ -1460,16 +1460,12 @@ internal sealed partial class RackCardView(DeviceCardContext ctx)
{
if (!a.HasInstrumentChains) { a.AddChain(-1); _ctx.RequestRebuild(); return; } // effect chain (no instrument)
var f = new MenuFlyout();
- var s = new MenuItem { Header = "Nota Synth" };
- s.Click += (_, _) => { a.AddChain(0); _ctx.RequestRebuild(); };
var p = new MenuItem { Header = "Nota Physical" };
p.Click += (_, _) => { a.AddChain(2); _ctx.RequestRebuild(); };
var w = new MenuItem { Header = "Nota Aurora" };
w.Click += (_, _) => { a.AddChain(5); _ctx.RequestRebuild(); };
var vo = new MenuItem { Header = "Nota Volt" };
vo.Click += (_, _) => { a.AddChain(6); _ctx.RequestRebuild(); };
- var ba = new MenuItem { Header = "Nota Bass" };
- ba.Click += (_, _) => { a.AddChain(7); _ctx.RequestRebuild(); };
var pe = new MenuItem { Header = "Nota Pendulum" };
pe.Click += (_, _) => { a.AddChain(8); _ctx.RequestRebuild(); };
var op = new MenuItem { Header = "Nota Operator" };
@@ -1486,7 +1482,7 @@ internal sealed partial class RackCardView(DeviceCardContext ctx)
co.Click += (_, _) => { a.AddChain(15); _ctx.RequestRebuild(); };
var ke = new MenuItem { Header = "Nota Keys" };
ke.Click += (_, _) => { a.AddChain(16); _ctx.RequestRebuild(); };
- f.Items.Add(s); f.Items.Add(p); f.Items.Add(w); f.Items.Add(vo); f.Items.Add(ba); f.Items.Add(pe); f.Items.Add(op); f.Items.Add(gr); f.Items.Add(fl); f.Items.Add(mo); f.Items.Add(pd); f.Items.Add(co); f.Items.Add(ke);
+ f.Items.Add(vo); f.Items.Add(p); f.Items.Add(w); f.Items.Add(pe); f.Items.Add(op); f.Items.Add(gr); f.Items.Add(fl); f.Items.Add(mo); f.Items.Add(pd); f.Items.Add(co); f.Items.Add(ke);
f.ShowAt(b, showAtPointer: true);
};
return b;
diff --git a/src/managed/Nota.App/MainWindow.Convert.cs b/src/managed/Nota.App/MainWindow.Convert.cs
index 700ff2ff..44e73880 100644
--- a/src/managed/Nota.App/MainWindow.Convert.cs
+++ b/src/managed/Nota.App/MainWindow.Convert.cs
@@ -144,7 +144,7 @@ public partial class MainWindow
}
// Convert Melody: YIN pitch per frame → median-smoothed MIDI pitch → note segmentation, onto a
- // new Nota Synth track. Monophonic MVP — best on clean single-note lines / vocals.
+ // new Nota Volt track. Monophonic MVP — best on clean single-note lines / vocals.
private async Task ConvertMelodyAsync(float[] mono, double sr, double startBeat, double clipBeats, IProgress<ProgressReport> prog)
{
const double minHz = 65, maxHz = 1100;
@@ -199,7 +199,7 @@ public partial class MainWindow
Flush(frames);
if (notes.Count == 0) { Status("No melody found."); return; }
- int t = Engine.AddInstrumentTrack(); // Nota Synth
+ int t = Engine.AddVoltSynthTrack(); // Nota Volt
int mc = Engine.AddMidiClip(t, startBeat, Math.Max(0.25, clipBeats));
Engine.SetClipNotes(t, mc, notes.ToArray());
Timeline.Refresh(); Timeline.Select(t, mc); ShowDevices(t); _session?.Refresh();
@@ -220,7 +220,7 @@ public partial class MainWindow
if (melody) heard = Transcription.Monophonic(heard);
var notes = Transcription.ToClipNotes(heard, mono.Length / sr, clipBeats);
if (notes.Length == 0) { Status($"No {what} found."); return; }
- int t = Engine.AddInstrumentTrack(); // Nota Synth
+ int t = Engine.AddVoltSynthTrack(); // Nota Volt
int mc = Engine.AddMidiClip(t, startBeat, Math.Max(0.25, clipBeats));
Engine.SetClipNotes(t, mc, notes);
Timeline.Refresh(); Timeline.Select(t, mc); ShowDevices(t); _session?.Refresh();
@@ -228,7 +228,7 @@ public partial class MainWindow
}
// Convert Harmony: harmonic-sum pitch estimation (AudioHarmony) → polyphonic note spans on a new
- // Nota Synth track. Approximate — best on sustained chords / pads.
+ // Nota Volt track. Approximate — best on sustained chords / pads.
private async Task ConvertHarmonyAsync(float[] mono, double sr, double startBeat, double clipBeats, IProgress<ProgressReport> prog)
{
prog.Report(ProgressReport.Indeterminate("Detecting harmony…"));
@@ -240,7 +240,7 @@ public partial class MainWindow
var notes = new List<NotaNote>(spans.Count);
foreach (var s in spans)
notes.Add(new NotaNote(s.Pitch, s.StartSample * toBeat, Math.Max(0.05, (s.EndSample - s.StartSample) * toBeat), s.Velocity));
- int t = Engine.AddInstrumentTrack(); // Nota Synth (polyphonic)
+ int t = Engine.AddVoltSynthTrack(); // Nota Volt (polyphonic)
int mc = Engine.AddMidiClip(t, startBeat, Math.Max(0.25, clipBeats));
Engine.SetClipNotes(t, mc, notes.ToArray());
Timeline.Refresh(); Timeline.Select(t, mc); ShowDevices(t); _session?.Refresh();
diff --git a/src/managed/Nota.App/MainWindow.MidiImport.cs b/src/managed/Nota.App/MainWindow.MidiImport.cs
index 2f3b5116..5add011a 100644
--- a/src/managed/Nota.App/MainWindow.MidiImport.cs
+++ b/src/managed/Nota.App/MainWindow.MidiImport.cs
@@ -84,7 +84,7 @@ public partial class MainWindow
t = Engine.AddRhythmTrack();
_kits.LoadInto(Engine, t, _kits.DefaultRhythmKit, out _);
}
- else t = Engine.AddInstrumentTrack();
+ else t = Engine.AddVoltSynthTrack();
if (t > 0 && name.Length > 0) Engine.SetTrackName(t, name);
return t;
}
diff --git a/src/managed/Nota.App/MainWindow.axaml.cs b/src/managed/Nota.App/MainWindow.axaml.cs
index 5b47609e..b25bf1b6 100644
--- a/src/managed/Nota.App/MainWindow.axaml.cs
+++ b/src/managed/Nota.App/MainWindow.axaml.cs
@@ -608,7 +608,7 @@ public partial class MainWindow : Window
Engine.BeginUndoGroup();
try
{
- trackId = kind == NewTrackKind.Instrument ? Engine.AddInstrumentTrack() : Engine.AddAudioTrack();
+ trackId = kind == NewTrackKind.Instrument ? Engine.AddVoltSynthTrack() : Engine.AddAudioTrack();
if (kind == NewTrackKind.Instrument) Engine.AddMidiClip(trackId, 0.0, 4.0);
Timeline.PlaceNewTrack(trackId, anchorTrackId);
}
diff --git a/src/managed/Nota.Application/Palette/BuiltinDeviceCatalog.cs b/src/managed/Nota.Application/Palette/BuiltinDeviceCatalog.cs
index ee8ddcbd..ae1e4552 100644
--- a/src/managed/Nota.Application/Palette/BuiltinDeviceCatalog.cs
+++ b/src/managed/Nota.Application/Palette/BuiltinDeviceCatalog.cs
@@ -43,21 +43,17 @@ public static class BuiltinDeviceCatalog
public static IReadOnlyList<BuiltinDevice> All { get; } = new BuiltinDevice[]
{
// ---- instruments ----------------------------------------------------------------------
- new("Nota Synth", I, 0, "subtractive synth", D("synth.subtractive", "poly va init basic",
- "clean bright", "pad bass lead keys pluck", "", "", "",
- "A straightforward subtractive polysynth: oscillators, a filter and envelopes.")),
new("Nota Physical", I, 2, "physical synth", D("synth.physical", "modal karplus string mallet",
"metallic glassy", "pluck bell keys strings perc", "", "", "cinematic",
"Physical modelling of struck, plucked and blown bodies.")),
new("Nota Aurora", I, 5, "wavetable synth", D("synth.wavetable", "wt serum",
"bright airy evolving lush", "pad lead texture", "", "", "edm cinematic",
"Wavetable synth with warping oscillators — evolving pads and modern leads.")),
- new("Nota Volt", I, 6, "analog synth", D("synth.subtractive", "moog analog poly",
- "warm vintage", "pad bass lead keys", "", "", "synthwave",
- "Warm analog-style polysynth for pads, basses and leads.")),
- new("Nota Bass", I, 7, "bass synth", D("synth.subtractive", "303 acid tb",
- "gritty", "bass", "", "", "techno acid house",
- "Mono bass synth with a squelchy filter — acid lines and techno basses.")),
+ // Nota Synth (kind 0) and Nota Bass (kind 7) folded into Volt (specs/026): their engines
+ // still load saved tracks, but new ones are Volts, so they are not offered here.
+ new("Nota Volt", I, 6, "analog synth", D("synth.subtractive", "moog analog poly va init basic supersaw 303 acid tb",
+ "warm vintage clean bright gritty", "pad bass lead keys pluck", "", "", "synthwave techno acid house",
+ "Two-oscillator analog-style synth with drive and a unison stack — pads, basses, acid lines and leads.")),
new("Nota Pendulum", I, 8, "arp synth", D("synth", "arpsynth sequencer",
"evolving bright", "seq pluck", "", "", "synthwave techno",
"A synth with a built-in pattern engine for arpeggios and sequences.")),
diff --git a/src/managed/Nota.Application/Palette/DeviceCategories.cs b/src/managed/Nota.Application/Palette/DeviceCategories.cs
index fc2bfd42..2790cc37 100644
--- a/src/managed/Nota.Application/Palette/DeviceCategories.cs
+++ b/src/managed/Nota.Application/Palette/DeviceCategories.cs
@@ -18,7 +18,7 @@ public static class DeviceCategories
private static readonly Category[] Instruments =
{
- new("Synths", ["Nota Synth", "Nota Volt", "Nota Bass", "Nota Monolith", "Nota Pentad", "Nota Consort",
+ new("Synths", ["Nota Volt", "Nota Monolith", "Nota Pentad", "Nota Consort",
"Nota Operator", "Nota Aurora", "Nota Flux", "Nota Pendulum"]),
new("Keys & physical", ["Nota Keys", "Nota Physical"]),
new("Drums", ["Nota Rhythm", "Nota Drum Rack"]),
diff --git a/src/managed/Nota.Infrastructure/Persistence/FactoryPresetCatalog.cs b/src/managed/Nota.Infrastructure/Persistence/FactoryPresetCatalog.cs
index 43010977..88f17c57 100644
--- a/src/managed/Nota.Infrastructure/Persistence/FactoryPresetCatalog.cs
+++ b/src/managed/Nota.Infrastructure/Persistence/FactoryPresetCatalog.cs
@@ -563,6 +563,11 @@ public sealed class FactoryPresetCatalog : IFactoryPresets
("decay", 0.35f), ("sustain", 0.35f), ("release", 0.12f),
("velamp", 0.7f), ("velfilter", 0.8f), ("glide", 0.0f), ("volume", 0.8f));
+ // ---- Nota Synth and Nota Bass live on in Volt (specs/026): every patch above, converted
+ // by VoltPort, filed into Volt's folders. The originals stay for the in-card picker of
+ // tracks saved with those instruments.
+ PortToVolt();
+
// ---- Nota Pendulum (kind 8) — generative keys, 28 patches. Balls 0 2 … 1 6 (quarter
// steps); Sync Free 0 / Sync 1; Division 0 1/1 · .25 1/2 · .5 1/4 · .75 1/8 · 1 1/16;
// Rate 0.5 = stop, <0.5 reverse; Motion 0 Linear/.33 Pendulum/.67 Ease/1 Bounce;
@@ -2830,6 +2835,39 @@ public sealed class FactoryPresetCatalog : IFactoryPresets
/// <summary>Files the presets that follow into a browser folder inside their device.</summary>
private void Section(string name) { _section = name; _sectionPending = true; }
+ // Volt folders for the ported patches, and new names where Volt already has one.
+ private static readonly Dictionary<string, string> PortFolder = new()
+ {
+ ["synth/Pads"] = "Pads", ["synth/Bass"] = "Bass", ["synth/Leads"] = "Leads",
+ ["synth/Keys & Plucks"] = "Keys & Plucks", ["synth/Bells & Mallets"] = "Bells & Mallets",
+ ["synth/Textures & FX"] = "Textures & FX",
+ ["bass/Sub"] = "Sub Bass", ["bass/Analog"] = "Analog Bass", ["bass/Acid"] = "Acid",
+ ["bass/Growl & Wobble"] = "Growl & Wobble", ["bass/Electric"] = "Electric Bass",
+ };
+ private static readonly Dictionary<string, string> PortName = new()
+ {
+ ["synth/Warm Pad"] = "Velvet Pad", ["synth/Glass Pad"] = "Crystal Pad", ["synth/Choir Pad"] = "Vox Pad",
+ ["synth/Rubber Bass"] = "Bouncy Bass", ["synth/Acid Bass"] = "Saw Acid", ["synth/Growl Bass"] = "Unison Growl",
+ ["synth/Bright Lead"] = "Bright Saw Lead", ["synth/Super Saw"] = "Super Saw 7", ["synth/Solo Lead"] = "Mono Lead",
+ ["synth/Soft Pluck"] = "Tri Pluck",
+ ["bass/Reese Bass"] = "Deep Reese", ["bass/Growl Bass"] = "Pulse Growl", ["bass/Wobble Bass"] = "LFO Wobble",
+ };
+
+ private void PortToVolt()
+ {
+ var sources = _all.Where(e => e.Info.IsInstrument && (e.Info.BuiltinKind == 0 || e.Info.BuiltinKind == 7)).ToList();
+ foreach (var (info, doc) in sources)
+ {
+ if (info.Category.Length == 0) continue; // Init: Volt has its own
+ string group = info.BuiltinKind == 0 ? "synth" : "bass";
+ string name = PortName.TryGetValue(group + "/" + info.DisplayName, out var n) ? n : info.DisplayName;
+ if (_byId.ContainsKey("volt/" + name))
+ throw new System.InvalidOperationException($"Ported preset name '{name}' is already a Volt preset.");
+ Section(PortFolder[group + "/" + info.Category]);
+ Inst("volt", 6, name, info.BuiltinKind == 0 ? VoltPort.FromSynth(doc.NamedParams!) : VoltPort.FromBass(doc.NamedParams!));
+ }
+ }
+
private void Add(string group, string name, string type, int kind, bool isInstrument, bool isMidi, (string Key, float Value)[] ps)
{
// A new device starts unfiled unless a Section was declared right before it.
diff --git a/src/managed/Nota.Infrastructure/Persistence/ProjectService.cs b/src/managed/Nota.Infrastructure/Persistence/ProjectService.cs
index f3f7e50b..db6a67ad 100644
--- a/src/managed/Nota.Infrastructure/Persistence/ProjectService.cs
+++ b/src/managed/Nota.Infrastructure/Persistence/ProjectService.cs
@@ -493,8 +493,8 @@ public sealed class ProjectService
: engine.AddSamplerTrack(ResolveInBundle(bundleDir, sd.Sample), sd.RootNote, sd.Loop);
if (id <= 0)
{
- warnings.Add($"Couldn't reload sampler \"{sd.Sample}\" — using an empty Synth track.");
- id = engine.AddInstrumentTrack();
+ warnings.Add($"Couldn't reload sampler \"{sd.Sample}\" — using an empty Volt track.");
+ id = engine.AddVoltSynthTrack();
}
else
{
@@ -525,8 +525,8 @@ public sealed class ProjectService
id = idx >= 0 ? engine.AddPluginInstrumentTrack(idx) : 0;
if (id <= 0)
{
- warnings.Add($"Plugin instrument \"{pid}\" isn't installed — using an empty Synth track.");
- id = engine.AddInstrumentTrack();
+ warnings.Add($"Plugin instrument \"{pid}\" isn't installed — using an empty Volt track.");
+ id = engine.AddVoltSynthTrack();
}
else if (t.Instrument.State is { } stateRel)
{
diff --git a/src/managed/Nota.Infrastructure/Persistence/ProjectTemplate.cs b/src/managed/Nota.Infrastructure/Persistence/ProjectTemplate.cs
index 79d22c9d..9352a8e0 100644
--- a/src/managed/Nota.Infrastructure/Persistence/ProjectTemplate.cs
+++ b/src/managed/Nota.Infrastructure/Persistence/ProjectTemplate.cs
@@ -20,8 +20,8 @@ public static class ProjectTemplate
/// the undo baseline. Returns the instrument track id.</summary>
public static int ApplyDefault(IAudioEngine engine)
{
- // Same as the toolbar's Add Instrument: Nota Synth with a seed one-bar clip.
- int inst = engine.AddInstrumentTrack();
+ // Same as the toolbar's Add Instrument: Nota Volt with a seed one-bar clip.
+ int inst = engine.AddVoltSynthTrack();
engine.AddMidiClip(inst, 0.0, 4.0);
engine.AddAudioTrack();
diff --git a/src/managed/Nota.Infrastructure/Persistence/VoltPort.cs b/src/managed/Nota.Infrastructure/Persistence/VoltPort.cs
new file mode 100644
index 00000000..c6f206d7
--- /dev/null
+++ b/src/managed/Nota.Infrastructure/Persistence/VoltPort.cs
@@ -0,0 +1,196 @@
+// SPDX-License-Identifier: AGPL-3.0-only
+// Copyright (c) 2026 Egor Khindikaynen (Nota). See LICENSES/ for license terms.
+//
+// Turns a Nota Synth (kind 0) or Nota Bass (kind 7) patch into the Nota Volt (kind 6) patch
+// that sounds like it (specs/026). Both are one-oscillator subsets of Volt's engine, so most
+// knobs carry straight over; the ones whose ranges differ (cutoff, envelope times, glide,
+// octave, resonance, loudness, LFO rate) are converted through their real units rather than
+// copied as numbers. A parameter a patch does not name takes its instrument's default first,
+// exactly as applying the preset would.
+
+using System;
+using System.Collections.Generic;
+
+namespace Nota.Infrastructure;
+
+internal static class VoltPort
+{
+ // Nota Synth's defaults (Synth.h constructor).
+ private static readonly Dictionary<string, float> SynthDefaults = new()
+ {
+ ["wave"] = 0f, ["attack"] = 0.02f, ["decay"] = 0.25f, ["sustain"] = 0.7f, ["release"] = 0.20f,
+ ["cutoff"] = 0.62f, ["resonance"] = 0.12f, ["gain"] = 0.80f, ["filtype"] = 1f / 3f, ["filenv"] = 0.5f,
+ ["pulsewidth"] = 0.5f, ["detune"] = 0.5f, ["octave"] = 0.5f, ["unison"] = 0f, ["spread"] = 0.35f,
+ ["glide"] = 0f, ["velamp"] = 1f, ["pan"] = 0.5f, ["voicemode"] = 0f,
+ };
+
+ // Nota Bass's defaults (BassSynth.h constructor).
+ private static readonly Dictionary<string, float> BassDefaults = new()
+ {
+ ["oscshape"] = 0.62f, ["oscpw"] = 0.5f, ["oscoctave"] = 0.5f, ["oscsemi"] = 0.5f, ["osclevel"] = 0.85f,
+ ["subwave"] = 0f, ["suboctave"] = 0f, ["sublevel"] = 0.7f,
+ ["filtype"] = 0f, ["filslope"] = 1f, ["filfreq"] = 0.4f, ["filreso"] = 0.22f, ["fildrive"] = 0.25f,
+ ["filenv"] = 0.72f, ["filkey"] = 0.35f, ["fillfo"] = 0.5f,
+ ["fattack"] = 0f, ["fdecay"] = 0.35f, ["fsustain"] = 0.15f, ["frelease"] = 0.25f,
+ ["attack"] = 0f, ["decay"] = 0.4f, ["sustain"] = 0.85f, ["release"] = 0.22f,
+ ["lforate"] = 0.35f, ["lfowave"] = 0f, ["lfopitch"] = 0.5f,
+ ["glide"] = 0.08f, ["unison"] = 0f, ["drive"] = 0.15f, ["volume"] = 0.85f,
+ ["velamp"] = 0.4f, ["velfilter"] = 0.35f, ["mono"] = 1f,
+ ["bend"] = 0.5f, ["bendrange"] = 1f / 11f, ["modwheel"] = 0f, ["outpan"] = 0.5f, ["legato"] = 0f,
+ };
+
+ // Volt's wave chips, by Volt's encoding.
+ private const float Saw = 0f, Square = 1f / 3f, Tri = 2f / 3f, Sine = 1f;
+
+ /// <summary>The Volt parameters (by id) for a Nota Synth patch.</summary>
+ public static (string Id, float Value)[] FromSynth(IReadOnlyDictionary<string, float> named)
+ {
+ var s = Merge(SynthDefaults, named);
+ var v = Base();
+
+ v["osc1wave"] = s["wave"]; // same encoding
+ v["osc1pw"] = s["pulsewidth"];
+ v["osc1octave"] = OctaveNorm(Steps(s["octave"], 4)); // Synth ±2 → Volt ±3
+
+ int uni = new[] { 1, 2, 4, 7 }[Math.Clamp((int)MathF.Round(s["unison"] * 3f, MidpointRounding.AwayFromZero), 0, 3)];
+ if (uni == 1)
+ {
+ v["osc1detune"] = s["detune"]; // a plain fine tune, ±50 c in both
+ v["unison"] = 0f;
+ }
+ else
+ {
+ v["univoices"] = uni switch { 2 => 1f / 3f, 4 => 2f / 3f, _ => 1f };
+ v["unison"] = Math.Abs(s["detune"] - 0.5f) * 2f; // the stack spans ±(unison × 50) c
+ v["unispread"] = s["spread"];
+ }
+
+ // Synth's one envelope moves both the level and the cutoff; Volt has one for each.
+ float a = s["attack"], d = Rescale(s["decay"], 0.002, 2.0, 0.002, 4.0), sus = s["sustain"], r = Rescale(s["release"], 0.002, 3.0, 0.002, 5.0);
+ v["attack"] = a; v["decay"] = d; v["sustain"] = sus; v["release"] = r;
+ v["fattack"] = a; v["fdecay"] = d; v["fsustain"] = sus; v["frelease"] = r;
+
+ int filType = (int)MathF.Round(s["filtype"] * 3f, MidpointRounding.AwayFromZero);
+ if (filType == 0)
+ {
+ // Off → the low-pass fully open, flat and still.
+ v["fil1type"] = 0f; v["fil1freq"] = 1f; v["fil1reso"] = 0f; v["fil1env"] = 0.5f;
+ }
+ else
+ {
+ v["fil1type"] = (filType - 1) / 3f; // LP / HP / BP
+ v["fil1freq"] = s["cutoff"]; // 20 Hz..18 kHz in both
+ v["fil1reso"] = Math.Clamp(s["resonance"] * 1.94f / 1.9f, 0f, 1f);
+ v["fil1env"] = s["filenv"];
+ }
+ v["fil1key"] = 0f;
+ v["velfilter"] = 0f;
+ v["velamp"] = s["velamp"];
+
+ int mode = (int)MathF.Round(s["voicemode"] * 2f, MidpointRounding.AwayFromZero);
+ v["mono"] = mode == 0 ? 0f : 1f;
+ v["legato"] = mode == 2 ? 1f : 0f;
+ // Synth slides only in Mono / Legato; its glide time is 0.5·g² seconds.
+ double g = s["glide"];
+ v["glide"] = mode == 0 || g <= 1e-4 ? 0f : GlideNorm(0.5 * g * g);
+
+ v["outpan"] = s["pan"];
+ v["volume"] = Math.Clamp(s["gain"] * 0.5f, 0f, 1f); // Synth's ×0.25 against Volt's ×0.5
+ return ToArray(v);
+ }
+
+ /// <summary>The Volt parameters (by id) for a Nota Bass patch.</summary>
+ public static (string Id, float Value)[] FromBass(IReadOnlyDictionary<string, float> named)
+ {
+ var b = Merge(BassDefaults, named);
+ var v = Base();
+
+ // Bass's continuous shape is a position along sine → tri → saw → pulse; Volt picks the
+ // wave below it and morphs toward the next by the rest.
+ float pos = Math.Clamp(b["oscshape"], 0f, 1f) * 3f;
+ int chip = Math.Min(3, (int)MathF.Floor(pos));
+ v["osc1wave"] = chip switch { 0 => Sine, 1 => Tri, 2 => Saw, _ => Square };
+ v["osc1shape"] = chip >= 3 ? 0f : pos - chip;
+ v["osc1pw"] = b["oscpw"];
+ v["osc1octave"] = OctaveNorm(Steps(b["oscoctave"], 4)); // Bass ±2 → Volt ±3
+ v["osc1semi"] = b["oscsemi"]; // ±12 in both
+ v["osc1level"] = b["osclevel"];
+
+ // The sub oscillator becomes Osc 2, one or two octaves under the note.
+ int subWave = Math.Clamp((int)MathF.Round(b["subwave"] * 2f, MidpointRounding.AwayFromZero), 0, 2);
+ v["osc2wave"] = subWave switch { 0 => Sine, 1 => Square, _ => Tri };
+ v["osc2octave"] = OctaveNorm(b["suboctave"] >= 0.5f ? -2 : -1);
+ v["osc2semi"] = 0.5f; v["osc2detune"] = 0.5f;
+ v["osc2level"] = b["sublevel"];
+
+ v["fil1type"] = b["filtype"]; // LP / HP / BP / Notch in both
+ v["fil1slope"] = b["filslope"];
+ v["fil1freq"] = (float)Math.Clamp(Math.Log(30.0 * Math.Pow(600.0, b["filfreq"]) / 20.0) / Math.Log(900.0), 0.0, 1.0);
+ v["fil1reso"] = b["filreso"]; // same k law
+ v["fil1env"] = b["filenv"]; v["fil1key"] = b["filkey"]; v["fil1lfo"] = b["fillfo"];
+ v["fildrive"] = b["fildrive"]; v["drive"] = b["drive"];
+ foreach (var k in new[] { "fattack", "fdecay", "fsustain", "frelease", "attack", "decay", "sustain", "release",
+ "velamp", "velfilter", "glide", "bendrange", "modwheel", "outpan" })
+ v[k] = b[k]; // same ranges
+
+ // LFO: 0.05..30 Hz → Volt's 0.05..20; Bass's saw has no Volt shape, triangle is nearest.
+ double hz = 0.05 * Math.Pow(600.0, b["lforate"]);
+ v["lfo1rate"] = (float)Math.Clamp(Math.Log(hz / 0.05) / Math.Log(400.0), 0.0, 1.0);
+ int lw = Math.Clamp((int)MathF.Round(b["lfowave"] * 4f, MidpointRounding.AwayFromZero), 0, 4);
+ v["lfo1shape"] = lw switch { 0 => 0f, 1 or 2 => 1f / 3f, 3 => 2f / 3f, _ => 1f };
+ if (Math.Abs(b["lfopitch"] - 0.5f) > 1e-4f)
+ {
+ // LFO → Pitch through the matrix: ±24 st × amount at full depth vs Bass's ±12.
+ v["lfo1depth"] = 1f;
+ v["mtx2_0"] = 0.5f + (b["lfopitch"] - 0.5f) * 0.5f;
+ }
+ v["wheellfo"] = 1f; // Bass's wheel always opens the LFO
+
+ v["unison"] = Math.Clamp(b["unison"] * 22f / 25f, 0f, 1f); // up to 22 c vs Volt's 25
+ v["mono"] = b["mono"] >= 0.5f ? 1f : 0f;
+ v["legato"] = b["legato"] >= 0.5f ? 1f : 0f;
+ v["volume"] = Math.Clamp(b["volume"] * MathF.Sqrt(2f), 0f, 1f); // Volt's amp pan sits 3 dB down at centre
+ return ToArray(v);
+ }
+
+ // The neutral Volt frame both ports start from: Osc 1 alone into Filter 1 → Amp 1, no
+ // Osc 2 / noise / Filter 2 / vibrato, nothing on velocity → cutoff unless set.
+ private static Dictionary<string, float> Base() => new()
+ {
+ ["osc1wave"] = Saw, ["osc1octave"] = 0.5f, ["osc1semi"] = 0.5f, ["osc1detune"] = 0.5f, ["osc1level"] = 1f, ["osc1route"] = 0f,
+ ["osc2level"] = 0f, ["osc2route"] = 0f, ["noise"] = 0f,
+ ["fil1lfo"] = 0.5f, ["fil1tof2"] = 0f,
+ ["amp1pan"] = 0.5f, ["amp1level"] = 1f, ["amp2level"] = 0f,
+ ["vibamt"] = 0f, ["unison"] = 0f,
+ };
+
+ private static Dictionary<string, float> Merge(Dictionary<string, float> defaults, IReadOnlyDictionary<string, float> named)
+ {
+ var m = new Dictionary<string, float>(defaults);
+ foreach (var (k, val) in named) m[k] = val;
+ return m;
+ }
+
+ private static (string, float)[] ToArray(Dictionary<string, float> v)
+ {
+ var a = new (string, float)[v.Count];
+ int i = 0;
+ foreach (var (k, val) in v) a[i++] = (k, Math.Clamp(val, 0f, 1f));
+ return a;
+ }
+
+ // A bipolar stepped knob (centre 0.5) spanning ±span/2 steps → its integer step.
+ private static int Steps(float norm, int span) => (int)MathF.Round((norm - 0.5f) * span, MidpointRounding.AwayFromZero);
+ private static float OctaveNorm(int octaves) => 0.5f + octaves / 6f; // Volt's ±3
+
+ // The same time in seconds on a different exponential range.
+ private static float Rescale(float v, double lo, double hi, double lo2, double hi2)
+ {
+ double t = lo * Math.Pow(hi / lo, v);
+ return (float)Math.Clamp(Math.Log(t / lo2) / Math.Log(hi2 / lo2), 0.0, 1.0);
+ }
+
+ // Volt's glide time is 0.005·120^g seconds; anything above zero must stay "on".
+ private static float GlideNorm(double seconds)
+ => (float)Math.Clamp(Math.Log(seconds / 0.005) / Math.Log(120.0), 0.002, 1.0);
+}
diff --git a/src/managed/Nota.Mcp/Tools/AiTools.cs b/src/managed/Nota.Mcp/Tools/AiTools.cs
index e17f0b6c..c39bd2c1 100644
--- a/src/managed/Nota.Mcp/Tools/AiTools.cs
+++ b/src/managed/Nota.Mcp/Tools/AiTools.cs
@@ -56,7 +56,7 @@ public sealed class AiTools(
public sealed record ConvertResult(int TrackId, int ClipIndex, int Notes);
[McpServerTool(Name = "convert_audio_to_midi"), Description(
- "Transcribe an audio clip into a MIDI clip on a new Nota Synth track, lined up with it, using the basic-pitch model. "
+ "Transcribe an audio clip into a MIDI clip on a new Nota Volt track, lined up with it, using the basic-pitch model. "
+ "'harmony' keeps every note (chords, polyphony); 'melody' keeps one line, the strongest note wherever notes overlap. "
+ "Velocities follow how loud each note is.")]
public async Task<ConvertResult> ConvertAudioToMidi(
@@ -86,7 +86,7 @@ public sealed class AiTools(
if (notes.Length == 0) throw new InvalidOperationException($"No {(melody ? "melody" : "notes")} found in that clip.");
return await Mutate(() =>
{
- int t = E.AddInstrumentTrack();
+ int t = E.AddVoltSynthTrack();
int mc = E.AddMidiClip(t, startBeat, Math.Max(0.25, clipBeats));
E.SetClipNotes(t, mc, notes);
return new ConvertResult(t, mc, notes.Length);
diff --git a/src/managed/Nota.Mcp/Tools/InstrumentTools.cs b/src/managed/Nota.Mcp/Tools/InstrumentTools.cs
index e29dee83..40ff45e5 100644
--- a/src/managed/Nota.Mcp/Tools/InstrumentTools.cs
+++ b/src/managed/Nota.Mcp/Tools/InstrumentTools.cs
@@ -13,11 +13,12 @@ namespace Nota.Mcp.Tools;
public sealed class InstrumentTools(IAudioEngine engine, IEngineDispatch dispatch, IArrangementRefresh refresh)
: EngineTools(engine, dispatch, refresh)
{
- // Built-in instrument kinds (matches the engine's kind() ids + browser mapping).
+ // Built-in instrument kinds (matches the engine's kind() ids + browser mapping). Nota Synth (0)
+ // and Nota Bass (7) folded into Volt (specs/026): not listed, still accepted by add_instrument_track.
private static readonly (int Kind, string Name)[] Kinds =
{
- (0, "Nota Synth"), (1, "Nota Sampler"), (2, "Nota Physical"), (3, "Instrument Rack"),
- (4, "Drum Rack"), (5, "Nota Aurora"), (6, "Nota Volt"), (7, "Nota Bass"),
+ (1, "Nota Sampler"), (2, "Nota Physical"), (3, "Instrument Rack"),
+ (4, "Drum Rack"), (5, "Nota Aurora"), (6, "Nota Volt"),
(8, "Nota Pendulum"), (9, "Nota Operator"), (10, "Nota Grain"), (11, "Nota Flux"),
(12, "Nota Rhythm"), (13, "Nota Monolith"), (14, "Nota Pentad"), (15, "Nota Consort"),
(16, "Nota Keys"), (17, "Nota Mosaic"),
@@ -30,8 +31,10 @@ public sealed class InstrumentTools(IAudioEngine engine, IEngineDispatch dispatc
public InstrumentKind[] ListInstrumentKinds() => Array.ConvertAll(Kinds, k => new InstrumentKind(k.Kind, k.Name));
[McpServerTool(Name = "add_instrument_track"), Description("Add an instrument track with the given built-in kind (see list_instrument_kinds). Returns the track id.")]
- public Task<int> AddInstrumentTrack([Description("Instrument kind id (0..17)")] int kind) => Mutate(() => kind switch
+ public Task<int> AddInstrumentTrack([Description("Instrument kind id from list_instrument_kinds")] int kind) => Mutate(() => kind switch
{
+ 0 => E.AddInstrumentTrack(), // legacy Nota Synth
+
1 => E.AddSamplerInstrumentTrack(),
2 => E.AddPhysicalSynthTrack(),
3 => E.AddInstrumentRackTrack(),
@@ -49,7 +52,7 @@ public sealed class InstrumentTools(IAudioEngine engine, IEngineDispatch dispatc
15 => E.AddConsortTrack(),
16 => E.AddKeysTrack(),
17 => E.AddMosaicTrack(),
- _ => E.AddInstrumentTrack(), // 0 = Nota Synth
+ _ => E.AddVoltSynthTrack(), // the default instrument
});
[McpServerTool(Name = "get_instrument_params"), Description("List the track instrument's parameters (index, stable id, name, normalized value 0..1).")]
diff --git a/src/managed/Nota.Mcp/Tools/RackTools.cs b/src/managed/Nota.Mcp/Tools/RackTools.cs
index 5daf767f..c4063b4e 100644
--- a/src/managed/Nota.Mcp/Tools/RackTools.cs
+++ b/src/managed/Nota.Mcp/Tools/RackTools.cs
@@ -45,7 +45,7 @@ public sealed class RackTools(IAudioEngine engine, IEngineDispatch dispatch, IAr
// ---- chains -----------------------------------------------------------
[McpServerTool(Name = "add_rack_chain"), Description("Add a parallel chain to the rack with the given built-in instrument kind. Returns the chain index.")]
- public Task<int> AddRackChain(int trackId, [Description("Instrument kind id, e.g. 0=Synth, 2=Physical, 6=Volt")] int instrumentKind)
+ public Task<int> AddRackChain(int trackId, [Description("Instrument kind id, e.g. 6=Volt, 2=Physical, 5=Aurora")] int instrumentKind)
=> Mutate(() => E.RackAddChain(trackId, instrumentKind));
[McpServerTool(Name = "remove_rack_chain"), Description("Remove a chain from the rack by index.")]
diff --git a/src/native/nota.engine/include/nota/nota_engine.h b/src/native/nota.engine/include/nota/nota_engine.h
index 0c8a6e8c..335223d5 100644
--- a/src/native/nota.engine/include/nota/nota_engine.h
+++ b/src/native/nota.engine/include/nota/nota_engine.h
@@ -1480,7 +1480,7 @@ NOTA_API int32_t nota_fx_selftest(void);
* plus 8 macros. It lives on an instrument track; the calls below address into
* it by (track_id, chain, dev, param). Rack-internal edits publish the rack's own
* snapshot (thread-safe) and are outside engine undo in v1. Chain instruments are
- * built-in (kind 0=Synth, 2=Physical); chain devices are built-in (0..4). Chain
+ * built-in (kind 6=Volt by default, 2=Physical, …); chain devices are built-in (0..4). Chain
* instrument params ride the normalized 0..1 plugin-param surface; chain device
* params are native floats in [min,max]. Boolean queries return 1/0. */
NOTA_API int32_t nota_engine_add_instrument_rack_track(NotaEngine* engine);
diff --git a/src/native/nota.engine/src/Engine_Rack.cpp b/src/native/nota.engine/src/Engine_Rack.cpp
index e765e82b..612f106b 100644
--- a/src/native/nota.engine/src/Engine_Rack.cpp
+++ b/src/native/nota.engine/src/Engine_Rack.cpp
@@ -70,7 +70,7 @@ int32_t Engine::addInstrumentRackTrack() {
auto track = std::make_shared<Track>(id, TrackType::Instrument);
auto rack = std::make_shared<RackInstrument>();
rack->setSampleRate(transport_.sampleRate());
- rack->addChain(0); // one default Nota Synth chain
+ rack->addChain(6); // one default Nota Volt chain (specs/026)
track->instrument = rack;
g->tracks.push_back(track);
publish(g);
diff --git a/src/native/nota.engine/src/VoltSynth.h b/src/native/nota.engine/src/VoltSynth.h
index dd5ae940..bed1f3fa 100644
--- a/src/native/nota.engine/src/VoltSynth.h
+++ b/src/native/nota.engine/src/VoltSynth.h
@@ -26,6 +26,14 @@
// (1..12 semitones) and a mod wheel that is both a matrix source and, when the patch
// asks for it, the hand on the vibrato.
//
+// Appended in v6 so Volt covers what Nota Bass and Nota Synth did (specs/026): a Shape knob
+// per oscillator that morphs the chosen wave toward the next one (sine → triangle → saw →
+// square), pulse width for the square, a drive before the filters and one on the output,
+// a unison stack of 2 / 4 / 7 copies per oscillator spread across the stereo field (the
+// filters then run per channel), a Poly / Mono / Legato voice mode with a held-note stack,
+// and Wheel → LFO, which lets the mod wheel open each filter's LFO onto its cutoff. All of
+// them default to neutral, so a patch saved before renders exactly as it did.
+//
// All parameters ride the Instrument plugin-param interface (normalized 0..1, stable
// ids) → automation / persist / clone for free. Header-only; allocation-free after
// construction. A per-sample loop keeps modulation smooth; filter coefficients update
@@ -85,8 +93,12 @@ public:
// ---- appended (v5, almanac rework): the two performance wheels ----
ExtraBase = MacroBase + kMacros * 3, // 130
Bend = ExtraBase, BendRange, VibWheel, // 130,131,132
- kNumParams // 133
+ // ---- appended (v6, specs/026: what Nota Bass and Nota Synth had) ----
+ Osc1Shape, Osc2Shape, Osc1Pw, Osc2Pw, // 133..136
+ FilDrive, Drive, UniVoices, UniSpread, Legato, WheelLfo, // 137..142
+ kNumParams // 143
};
+ static constexpr int kV6Base = Osc1Shape;
static int matrixIdx(int s, int d) { return MatrixBase + s * kDests + d; }
static int macroIdx(int m, int field) { return MacroBase + m * 3 + field; } // field: 0 val, 1 dest, 2 amt
@@ -115,6 +127,13 @@ public:
set(Bend, 0.5f); // centred
set(BendRange, 1.0f / 11.0f); // ±2 semitones
set(VibWheel, 0.0f); // vibrato at its own depth, not the wheel's
+ set(Osc1Shape, 0.0f); set(Osc2Shape, 0.0f); // the wave chip as it is
+ set(Osc1Pw, 0.5f); set(Osc2Pw, 0.5f); // a plain square
+ set(FilDrive, 0.0f); set(Drive, 0.0f); // clean
+ set(UniVoices, 0.0f); // 1: one detuned partner (the Unison knob)
+ set(UniSpread, 0.35f);
+ set(Legato, 1.0f); // Mono slides, as Volt's mono always did
+ set(WheelLfo, 0.0f);
}
int32_t kind() const override { return 6; }
@@ -167,7 +186,12 @@ public:
return std::string(ids[i]);
}
if (i < MacroBase) { int j = i - MatrixBase; return "mtx" + std::to_string(j / kDests) + "_" + std::to_string(j % kDests); }
- if (i >= ExtraBase) { static const char* ex[] = { "bend", "bendrange", "vibwheel" }; return std::string(ex[i - ExtraBase]); }
+ if (i >= ExtraBase) {
+ static const char* ex[] = { "bend", "bendrange", "vibwheel",
+ "osc1shape", "osc2shape", "osc1pw", "osc2pw",
+ "fildrive", "drive", "univoices", "unispread", "legato", "wheellfo" };
+ return std::string(ex[i - ExtraBase]);
+ }
int j = i - MacroBase, m = j / 3, f = j % 3;
return "mac" + std::to_string(m) + (f == 0 ? "val" : f == 1 ? "dest" : "amt");
}
@@ -195,7 +219,12 @@ public:
static const char* srcNm[] = { "Amp Env", "Flt Env", "LFO 1", "LFO 2", "Velocity", "Key", "Mod Whl" };
static const char* dstNm[] = { "Pitch", "Osc2 Pitch", "Cutoff", "Reso", "Level", "Pan" };
if (i < MacroBase) { int j = i - MatrixBase; return std::string(srcNm[j / kDests]) + " → " + dstNm[j % kDests]; }
- if (i >= ExtraBase) { static const char* exNm[] = { "Pitch Bend", "Bend Range", "Vibrato → Wheel" }; return std::string(exNm[i - ExtraBase]); }
+ if (i >= ExtraBase) {
+ static const char* exNm[] = { "Pitch Bend", "Bend Range", "Vibrato → Wheel",
+ "Osc1 Shape", "Osc2 Shape", "Osc1 Pulse Width", "Osc2 Pulse Width",
+ "Filter Drive", "Drive", "Unison Voices", "Unison Spread", "Legato", "Wheel → LFO" };
+ return std::string(exNm[i - ExtraBase]);
+ }
int j = i - MacroBase, m = j / 3, f = j % 3;
return "Macro " + std::to_string(m + 1) + (f == 0 ? "" : f == 1 ? " Dest" : " Amount");
}
@@ -239,17 +268,22 @@ public:
const bool mono = get(MonoMode) > 0.5f;
const bool glideOn = pn_[Glide].load(std::memory_order_relaxed) > 0.001f;
+ const bool hadHeld = heldCount_ > 0; // another key already down → an overlap
+ pushHeld(pitch);
if (mono) {
Voice* v = &voices_[0];
- const bool legato = v->active && v->aStage != Stage::Off;
+ // Legato slides only over a key that is still held, on a voice still sounding; a
+ // note struck on a releasing voice is a fresh attack (before, it faded out).
+ const bool sounding = v->active && v->aStage != Stage::Release && v->aStage != Stage::Off;
+ const bool legato = get(Legato) >= 0.5f && hadHeld && sounding;
v->pitch = pitch;
+ v->ktOct = (pitch - 60) / 12.0;
v->freqTarget = 440.0 * std::pow(2.0, (pitch - 69) / 12.0);
resetExpr(*v);
if (!legato) { v->freqCur = (glideOn && lastFreq_ > 0.0) ? lastFreq_ : v->freqTarget; startVoice(*v, pitch, velocity); }
else if (!glideOn) v->freqCur = v->freqTarget; // legato, no glide: jump pitch, keep envelopes
v->active = true;
lastFreq_ = v->freqTarget;
- heldPitch_ = pitch;
return;
}
@@ -263,12 +297,28 @@ public:
lastFreq_ = v->freqTarget;
}
void noteOff(int32_t pitch) override {
+ const bool wasHeld = popHeld(pitch);
+ if (get(MonoMode) > 0.5f && wasHeld) {
+ Voice& v = voices_[0];
+ if (heldCount_ == 0) {
+ if (v.active && v.aStage != Stage::Release) { v.aStage = Stage::Release; v.fStage = Stage::Release; }
+ return;
+ }
+ // Back to the newest key still down — no new attack, it's one phrase.
+ const int32_t top = held_[heldCount_ - 1];
+ if (top != v.pitch) {
+ v.pitch = top; v.ktOct = (top - 60) / 12.0;
+ v.freqTarget = 440.0 * std::pow(2.0, (top - 69) / 12.0);
+ lastFreq_ = v.freqTarget;
+ }
+ return;
+ }
for (auto& v : voices_)
if (v.active && v.pitch == pitch && v.aStage != Stage::Release) {
v.aStage = Stage::Release; v.fStage = Stage::Release;
}
}
- void allNotesOff() override { gexpr_.reset(); for (auto& v : voices_) v.active = false; }
+ void allNotesOff() override { heldCount_ = 0; gexpr_.reset(); for (auto& v : voices_) v.active = false; }
void render(float* out, int32_t frames) override {
// ---- macros first: six of the twelve destinations move the block snapshot
@@ -336,8 +386,30 @@ public:
// "By the wheel": the vibrato depth the patch dials becomes the wheel's ceiling.
const double vibCents = get(VibAmt) * 50.0 * (get(VibWheel) > 0.5f ? (double)modWheel : 1.0);
const double uni = get(Unison);
+ const double wheelLfo = get(WheelLfo) * modWheel * 2.0; // the mod wheel opens the LFOs onto the cutoffs
const double uniDet = std::exp2(uni * 25.0 / 1200.0); // side-osc detune (up to ~25 cents)
const float uniLvl = (float)(uni * 0.9);
+ // v6: per-oscillator shape morph and pulse width, the two drives, the unison stack.
+ const double shp1 = get(Osc1Shape), shp2 = get(Osc2Shape);
+ const double pw1 = pwOf(Osc1Pw), pw2 = pwOf(Osc2Pw);
+ const double fDrv = 1.0 + get(FilDrive) * 11.0; // 1..12, before both filters
+ const bool fDrive = fDrv > 1.001;
+ const double fDrvNorm = fDrive ? 1.0 / std::tanh(fDrv) : 1.0;
+ const double oDrv = 1.0 + get(Drive) * 7.0; // 1..8, on the output
+ const bool oDrive = oDrv > 1.001;
+ const double oDrvNorm = oDrive ? 1.0 / std::tanh(oDrv) : 1.0;
+ const int nUni = uniCount();
+ const double spread = get(UniSpread);
+ const bool stereo = nUni > 1 && spread > 0.001; // copies panned apart → a filter per side
+ double uDet[kMaxStack], uL[kMaxStack], uR[kMaxStack];
+ for (int u = 0; u < nUni; ++u) {
+ // The stack spreads across ±(Unison × 50) cents; a centred copy stays at unity gain.
+ const double t = nUni == 1 ? 0.0 : 2.0 * u / (nUni - 1) - 1.0;
+ uDet[u] = std::exp2(uni * 50.0 * t / 1200.0);
+ const double p = t * spread;
+ uL[u] = std::sqrt(1.0 - p); uR[u] = std::sqrt(1.0 + p);
+ }
+ const double uNorm = 1.0 / std::sqrt((double)nUni);
const double glide = get(Glide);
const double glideCoef = glide > 0.001 ? (1.0 - std::exp(-1.0 / (expMap(glide, 0.005, 0.6) * sampleRate_))) : 1.0;
const float velAmp = get(VelAmp), velFilt = get(VelFilter);
@@ -406,18 +478,45 @@ public:
m1 *= pm; m2 *= pm * std::exp2(dst[1] * 2.0);
}
- const double i1 = base * m1, i1u = i1 * uniDet;
- const double i2 = base * m2, i2u = i2 * uniDet;
- double s1 = (oscBlep(w1, v.ph1, i1) + oscBlep(w1, v.ph1u, i1u) * uniLvl);
- double s2 = (oscBlep(w2, v.ph2, i2) + oscBlep(w2, v.ph2u, i2u) * uniLvl);
- s1 *= lvl1 / (1.0 + uniLvl); s2 *= lvl2 / (1.0 + uniLvl);
- v.ph1 += i1; if (v.ph1 >= 1.0) v.ph1 -= 1.0;
- v.ph1u += i1u; if (v.ph1u >= 1.0) v.ph1u -= 1.0;
- v.ph2 += i2; if (v.ph2 >= 1.0) v.ph2 -= 1.0;
- v.ph2u += i2u; if (v.ph2u >= 1.0) v.ph2u -= 1.0;
+ const double i1 = base * m1, i2 = base * m2;
+ double s1, s2, s1r = 0.0, s2r = 0.0; // left (or mono) and right
+ if (nUni == 1) {
+ // One detuned partner per oscillator, scaled by the Unison knob.
+ const double i1u = i1 * uniDet, i2u = i2 * uniDet;
+ s1 = (osc(w1, shp1, pw1, v.ph1, i1) + osc(w1, shp1, pw1, v.ph1u, i1u) * uniLvl);
+ s2 = (osc(w2, shp2, pw2, v.ph2, i2) + osc(w2, shp2, pw2, v.ph2u, i2u) * uniLvl);
+ s1 *= lvl1 / (1.0 + uniLvl); s2 *= lvl2 / (1.0 + uniLvl);
+ v.ph1 += i1; if (v.ph1 >= 1.0) v.ph1 -= 1.0;
+ v.ph1u += i1u; if (v.ph1u >= 1.0) v.ph1u -= 1.0;
+ v.ph2 += i2; if (v.ph2 >= 1.0) v.ph2 -= 1.0;
+ v.ph2u += i2u; if (v.ph2u >= 1.0) v.ph2u -= 1.0;
+ } else {
+ // A stack of nUni copies per oscillator, detuned across ±cents, panned by Spread.
+ double aL = 0.0, aR = 0.0, bL = 0.0, bR = 0.0;
+ for (int u = 0; u < nUni; ++u) {
+ const double d1 = i1 * uDet[u], d2 = i2 * uDet[u];
+ const double x1 = osc(w1, shp1, pw1, v.st1[u], d1);
+ const double x2 = osc(w2, shp2, pw2, v.st2[u], d2);
+ v.st1[u] += d1; if (v.st1[u] >= 1.0) v.st1[u] -= 1.0;
+ v.st2[u] += d2; if (v.st2[u] >= 1.0) v.st2[u] -= 1.0;
+ aL += x1 * uL[u]; aR += x1 * uR[u];
+ bL += x2 * uL[u]; bR += x2 * uR[u];
+ }
+ s1 = aL * uNorm * lvl1; s1r = aR * uNorm * lvl1;
+ s2 = bL * uNorm * lvl2; s2r = bR * uNorm * lvl2;
+ }
double in1 = s1 * (1.0 - r1) + s2 * (1.0 - r2) + nz * (1.0 - rn);
double in2 = s1 * r1 + s2 * r2 + nz * rn;
+ double in1r = 0.0, in2r = 0.0;
+ if (stereo) {
+ in1r = s1r * (1.0 - r1) + s2r * (1.0 - r2) + nz * (1.0 - rn);
+ in2r = s1r * r1 + s2r * r2 + nz * rn;
+ }
+ if (fDrive) {
+ in1 = std::tanh(in1 * fDrv) * fDrvNorm; in2 = std::tanh(in2 * fDrv) * fDrvNorm;
+ if (stereo) { in1r = std::tanh(in1r * fDrv) * fDrvNorm; in2r = std::tanh(in2r * fDrv) * fDrvNorm; }
+ }
// Control-rate filter coefficients (cutoff = base × 2^mod, incl. matrix).
if (v.modCount-- <= 0) {
@@ -425,8 +524,8 @@ public:
const double velF = 1.0f - velFilt + velFilt * v.vel;
const double cutMod = dst[2] * 4.0 // matrix Cutoff (±4 oct)
+ v.ex.slide() * 2.0 + v.ex.pressure() * 2.0; // MPE
- double o1 = f1Env * 4.0 * v.fEnv * velF + f1Key * v.ktOct + f1Lfo * 2.0 * lfo1 + cutMod;
- double o2 = f2Env * 4.0 * v.fEnv * velF + f2Key * v.ktOct + f2Lfo * 2.0 * lfo2 + cutMod;
+ double o1 = f1Env * 4.0 * v.fEnv * velF + f1Key * v.ktOct + (f1Lfo * 2.0 + wheelLfo) * lfo1 + cutMod;
+ double o2 = f2Env * 4.0 * v.fEnv * velF + f2Key * v.ktOct + (f2Lfo * 2.0 + wheelLfo) * lfo2 + cutMod;
const double k1 = resoToK(reso1 + dst[3]);
const double k2 = resoToK(reso2 + dst[3]);
v.k1 = k1; v.k2 = k2;
@@ -438,13 +537,22 @@ public:
in2 += o1 * toF2;
double o2 = svf(v.s2, v.f2a1, v.f2a2, v.f2a3, v.k2, in2, t2);
if (slope2) o2 = svf(v.s2b, v.f2a1, v.f2a2, v.f2a3, v.k2, o2, t2);
+ double o1r = o1, o2r = o2;
+ if (stereo) {
+ o1r = svf(v.s1R, v.f1a1, v.f1a2, v.f1a3, v.k1, in1r, t1);
+ if (slope1) o1r = svf(v.s1bR, v.f1a1, v.f1a2, v.f1a3, v.k1, o1r, t1);
+ in2r += o1r * toF2;
+ o2r = svf(v.s2R, v.f2a1, v.f2a2, v.f2a3, v.k2, in2r, t2);
+ if (slope2) o2r = svf(v.s2bR, v.f2a1, v.f2a2, v.f2a3, v.k2, o2r, t2);
+ }
float ampG = v.aEnv * (1.0f - velAmp + velAmp * v.vel) * (1.0f + 0.5f * v.ex.pressure());
if (lvlMod) ampG *= (float)std::clamp(1.0 + dst[4], 0.0, 4.0);
const float a1 = (float)o1 * l1 * ampG;
const float a2 = (float)o2 * l2 * ampG;
float vL = a1 * p1L + a2 * p2L;
- float vR = a1 * p1R + a2 * p2R;
+ float vR = stereo ? (float)o1r * l1 * ampG * p1R + (float)o2r * l2 * ampG * p2R
+ : a1 * p1R + a2 * p2R;
if (panMod) {
const float pm = (float)std::clamp(dst[5], -1.0, 1.0); // linear balance atop static pan
vL *= pm <= 0.0f ? 1.0f : 1.0f - pm;
@@ -452,6 +560,11 @@ public:
}
outL += vL; outR += vR;
}
+ if (oDrive) {
+ // Bass's output saturation, measured against a centred voice (amp pan −3 dB).
+ outL = (float)(std::tanh(outL * kSqrt2 * oDrv) * oDrvNorm / kSqrt2);
+ outR = (float)(std::tanh(outR * kSqrt2 * oDrv) * oDrvNorm / kSqrt2);
+ }
const float mL = outL * volume * 0.5f, mR = outR * volume * 0.5f;
out[i * 2] += mL * opL * kSqrt2;
out[i * 2 + 1] += mR * opR * kSqrt2;
@@ -464,6 +577,7 @@ private:
static constexpr double kTwoPi = 6.283185307179586;
static constexpr float kSqrt2 = 1.41421356f; // restore unity for centred out-pan
+ static constexpr int kMaxStack = 7; // unison voices: 1 / 2 / 4 / 7
enum class Stage { Attack, Decay, Sustain, Release, Off };
struct Voice {
bool active = false;
@@ -474,6 +588,9 @@ private:
Stage aStage = Stage::Attack, fStage = Stage::Attack;
double s1[2] = {0, 0}, s2[2] = {0, 0}; // SVF integrator state (ic1, ic2)
double s1b[2] = {0, 0}, s2b[2] = {0, 0}; // 2nd stage for 24 dB slope
+ double s1R[2] = {0, 0}, s2R[2] = {0, 0}; // right-channel filters, for a spread stack
+ double s1bR[2] = {0, 0}, s2bR[2] = {0, 0};
+ double st1[kMaxStack] = {}, st2[kMaxStack] = {}; // unison stack phases
double f1a1 = 0, f1a2 = 0, f1a3 = 0, f2a1 = 0, f2a2 = 0, f2a3 = 0;
double k1 = 1.0, k2 = 1.0;
int32_t modCount = 0;
@@ -495,6 +612,9 @@ private:
int waveOf(Param p) const { return std::clamp((int)std::lround(get(p) * 3.0f), 0, 3); }
int filtTypeOf(Param p) const { return std::clamp((int)std::lround(get(p) * 3.0f), 0, 3); }
int shapeOf(Param p) const { return std::clamp((int)std::lround(get(p) * 3.0f), 0, 3); }
+ int uniCount() const { static constexpr int n[4] = { 1, 2, 4, 7 }; return n[std::clamp((int)std::lround(get(UniVoices) * 3.0f), 0, 3)]; }
+ // Pulse width 5..95 %; the centre is exactly 50 % so a plain square renders as before.
+ double pwOf(Param p) const { const float v = get(p); return v == 0.5f ? 0.5 : 0.05 + 0.9 * v; }
static int macroDestOf(float v) { return std::clamp((int)std::lround(v * (kMacroDests - 1)), 0, kMacroDests - 1); }
static bool amActive(const int* d, int n, int dest) { for (int k = 0; k < n; ++k) if (d[k] == dest) return true; return false; }
static double resoToK(double reso) { return std::clamp(2.0 - 1.9 * std::clamp(reso, 0.0, 1.0), 0.05, 2.0); }
@@ -511,6 +631,9 @@ private:
v.f1a1 = v.f1a2 = 0.0; v.f2a1 = v.f2a2 = 0.0;
for (double& z : v.s1) z = 0.0; for (double& z : v.s2) z = 0.0;
for (double& z : v.s1b) z = 0.0; for (double& z : v.s2b) z = 0.0;
+ for (double& z : v.s1R) z = 0.0; for (double& z : v.s2R) z = 0.0;
+ for (double& z : v.s1bR) z = 0.0; for (double& z : v.s2bR) z = 0.0;
+ for (int u = 0; u < kMaxStack; ++u) { v.st1[u] = wrap(v.ph1 + u * 0.13); v.st2[u] = wrap(v.ph2 + u * 0.13); }
v.modCount = 0;
}
// 0 = free running (leave previous phase); >0 = retrigger to that start phase.
@@ -571,12 +694,23 @@ private:
return (float)(1.0 / (expMap(t, 0.01, 5.0) * sampleRate_));
}
- static double oscBlep(int wave, double ph, double dt) {
+ // Wave chip (0 saw, 1 square, 2 tri, 3 sine) with Shape blending it toward the next wave
+ // in sine → triangle → saw → square order; Shape 0 is the chip itself.
+ static double osc(int wave, double shape, double pw, double ph, double dt) {
+ if (shape <= 0.0) return oscBlep(wave, ph, dt, pw);
+ static constexpr int kPos[4] = { 2, 3, 1, 0 }; // chip → morph position
+ static constexpr int kWave[4] = { 3, 2, 0, 1 }; // morph position → chip
+ const double s = std::min(3.0, kPos[wave] + shape);
+ const int a = std::min(2, (int)s);
+ const double f = s - a;
+ return oscBlep(kWave[a], ph, dt, pw) * (1.0 - f) + oscBlep(kWave[a + 1], ph, dt, pw) * f;
+ }
+ static double oscBlep(int wave, double ph, double dt, double pw) {
switch (wave) {
- case 1: { // square
- double s = ph < 0.5 ? 1.0 : -1.0;
+ case 1: { // square, pulse width pw
+ double s = ph < pw ? 1.0 : -1.0;
s += polyBlep(ph, dt);
- double p2 = ph + 0.5; if (p2 >= 1.0) p2 -= 1.0;
+ double p2 = ph + (1.0 - pw); if (p2 >= 1.0) p2 -= 1.0;
return s - polyBlep(p2, dt);
}
case 2: return 4.0 * std::fabs(ph - 0.5) - 1.0; // triangle
@@ -607,6 +741,20 @@ private:
return std::exp2(o + s / 12.0 + c / 1200.0);
}
+ void pushHeld(int32_t pitch) {
+ popHeld(pitch);
+ if (heldCount_ == 16) { std::memmove(held_, held_ + 1, 15 * sizeof(int32_t)); --heldCount_; }
+ held_[heldCount_++] = pitch;
+ }
+ bool popHeld(int32_t pitch) {
+ for (int k = heldCount_ - 1; k >= 0; --k)
+ if (held_[k] == pitch) {
+ std::memmove(held_ + k, held_ + k + 1, (heldCount_ - 1 - k) * sizeof(int32_t));
+ --heldCount_;
+ return true;
+ }
+ return false;
+ }
Voice* findFreeVoice() {
for (auto& v : voices_) if (!v.active) return &v;
Voice* q = &voices_[0];
@@ -624,7 +772,8 @@ private:
double lfoPhase1_ = 0.0, lfoPhase2_ = 0.0, vibPhase_ = 0.0;
float lfoSh1_ = 0.0f, lfoSh2_ = 0.0f; // sample & hold values
double lastFreq_ = 0.0; // portamento reference
- int32_t heldPitch_ = -1; // mono last-note
+ int32_t held_[16] = {}; // keys down, oldest first (mono falls back through them)
+ int heldCount_ = 0;
float nlp_ = 0.0f; // noise color one-pole state
uint32_t rng_ = 0x9E3779B9u;
std::atomic<int32_t> activeVoices_{0};
diff --git a/tests/Nota.SmokeTest/BrowserCategoryTests.cs b/tests/Nota.SmokeTest/BrowserCategoryTests.cs
index 454e7760..e97aac2b 100644
--- a/tests/Nota.SmokeTest/BrowserCategoryTests.cs
+++ b/tests/Nota.SmokeTest/BrowserCategoryTests.cs
@@ -52,7 +52,7 @@ internal static class BrowserCategoryTests
// Picks are per tab, and a pick keeps "Group by source"'s header.
vm.SetCategoryFilter(1, "Reverb & delay");
- yield return (vm.CategoryFilter(1) == "Reverb & delay" && vm.CategoryFilter(0) == "" && Devices(vm.Instruments).Count == 18,
+ yield return (vm.CategoryFilter(1) == "Reverb & delay" && vm.CategoryFilter(0) == "" && Devices(vm.Instruments).Count == 16,
"a pick narrows only its own tab");
yield return (vm.Effects.Select(r => r.Name).SequenceEqual(new[] { "BUILT-IN", "Nota Chamber", "Nota Delay", "Nota Reverb" }),
$"Reverb & delay lists Chamber, Delay, Reverb ({string.Join(", ", vm.Effects.Select(r => r.Name))})");
@@ -75,7 +75,7 @@ internal static class BrowserCategoryTests
// Expanding a device while a chip is picked shows its presets beneath it (FR-007).
vm.SetCategoryFilter(1, "");
vm.SetCategoryFilter(0, "Synths");
- var synth = vm.Instruments.First(r => r.Name == "Nota Synth");
+ var synth = vm.Instruments.First(r => r.Name == "Nota Volt");
vm.ToggleExpand(synth);
int si = vm.Instruments.IndexOf(synth);
yield return (si >= 0 && si + 1 < vm.Instruments.Count && vm.Instruments[si + 1].Depth > 0, "expanding a device under a chip lists its presets");
diff --git a/tests/Nota.SmokeTest/DesignTokenCheck.Browser.cs b/tests/Nota.SmokeTest/DesignTokenCheck.Browser.cs
index 50796aa5..8292c639 100644
--- a/tests/Nota.SmokeTest/DesignTokenCheck.Browser.cs
+++ b/tests/Nota.SmokeTest/DesignTokenCheck.Browser.cs
@@ -16,7 +16,7 @@ internal static partial class DesignTokenCheck
var types = new[] { BuiltinDeviceType.Instrument, BuiltinDeviceType.AudioEffect, BuiltinDeviceType.MidiEffect };
var expected = new Dictionary<BuiltinDeviceType, int>
{
- [BuiltinDeviceType.Instrument] = 18, [BuiltinDeviceType.AudioEffect] = 26, [BuiltinDeviceType.MidiEffect] = 6,
+ [BuiltinDeviceType.Instrument] = 16, [BuiltinDeviceType.AudioEffect] = 26, [BuiltinDeviceType.MidiEffect] = 6,
};
foreach (var type in types)
{
diff --git a/tests/Nota.SmokeTest/DesignTokenCheck.cs b/tests/Nota.SmokeTest/DesignTokenCheck.cs
index d9275473..7926d84a 100644
--- a/tests/Nota.SmokeTest/DesignTokenCheck.cs
+++ b/tests/Nota.SmokeTest/DesignTokenCheck.cs
@@ -407,8 +407,9 @@ internal static partial class DesignTokenCheck
// Physical instruments keep their wider layouts. (Plug-ins are S 260 / L 700.) The
// generic instrument card is an "Open GUI" stub, 170 wide since before it joined the
// shared shell (spec 012).
+ // Volt grew to 790 when it absorbed Nota Synth and Nota Bass (specs/026).
var exempt = new HashSet<string> { "GenericParamDeviceBody.cs", "GenericMidiBody.cs",
- "BassInstrumentCard.cs", "PhysicalInstrumentCard.cs", "GenericInstrumentCard.cs" };
+ "BassInstrumentCard.cs", "PhysicalInstrumentCard.cs", "GenericInstrumentCard.cs", "VoltInstrumentCard.cs" };
var off = Files(Path.Combine(app, "DeviceCards"), "*.cs", SearchOption.AllDirectories)
.Where(f => !exempt.Contains(Path.GetFileName(f)))
.SelectMany(f => Regex.Matches(File.ReadAllText(f), @"public double (?:Card)?Width => (?<w>[0-9]+);")
diff --git a/tests/Nota.SmokeTest/PaletteTests.cs b/tests/Nota.SmokeTest/PaletteTests.cs
index 95aebcd9..3c29d822 100644
--- a/tests/Nota.SmokeTest/PaletteTests.cs
+++ b/tests/Nota.SmokeTest/PaletteTests.cs
@@ -84,7 +84,7 @@ internal static class PaletteTests
// aliases / slang
("verb", "Nota Reverb"), ("ott", "Nota Prism"), ("echo", "Nota Delay"), ("autotune", "Nota Auto Shift"),
("de-esser", "De-Esser"), ("deesser", "Nota Dynamic EQ-8"), ("limiter", "Nota Ceiling"), ("bitcrusher", "Nota Crush"),
- ("arpeggiator", "Nota Arp"), ("303", "Nota Bass"), ("wavetable", "Nota Aurora"), ("fm", "Nota Operator"), ("granular", "Nota Grain"),
+ ("arpeggiator", "Nota Arp"), ("303", "Nota Volt"), ("wavetable", "Nota Aurora"), ("fm", "Nota Operator"), ("granular", "Nota Grain"),
// typos (CP-10)
("reverv", "Nota Reverb"), ("compresor", "Nota Compressor"), ("dealy", "Nota Delay"), ("chorsu", "Nota Chorus"),
// wrong layout (CP-10)
diff --git a/tests/Nota.SmokeTest/Program.cs b/tests/Nota.SmokeTest/Program.cs
index 93cdaba7..5fb6598b 100644
--- a/tests/Nota.SmokeTest/Program.cs
+++ b/tests/Nota.SmokeTest/Program.cs
@@ -2029,7 +2029,7 @@ Console.WriteLine("-- Nota Volt --");
Check(ve.DeviceName(t, -1) == "Nota Volt", $"instrument is Nota Volt (got '{ve.DeviceName(t, -1)}')");
int pc = ve.PluginParamCount(t, -1);
- Check(pc == 133, $"Nota Volt exposes 133 params (got {pc})");
+ Check(pc == 143, $"Nota Volt exposes 143 params (got {pc})");
int cut = -1; bool idsOk = true;
for (int i = 0; i < pc; i++)
{
@@ -2044,7 +2044,7 @@ Console.WriteLine("-- Nota Volt --");
// State round-trips to another track (project save/load path).
ve.PluginParamSet(t, -1, cut, 0.88f);
var state = ve.GetPluginState(t, -1);
- Check(state.Length >= 133 * 4, $"volt state serialized ({state.Length} bytes)");
+ Check(state.Length >= 143 * 4, $"volt state serialized ({state.Length} bytes)");
int t2 = ve.AddVoltSynthTrack();
ve.SetPluginState(t2, -1, state);
Check(Math.Abs(ve.PluginParamGet(t2, -1, cut) - 0.88f) < 1e-4, "volt state restores params on another track");
@@ -2184,13 +2184,90 @@ Console.WriteLine("-- Nota Volt --");
Check(louder > neutral * 1.1f, $"an old macro pointing at Level still lands there ({neutral:F3} → {louder:F3})");
}
- // Factory presets: 25 ship, every named param is a real Volt id, each applies in place.
+ // v6 (specs/026): what Nota Synth and Nota Bass had. Each control changes the sound and
+ // stays finite; a spread unison stack is stereo; Mono falls back to a held key; a note
+ // struck on a releasing mono voice retriggers.
+ Check(new[] { "osc1shape", "osc2shape", "osc1pw", "osc2pw", "fildrive", "drive", "univoices", "unispread", "legato", "wheellfo" }.All(id => IdOf(id) >= 0),
+ "v6 params present (shape / pw / drives / unison voices + spread / legato / wheel → LFO)");
+ {
+ float[] RenderV6(NotaNote[] notes, int frames, params (string Id, float Value)[] ps)
+ {
+ using var e6 = new NotaEngine();
+ e6.SetBpm(120); e6.SetTimeSignature(4, 4);
+ int t6 = e6.AddVoltSynthTrack();
+ foreach (var (id, value) in ps)
+ for (int i = 0; i < e6.PluginParamCount(t6, -1); i++)
+ if (e6.PluginParamId(t6, -1, i) == id) e6.PluginParamSet(t6, -1, i, value);
+ e6.AddMidiClip(t6, 0.0, 4.0);
+ e6.SetClipNotes(t6, 0, notes);
+ var b = new float[frames * 2];
+ e6.Seek(0.0); e6.Play(); e6.RenderOffline(b, frames); e6.StopTransport();
+ return b;
+ }
+ var one = new[] { new NotaNote(48, 0.0, 2.0, 0.9f) };
+ float[] R6(params (string Id, float Value)[] ps) => RenderV6(one, 8192, ps);
+ bool Finite(float[] b) { foreach (var x in b) if (!float.IsFinite(x) || Math.Abs(x) > 8f) return false; return true; }
+ float D6(float[] a, float[] b) { float d = 0; for (int i = 0; i < a.Length; i++) d += Math.Abs(a[i] - b[i]); return d / a.Length; }
+ var basis = R6();
+ Check(D6(basis, R6(("osc1shape", 0f), ("osc1pw", 0.5f), ("fildrive", 0f), ("drive", 0f), ("univoices", 0f), ("wheellfo", 0f))) < 1e-9f,
+ "v6 controls at their defaults leave a patch exactly as it was");
+ foreach (var (what, ps) in new (string, (string, float)[])[]
+ {
+ ("Shape", new[] { ("osc1shape", 0.5f) }),
+ ("Pulse Width", new[] { ("osc1wave", 1f / 3f), ("osc2wave", 1f / 3f), ("osc1pw", 0.15f), ("osc2pw", 0.15f) }),
+ ("Filter Drive", new[] { ("fildrive", 1f) }),
+ ("Drive", new[] { ("drive", 1f) }),
+ ("Unison 7", new[] { ("univoices", 1f), ("unison", 0.6f) }),
+ ("Wheel → LFO", new[] { ("wheellfo", 1f), ("modwheel", 1f), ("lfo1rate", 0.8f) }),
+ })
+ {
+ var b = R6(ps);
+ Check(Finite(b) && Rms(b, 8192) > 0.001f && D6(basis, b) > 1e-4f, $"Volt {what} changes the sound and stays finite (RMS {Rms(b, 8192):F3})");
+ }
+ float Side(float[] b) { double s2 = 0; for (int i = 0; i < b.Length; i += 2) { double d = b[i] - b[i + 1]; s2 += d * d; } return (float)Math.Sqrt(s2 / (b.Length / 2)); }
+ Check(Side(basis) < 1e-6f && Side(R6(("univoices", 1f), ("unison", 0.6f), ("unispread", 1f))) > 1e-3f,
+ "a spread unison stack is stereo (filters per side); one voice stays mono");
+ Check(Side(R6(("univoices", 1f), ("unison", 0.6f), ("unispread", 0f))) < 1e-6f, "a stack with no spread stays mono");
+
+ // Mono note stack: C3 held, G3 pressed then released → back to C3, still sounding.
+ int Cross(float[] b, int from, int to) { int c = 0; for (int i = from * 2 + 2; i < to * 2; i += 2) if ((b[i - 2] < 0) != (b[i] < 0)) c++; return c; }
+ var mono = new (string, float)[] { ("mono", 1f), ("legato", 1f), ("osc2level", 0f), ("osc1wave", 1f), ("fil1freq", 1f), ("sustain", 1f), ("unison", 0f) };
+ var held = RenderV6(new[] { new NotaNote(48, 0.0, 3.0, 0.9f), new NotaNote(55, 0.5, 0.5, 0.9f) }, 44100, mono);
+ var alone = RenderV6(new[] { new NotaNote(48, 0.0, 3.0, 0.9f) }, 44100, mono);
+ int heldX = Cross(held, 30000, 44000), aloneX = Cross(alone, 30000, 44000);
+ Check(Math.Abs(heldX - aloneX) <= 2 && Rms(held, 44100) > 0.01f, $"Mono falls back to the key still held ({heldX} vs {aloneX} crossings)");
+ // A note struck while the voice is only releasing comes back to full level.
+ var rel = RenderV6(new[] { new NotaNote(48, 0.0, 0.5, 0.9f), new NotaNote(50, 0.75, 1.5, 0.9f) }, 44100,
+ ("mono", 1f), ("legato", 1f), ("attack", 0f), ("sustain", 1f), ("release", 0.7f));
+ float late = 0; for (int i = 36000; i < 44100; i++) late += rel[i * 2] * rel[i * 2];
+ late = MathF.Sqrt(late / 8100);
+ Check(late > 0.01f, $"a mono note on a releasing voice retriggers (late RMS {late:F3})");
+ }
+
+ // Factory presets: Volt's own 25 plus the 49 Nota Synth and Nota Bass patches ported into it;
+ // every named param is a real Volt id, each applies in place, and every port plays.
{
var voltIds = new System.Collections.Generic.HashSet<string>();
for (int i = 0; i < pc; i++) voltIds.Add(ve.PluginParamId(t, -1, i));
var cat = new FactoryPresetCatalog();
var mine = cat.All().Where(p => p.IsInstrument && p.BuiltinKind == 6).ToList();
- Check(mine.Count == 25, $"Nota Volt ships 25 factory presets (got {mine.Count})");
+ Check(mine.Count == 25 + 24 + 25, $"Nota Volt ships 74 factory presets (got {mine.Count})");
+ int ported = cat.All().Count(p => p.IsInstrument && p.BuiltinKind is 0 or 7 && p.Category.Length > 0);
+ Check(ported == 24 + 25, $"every filed Synth / Bass preset has a Volt port ({ported})");
+ var silent = new List<string>();
+ foreach (var p in mine.Skip(25))
+ {
+ using var pe = new NotaEngine();
+ pe.SetBpm(120); pe.SetTimeSignature(4, 4);
+ int tp6 = pe.AddVoltSynthTrack();
+ cat.ApplyInPlace(pe, p.Id, tp6, -1);
+ pe.AddMidiClip(tp6, 0.0, 4.0);
+ pe.SetClipNotes(tp6, 0, new[] { new NotaNote(48, 0.0, 3.0, 0.9f), new NotaNote(55, 0.0, 3.0, 0.9f) });
+ var pb = new float[22050 * 2];
+ pe.Seek(0.0); pe.Play(); pe.RenderOffline(pb, 22050); pe.StopTransport();
+ if (pb.Any(x => !float.IsFinite(x) || Math.Abs(x) > 8f) || Rms(pb, 22050) < 0.002f) silent.Add($"{p.DisplayName} ({Rms(pb, 22050):F4})");
+ }
+ Check(silent.Count == 0, $"every ported preset plays{(silent.Count > 0 ? " — silent or clipping: " + string.Join(", ", silent) : "")}");
var bad = mine.SelectMany(p => cat.Document(p.Id)!.NamedParams!.Keys.Where(k => !voltIds.Contains(k)).Select(k => $"{p.DisplayName}:{k}")).ToList();
Check(bad.Count == 0, $"every Volt preset param id exists{(bad.Count > 0 ? " — bad: " + string.Join(", ", bad) : "")}");
int tp = ve.AddVoltSynthTrack();
@@ -9474,7 +9551,7 @@ Console.WriteLine("-- Instrument Rack: C ABI + persistence --");
int rt = re.AddInstrumentRackTrack();
Check(rt > 0, "rack track created");
Check(re.RackChainCount(rt) == 1, "rack starts with one chain");
- Check(re.RackChainInstrumentKind(rt, 0) == 0, "default chain hosts Nota Synth");
+ Check(re.RackChainInstrumentKind(rt, 0) == 6, "default chain hosts Nota Volt");
int c2 = re.RackAddChain(rt, 2); // Nota Physical
Check(c2 == 1 && re.RackChainCount(rt) == 2, "second chain added");
@@ -14748,12 +14825,12 @@ Console.WriteLine("-- background audio import --");
"instrument, effect and MIDI presets carry their category; Init stays unfiled");
var bvm = new Nota.Presentation.BrowserViewModel(new EmptyPluginCatalog(), new EmptyPresetLibrary(), fcat);
- var synth = bvm.Instruments.First(i => i.Name == "Nota Synth");
- Check(synth.Children[0] is { Name: "Init Saw", Kind: Nota.Presentation.BrowserItemKind.Preset, Depth: 1 }
+ var synth = bvm.Instruments.First(i => i.Name == "Nota Sampler");
+ Check(synth.Children[0] is { Name: "Init", Kind: Nota.Presentation.BrowserItemKind.Preset, Depth: 1 }
&& synth.Children.Skip(1).All(c => c.Kind == Nota.Presentation.BrowserItemKind.Folder && c.Depth == 1),
"a device holds its Init loose on top, then category folders");
var pads = synth.Children.First(c => c.Name == "Pads");
- Check(pads.Children.Any(p => p.Name == "Warm Pad" && p.Depth == 2 && p.Path == "factory:synth/Warm Pad"),
+ Check(pads.Children.Any(p => p.Name == "Warm Pad" && p.Depth == 2 && p.Path == "factory:sampler/Warm Pad"),
"a folder holds its presets one level deeper, still applying by factory id");
bvm.ToggleExpand(synth);
@@ -14761,10 +14838,10 @@ Console.WriteLine("-- background audio import --");
Check(bvm.Instruments.Contains(pads) && !bvm.Instruments.Any(i => i.Name == "Warm Pad"),
"expanding a device shows its folders, not the presets inside them");
bvm.ToggleExpand(pads);
- Check(bvm.Instruments.Any(i => i.Path == "factory:synth/Warm Pad") && bvm.Instruments.IndexOf(pads) > at,
+ Check(bvm.Instruments.Any(i => i.Path == "factory:sampler/Warm Pad") && bvm.Instruments.IndexOf(pads) > at,
"expanding a folder reveals its presets");
bvm.ToggleExpand(pads);
- Check(!bvm.Instruments.Any(i => i.Path == "factory:synth/Warm Pad"), "…and collapsing hides them again");
+ Check(!bvm.Instruments.Any(i => i.Path == "factory:sampler/Warm Pad"), "…and collapsing hides them again");
bvm.FilterTree(0, "Glacier");
Check(bvm.Instruments.Select(i => i.Name).SequenceEqual(new[] { "BUILT-IN", "Nota Aurora", "Pads", "Glacier Pad" }),
diff --git a/tests/Nota.SmokeTest/ProjectTemplateTests.cs b/tests/Nota.SmokeTest/ProjectTemplateTests.cs
index 01eb70a9..b34b9f95 100644
--- a/tests/Nota.SmokeTest/ProjectTemplateTests.cs
+++ b/tests/Nota.SmokeTest/ProjectTemplateTests.cs
@@ -65,7 +65,7 @@ internal static class ProjectTemplateTests
if (tracks.Count != 2 || returns.Count != 2) yield break;
var inst = tracks[0];
var audio = tracks[1];
- yield return (inst.IsInstrument && eng.TrackInstrumentKind(inst.Id) == 0, $"{tag}: track 1 is an instrument with Nota Synth");
+ yield return (inst.IsInstrument && eng.TrackInstrumentKind(inst.Id) == 6, $"{tag}: track 1 is an instrument with Nota Volt");
yield return (inst.ClipCount == 1 && eng.TryGetClipInfo(inst.Id, 0, out var c)
&& c.IsMidi && c.StartBeat == 0.0 && c.LengthBeats == 4.0,
$"{tag}: the instrument has the seed 1-bar MIDI clip");