mirror of
https://github.com/juanjiant-bit/JIANT.git
synced 2026-12-06 04:44:33 +01:00
0.6.59: organic boxes (violet, uneven organelles), round step cells
The JIANT palette's cards, panel, rows, buttons and dialogs drawn as soft uneven bodies (a superellipse table, each box its own shape) with one violet antialiased line; the cards' bodies reach past them (draw_loops). Footer steps round cells. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KMHk6yH4XbP1xxHYKCo9Mh
This commit is contained in:
15 files changed
+157
-25
No files matched your search
@@ -15,7 +15,7 @@ and takes its song system from [SLOOP](https://github.com/isod89/sloop-fm1).
|
||||
the FM-1, with sound, and is played with your computer keyboard or the mouse. The emulator, the installer and the
|
||||
editor update themselves with every change merged into `main`.
|
||||
|
||||
> **Status: in development (v0.6.58).** It builds and passes every test (Felucca's and its own), Back up the flash before installing it.
|
||||
> **Status: in development (v0.6.59).** It builds and passes every test (Felucca's and its own), Back up the flash before installing it.
|
||||
|
||||
> 🫶 If you resonate with my work, consider supporting me on **[Ko-fi](https://ko-fi.com/juanjiant)** (in Argentina:
|
||||
> **[Cafecito](https://cafecito.app/juanjiant)**). Thanks for all the good energy, hope you enjoy this little beast ✨🎹
|
||||
@@ -38,6 +38,13 @@ Two printable sheets with everything on the device. Click an image to open it fu
|
||||
|
||||
Every update is listed here, newest first.
|
||||
|
||||
### v0.6.59
|
||||
- **Organic boxes** (the JIANT palette): every card, the panel, menu rows, tabs, buttons and dialogs are organelles,
|
||||
the beings' kin: a soft, uneven body (each its own shape, always the same) drawn as one clean antialiased **violet**
|
||||
line. The four cards' bodies reach past the cards, round their labels and gauges. The footer's steps are round
|
||||
cells, each as hot as its velocity. The beings, DRUM-X and the colours as they were; drawn with the boxes (no cost a
|
||||
frame when nothing changes).
|
||||
|
||||
### v0.6.58
|
||||
- **Page name over the cards, shorter**: the big name now covers the four cards for 0.45 s (was the graph for 0.7 s), on
|
||||
one line with the track and engine at the right; the graph stays in sight.
|
||||
|
||||
@@ -138,6 +138,8 @@ atajos de esa capa; en la grilla DRUM son pasos y carriles; en la pantalla NAME
|
||||
"T1 CLEARED"...), a veces con una segunda línea.
|
||||
- **Tarjetas**: las cuatro columnas debajo del encabezado son KNOB 1–4. Un valor automatizado o con lock aparece
|
||||
marcado; una tarjeta apagada significa "acá ahora no hay nada".
|
||||
- **El aspecto** (paleta JIANT): cada tarjeta, panel, fila y botón es una organela, un cuerpo blando e irregular dibujado
|
||||
con una línea violeta; los seres viven en los paneles.
|
||||
- **Nombre de página**: al cambiar de página (o de pista) a mano, el nombre de la página aparece grande un momento sobre
|
||||
las cuatro tarjetas (el gráfico queda a la vista), con la pista y su motor a la derecha.
|
||||
- **Panel (al medio)**: el gráfico de la página — la criatura del motor, una envolvente, el LFO en movimiento, la
|
||||
|
||||
@@ -136,6 +136,8 @@ layer's shortcuts; on the DRUM grid they are steps and lanes; on the NAME screen
|
||||
takes now) and the USB icon. Messages appear here too ("SAVED", "T1 CLEARED"...), sometimes with a second line.
|
||||
- **Cards**: the four columns under the header are KNOB 1–4. A value that is automated or locked is marked; a dim card
|
||||
means "nothing here now".
|
||||
- **The look** (JIANT palette): every card, panel, row and button is an organelle, a soft, uneven body drawn as one
|
||||
violet line; the beings live in the panels.
|
||||
- **Page name**: changing page (or track) by hand shows the page's name big for a moment over the four cards (the
|
||||
graph stays visible), with the track and its engine at the right.
|
||||
- **Panel (middle)**: the page's graph — the engine's creature, an envelope, the LFO running, the step grid, a list...
|
||||
|
||||
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 1008 KiB After Width: | Height: | Size: 1008 KiB |
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 1020 KiB After Width: | Height: | Size: 1019 KiB |
@@ -51,9 +51,9 @@ ul { padding-left: 18px; } li { margin: 2px 0; }
|
||||
</style></head><body>
|
||||
<header><img src="signature.png" alt="JIANT FM signature"><div>
|
||||
<h1>JIANT FM · CONTROLS</h1><h2>every button, knob, layer, combo and page</h2>
|
||||
<div class="ver">firmware v0.6.58 · M-VAVE FM-1 · juanjiant-bit.github.io/JIANT</div></div></header>
|
||||
<div class="ver">firmware v0.6.59 · M-VAVE FM-1 · juanjiant-bit.github.io/JIANT</div></div></header>
|
||||
<div class="rule"></div>
|
||||
<div class="sec">THE PANEL<span></span></div><div class="grid g2"><div class="card" style="--c:#22d3ee" ><h3>KNOBS AND TRANSPORT</h3><table><tr><td class="n">MASTER</td><td>Master volume.</td></tr><tr><td class="n">SELECT</td><td>HOME: <b>DICE EVERYTHING?</b> (OCT+ yes): a new piece in one scale. EDIT: <b>the sound's dice</b>. GLO's pages or GLO held: the tempo. Macros open (LFO held or latched): new random routes.</td></tr><tr><td class="n">PRESETS</td><td>Browses the sounds (factory and user). On step, list and song pages: the cursor / the row. <b>Hold a page button + PRESETS: jump through its pages.</b></td></tr><tr><td class="n">ALGORITHM</td><td>Selects the track from any page: T1–T4, or T1–T6 with TRACKS 6.</td></tr><tr><td class="n">KNOB 1–4</td><td>The four columns on screen. Fast sweeps the whole range, slow fine-tunes. With a layer held: the layer's.</td></tr><tr><td class="n">OCT− · OCT+</td><td>The keyboard's octave (both together: back to 0). On action pages and dialogs: back / confirm.</td></tr><tr><td class="n">PLAY</td><td>Start / stop. GLO + PLAY: restart from the top.</td></tr><tr><td class="n">REC</td><td>Arms live recording on the selected track (notes and knob moves, overdub).</td></tr><tr><td class="n">HOME</td><td>Tap: the ecosystem. <b>Hold: the MENU.</b></td></tr><tr><td class="n">KEYS</td><td>27 keys play the selected track in its scale; with a layer held they become that layer's.</td></tr></table></div><div class="card" style="--c:#8b5cf6" ><h3>PAGE BUTTONS</h3><table class="pages"><tr><th>BUTTON</th><th>TAP: ITS PAGES, ONE PER TAP</th><th>HOLD</th></tr><tr><td class="n">ENV</td><td>ENV · ENV DEST</td><td class="dim">—</td></tr><tr><td class="n">LFO</td><td>LFO · LFO DEST · MOD · MSEQ · MSEQ 2</td><td class="dim">MACROS M1–M4 (stay latched)</td></tr><tr><td class="n">FX</td><td>TRACK · SLICER · DELAY · REVERB · CHORUS · MASTER (two quick taps: next section)</td><td class="dim">PUNCH-IN FX</td></tr><tr><td class="n">SCL</td><td>SCL · SCL 2</td><td class="dim">ROOT by key</td></tr><tr><td class="n">EDIT</td><td>EDIT 1 · EDIT 2 · FILTER · VOICE (FM6: OPERATOR · OP ENV · OPERATOR 2; DRUM: KIT · KIT 2 · KIT 3 · X-MOD · FILTER · SOUND 1–4 · LEVELS 1–2 · STEREO)</td><td class="dim">INIT · RECALL · sound mutes</td></tr><tr><td class="n">GLO</td><td>MIXER · GLOBAL · SYSTEM</td><td class="dim">MUTE · SOLO · LEVEL · TAP</td></tr><tr><td class="n">SAVE</td><td>PRESETS · USER · PROJECT · ARRANGE · TOOLS</td><td class="dim">SONG layer</td></tr><tr><td class="n">ARP</td><td>ARP · ARP 2</td><td class="dim">—</td></tr><tr><td class="n">SEQ</td><td>STEP · COMP · PATTERN · AUTOMATION · AUTO LIST · MUTATE · FUGUE · SHIFT</td><td class="dim">SEQ TOOLS</td></tr><tr><td class="n">REC</td><td>(transport)</td><td class="dim">CLEAR · CLICK</td></tr></table><p style="margin-top:10px"><span class="k v">BUTTON</span> + <span class="k v">PRESETS</span> jumps straight to a page (no wrap); let go and you stay there.</p></div></div><div class="sec">LAYERS · HOLD A BUTTON<span></span></div><div class="grid g2"><div class="card" style="--c:#ff7a00" ><h3>FX · PUNCH-IN EFFECTS</h3><div class="kb"><div class="w on" style="left:0.0px;width:40.2px"><b>F3</b>REP 1/8</div><div class="w on" style="left:43.2px;width:40.2px"><b>G3</b>REP 1/16</div><div class="w on" style="left:86.5px;width:40.2px"><b>A3</b>REP 1/32</div><div class="w on" style="left:129.8px;width:40.2px"><b>B3</b>LPF</div><div class="w on" style="left:173.0px;width:40.2px"><b>C4</b>HPF</div><div class="w on" style="left:216.2px;width:40.2px"><b>D4</b>OCT−</div><div class="w on" style="left:259.5px;width:40.2px"><b>E4</b>OCT+</div><div class="w on" style="left:302.8px;width:40.2px"><b>F4</b>½ TEMPO</div><div class="w on" style="left:346.0px;width:40.2px"><b>G4</b>DEC−</div><div class="w on" style="left:389.2px;width:40.2px"><b>A4</b>DEC+</div><div class="w on" style="left:432.5px;width:40.2px"><b>B4</b>STUT 1/8</div><div class="w on" style="left:475.8px;width:40.2px"><b>C5</b>STUT 1/16</div><div class="w on" style="left:519.0px;width:40.2px"><b>D5</b>ATK+</div><div class="w on" style="left:562.2px;width:40.2px"><b>E5</b>ARP</div><div class="w on" style="left:605.5px;width:40.2px"><b>F5</b>RAND</div><div class="w on" style="left:648.8px;width:40.2px"><b>G5</b>ERASE</div><div class="b on" style="left:27.7px;width:31.1px"><b>F#</b>M1</div><div class="b on" style="left:70.9px;width:31.1px"><b>G#</b>M2</div><div class="b on" style="left:114.2px;width:31.1px"><b>A#</b>M3</div><div class="b on" style="left:200.7px;width:31.1px"><b>C#</b>M4</div><div class="b on" style="left:243.9px;width:31.1px"><b>D#</b>M5</div><div class="b on" style="left:330.4px;width:31.1px"><b>F#</b>M6</div><div class="b" style="left:373.7px;width:31.1px"><b>G#</b></div><div class="b on" style="left:416.9px;width:31.1px"><b>A#</b>TGT</div><div class="b" style="left:503.4px;width:31.1px"><b>C#</b></div><div class="b" style="Line truncated
|
||||
<footer><span>GPL-3.0 · fork of Felucca (Hügelton Instruments) · song mode from SLOOP</span>
|
||||
<span>JIANT FM v0.6.58</span></footer>
|
||||
<span>JIANT FM v0.6.59</span></footer>
|
||||
</body></html>
|
||||
@@ -51,9 +51,9 @@ ul { padding-left: 18px; } li { margin: 2px 0; }
|
||||
</style></head><body>
|
||||
<header><img src="signature.png" alt="JIANT FM signature"><div>
|
||||
<h1>JIANT FM · SOUND · FX · MOD</h1><h2>engines, effects, modulation, sequencer and songs</h2>
|
||||
<div class="ver">firmware v0.6.58 · M-VAVE FM-1 · juanjiant-bit.github.io/JIANT</div></div></header>
|
||||
<div class="ver">firmware v0.6.59 · M-VAVE FM-1 · juanjiant-bit.github.io/JIANT</div></div></header>
|
||||
<div class="rule"></div>
|
||||
<div class="sec">ENGINES · EDIT 1 / EDIT 2<span></span></div><div class="card" style="--c:#f4f1ea" ><h3>EIGHT ENGINES, ALL SYNTHESIS</h3><table><tr><th>ENGINE</th><th>EDIT 1</th><th>EDIT 2</th><th>WHAT TO KNOW</th></tr><tr><td class="n" style="--c:#3b82f6">ANALOG</td><td style="width:22%"><div class="knobs"><span class="">WAVE</span><span class="">DETUNE</span><span class="">MIX</span><span class="">NOISE</span></div></td><td style="width:22%"><div class="knobs"><span class="">CUT</span><span class="">RES</span><span class="">DRIVE</span><span class="">INT</span></div></td><td>SAW SQR TRI SIN PWM <b>SYNC RING SAW3</b>; INT: osc 2 ±24 st. Its filter is per voice.</td></tr><tr><td class="n" style="--c:#d946ef">FM6</td><td style="width:22%"><div class="knobs"><span class="">ALG</span><span class="">FB</span><span class="">MOD</span><span class="">RATIO</span></div></td><td style="width:22%"><div class="knobs"><span class="">MEG</span><span class="">VMOD</span><span class="">DETUNE</span><span class="">SLOT</span></div></td><td>Dexed's 6 operators, 32 algorithms drawn, .syx patches (SLOT), MOD / RATIO move the modulators. <b>OPERATOR · OP ENV · OPERATOR 2</b>: each operator on the device (ratio / fixed, fine, level, its envelope, mode, detune, velocity). <b>SLOT B1–B32</b>: a 32-voice .syx sent from the web editor.</td></tr><tr><td class="n" style="--c:#8b5cf6">PHASE</td><td style="width:22%"><div class="knobs"><span class="">WAVE</span><span class="">WAVE2</span><span class="">DCW</span><span class="">ENV</span></div></td><td style="width:22%"><div class="knobs"><span class="">DETUNE</span><span class="">LINE</span><span class="">SUB</span><span class="">FB</span></div></td><td>Phase distortion (CZ); <b>FB</b> feeds the output back into the phase: hard edge to growl.</td></tr><tr><td class="n" style="--c:#22d3ee">LOFI</td><td style="width:22%"><div class="knobs"><span class="">CHIP</span><span class="">WAVE</span><span class="">DUTY</span><span class="">CRUSH</span></div></td><td style="width:22%"><div class="knobs"><span class="e">-</span><span class="">VIB</span><span class="">BEND</span><span class="">MASK</span></div></td><td>Chip: PLS TRI SAW NOIS WRAM. <b>BYTE</b>: ALGO VAR · MOTN GRIT BEND LOOP. <b>FLOAT</b> (floatbeat): ALGO VAR · MOTN FBK BEND LOOP; CHIP sets FULL / 4BIT / 1BIT.</td></tr><tr><td class="n" style="--c:#facc15">VOICE</td><td style="width:22%"><div class="knobs"><span class="">VOWEL</span><span class="">VOWEL2</span><span class="">TALK</span><span class="">SHIFT</span></div></td><td style="width:22%"><div class="knobs"><span class="">BUZZ</span><span class="">BREATH</span><span class="">Q</span><span class="">RAND</span></div></td><td>Formant voice (after klattsch): vowels, talk, breath.</td></tr><tr><td class="n" style="--c:#ff7a00">WHEEL</td><td style="width:22%"><div class="knobs"><span class="">REG</span><span class="">SUB</span><span class="">BODY</span><span class="">TOP</span></div></td><td style="width:22%"><div class="knobs"><span class="">PERC</span><span class="">CLICK</span><span class="">DRIVE</span><span class="">ROTOR</span></div></td><td>Drawbar organ: registrations, percussion, rotary.</td></tr><tr><td class="n" style="--c:#ef4444">NOISE</td><td style="width:22%"><div class="knobs"><span class="">MODE</span><span class="">COLOR</span><span class="">FREQ</span><span class="">PEAK</span></div></td><td style="width:22%"><div class="knobs"><span class="">TRK</span><span class="">DENSE</span><span class="">DRIFT</span><span class="">CRUSH</span></div></td><td>Coloured and metallic noise, tracked or free.</td></tr><tr><td class="n" style="--c:#ff7a00">DRUM-X</td><td style="width:22%"><div class="knobs"><span class="">MORPH</span><span class="">TUNE</span><span class="">TONE</span><span class="">DECAY</span></div></td><td style="width:22%"><div class="knobs"><span class="">NOISE</span><span class="">FM</span><span class="">ENV</span><span class="">FOLD</span><span class="">DRIVE</span></div></td><td>8 sounds BD SD CP CH OH TM RS CB, sides A / B: <b>MORPH</b> morphs the kit. The kit first: <b>KIT 3</b> BP FEEDBK, <b>X-MOD</b> RATE DEPTH SHAPE RAND. Then a sound (KNOB 1 the sound): SIDE PITCH PMOD · DECAY NOISE COLOR · MODE PM.TYPE DRIVE · <b>LAYER</b> (no note) FEEDBK <b>SEND</b> (CHO / DLY / REV). Last LEVELS and <b>STEREO</b> IMAGE (a knob through the kit's stereo placings).</td></tr></table></div><div class="grid g3" style="margin-top:22px"><div class="card" style="--c:#d946ef" ><h3>FILTER · EVERY ENGINE</h3><div class="knobs"><span class="">TYPE</span><span class="">CUT</span><span class="">RES</span><span class="">DRV</span></div><p style="margin-top:8px"><b>LP · HP · BP · COMB</b>. COMB rings tuned to the note: CUT moves it ±32 st, RES how much it rings. ANALOG and LOFI: per voice; the others: on the track, following LFO / ENV DEST FLT (DRV = the track's DIST).</p></div><div class="card" style="--c:#8b5cf6" ><h3>VOICE · PLAYING</h3><div class="knobs"><spanLine truncated
|
||||
<footer><span>GPL-3.0 · fork of Felucca (Hügelton Instruments) · song mode from SLOOP</span>
|
||||
<span>JIANT FM v0.6.58</span></footer>
|
||||
<span>JIANT FM v0.6.59</span></footer>
|
||||
</body></html>
|
||||
@@ -32,7 +32,7 @@
|
||||
#define FELUCCA_ID "FM-1_900" /* package identity (build.py: the .fwsc marker string) */
|
||||
#endif
|
||||
#ifndef FELUCCA_VERSION
|
||||
#define FELUCCA_VERSION "v0.6.58" /* JIANT's (based on Felucca 1.1.5.1): the splash, the menu, the console, the editor */
|
||||
#define FELUCCA_VERSION "v0.6.59" /* JIANT's (based on Felucca 1.1.5.1): the splash, the menu, the console, the editor */
|
||||
#endif
|
||||
#if FELUCCA_OTA && !FELUCCA_FLASH
|
||||
#error "FELUCCA_OTA needs FELUCCA_FLASH"
|
||||
|
||||
+99
-14
@@ -285,11 +285,107 @@ static uint32_t rr_cov(int32_t r, int32_t i, int32_t j)
|
||||
}
|
||||
return (uint32_t)n;
|
||||
}
|
||||
/* (JIANT 0.6.59) the JIANT palette's boxes as organelles, the beings' kin: each a soft body, a superellipse (n 3 for a
|
||||
* card or a button, 5 for a long row or the panel: rounder than a box, flatter than an ellipse), drawn as one clean
|
||||
* antialiased line in the thermal camera's colours, its heat by where it sits (the four cards violet, red, orange,
|
||||
* yellow from the left; a wide box, the panel or a row, blue), its inside filled. A card's loop reaches past its box
|
||||
* (mb_ext: into the gaps, round the label and the gauge); draw_frame draws those parts. Tables: tools/gen (python,
|
||||
* the unit curve in Q12) */
|
||||
static const int16_t MB_HW3[33] = {4096, 4096, 4096, 4095, 4093, 4091, 4087, 4082, 4075, 4065, 4054, 4040, 4023, 4002, 3978, 3950, 3918, 3880, 3837, 3788, 3731, 3667, 3593, 3509, 3412, 3300, 3170, 3016, 2831, 2600, 2296, 1841, 0};
|
||||
static const int16_t MB_PT3[64][2] = {{4096, 0}, {4083, 871}, {4043, 1378}, {3978, 1796}, {3885, 2159}, {3767, 2481}, {3622, 2768}, {3450, 3024}, {3251, 3251}, {3024, 3450}, {2768, 3622}, {2481, 3767}, {2159, 3885}, {1796, 3978}, {1378, 4043}, {871, 4083}, {0, 4096}, {-871, 4083}, {-1378, 4043}, {-1796, 3978}, {-2159, 3885}, {-2481, 3767}, {-2768, 3622}, {-3024, 3450}, {-3251, 3251}, {-3450, 3024}, {-3622, 2768}, {-3767, 2481}, {-3885, 2159}, {-3978, 1796}, {-4043, 1378}, {-4083, 871}, {-4096, 0}, {-4083, -871}, {-4043, -1378}, {-3978, -1796}, {-3885, -2159}, {-3767, -2481}, {-3622, -2768}, {-3450, -3024}, {-3251, -3251}, {-3024, -3450}, {-2768, -3622}, {-2481, -3767}, {-2159, -3885}, {-1796, -3978}, {-1378, -4043}, {-871, -4083}, {0, -4096}, {871, -4083}, {1378, -4043}, {1796, -3978}, {2159, -3885}, {2481, -3767}, {2768, -3622}, {3024, -3450}, {3251, -3251}, {3450, -3024}, {3622, -2768}, {3767, -2481}, {3885, -2159}, {3978, -1796}, {4043, -1378}, {4083, -871}};
|
||||
static const int16_t MB_HW5[33] = {4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4095, 4095, 4094, 4092, 4090, 4087, 4083, 4077, 4070, 4061, 4049, 4034, 4015, 3991, 3962, 3925, 3880, 3824, 3753, 3663, 3547, 3391, 3166, 2791, 0};
|
||||
static const int16_t MB_PT5[64][2] = {{4096, 0}, {4088, 1618}, {4064, 2130}, {4025, 2497}, {3968, 2789}, {3895, 3032}, {3805, 3238}, {3695, 3414}, {3566, 3566}, {3414, 3695}, {3238, 3805}, {3032, 3895}, {2789, 3968}, {2497, 4025}, {2130, 4064}, {1618, 4088}, {0, 4096}, {-1618, 4088}, {-2130, 4064}, {-2497, 4025}, {-2789, 3968}, {-3032, 3895}, {-3238, 3805}, {-3414, 3695}, {-3566, 3566}, {-3695, 3414}, {-3805, 3238}, {-3895, 3032}, {-3968, 2789}, {-4025, 2497}, {-4064, 2130}, {-4088, 1618}, {-4096, 0}, {-4088, -1618}, {-4064, -2130}, {-4025, -2497}, {-3968, -2789}, {-3895, -3032}, {-3805, -3238}, {-3695, -3414}, {-3566, -3566}, {-3414, -3695}, {-3238, -3805}, {-3032, -3895}, {-2789, -3968}, {-2497, -4025}, {-2130, -4064}, {-1618, -4088}, {0, -4096}, {1618, -4088}, {2130, -4064}, {2497, -4025}, {2789, -3968}, {3032, -3895}, {3238, -3805}, {3414, -3695}, {3566, -3566}, {3695, -3414}, {3805, -3238}, {3895, -3032}, {3968, -2789}, {4025, -2497}, {4064, -2130}, {4088, -1618}};
|
||||
static int16_t mb_ext_x, mb_ext_y; /* (a card: the loop this far past its box; ui_draw.c) */
|
||||
static int32_t mb_seed = -1; /* (a card: its shape, by its place; else -1: by the box) */
|
||||
#define MB_VIOLET 0xB19Cu /* (0.6.59) every organelle's line: the beings' violet */
|
||||
static uint16_t mb_heat(int32_t v) /* 0..255 -> the thermal ramp (ui_graph.c heat_col's stops) */
|
||||
{
|
||||
static const uint16_t H[7] = {0x069Fu, 0x59FFu, 0xB19Cu, 0xF146u, 0xFBC0u, 0xFEA0u, 0xFFFFu};
|
||||
int32_t i = v < 0 ? 0 : v > 255 ? 255 : v, k = i * 6 / 256, f = (i * 6 % 256) * 100 / 256;
|
||||
return ux_mix(H[k], H[k + 1 < 7 ? k + 1 : 6], f);
|
||||
}
|
||||
static void mb_plot(int32_t x, int32_t y, uint16_t c, int32_t a) /* c over the canvas pixel, a 0..256 */
|
||||
{
|
||||
uint16_t *p;
|
||||
y += cv_oy;
|
||||
if (a <= 0 || (uint32_t)x >= cv_w || (uint32_t)y >= cv_h)
|
||||
return;
|
||||
p = &cv_px[(uint32_t)y * cv_w + (uint32_t)x];
|
||||
*p = swap16(a >= 256 ? c : ux_mix(swap16(*p), c, a * 100 / 256));
|
||||
}
|
||||
static void mb_line(int32_t x0, int32_t y0, int32_t x1, int32_t y1, uint16_t c) /* antialiased, Q4 */
|
||||
{
|
||||
int32_t dx = x1 - x0, dy = y1 - y0, t, g, p, e, f;
|
||||
if ((dx < 0 ? -dx : dx) >= (dy < 0 ? -dy : dy)) {
|
||||
if (x0 > x1) { t = x0; x0 = x1; x1 = t; t = y0; y0 = y1; y1 = t; }
|
||||
g = x1 != x0 ? ((y1 - y0) << 8) / (x1 - x0) : 0;
|
||||
for (p = x0 >> 4, e = x1 >> 4; p <= e; p++) {
|
||||
int32_t y = (y0 << 4) + g * (p - (x0 >> 4)) - 128;
|
||||
f = y & 255;
|
||||
mb_plot(p, y >> 8, c, 256 - f), mb_plot(p, (y >> 8) + 1, c, f);
|
||||
}
|
||||
} else {
|
||||
if (y0 > y1) { t = x0; x0 = x1; x1 = t; t = y0; y0 = y1; y1 = t; }
|
||||
g = ((x1 - x0) << 8) / (y1 - y0);
|
||||
for (p = y0 >> 4, e = y1 >> 4; p <= e; p++) {
|
||||
int32_t x = (x0 << 4) + g * (p - (y0 >> 4)) - 128;
|
||||
f = x & 255;
|
||||
mb_plot(x >> 8, p, c, 256 - f), mb_plot((x >> 8) + 1, p, c, f);
|
||||
}
|
||||
}
|
||||
}
|
||||
/* the organelle centred on (cx, cy) (Q4), half sizes a b (Q4), filled with fill (-1: not) and its line k. Uneven as a
|
||||
* cell: its radius swells and dips along the rim by two slow waves (seed: each box its own shape, always the same),
|
||||
* +-8 % (a card's outward, past its box; any other box's inward, inside it); the fill follows the same rim */
|
||||
static int32_t mb_wave(int32_t a) /* a: 0..1023 a turn -> -64..64 */
|
||||
{
|
||||
int32_t t = a & 511, v = t * (512 - t) >> 10;
|
||||
return (a & 512) ? -v : v;
|
||||
}
|
||||
static void mb_body(int32_t cx, int32_t cy, int32_t a, int32_t b, int n5, int32_t fill, uint16_t k, uint32_t seed)
|
||||
{
|
||||
const int16_t (*pt)[2] = n5 ? MB_PT5 : MB_PT3;
|
||||
int32_t X[65], Y[65], y, i, y0 = 1 << 30, y1 = -(1 << 30);
|
||||
for (i = 0; i < 64; i++) { /* the rim's points (Q4) */
|
||||
int32_t w = (mb_ext_x ? 1060 : 940) + ((mb_wave(i * 32 + (int32_t)(seed & 1023)) * 3 + /* (inside its box unless a card) */
|
||||
mb_wave(i * 48 + (int32_t)(seed >> 10 & 1023)) * 2) >> 2);
|
||||
X[i] = cx + ((pt[i][0] * a >> 12) * w >> 10); /* (w: 1024 = the curve) */
|
||||
Y[i] = cy + ((pt[i][1] * b >> 12) * w >> 10);
|
||||
if (Y[i] < y0) y0 = Y[i];
|
||||
if (Y[i] > y1) y1 = Y[i];
|
||||
}
|
||||
X[64] = X[0], Y[64] = Y[0];
|
||||
if (fill >= 0)
|
||||
for (y = y0 >> 4; y <= (y1 >> 4) + 1; y++) { /* rows: where the rim crosses the row's centre, the ends blended */
|
||||
int32_t yc = y * 16 + 8, xl = 1 << 30, xr = -(1 << 30), x;
|
||||
for (i = 0; i < 64; i++)
|
||||
if ((Y[i] <= yc) != (Y[i + 1] <= yc)) {
|
||||
int32_t xi = X[i] + (X[i + 1] - X[i]) * (yc - Y[i]) / (Y[i + 1] - Y[i]);
|
||||
if (xi < xl) xl = xi;
|
||||
if (xi > xr) xr = xi;
|
||||
}
|
||||
if (xl > xr) continue;
|
||||
for (x = (xl >> 4) + 1; x < (xr >> 4); x++)
|
||||
mb_plot(x, y, (uint16_t)fill, 256);
|
||||
mb_plot(xl >> 4, y, (uint16_t)fill, (16 - (xl & 15)) * 16);
|
||||
mb_plot(xr >> 4, y, (uint16_t)fill, (xr & 15) * 16);
|
||||
}
|
||||
for (i = 0; i < 64; i++) /* the line */
|
||||
mb_line(X[i], Y[i], X[i + 1], Y[i + 1], k);
|
||||
}
|
||||
static void cv_membrane(int32_t x, int32_t y, int32_t w, int32_t h, uint16_t c, uint16_t under)
|
||||
{
|
||||
int n5 = w > 2 * h || w > 150; /* (a long row, the panel: flatter) */
|
||||
cv_rect(x, y, w, h, under);
|
||||
mb_body((x * 2 + w) * 8, (y * 2 + h) * 8, (w * 8) + mb_ext_x * 16 - 8, (h * 8) + mb_ext_y * 16 - 8, n5, c, MB_VIOLET,
|
||||
mb_seed >= 0 ? (uint32_t)mb_seed : ((uint32_t)x * 2654435761u ^ (uint32_t)w * 40503u ^ (uint32_t)h * 977u) >> 8);
|
||||
}
|
||||
/* a filled rectangle with rounded corners (r <= 8), the corners anti-aliased against `under` (what lies
|
||||
* behind it): the flat look's cards, panels, rows, bars and buttons */
|
||||
static void cv_rrect(int32_t x, int32_t y, int32_t w, int32_t h, int32_t r, uint16_t c, uint16_t under)
|
||||
{
|
||||
int32_t i, j, cut = ux.chamfer && r > 0; /* (JIANT 0.5: a -r cushion, a switch, stays round) */
|
||||
int32_t i, j, cut = ux.chamfer && r > 0 && w >= 20 && h >= 14; /* (JIANT 0.5: a -r cushion, a switch, stays round;
|
||||
* 0.6.59: a small box, a chip or a bar, round too) */
|
||||
GFX_HOOK_CELL(x, y + cv_oy, x + w, y + h + cv_oy); /* (the lint: what is drawn on it stays inside it) */
|
||||
if (r < 0) r = -r; /* (-r: rounded in every style: a keycap-like cushion) */
|
||||
else if (ux.style == ST_LINE) r = 0; /* LINE: square cursors, selections and fills (FLAT: rounded) */
|
||||
@@ -299,19 +395,8 @@ static void cv_rrect(int32_t x, int32_t y, int32_t w, int32_t h, int32_t r, uint
|
||||
cv_rect(x, y, w, h, c);
|
||||
return;
|
||||
}
|
||||
if (cut) { /* (JIANT 0.6.56) the landing's windows: a square box, and a box
|
||||
* big enough to be a window (a card, a panel, a row, a button) its
|
||||
* four HUD corners, L-shaped ticks a little lighter than its fill */
|
||||
uint16_t k = ux_mix(c, T_TEXT, 30);
|
||||
int32_t n = (h < w ? h : w) / 3;
|
||||
cv_rect(x, y, w, h, c);
|
||||
if (w < 20 || h < 14)
|
||||
return;
|
||||
if (n > 6) n = 6;
|
||||
cv_rect(x, y, n, 1, k), cv_rect(x, y, 1, n, k);
|
||||
cv_rect(x + w - n, y, n, 1, k), cv_rect(x + w - 1, y, 1, n, k);
|
||||
cv_rect(x, y + h - 1, n, 1, k), cv_rect(x, y + h - n, 1, n, k);
|
||||
cv_rect(x + w - n, y + h - 1, n, 1, k), cv_rect(x + w - 1, y + h - n, 1, n, k);
|
||||
if (cut) { /* (JIANT 0.6.59) an organelle: cv_membrane */
|
||||
cv_membrane(x, y, w, h, c, under);
|
||||
return;
|
||||
}
|
||||
cv_rect(x + r, y, w - 2 * r, h, c);
|
||||
|
||||
+38
-2
@@ -374,6 +374,35 @@ static void draw_rules(uint32_t y, uint32_t h)
|
||||
for (i = 0; i < 3u; i++)
|
||||
lcd_rule((uint32_t)(CARD_X(i) + CARD_W), y, 1, h);
|
||||
}
|
||||
/* (JIANT 0.6.59) a card's body: JIANT an organelle (gfx.c cv_membrane: violet, uneven, each card its own shape) whose
|
||||
* loop reaches past the card, round its label and gauge, into the gaps (draw_frame draws those parts); another palette
|
||||
* the rounded card */
|
||||
#define CARD_EXT_X 2
|
||||
#define CARD_EXT_Y 3
|
||||
static uint32_t card_seed(uint32_t c) { return (c * 2654435761u >> 12) & 0xFFFFFu; } /* (each card its own shape) */
|
||||
static void card_body(uint32_t c)
|
||||
{
|
||||
if (ux.chamfer && !ux.style) {
|
||||
mb_ext_x = CARD_EXT_X, mb_ext_y = CARD_EXT_Y, mb_seed = (int32_t)card_seed(c);
|
||||
cv_rrect(0, 0, COL_W, COL_H, 4, T_SURF, T_BG);
|
||||
mb_ext_x = mb_ext_y = 0, mb_seed = -1;
|
||||
} else
|
||||
cv_rrect(0, 0, COL_W, COL_H, 4, T_SURF, T_BG);
|
||||
}
|
||||
/* the parts of the cards' loops outside the cards (the gaps above, below and between them): with the frame */
|
||||
static void draw_loops(uint32_t y, uint32_t h)
|
||||
{
|
||||
uint32_t c;
|
||||
cv_begin(240, h, T_BG);
|
||||
cv_oy = -(int32_t)y;
|
||||
mb_ext_x = CARD_EXT_X; /* (the cards' shapes: card_body's) */
|
||||
for (c = 0; c < 4u; c++)
|
||||
mb_body((CARD_X(c) * 2 + COL_W) * 8, (Y_LABEL * 2 + COL_H) * 8, COL_W * 8 + CARD_EXT_X * 16 - 8,
|
||||
COL_H * 8 + CARD_EXT_Y * 16 - 8, 0, T_SURF, MB_VIOLET, card_seed(c));
|
||||
mb_ext_x = 0;
|
||||
cv_oy = 0;
|
||||
cv_blit(0, y);
|
||||
}
|
||||
/* full redraw: the strips (header, cards, panel, footer) cover the rest; only the BG between them is filled */
|
||||
static void draw_frame(void)
|
||||
{
|
||||
@@ -387,6 +416,8 @@ static void draw_frame(void)
|
||||
240u - (uint32_t)(CARD_X(i) + CARD_W), ch, T_BG);
|
||||
if (ux.style) /* LINE: the dividers in the gaps */
|
||||
draw_rules(Y_LABEL, ch);
|
||||
else if (ux.chamfer && ch == CARD_H) /* (0.6.59) JIANT: the cards' loops in the gaps */
|
||||
draw_loops(H_HEAD, gy - H_HEAD);
|
||||
}
|
||||
|
||||
/* MOTION on the cards (#63: values that move on their own): the selected track's motion-driven parameters
|
||||
@@ -582,7 +613,7 @@ static void draw_column(uint32_t c, const char *label, const char *val, const ch
|
||||
return;
|
||||
}
|
||||
cv_begin(COL_W, COL_H, T_BG);
|
||||
cv_rrect(0, 0, COL_W, COL_H, 4, T_SURF, T_BG);
|
||||
card_body(c);
|
||||
}
|
||||
if (label[0] || val[0]) {
|
||||
if (!strip && label[0]) {
|
||||
@@ -761,7 +792,12 @@ static void draw_foot(void)
|
||||
const step_t *st = &seq_steps(t)[si];
|
||||
if (si >= (uint32_t)t->p[P_SLEN])
|
||||
continue;
|
||||
if (step_on(st)) /* a note: a bar (accented: the accent) */
|
||||
if (ux.chamfer && !ux.style) { /* (0.6.59) JIANT: cells, a note a round one in its heat */
|
||||
if (step_on(st))
|
||||
cv_rrect(sx, 2, 9, 9, -5, (st->flags & SF_ACCENT) ? T_ACCENT : mb_heat(110 + (st->vel ? st->vel : 96) * 50 / 127), T_BG);
|
||||
else
|
||||
cv_rrect(sx, 6, 9, 3, -2, st->time == ST_TIE ? T_MID : T_RAISE, T_BG); /* (a stub between) */
|
||||
} else if (step_on(st)) /* a note: a bar (accented: the accent) */
|
||||
cv_rrect(sx, 1, 9, 11, 2, (st->flags & SF_ACCENT) ? T_ACCENT : T_THEME, T_BG);
|
||||
else /* empty: a stub (a tie: brighter) */
|
||||
cv_rrect(sx, 9, 9, 3, 1, st->time == ST_TIE ? T_MID : T_RAISE, T_BG);
|
||||
|
||||
@@ -7,7 +7,7 @@ import html, os
|
||||
|
||||
R = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
OUT = os.path.join(R, 'docs', 'cheatsheet')
|
||||
VERSION = 'v0.6.58'
|
||||
VERSION = 'v0.6.59'
|
||||
|
||||
HEAT = ['#22d3ee', '#3b82f6', '#8b5cf6', '#d946ef', '#ef4444', '#ff7a00', '#facc15', '#f4f1ea']
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* build/video/capture build/video -> audio.wav (44.1 kHz stereo), screen.rgb (240 x 240 RGB24 a frame)
|
||||
* tools/video/compose.py makes the 1080p video from them. */
|
||||
#define UI_TEST_NO_MAIN 1
|
||||
#define FELUCCA_VERSION "v0.6.58"
|
||||
#define FELUCCA_VERSION "v0.6.59"
|
||||
#include "ui_test.c"
|
||||
|
||||
#define FPS 30u
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* build/video_dice/capture build/video_dice -> audio.wav, screen.rgb, scenes.txt, beats.txt, seps.txt, intro.txt
|
||||
* python3 tools/video/compose.py build/video_dice -> build/video_dice/jiant-fm.mp4 */
|
||||
#define UI_TEST_NO_MAIN 1
|
||||
#define FELUCCA_VERSION "v0.6.58"
|
||||
#define FELUCCA_VERSION "v0.6.59"
|
||||
#include "ui_test.c"
|
||||
|
||||
#define FPS 30u
|
||||
|
||||
Reference in new issue
Block a user