mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-06-06 05:28:31 +09:00
keys to change playback tickrate
This commit is contained in:
@@ -1555,6 +1555,8 @@ function timelineInput(wo, event) {
|
|||||||
if (keyJustHit && shiftDown && event.includes(keys.E)) { setTimelineRowStyle(1); return }
|
if (keyJustHit && shiftDown && event.includes(keys.E)) { setTimelineRowStyle(1); return }
|
||||||
if (keyJustHit && shiftDown && event.includes(keys.R)) { setTimelineRowStyle(2); return }
|
if (keyJustHit && shiftDown && event.includes(keys.R)) { setTimelineRowStyle(2); return }
|
||||||
|
|
||||||
|
if (keyJustHit && (keysym === '[' || keysym === ']')) { nudgeTickRate(keysym === '[' ? -1 : 1); return }
|
||||||
|
|
||||||
if (playbackMode !== PLAYMODE_NONE) {
|
if (playbackMode !== PLAYMODE_NONE) {
|
||||||
if (keyJustHit && shiftDown && event.includes(keys.Y) || keysym === " ") { stopPlayback(); redrawPanel(); drawAlwaysOnElems() }
|
if (keyJustHit && shiftDown && event.includes(keys.Y) || keysym === " ") { stopPlayback(); redrawPanel(); drawAlwaysOnElems() }
|
||||||
else if (keysym === "<LEFT>" || keysym === "<RIGHT>") {
|
else if (keysym === "<LEFT>" || keysym === "<RIGHT>") {
|
||||||
@@ -2188,6 +2190,8 @@ function patternsInput(wo, event) {
|
|||||||
const shiftDown = (event.includes(59) || event.includes(60))
|
const shiftDown = (event.includes(59) || event.includes(60))
|
||||||
const moveDelta = shiftDown ? 4 : 1
|
const moveDelta = shiftDown ? 4 : 1
|
||||||
|
|
||||||
|
if (keyJustHit && (keysym === '[' || keysym === ']')) { nudgeTickRate(keysym === '[' ? -1 : 1); return }
|
||||||
|
|
||||||
if (playbackMode !== PLAYMODE_NONE) {
|
if (playbackMode !== PLAYMODE_NONE) {
|
||||||
if ((keyJustHit && shiftDown && event.includes(keys.Y)) || keysym === " ") {
|
if ((keyJustHit && shiftDown && event.includes(keys.Y)) || keysym === " ") {
|
||||||
stopPlayback(); simStateKey = ''; drawPatternsContents(wo); drawAlwaysOnElems()
|
stopPlayback(); simStateKey = ''; drawPatternsContents(wo); drawAlwaysOnElems()
|
||||||
@@ -2346,6 +2350,16 @@ function restoreFullSongParams() {
|
|||||||
previewActive = false
|
previewActive = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Adjust the live tick rate by `delta`. The engine still honours 'A' (set speed) effects,
|
||||||
|
// which will overwrite this value when their row is hit during playback.
|
||||||
|
function nudgeTickRate(delta) {
|
||||||
|
const cur = audio.getTickRate(PLAYHEAD) | 0
|
||||||
|
const next = Math.max(1, Math.min(255, cur + delta))
|
||||||
|
if (next === cur) return
|
||||||
|
audio.setTickRate(PLAYHEAD, next)
|
||||||
|
drawAlwaysOnElems()
|
||||||
|
}
|
||||||
|
|
||||||
function startPlaySong() {
|
function startPlaySong() {
|
||||||
restoreFullSongParams()
|
restoreFullSongParams()
|
||||||
audio.stop(PLAYHEAD)
|
audio.stop(PLAYHEAD)
|
||||||
@@ -2392,7 +2406,6 @@ function startPlayPattern() {
|
|||||||
if (song.numPats === 0) return
|
if (song.numPats === 0) return
|
||||||
audio.stop(PLAYHEAD)
|
audio.stop(PLAYHEAD)
|
||||||
audio.setBPM(PLAYHEAD, song.bpm)
|
audio.setBPM(PLAYHEAD, song.bpm)
|
||||||
audio.setTickRate(PLAYHEAD, song.tickRate)
|
|
||||||
audio.uploadCue(PREVIEW_CUE_IDX, buildPreviewCue(patternIdx))
|
audio.uploadCue(PREVIEW_CUE_IDX, buildPreviewCue(patternIdx))
|
||||||
audio.setCuePosition(PLAYHEAD, PREVIEW_CUE_IDX)
|
audio.setCuePosition(PLAYHEAD, PREVIEW_CUE_IDX)
|
||||||
audio.setTrackerRow(PLAYHEAD, 0)
|
audio.setTrackerRow(PLAYHEAD, 0)
|
||||||
@@ -2408,7 +2421,6 @@ function startPlayPatternRow() {
|
|||||||
if (song.numPats === 0) return
|
if (song.numPats === 0) return
|
||||||
audio.stop(PLAYHEAD)
|
audio.stop(PLAYHEAD)
|
||||||
audio.setBPM(PLAYHEAD, song.bpm)
|
audio.setBPM(PLAYHEAD, song.bpm)
|
||||||
audio.setTickRate(PLAYHEAD, song.tickRate)
|
|
||||||
audio.uploadCue(PREVIEW_CUE_IDX, buildPreviewCue(patternIdx))
|
audio.uploadCue(PREVIEW_CUE_IDX, buildPreviewCue(patternIdx))
|
||||||
audio.setCuePosition(PLAYHEAD, PREVIEW_CUE_IDX)
|
audio.setCuePosition(PLAYHEAD, PREVIEW_CUE_IDX)
|
||||||
audio.setTrackerRow(PLAYHEAD, patternGridRow)
|
audio.setTrackerRow(PLAYHEAD, patternGridRow)
|
||||||
|
|||||||
@@ -90,6 +90,7 @@ Timeline has two distinct modes: view and edit mode. Two modes are toggled using
|
|||||||
&bul;<b>W</b>&mdot;<b>E</b>&mdot;<b>R</b> : <O>toggle timeline view mode. W-most detailed, R-most abridged</O>
|
&bul;<b>W</b>&mdot;<b>E</b>&mdot;<b>R</b> : <O>toggle timeline view mode. W-most detailed, R-most abridged</O>
|
||||||
&bul;<b>n</b> : <O>toggle soloing of the selected voice</O>
|
&bul;<b>n</b> : <O>toggle soloing of the selected voice</O>
|
||||||
&bul;<b>m</b> : <O>toggle muting of the selected voice</O>
|
&bul;<b>m</b> : <O>toggle muting of the selected voice</O>
|
||||||
|
&bul;<b>[</b>&mdot;<b>]</b> : <O>change tick rate of playhead</O>
|
||||||
|
|
||||||
<b> EDIT MODE</b>
|
<b> EDIT MODE</b>
|
||||||
<b>\u00B7${'\u00B8'.repeat(9)}\u00B9</b>
|
<b>\u00B7${'\u00B8'.repeat(9)}\u00B9</b>
|
||||||
|
|||||||
@@ -2399,7 +2399,7 @@ TODO:
|
|||||||
previous "row volume default = 63" behaviour.
|
previous "row volume default = 63" behaviour.
|
||||||
[x] physical_presence order 0x1F chn 2: note cuts unexpectedly fast — engine fix
|
[x] physical_presence order 0x1F chn 2: note cuts unexpectedly fast — engine fix
|
||||||
[x] GSLINGER order 0x03 chn 1: L 0100 fades unexpectedly fast? — converter fix
|
[x] GSLINGER order 0x03 chn 1: L 0100 fades unexpectedly fast? — converter fix
|
||||||
[ ] do not reset tickspeed on pattern view play / add key to modify tick speed ('[' down/']' up)
|
[x] do not reset tickspeed on pattern view play / add key to modify tick speed ('[' down/']' up)
|
||||||
[ ] expose song table on UI (test with `insaniq2.taud`)
|
[ ] expose song table on UI (test with `insaniq2.taud`)
|
||||||
|
|
||||||
TODO - list of demo songs that MUST ship with Microtone:
|
TODO - list of demo songs that MUST ship with Microtone:
|
||||||
|
|||||||
@@ -3410,6 +3410,7 @@ class AudioAdapter(val vm: VM) : PeriBase(VM.PERITYPE_SOUND) {
|
|||||||
var samplePos = 0.0
|
var samplePos = 0.0
|
||||||
var playbackRate = 1.0
|
var playbackRate = 1.0
|
||||||
var forward = true
|
var forward = true
|
||||||
|
var instrumentId = 0
|
||||||
|
|
||||||
// -1 for live foreground voices held by TrackerState.voices[]; 0..19 for background
|
// -1 for live foreground voices held by TrackerState.voices[]; 0..19 for background
|
||||||
// (mixer-private) ghosts spawned by NNA on the matching channel index.
|
// (mixer-private) ghosts spawned by NNA on the matching channel index.
|
||||||
|
|||||||
Reference in New Issue
Block a user