if (!_G.TAUT) _G.TAUT = {}; let help = {} let ts = require("typesetter") //////////////////////////////////////////////////////////////////////////////////////////////////// /* Tags: - print the text in emphasis colour (colVoiceHdr aka 230) - centre the line. If the line spans multiple lines, centre each line - align right - align left - create virtual typesetting box. Left anchor: where the text cursor is. Right anchor: end of the line µtone; - replace with the brand string (Microtone) &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\u00B1\u00B1\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 */ let helpNotation = `CONTROL NOTATION \u00B7${'\u00B8'.repeat(16)}\u00B9 µtone; shortcuts differentiate normal and shifted shortcuts. &bul;a&ddot;z : alphabet without shift-in &bul;A&ddot;Z : alphabet with shift-in &bul;^q : hit 'q' with control key &bul;^Q : hit 'q' with control and shift key ` //////////////////////////////////////////////////////////////////////////////////////////////////// let helpJam = `NOTE JAMMING \u00B7${'\u00B8'.repeat(12)}\u00B9 Push keys to play or insert notes.  w e   t y u a s d f g h j k ` //////////////////////////////////////////////////////////////////////////////////////////////////// let helpCommon = `COMMON CONTROLS \u00B7${'\u00B8'.repeat(15)}\u00B9 &bul;! : show this help message &bul;Y : plays the entire song from the current cue &bul;U : plays the current cue then stop &bul;I : plays the current row &bul;O : stops the playback &bul;tab : switchs forward a tab &bul;TAB : switchs backward a tab &bul;q : closes µtone; ` //////////////////////////////////////////////////////////////////////////////////////////////////// let helpTimeline = `TIMELINE VIEW \u00B7${'\u00B8'.repeat(13)}\u00B9 Timeline has two distinct modes: view and edit mode. Two modes are toggled using the space bar.  VIEW MODE \u00B7${'\u00B8'.repeat(9)}\u00B9 &bul;Note jamming : plays the note &bul;&udlr; : moves the viewing cursor by voices and rows &bul;pg&updn; : goes to previous/next cue &bul;W&mdot;E&mdot;R : toggles timeline view mode. W-most detailed, R-most abridged &bul;n : toggles soloing of the selected voice &bul;m : toggles muting of the selected voice &bul;[&mdot;] : changes tick rate of playhead  EDIT MODE \u00B7${'\u00B8'.repeat(9)}\u00B9 &bul;Note jamming : (note column) inserts the note &bul;{&mdot;} : (note column) lowers/raises a note by one octave (or period) &bul;[&mdot;] : (note column) lowers/raises a note by one unit &bul;z : (note column) inserts a key-off &keyoffsym; &bul;x : (note column) inserts a note-cut ¬ecutsym; &bul;. : clears fields &bul;bksp : deletes one character on the selected column &bul;0&ddot;9 a&ddot;f : inserts a (hexa)decimal number &bul;0&ddot;9 a&ddot;z : (fx column) inserts an effect &bul;^&mdot;v : (volume column) slide up/down &bul;<&mdot;>: (panning column) slide left/right &bul;-&mdot;= : (vol/pan col) fine slide down/up &bul;&udlr; : moves the viewing cursor by columns and rows &bul;pg&updn; : goes to previous/next cue  ACCIDENTALS \u00B7${'\u00B8'.repeat(11)}\u00B9 &demisharp; ♯ &doublesharp; &triplesharp; &quadsharp; &demiflat; ♭ &doubleflat; &tripleflat;  &accuptick;  &accupup;  &accdntick;  &accdndn; C  c  cx x  xx B  b  bb bbb ^  ^^ v  vv  GLOBAL EDIT \u00B7${'\u00B8'.repeat(11)}\u00B9 &bul;Q : retunes current song into different tuning and strategy. In general, nearest-note works best for macrotonals, nearest-harmonic and nearest-delta works best for highly microtonals (31+); 17- and 19-TET takes nearest-harmonic pretty well, while 22-TET seem to only benefit from the nearest-note ` let helpProjectFlags = `MIXER FLAGS \u00B7${'\u00B8'.repeat(11)}\u00B9 Mixer flags define how should the mixer behave.  TONE MODE \u00B7${'\u00B8'.repeat(9)}\u00B9 &bul;Linear pitch : pitch shift effects operate on linear pitch scale. The default and recommended setting for a new project &bul;Amiga pitch : pitch shift effects operate on Amiga period scale. Backwards compatible setting for MOD/S3M/XM/IT formats &bul;Linear freq : pitch shift effects operate on linear frequency scale. Backwards compatible setting for MONOTONE format  INTERPOLATION \u00B7${'\u00B8'.repeat(13)}\u00B9 &bul;Default : three-tap fast sinc interpolation. The default and recommended setting for a new project &bul;None : zeroth-order hold &bul;A500 : emulates what Paula chip of Amiga 500 does. S 0x00 effects only work with this and Amiga 1200 mode &bul;A1200 : emulates what Paula chip of Amiga 1200 does &bul;SNES : four-tap gaussian interpolation used by SNES &bul;DPCM : simulates Differential Pulse Code Modulation used by NES ` //////////////////////////////////////////////////////////////////////////////////////////////////// // assemble help text pieces to complete help message const HRULE = '\u00B4\u00B5'.repeat((_G.TAUT.HELPMSG_WIDTH) >>> 1) + '\n' // taut.js's popup uses (HELP_COL_TEXT on background) as the default colour pair. // The shared typesetter module owns the palette and the markup expander. function typeset(text) { return ts.typeset(text, _G.TAUT.HELPMSG_WIDTH) } let helpMessages = [ // index: taut.js PANEL_NAMES /* Timeline */[helpJam, helpTimeline, helpCommon, helpNotation].join(HRULE), /* Cues */[helpCommon, helpNotation].join(HRULE), // placeholder /* Patterns */[helpCommon, helpNotation].join(HRULE), // placeholder /* Samples */[helpCommon, helpNotation].join(HRULE), // placeholder /* Instruments */[helpCommon, helpNotation].join(HRULE), // placeholder /* Project */[helpProjectFlags, helpCommon, helpNotation].join(HRULE), // placeholder /* File */[helpCommon, helpNotation].join(HRULE), // placeholder ] help.MSG_BY_TABS = helpMessages.map(it => typeset(it)) help.typeset = typeset help.COL_TEXT = ts.COL_TEXT help.COL_EMPH = ts.COL_EMPH if (!_G.TAUT.HELPMSG) _G.TAUT.HELPMSG=help;