taut helpmsg

This commit is contained in:
minjaesong
2026-05-06 14:36:35 +09:00
parent 5a4d200fdc
commit 18881a6d16
5 changed files with 117 additions and 29 deletions

View File

@@ -19,6 +19,10 @@ const BULLET = "\u00847u"
const VERT = "\u00B3"
const TWOVERT = "\u00BA"
if (!_G.TAUT) _G.TAUT = {};
if (!_G.TAUT.UI) _G.TAUT.UI = {};
if (!_G.TAUT.UI.NEXTPANEL) _G.TAUT.UI.NEXTPANEL = undefined;
const sym = {
/* accidentals */
accnull:"\u00A2\u00A3",
@@ -850,44 +854,44 @@ function drawPatternView(style = timelineRowStyle) {
function drawControlHint() {
let hintElemTimeline = [
[`\u008428u\u008429u`,'Nav'],
[`Pg\u008418u`,'Cue'],
[`pg\u008418u`,'Cue'],
['sep'],
['WER','View'],
['sep'],
['Sp','Edit'],
['sp','Edit'],
['sep'],
['n','Solo'],
['m','Mute'],
['sep'],
['Tab','Panel']
['tab','Panel']
// ['sep'],
// ['q','Quit'],
]
let hintElemOrders = [
[`\u008428u\u008429u`,'Nav'],
[`Ent`,'Go to cue'],
[`ent`,'Go to cue'],
['sep'],
['Sp','Edit'],
['sp','Edit'],
['sep'],
['Tab','Panel'],
['tab','Panel'],
// ['sep'],
// ['q','Quit'],
]
let hintElemPatterns = [
[`\u008428u\u008429u`,'Nav'],
[`Pg\u008418u`,'Ptn'],
[`pg\u008418u`,'Ptn'],
['sep'],
['Sp','Edit'],
['sp','Edit'],
['sep'],
['Tab','Panel'],
['tab','Panel'],
// ['sep'],
// ['q','Quit'],
]
let hintElemEditNoteValue = [ // only enabled in viewmode 'E' or in pattern editor
[`\u008428u\u008429u`,'Nav'],
[`Pg\u008418u`,'Cue'],
[`pg\u008418u`,'Cue'],
['sep'],
[`A${sym.doubledot}G`,'Note'],
[`0${sym.doubledot}9`,'Oct'],
@@ -903,15 +907,15 @@ function drawControlHint() {
]
let hintElemEditInstValue = [
[`\u008428u\u008429u`,'Nav'],
[`Pg\u008418u`,'Cue'],
[`pg\u008418u`,'Cue'],
['sep'],
[`0${sym.doubledot}9 A${sym.doubledot}F`,'Instrument'],
['sep'],
['Sp','ExitEdit'],
['sp','ExitEdit'],
]
let hintElemEditVolEff = [
[`\u008428u\u008429u`,'Nav'],
[`Pg\u008418u`,'Cue'],
[`pg\u008418u`,'Cue'],
['sep'],
['h','Set'],
['j','SlideDn'],
@@ -924,7 +928,7 @@ function drawControlHint() {
]
let hintElemEditPanEff = [
[`\u008428u\u008429u`,'Nav'],
[`Pg\u008418u`,'Cue'],
[`pg\u008418u`,'Cue'],
['sep'],
['h','Set'],
['j','SlideL'],
@@ -937,19 +941,19 @@ function drawControlHint() {
]
let hintElemEditFxSym = [
[`\u008428u\u008429u`,'Nav'],
[`Pg\u008418u`,'Cue'],
[`pg\u008418u`,'Cue'],
['sep'],
[`0${sym.doubledot}9 A${sym.doubledot}F`,`FxSym`],
['sep'],
['Sp','ExitEdit'],
['sp','ExitEdit'],
]
let hintElemEditFxVal = [
[`\u008428u\u008429u`,'Nav'],
[`Pg\u008418u`,'Cue'],
[`pg\u008418u`,'Cue'],
['sep'],
[`0${sym.doubledot}9 A${sym.doubledot}F`,`FxVal`],
['sep'],
['Sp','ExitEdit'],
['sp','ExitEdit'],
]
const hintElemExternal = [['Tab','Panel']]
@@ -2082,7 +2086,7 @@ const panelPatterns = new win.WindowObject(1, PTNVIEW_OFFSET_Y, SCRW, PTNVIEW_HE
// External sub-program panels: drawContents launches the sub-program synchronously.
// The sub-program draws rows 4+ and does NOT touch rows 1-3 (drawn by taut.js before launch).
// On exit, the sub-program sets _G.taut_nextPanel to request a tab switch.
// On exit, the sub-program sets _G.TAUT.UI.NEXTPANEL to request a tab switch.
function makeExternalPanelDraw(progName) {
return function(wo) {
// stop any playback first
@@ -2090,7 +2094,7 @@ function makeExternalPanelDraw(progName) {
// update the top bar
drawAlwaysOnElems()
_G.taut_nextPanel = undefined
_G.TAUT.UI.NEXTPANEL = undefined
_G.shell.execute(`${progName} ${fullPathObj.full} ${currentPanel}`)
}
}
@@ -2617,9 +2621,9 @@ while (!exitFlag) {
if (pendingExternalDraw) {
pendingExternalDraw = false
redrawPanel()
while (_G.taut_nextPanel !== undefined && _G.taut_nextPanel !== null) {
currentPanel = _G.taut_nextPanel
_G.taut_nextPanel = undefined
while (_G.TAUT.UI.NEXTPANEL !== undefined && _G.TAUT.UI.NEXTPANEL !== null) {
currentPanel = _G.TAUT.UI.NEXTPANEL
_G.TAUT.UI.NEXTPANEL = undefined
applyMuteTransition(currentPanel)
if (isExternalPanel(currentPanel)) {
con.clear(); drawAlwaysOnElems(); drawControlHint()

View File

@@ -4,7 +4,7 @@
* Rows 1-3 are owned by the parent; this program draws rows 4+.
*
* exec_args[1] = path to .taud file
* Sets _G.taut_nextPanel before returning to request a panel switch.
* Sets _G.TAUT.UI.NEXTPANEL before returning to request a panel switch.
*
* Created by minjaesong on 2026-04-27
*/
@@ -65,7 +65,7 @@ while (!done) {
if (!keyJustHit) return
if (keysym === '<TAB>') {
_G.taut_nextPanel = (MY_PANEL + (shiftDown ? -1 : 1) + PANEL_COUNT) % PANEL_COUNT
_G.TAUT.UI.NEXTPANEL = (MY_PANEL + (shiftDown ? -1 : 1) + PANEL_COUNT) % PANEL_COUNT
done = true
return
}

View File

@@ -0,0 +1,84 @@
if (!_G.TAUT) _G.TAUT = {};
let help = {}
////////////////////////////////////////////////////////////////////////////////////////////////////
/*
Tags:
<b> - print the text in emphasis colour (colVoiceHdr aka 230)
<c> - centre the line. If the line spans multiple lines, centre each line
<r> - align right
<l> - align left
&microtone; - replace with the brand string
&bul; - replace with bullet (\u00847u)
&ddot; - replace with double-dot (\u008419u)
&mdot; - replace with BIGDOT (\u00F9)
&updn; - up-down arrow (\u008418u)
&udlr; - four direction arrow (\u008428u\u008429u)
&keyoffsym; - pattern view key-off symbol (\u00A0\u00CD\u00CD\u00A1)
&notecutsym; - pattern view note-cut symbol (\u00A4\u00A4\u00A4\u00A4)
&nbsp; - nonbreakable space (only meaningful for typesetters)
&shy; - soft hyphen (only meaningful for typesetters)
default alignment: fully justified
*/
help.notation = `<c>CONTROL NOTATON</c>
&microtone; shortcuts differentiate normal and shifted shortcuts.
&bul;a&ddot;z : alphabet without shift-in
&bul;A&ddot;Z : alphabet with shift-in
&bul;^ : control key`
////////////////////////////////////////////////////////////////////////////////////////////////////
help.jam = `<c>NOTE JAMMING</c>
Push keys to play or insert notes.
&nbsp;w&nbsp;e&nbsp;&nbsp;&nbsp;t&nbsp;y&nbsp;u&nbsp;i
a&nbsp;s&nbsp;d&nbsp;f&nbsp;g&nbsp;h&nbsp;j&nbsp;k`
////////////////////////////////////////////////////////////////////////////////////////////////////
help.common = `<c>COMMON CONTROLS</c>
&bul;Y : play the entire song from the current cue
&bul;U : play the current cue then stop
&bul;I : play the current row
&bul;O : stop the playback
&bul;tab : switch forward a tab
&bul;TAB : switch backward a tab
&bul;q : close &microtone;`
////////////////////////////////////////////////////////////////////////////////////////////////////
help.timeline = `<c>TIMELINE VIEW</c>
Timeline has two distinct modes: view and edit mode. Two modes are toggled using the space bar.
<b>View mode</b>
&bul;Note jamming : plays the note
&bul;&udlr; : move the viewing cursor by voices and rows
&bul;pg&updn; : go to previous/next cue
&bul;W&mdot;E&mdot;R : toggle timeline view mode. W-most detailed, R-most abridged
&bul;n : toggle soloing of the selected voice
&bul;m : toggle muting of the selected voice
<b>Edit mode</b>
&bul;Note jammping : (note column) inserts the note
&bul;{&mdot;} : (note column) lower/raise a note by one octave (or period)
&bul;[&mdot;] : (note column) lower/raise a note by one unit
&bul;= : (note column) insert a key-off &keyoffsym;
&bul;^ : (note column) insert a note-cut &notecutsym;
&bul;. : remove a symbol on the selected column
&bul;bksp : delete one character on the selected column
&bul;0&ddot;9 a&ddot;f : inserts a (hexa)decimal number
&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; : move the viewing cursor by columns and rows
&bul;pg&updn; : go to previous/next cue`
////////////////////////////////////////////////////////////////////////////////////////////////////
if (!_G.TAUT.HELPMSG) _G.TAUT.HELPMSG=help;

View File

@@ -4,7 +4,7 @@
* Rows 1-3 are owned by the parent; this program draws rows 4+.
*
* exec_args[1] = path to .taud file
* Sets _G.taut_nextPanel before returning to request a panel switch.
* Sets _G.TAUT.UI.NEXTPANEL before returning to request a panel switch.
*
* Created by minjaesong on 2026-04-27
*/
@@ -65,7 +65,7 @@ while (!done) {
if (!keyJustHit) return
if (keysym === '<TAB>') {
_G.taut_nextPanel = (MY_PANEL + (shiftDown ? -1 : 1) + PANEL_COUNT) % PANEL_COUNT
_G.TAUT.UI.NEXTPANEL = (MY_PANEL + (shiftDown ? -1 : 1) + PANEL_COUNT) % PANEL_COUNT
done = true
return
}

View File

@@ -4,7 +4,7 @@
* Rows 1-3 are owned by the parent; this program draws rows 4+.
*
* exec_args[1] = path to .taud file
* Sets _G.taut_nextPanel before returning to request a panel switch.
* Sets _G.TAUT.UI.NEXTPANEL before returning to request a panel switch.
*
* Created by minjaesong on 2026-04-27
*/
@@ -65,7 +65,7 @@ while (!done) {
if (!keyJustHit) return
if (keysym === '<TAB>') {
_G.taut_nextPanel = (MY_PANEL + (shiftDown ? -1 : 1) + PANEL_COUNT) % PANEL_COUNT
_G.TAUT.UI.NEXTPANEL = (MY_PANEL + (shiftDown ? -1 : 1) + PANEL_COUNT) % PANEL_COUNT
done = true
return
}