mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-06-14 00:14:05 +09:00
linear freq pitch mode
This commit is contained in:
@@ -1704,7 +1704,7 @@ function simulateRowState(ptnDat, uptoRow) {
|
||||
let bpm = audio.getBPM(PLAYHEAD) // best-effort starting tempo
|
||||
let speed = audio.getTickRate(PLAYHEAD)
|
||||
let globalVol = 0xFF
|
||||
let panLaw = 0, amigaMode = false
|
||||
let panLaw = 0, toneMode = 0 // toneMode: 0=linear, 1=Amiga, 2=linear-freq, 3=reserved
|
||||
|
||||
let memEF = 0, memG = 0
|
||||
let memHU = { speed: 0, depth: 0 }
|
||||
@@ -1808,8 +1808,8 @@ function simulateRowState(ptnDat, uptoRow) {
|
||||
if (effop !== 0 || effarg !== 0) {
|
||||
if (effop === OP_1) {
|
||||
const flags = (effarg >>> 8) & 0xFF
|
||||
panLaw = flags & 1
|
||||
amigaMode = (flags & 2) !== 0
|
||||
panLaw = flags & 1
|
||||
toneMode = (flags >>> 1) & 3
|
||||
// bit 2 reserved (was 'm' fadeout-zero policy; removed)
|
||||
}
|
||||
else if (effop === OP_8) {
|
||||
@@ -1948,7 +1948,7 @@ function simulateRowState(ptnDat, uptoRow) {
|
||||
|
||||
return { lastNote, lastInst, volAbs, panAbs, pitchOff,
|
||||
bpm, speed, globalVol,
|
||||
panLaw, amigaMode,
|
||||
panLaw, toneMode,
|
||||
bitcrushDepth, bitcrushSkip, overdriveAmp, clipMode,
|
||||
glissandoOn, vibratoWave, tremoloWave, panbrelloWave,
|
||||
memEF, memG, memHU, memR, memY,
|
||||
@@ -2153,15 +2153,14 @@ function drawProjectContents(wo) {
|
||||
let flagstr = [
|
||||
['Linear pan','EquNrg pan'],
|
||||
['Linear pitch','Amiga pitch', 'Linear freq', ''], // TODO MONOTONE uses linear-freq pitch
|
||||
['IT fade','FT2 fade'],
|
||||
]
|
||||
for (let i = 0; i < flagstr.length; i++) {
|
||||
if (i != 1 && 1 != 3) {
|
||||
if (i != 1 && 1 != 2) {
|
||||
let s = flagstr[i][(mixerflag >>> i) & 1 != 0]
|
||||
flagStrSelected.push(s)
|
||||
}
|
||||
}
|
||||
let toneMode = (((mixerflag >>> 1) & 1)) | (((mixerflag >>> 3) & 1) << 1)
|
||||
let toneMode = (mixerflag >>> 1) & 3
|
||||
flagStrSelected.splice(1, 0, flagstr[1][toneMode])
|
||||
|
||||
|
||||
|
||||
@@ -11,15 +11,36 @@ Tags:
|
||||
<l> - align left
|
||||
<o> - create virtual typesetting box. Left anchor: where the text cursor is. Right anchor: end of the line
|
||||
µtone; - replace with the brand string (<col 211>Micro</col><col 239>tone</col>)
|
||||
|
||||
&bul; - replace with bullet (\u00F9)
|
||||
&ddot; - replace with double-dot (\u008419u)
|
||||
&mdot; - replace with BIGDOT (\u00FA)
|
||||
&updn; - up-down arrow (\u008418u)
|
||||
&udlr; - four direction arrow (\u008428u\u008429u)
|
||||
|
||||
&keyoffsym; - pattern view key-off symbol (\u00A0\u00CD\u00CD\u00A1)
|
||||
¬ecutsym; - pattern view note-cut symbol (\u00A4\u00A4\u00A4\u00A4)
|
||||
|
||||
&demisharp;
|
||||
♯
|
||||
&sesquisharp;
|
||||
&doublesharp;
|
||||
&triplesharp;
|
||||
&quadsharp;
|
||||
&demiflat;
|
||||
♭
|
||||
&sesquiflat;
|
||||
&doubleflat;
|
||||
&tripleflat;
|
||||
&quadflat;
|
||||
&accuptick;
|
||||
&accdntick;
|
||||
&accupup;
|
||||
&accdndn;
|
||||
|
||||
- nonbreakable space (only meaningful for typesetters)
|
||||
­ - soft hyphen (only meaningful for typesetters)
|
||||
|
||||
default alignment: fully justified
|
||||
*/
|
||||
|
||||
@@ -29,7 +50,8 @@ let helpNotation = `<c>CONTROL NOTATON</c>
|
||||
&bul;<b>a</b>&ddot;<b>z</b> : <O>alphabet without shift-in</O>
|
||||
&bul;<b>A</b>&ddot;<b>Z</b> : <O>alphabet with shift-in</O>
|
||||
&bul;<b>^q</b> : <O>hit 'q' with control key</O>
|
||||
&bul;<b>^Q</b> : <O>hit 'q' with control and shift key</O>`
|
||||
&bul;<b>^Q</b> : <O>hit 'q' with control and shift key</O>
|
||||
`
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -37,7 +59,8 @@ let helpJam = `<c>NOTE JAMMING</c>
|
||||
|
||||
Push keys to play or insert notes.
|
||||
w e t y u
|
||||
a s d f g h j k`
|
||||
a s d f g h j k
|
||||
`
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -50,7 +73,8 @@ let helpCommon = `<c>COMMON CONTROLS</c>
|
||||
&bul;<b>O</b> : <O>stop the playback</O>
|
||||
&bul;<b>tab</b> : <O>switch forward a tab</O>
|
||||
&bul;<b>TAB</b> : <O>switch backward a tab</O>
|
||||
&bul;<b>q</b> : <O>close µtone;</O>`
|
||||
&bul;<b>q</b> : <O>close µtone;</O>
|
||||
`
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -79,7 +103,12 @@ Timeline has two distinct modes: view and edit mode. Two modes are toggled using
|
||||
&bul;<b><</b>&mdot;<b>></b>: <O>(panning column) slide left/right</O>
|
||||
&bul;<b>-</b>&mdot;<b>=</b> : <O>(vol/pan col) fine slide down/up</O>
|
||||
&bul;<b>&udlr;</b> : <O>move the viewing cursor by columns and rows</O>
|
||||
&bul;<b>pg&updn;</b> : <O>go to previous/next cue</O>`
|
||||
&bul;<b>pg&updn;</b> : <O>go to previous/next cue</O>
|
||||
|
||||
<b>ACCIDENTALS</b>
|
||||
&demisharp; ♯ &doublesharp; &triplesharp; &quadsharp; &demiflat; ♭ &doubleflat; &tripleflat; &accuptick; &accupup; &accdntick; &accdndn;
|
||||
<b>C c x cx xx B b bb bbb ^ ^^ v vv</b>
|
||||
`
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -114,6 +143,22 @@ function expandEntities(s) {
|
||||
.replaceAll('­', '')
|
||||
.replaceAll('<', '<')
|
||||
.replaceAll('>', '>')
|
||||
.replaceAll('&demisharp;', '\u0080\u0081')
|
||||
.replaceAll('♯', '\u0082\u0083')
|
||||
.replaceAll('&sesquisharp;', '\u0084132u\u0085')
|
||||
.replaceAll('&doublesharp;', '\u0086\u0087')
|
||||
.replaceAll('&triplesharp;', '\u0088\u0089')
|
||||
.replaceAll('&quadsharp;', '\u008A\u008B')
|
||||
.replaceAll('&demiflat;', '\u008C\u008D')
|
||||
.replaceAll('♭', '\u008E\u008F')
|
||||
.replaceAll('&sesquiflat;', '\u0090\u0091')
|
||||
.replaceAll('&doubleflat;', '\u0092\u0093')
|
||||
.replaceAll('&tripleflat;', '\u0094\u0095')
|
||||
.replaceAll('&quadflat;', '\u0096\u0097')
|
||||
.replaceAll('&accuptick;', '\u009A')
|
||||
.replaceAll('&accdntick;', '\u009B')
|
||||
.replaceAll('&accupup;', '\u009C')
|
||||
.replaceAll('&accdndn;', '\u009D')
|
||||
}
|
||||
|
||||
// Tokenise a (post-entity-expansion) line. Returns an array of:
|
||||
@@ -324,13 +369,13 @@ function typeset(text, customWidth) {
|
||||
}
|
||||
|
||||
let helpMessages = [ // index: taut.js PANEL_NAMES
|
||||
[helpJam, helpTimeline, helpCommon, helpNotation].join('\n\n'),
|
||||
[helpCommon, helpNotation].join('\n\n'), // placeholder
|
||||
[helpCommon, helpNotation].join('\n\n'), // placeholder
|
||||
[helpCommon, helpNotation].join('\n\n'), // placeholder
|
||||
[helpCommon, helpNotation].join('\n\n'), // placeholder
|
||||
[helpCommon, helpNotation].join('\n\n'), // placeholder
|
||||
[helpCommon, helpNotation].join('\n\n'), // placeholder
|
||||
[helpJam, helpTimeline, helpCommon, helpNotation].join('\n'),
|
||||
[helpCommon, helpNotation].join('\n'), // placeholder
|
||||
[helpCommon, helpNotation].join('\n'), // placeholder
|
||||
[helpCommon, helpNotation].join('\n'), // placeholder
|
||||
[helpCommon, helpNotation].join('\n'), // placeholder
|
||||
[helpCommon, helpNotation].join('\n'), // placeholder
|
||||
[helpCommon, helpNotation].join('\n'), // placeholder
|
||||
]
|
||||
|
||||
help.MSG_BY_TABS = helpMessages.map(it => typeset(it))
|
||||
|
||||
Reference in New Issue
Block a user