Nota — a free DAW for macOS, Windows and Linux. No subscription, no account — just open it and make music.
description: "Tasks for Return & Master track levels"
Tasks: Return & Master Track Levels
Input: Design documents from /specs/005-return-master-meters/
Prerequisites: plan.md, spec.md, research.md, data-model.md, contracts/ui-footer-row.md, quickstart.md
Tests: The spec does not ask for TDD and the engine is untouched (no smoke-test extension). Verification is the headless Avalonia harness from quickstart.md, run per story checkpoint and in the final phase.
Organization: Tasks are grouped by user story. Almost all code lives in
src/managed/Nota.App/ArrangementView.cs, so tasks inside it are sequential; the
MixerView and MainWindow changes can run in parallel with them.
Format: [ID] [P?] [Story] Description
- [P]: Can run in parallel (different files, no dependencies)
- [Story]: Which user story this task belongs to (US1–US4)
Phase 1: Setup
No setup: no new project, file, dependency or tool. Skipped.
Phase 2: Foundational (Blocking Prerequisites)
Purpose: The footer row's new skeleton and the master-volume plumbing every story builds on.
- T001 In
src/managed/Nota.App/ArrangementView.cs, extract the track header's dB formatting (ShowDbinBuildTrackCard, and the duplicate inUpdateMeters) into oneprivate static string VolumeDbText(double v)returning"−∞"whenv <= 0.0011, elseAudioMath.LinToDb(v).ToString("0.0", NotaNum.Culture); use it in both places (note:UpdateMeterscurrently formats withoutNotaNum.Culture— the helper fixes that) - T002 In
src/managed/Nota.App/ArrangementView.cs, add footer-only state next to_meters/_volFaders/_volDb:_footerMeters : Dictionary<int, MeterBar>,_footerFaders : Dictionary<int, MiniFader>,_footerDb : Dictionary<int, TextBlock>, and_masterRowMeter : MeterBar?,_masterRowFader : MiniFader?,_masterRowDb : TextBlock?; clear/null all of them at the top ofRebuildFooterHeaders()(never in the track-header rebuild that clears_meters) - T003 In
src/managed/Nota.App/ArrangementView.cs, add public callbackspublic Func<float>? GetMasterVolume { get; set; }andpublic Action<float>? SetMasterVolume { get; set; }(same shape asSessionView.Mixer.cs), with a one-line comment thatTransportViewModel.MasterVolumeowns the master volume - T004 [P] In
src/managed/Nota.App/MainWindow.axaml.cs, next to the otherTimeline.*hooks (~line 189), wireTimeline.GetMasterVolume = () => (float)vm.Transport.MasterVolume;andTimeline.SetMasterVolume = v => vm.Transport.MasterVolume = v; - T005 In
src/managed/Nota.App/ArrangementView.cs, restructureBuildSlimRow(title, sub, colorIndex, trackId, bgKey, masterSpine)per contracts/ui-footer-row.md: keep the 3 px spine, card sizeHeaderW × FooterRowH(40), background, selection, right-click menu andSelecton press; replace the singleGridrow with aDockPanelwhose right dock is a slot for the meter and whose content is a two-lineGrid(row 0: name*withTextTrimming = CharacterEllipsis+ dBTextBlockMono 9,Brush.TextTertiary, Width 30, right-aligned; row 1: a slot for the fader), content padding 8,4. Return the parts the callers fill (e.g. an out record with the dock panel, the dBTextBlockand the fader slot). Remove the constantmasterSpine ? "0.0" : "−∞"
Checkpoint: The footer renders as before but with the two-line layout and empty slots; app builds.
Phase 3: User Story 1 — See the return and master levels while playing (Priority: P1) 🎯 MVP
Goal: Live meters on every Return row and on the Master row.
Independent Test: Play with a send raised to a return; the return and master row meters move and match the Mixer strips; a muted return stays empty.
- T006 [US1] In
ArrangementView.RebuildFooterHeaders()(src/managed/Nota.App/ArrangementView.cs), for each return createnew MeterBar { VerticalAlignment = VerticalAlignment.Stretch, Width = 8, Margin = new Thickness(0, 6, 3, 6) }— exactly the track header meter — dock it right in the row and register it in_footerMeters[r.Id]; for the master row create the same and store it in_masterRowMeter - T007 [US1] In
ArrangementView.UpdateMeters()(src/managed/Nota.App/ArrangementView.cs), push readings: for each_footerMetersentryeng.TryGetTrackMeter(id, out var m) ? bar.Push(m) : bar.Reset();_masterRowMeter?.Push(eng.MasterMeter())(NOTTryGetTrackMeter(MasterTrackId)— that is the master effect-chain track whose meter is never written, research R2) - T008 [US1] Headless check per quickstart.md: footer meters exist for each return + master,
UpdateMeterspushes non-zero engine readings into them during playback (or with synthetic readings where audio can't be pumped), muted return → empty
Checkpoint: MVP — meters live on Return and Master rows.
Phase 4: User Story 2 — The dB number tells the truth (Priority: P1)
Goal: The number on Return/Master rows shows the row's real volume in dB and follows every change.
Independent Test: Default return reads 0.0; changing return/master volume from the Mixer, MST or MCP updates the number; silence reads −∞.
- T009 [US2] In
ArrangementView.RebuildFooterHeaders(), set each return's dB text fromr.Volume(TrackVM.Volume, already filled inRefresh) viaVolumeDbText, and register it in_footerDb[r.Id]; set the master's fromGetMasterVolume?.Invoke() ?? 1fand store it in_masterRowDb - T010 [US2] In
ArrangementView.UpdateMeters(), inside the existingfor (i < eng.TrackCount)loop, also refresh_footerDb[ti.Id]fromti.Volume(when changed by > 1e-3 from the last shown value); after the loop refresh_masterRowDbfromGetMasterVolume()— this covers Mixer, MST, MCP, Remote, return automation and project load - T011 [US2] Headless check: default template returns read
0.0;engine.SetTrackVolume(returnId, 0.5f)+UpdateMeters()→-6.0;vm.Transport.MasterVolume = 0.0→ master−∞
Checkpoint: Return/Master numbers are truthful (the bug half is fixed).
Phase 5: User Story 4 — Adjust return and master volume in place (Priority: P2)
Goal: Mini volume faders on Return/Master rows; master volume has one owner everywhere (FR-006, FR-007).
Independent Test: Drag a return fader → return volume + Mixer change; drag the master fader → MST follows; Mixer master change survives save/reload.
- T012 [US4] In
ArrangementView.RebuildFooterHeaders(), put aMiniFader(volume) { VerticalAlignment = VerticalAlignment.Center, Default = 1.0 }in each row's fader slot. Return:ValueChanged += v => { _engine?.SetTrackVolume(id, (float)v); db.Text = VolumeDbText(v); }, register in_footerFaders[r.Id]. Master: initialGetMasterVolume?.Invoke() ?? 1f,ValueChanged += v => { SetMasterVolume?.Invoke((float)v); db.Text = VolumeDbText(v); }, store in_masterRowFader. NoBeginAutomationWrite/EndAutomationWrite(spec FR-006).MiniFadermarks its press handled, so the card's select-on-press doesn't rebuild the row mid-drag — keep it that way - T013 [US4] In
ArrangementView.UpdateMeters(), sync faders like the track headers do:_footerFaders[ti.Id]fromti.Volumewhen!f.Dragging && |f.Value − ti.Volume| > 1e-3(return automation, Mixer, MCP);_masterRowFaderfromGetMasterVolume()under the same rule; update the paired dB text withVolumeDbText(merge with T010 so each value is formatted once) - T014 [P] [US4] In
src/managed/Nota.App/MixerView.cs, addGetMasterVolume/SetMasterVolumecallbacks, remove the private_masterVolume; the master strip'sFaderRow(-1, …)starts fromGetMasterVolume?.Invoke() ?? 1f,SetVolumeforid < 0callsSetMasterVolume?.Invoke((float)v)(no direct_engine.SetMasterVolume); inUpdateMeters()sync the master fader + dB fromGetMasterVolume()when not dragging (keep a reference to the master fader/dBTextBlockfromFaderRow) - T015 [P] [US4] In
src/managed/Nota.App/MainWindow.axaml.cs, at_mixer = new MixerView(vm.Engine) { … }(~line 369) setGetMasterVolume = () => (float)vm.Transport.MasterVolume, SetMasterVolume = v => vm.Transport.MasterVolume = v(depends on T014) - T016 [US4] Headless check (synthetic pointer drags, memory recipe): return fader drag changes engine return volume and the dB text; master fader drag changes
vm.Transport.MasterVolumeand the MST read-out; double-click resets to0.0; Mixer master change → save → load → Master row, MST and Mixer show the saved value
Checkpoint: Faders work; master volume is one value across Mixer, MST and the Master row.
Phase 6: User Story 3 — Return and Master rows look like track rows (Priority: P2)
Goal: Visual consistency with track headers in both themes.
Independent Test: Side-by-side screenshots of a return row and a track header in Ember Graphite and Ember Paper.
- T017 [US3] Headless screenshots of the arrangement footer + one track header in Ember Graphite and Ember Paper (
NotaThemeService.Set(AppTheme.Light)by reflection); check againstDESIGN.md§ meters and contracts/ui-footer-row.md: row height 40, meter 28 px tall at the right, name trims before dB/meter shrink, selected row keeps a visible working meter; adjust paddings/margins inBuildSlimRow(src/managed/Nota.App/ArrangementView.cs) if anything clips - T018 [US3] Edge cases from spec: add a third return, delete the first, rename/recolour a return, select rows repeatedly — each remaining row's meter/fader addresses its own return; project with no returns shows only a metering Master row; no exceptions in the log
Checkpoint: All four stories done.
Phase 7: Polish & Cross-Cutting Concerns
- T019 Run the full quickstart.md table once more on the final code
- T020 Remove every temporary harness hook /
// TEMP-VERIFYline from the repo (harness itself lives under/tmp)
Nota closing tasks (PR gates)
- T021 Run
scripts/build.shuntil native + managed + smoke test are green - T022 AGPL-3.0-only SPDX header on every new source file — N/A (no new source files)
- T023 New dependency — N/A
- T024
CHANGELOG.md[Unreleased]: Added — level meter and volume fader on Return and Master rows in the arrangement; Fixed — Return rows always showed −∞ and Master 0.0; Fixed — master volume set in the Mixer started at 0 dB, was not saved and did not show in the transport - T025 FEATURES.md via the
nota-featuresskill; user docs (arrangement page, Return/Master rows; EN + RU) vianota-docs; shortcuts — N/A (no new bindings) - T026 Engine behaviour change → smoke test — N/A (engine untouched)
Dependencies & Execution Order
- Foundational (T001–T005) blocks all stories. T004 is [P] (different file).
- US1 (T006–T008) needs T002, T005.
- US2 (T009–T011) needs T001, T002, T003, T005; independent of US1.
- US4 (T012–T016) needs T003–T005 and US2's read-out (T009/T010 — the fader writes the same dB text). T014 → T015.
- US3 (T017–T018) needs US1 + US2 + US4 rendered (it checks the finished row).
- Polish (T019–T026) last.
Story order: US1 → US2 → US4 → US3 (US3 is a check of the finished row, so it moves after US4).
Parallel Opportunities
- T004 (
MainWindow.axaml.cs) alongside T001–T003/T005 (ArrangementView.cs). - T014 (
MixerView.cs) alongside T012–T013 (ArrangementView.cs); T015 follows T014. - Everything else touches
ArrangementView.cs→ sequential.
Parallel Example: User Story 4
Task: "T012–T013 footer faders in src/managed/Nota.App/ArrangementView.cs"
Task: "T014 master volume callbacks in src/managed/Nota.App/MixerView.cs"
Implementation Strategy
- Foundational → US1 (meters) → validate: MVP, the visible gap is closed.
- US2 → the wrong numbers are gone (the bug half of the request).
- US4 → faders + the Mixer master-volume fix.
- US3 → visual pass in both themes, edge cases.
- Polish + closing gates.
Notes
- Out of scope (plan § Out of Scope): pan on these rows, automation write, live automated master volume, MIDI-learn master-volume bypass.
- Don't commit — the user reviews and commits.