-
Notifications
You must be signed in to change notification settings - Fork 4
feat(editor): master mix strip (mute/solo/fader) in the Tracks pane #308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| /* | ||
| * Tracks-pane strip visibility (src/track-session.js _trackRowShowsStripPure). | ||
| * | ||
| * The master mix row now shows the same inline M/S/fader strip as every other | ||
| * strip-keyed row — its old deliberate carve-out (mixer-drawer-only) is gone. | ||
| * Pinned here so the master can't silently lose its pane mute again, and so | ||
| * folders (no strip key) can't grow one. | ||
| * | ||
| * Run: node tests/track_strip_master.test.mjs | ||
| */ | ||
| import assert from 'node:assert'; | ||
|
|
||
| const { | ||
| _trackRowShowsStripPure, | ||
| _trackSessionNormalizePure, | ||
| _trackSessionRowsPure, | ||
| } = await import('../src/track-session.js'); | ||
|
|
||
| let pass = 0, fail = 0; | ||
| function t(name, fn) { | ||
| try { fn(); pass++; console.log(' ok ' + name); } | ||
| catch (e) { fail++; console.error(' FAIL ' + name + ': ' + e.message); } | ||
| } | ||
|
|
||
| const sources = [ | ||
| { id: 'master', name: 'Full Mix', kind: 'master', url: '/full.ogg' }, | ||
| { id: 'Guitar_L', name: 'Guitar_L', kind: 'stem', url: '/s1.ogg' }, | ||
| ]; | ||
| const arrangements = [{ name: 'Lead' }]; | ||
| const drumTab = { name: 'Drums', hits: [{ t: 0 }] }; | ||
|
|
||
| t('the MASTER row shows the strip — the old carve-out is gone', () => { | ||
| const model = _trackSessionNormalizePure(null, sources, arrangements, drumTab); | ||
| const { rows } = _trackSessionRowsPure(model, sources, arrangements, drumTab, {}); | ||
| const master = rows.find(r => r.type === 'audio' && r.sourceKind === 'master'); | ||
| assert.ok(master, 'master row exists'); | ||
| assert.strictEqual(master.mixKey, 'audio:master', 'master strips on the output-bus key'); | ||
| assert.strictEqual(_trackRowShowsStripPure(master), true, | ||
| 'master must show M/S/fader in the pane (the fix)'); | ||
| }); | ||
|
|
||
| t('stem audio and transcription rows keep their strips', () => { | ||
| const model = _trackSessionNormalizePure(null, sources, arrangements, drumTab); | ||
| const { rows } = _trackSessionRowsPure(model, sources, arrangements, drumTab, {}); | ||
| for (const row of rows.filter(r => r.type !== 'folder')) { | ||
| assert.strictEqual(_trackRowShowsStripPure(row), true, `${row.id} shows a strip`); | ||
| } | ||
| }); | ||
|
|
||
| t('rows without a strip key never strip (folders, malformed rows)', () => { | ||
| assert.strictEqual(_trackRowShowsStripPure({ type: 'folder', id: 'f1' }), false); | ||
| assert.strictEqual(_trackRowShowsStripPure({ mixKey: '' }), false); | ||
| assert.strictEqual(_trackRowShowsStripPure(null), false); | ||
| assert.strictEqual(_trackRowShowsStripPure(undefined), false); | ||
| }); | ||
|
|
||
| console.log(`\n${pass} passed, ${fail} failed`); | ||
| process.exit(fail ? 1 : 0); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.