-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: better snip + loop controls (#201)
- Loading branch information
Showing
41 changed files
with
566 additions
and
375 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 |
---|---|---|
@@ -1,18 +1,20 @@ | ||
import { createSlider } from './snip-slider.js' | ||
import { createRangeLabels } from './snip-labels.js' | ||
import { createSnipToggler } from './snip-toggle.js' | ||
import { createSnipButtons } from './snip-buttons.js' | ||
|
||
import { playback } from '../../utils/playback.js' | ||
|
||
export const createSnipControls = () => { | ||
const current = playback.current() | ||
const duration = playback.duration() | ||
|
||
return ` | ||
<div id="chorus-snip-controls" style="display: block"> | ||
${createSlider({ current, duration })} | ||
export const createSnipControls = () => ` | ||
<div id="chorus-snip-controls" style="display: block"> | ||
${createSlider({ current: playback.current(), duration: playback.duration(), style: "margin:6px 0" })} | ||
<p style="font-size:.75rem;color:#fff;padding:0;margin-top:-8px;padding-bottom:.5rem"> | ||
* while editing 'end', track plays 3 secs past set 'end' | ||
</p> | ||
<div style="display:flex;justify-content:space-between;height:3rem;"> | ||
${createRangeLabels()} | ||
${createSnipButtons()} | ||
${createSnipToggler()} | ||
</div> | ||
` | ||
} | ||
${createSnipButtons()} | ||
</div> | ||
` |
This file contains 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 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 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,16 @@ | ||
import { createToggleButton } from '../toggle-button.js' | ||
|
||
export const createSnipToggler = () => ` | ||
<div style="display:flex;justify-content:flex-end;align-items:center;width:100%;"> | ||
<div style="display:flex;justify-content:space-between;align-items:flex-end"> | ||
${createToggleButton({ | ||
labelId: 'loop-label', | ||
labelText: 'Auto-Loop', | ||
onPathId: 'loop-toggle-on', | ||
offPathId: 'loop-toggle-off', | ||
checkboxId: 'loop-checkbox', | ||
buttonId: 'loop-toggle-button', | ||
})} | ||
</div> | ||
</div> | ||
` |
This file contains 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 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 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 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 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 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 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 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 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 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
Oops, something went wrong.