diff --git a/README.md b/README.md index df50aa70..31f3820e 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/docs/MANUAL.es.md b/docs/MANUAL.es.md index 201e21a0..11499595 100644 --- a/docs/MANUAL.es.md +++ b/docs/MANUAL.es.md @@ -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 diff --git a/docs/MANUAL.md b/docs/MANUAL.md index a36f1efb..46b31610 100644 --- a/docs/MANUAL.md +++ b/docs/MANUAL.md @@ -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... diff --git a/docs/cheatsheet-controls.pdf b/docs/cheatsheet-controls.pdf index c8f3fed8..427ec0d2 100644 Binary files a/docs/cheatsheet-controls.pdf and b/docs/cheatsheet-controls.pdf differ diff --git a/docs/cheatsheet-controls.png b/docs/cheatsheet-controls.png index db1ad953..057b29de 100644 Binary files a/docs/cheatsheet-controls.png and b/docs/cheatsheet-controls.png differ diff --git a/docs/cheatsheet-sound.pdf b/docs/cheatsheet-sound.pdf index de112eb0..be177627 100644 Binary files a/docs/cheatsheet-sound.pdf and b/docs/cheatsheet-sound.pdf differ diff --git a/docs/cheatsheet-sound.png b/docs/cheatsheet-sound.png index 5400bb70..526b9ff3 100644 Binary files a/docs/cheatsheet-sound.png and b/docs/cheatsheet-sound.png differ diff --git a/docs/cheatsheet/controls.html b/docs/cheatsheet/controls.html index ae9678df..a7a91a51 100644 --- a/docs/cheatsheet/controls.html +++ b/docs/cheatsheet/controls.html @@ -51,9 +51,9 @@ ul { padding-left: 18px; } li { margin: 2px 0; }
JIANT FM signature

JIANT FM · CONTROLS

every button, knob, layer, combo and page

-
firmware v0.6.58 · M-VAVE FM-1 · juanjiant-bit.github.io/JIANT
+
firmware v0.6.59 · M-VAVE FM-1 · juanjiant-bit.github.io/JIANT
THE PANEL

KNOBS AND TRANSPORT

MASTERMaster volume.
SELECTHOME: DICE EVERYTHING? (OCT+ yes): a new piece in one scale. EDIT: the sound's dice. GLO's pages or GLO held: the tempo. Macros open (LFO held or latched): new random routes.
PRESETSBrowses the sounds (factory and user). On step, list and song pages: the cursor / the row. Hold a page button + PRESETS: jump through its pages.
ALGORITHMSelects the track from any page: T1–T4, or T1–T6 with TRACKS 6.
KNOB 1–4The four columns on screen. Fast sweeps the whole range, slow fine-tunes. With a layer held: the layer's.
OCT− · OCT+The keyboard's octave (both together: back to 0). On action pages and dialogs: back / confirm.
PLAYStart / stop. GLO + PLAY: restart from the top.
RECArms live recording on the selected track (notes and knob moves, overdub).
HOMETap: the ecosystem. Hold: the MENU.
KEYS27 keys play the selected track in its scale; with a layer held they become that layer's.

PAGE BUTTONS

BUTTONTAP: ITS PAGES, ONE PER TAPHOLD
ENVENV · ENV DEST—
LFOLFO · LFO DEST · MOD · MSEQ · MSEQ 2MACROS M1–M4 (stay latched)
FXTRACK · SLICER · DELAY · REVERB · CHORUS · MASTER (two quick taps: next section)PUNCH-IN FX
SCLSCL · SCL 2ROOT by key
EDITEDIT 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)INIT · RECALL · sound mutes
GLOMIXER · GLOBAL · SYSTEMMUTE · SOLO · LEVEL · TAP
SAVEPRESETS · USER · PROJECT · ARRANGE · TOOLSSONG layer
ARPARP · ARP 2—
SEQSTEP · COMP · PATTERN · AUTOMATION · AUTO LIST · MUTATE · FUGUE · SHIFTSEQ TOOLS
REC(transport)CLEAR · CLICK

BUTTON + PRESETS jumps straight to a page (no wrap); let go and you stay there.

LAYERS · HOLD A BUTTON

FX · PUNCH-IN EFFECTS

F3REP 1/8
G3REP 1/16
A3REP 1/32
B3LPF
C4HPF
D4OCT−
E4OCT+
F4½ TEMPO
G4DEC−
A4DEC+
B4STUT 1/8
C5STUT 1/16
D5ATK+
E5ARP
F5RAND
G5ERASE
F#M1
G#M2
A#M3
C#M4
D#M5
F#M6
G#
A#TGT
C#
D#
F#

LATCH (default): a key toggles its effect; hold FX and let go untouched: LOCKED open, FX again unlocks; OCT- all off. In on the next 1/16. Black 1–6 mute T1–T6, A#4 picks which tracks the MIDI ones touch (all · synths · drums). With REC armed and playing they record into the section's lane; G5 erases it.

KNOBS

FILTERCRUSHTHROWDEPTH

GLO · MIX

F3SOLO 1
G3SOLO 2
A3SOLO 3
B3SOLO 4
C4SOLO 5
D4SOLO 6
E4ALL
F4TAP
G4UNDO
A4
B4
C5
D5
E5
F5
G5
F#M1
G#M2
A#M3
C#M4
D#M5
F#M6
G#KICK
A#SNR
C#HAT
D#PERC
F#

Black 1–6 mute T1–T6 (latched), 7–10 the DRUM-X groups. White: solo while held, E4 unmutes all, F4 tap tempo, G4 UNDO the last big change (again: redo), A4 FREEZE MUTATE. SELECT: the tempo. PLAY: restart.

KNOBS

LEVEL T1LEVEL T2LEVEL T3LEVEL T4

T5 or T6 selected: the knobs are T3–T6.

SAVE · SONG

F3PLAY A
G3PLAY B
A3PLAY C
B3PLAY D
C4STORE A
D4STORE B
E4STORE C
F4STORE D
G4
A4
B4
C5
D5LOOP/ SONG
E5SONG REC
F5
G5SONG
F#
G#
A#
C#
D#
F#
G#
A#
C#
D#
F#

PLAY A–D on the next bar (several in one hold: a quick chain), STORE the section into A–D. OCT+ stores the playing section, OCT− recalls it. On the SONG page KNOB 4 stores a scene.

KNOBS

SONG 1–8---

EDIT · SOUND

F3INIT
G3RECALL
A3
B3
C4
D4
E4
F4
G4
A4
B4
C5
D5
E5
F5
G5
F#BD
G#SD
A#CP
C#CH
D#OH
F#TM
G#RS
A#CB
C#
D#
F#

INIT: the factory sound (DRUM: the kit too). RECALL: the sound stored in the section. On a DRUM track black 1–8 mute each DRUM-X sound.

KNOBS

EDIT 1EDIT 2EDIT 3EDIT 4

LFO · MACROS

Knobs M1–M4; they stay latched when let go (LFO again: off). F3 rolls new routes, G3 clears them, SELECT rolls too (only tracks that sound).

KNOBS

M1M2M3M4

SCL · SCALE

Any key sets the ROOT. ROOT and SCALE are every melodic track's (and RESO's).

KNOBS

ROOTSCLOFSPIT

SEQ · TOOLS

On the SEQ pages: F3 CLEAR · G3 REVERSE · A3 B3 SHIFT · C4 RANDOM · D4 COOK · E4 BEAT · F4 CLR AUTO (the automation).

KNOBS

LENDIVSWINGGATE

REC · RECORD

F3 CLEAR the track (at once; GLO + G4 undoes it), G3 the metronome CLICK.

KNOBS

CLICK---
COMBOS

BUTTONS TOGETHER

PAGE BUTTON + PRESETSJump through that button's pages.
REC + FXEDITENVLFOSCLARPGLOClear that part's automation on the selected track (FX: the punch-in lane too).
SEQ + RECCLEAR ALL SEQUENCES? (OCT+ confirms).
SAVE + OCT+ / OCT−Store / recall the playing section.
GLO + PLAYRestart from the top.
GLO + SELECTTempo (from any page).
STEP HELD + KNOBA parameter lock on that step (roll, grid).
HOME heldMENU: knob accel, FX latch, hold time, USB level, palettes, animation…
EVERY PAGE · KNOB 1 – 4

ENV

ENV
ATKDECSUSREL
ENV DEST
FILTERPITCHSHAPELOOP

LFO

LFO
RATEWAVEPHASEFADE
LFO DEST
PITCHFILTERSHAPEAMP
MOD
SLOTSRCDESTAMT
MSEQ
STEPLEVELLENSLEW
MSEQ 2
DIV---

SCL · ARP

SCL
ROOTSCALEQUANTTRANS
SCL 2ALL TR - - -
ARP
MODERATEOCTGATE
ARP 2
SWINGPROBHOLDORDER

FX

FX
DISTCHORUSDLYREV
DIST
DISTTYPETONE-
AUTOPAN
DEPTHRATESYNCWAVE
SLICER
MODEPATRATEDEPTH
SL BUS
T1T2T3T4
SL BUS 2
T5T6FX-
SL PITCH
STEPPITCHLENQUANT
DLY
TIMEFEEDBKTONEMIX
DLY 2
WIDEPITCHSPRAY-
REVERB
TYPESIZEDAMPPRE/AIR
REVERB 2
MODRATEFILTWIDE
CHORUS
RATEDEPTHSTEREO-
MASTER
CLIPPUNCHDUCKREL

EDIT

EDIT 1
E1E2E3E4
EDIT 2
E5E6E7E8
RETRIG
RTRG---
OPERATOR
OPRATIOFINELEVEL
OP ENV
OPSTAGERATELEVEL
OPERATOR 2
OPMODEDETUNEVEL
FILTER
TYPECUTRESDRIVE
VOICE
VOICEGLIDEMODEPRIO
KIT 3
BPFEEDBK--
X-MOD
RATEDEPTHSHAPERAND
LEVELS
KICKSNARECLAPHATCL
LEVELS 2
HATOPTOMRIMBELL
SOUND
SOUNDSIDEPITCHPMOD
SOUND 2
SOUNDDECAYNOISECOLOR
SOUND 3
SOUNDMODEPM.TYPEDRIVE
SOUND 4
SOUNDLAYERFEEDBKSEND
STEREO
IMAGE---

SEQ

STEP
STEPNOTETIMEFLAG
STEP · DRUM
STEPLANEHITACC
COMP
STEPTYPEVALVAL
PATTERN
LENDIVSWINGGATE
AUTOMATION
PLAYEVENTLOCKCLEAR
AUTO LIST
ROWSTEPPARAMVALUE
MUTATE
SOUNDPATTERNAMOUNTMODE
FUGUE
HEADRATEDIRINTVL
SHIFT
OFFSETPITCHCHANCEC.LEN

GLO · SAVE

MIXER
LEVELPANREVMUTE
GLOBAL
BPMSWINGCLOCKTUNE
SYSTEM
TRACKSLOADROUTECPU
PRESETS
No.ENGFAVLIST
USER
SLOTLOADERASESAVE
PROJECT
PROJSECTLOADSAVE
ARRANGE
ROWSECTBARSSCENE
TOOLSCLEAR SEQ · INIT SOUND · DEL ROW · CLEAR SONG · NEW PROJECT: K1 picks, OCT+
+JIANT FM v0.6.59 \ No newline at end of file diff --git a/docs/cheatsheet/sound.html b/docs/cheatsheet/sound.html index b691faa7..1fc820b5 100644 --- a/docs/cheatsheet/sound.html +++ b/docs/cheatsheet/sound.html @@ -51,9 +51,9 @@ ul { padding-left: 18px; } li { margin: 2px 0; }
JIANT FM signature

JIANT FM · SOUND · FX · MOD

engines, effects, modulation, sequencer and songs

-
firmware v0.6.58 · M-VAVE FM-1 · juanjiant-bit.github.io/JIANT
+
firmware v0.6.59 · M-VAVE FM-1 · juanjiant-bit.github.io/JIANT
ENGINES · EDIT 1 / EDIT 2

EIGHT ENGINES, ALL SYNTHESIS

ENGINEEDIT 1EDIT 2WHAT TO KNOW
ANALOG
WAVEDETUNEMIXNOISE
CUTRESDRIVEINT
SAW SQR TRI SIN PWM SYNC RING SAW3; INT: osc 2 ±24 st. Its filter is per voice.
FM6
ALGFBMODRATIO
MEGVMODDETUNESLOT
Dexed's 6 operators, 32 algorithms drawn, .syx patches (SLOT), MOD / RATIO move the modulators. OPERATOR · OP ENV · OPERATOR 2: each operator on the device (ratio / fixed, fine, level, its envelope, mode, detune, velocity). SLOT B1–B32: a 32-voice .syx sent from the web editor.
PHASE
WAVEWAVE2DCWENV
DETUNELINESUBFB
Phase distortion (CZ); FB feeds the output back into the phase: hard edge to growl.
LOFI
CHIPWAVEDUTYCRUSH
-VIBBENDMASK
Chip: PLS TRI SAW NOIS WRAM. BYTE: ALGO VAR · MOTN GRIT BEND LOOP. FLOAT (floatbeat): ALGO VAR · MOTN FBK BEND LOOP; CHIP sets FULL / 4BIT / 1BIT.
VOICE
VOWELVOWEL2TALKSHIFT
BUZZBREATHQRAND
Formant voice (after klattsch): vowels, talk, breath.
WHEEL
REGSUBBODYTOP
PERCCLICKDRIVEROTOR
Drawbar organ: registrations, percussion, rotary.
NOISE
MODECOLORFREQPEAK
TRKDENSEDRIFTCRUSH
Coloured and metallic noise, tracked or free.
DRUM-X
MORPHTUNETONEDECAY
NOISEFMENVFOLDDRIVE
8 sounds BD SD CP CH OH TM RS CB, sides A / B: MORPH morphs the kit. The kit first: KIT 3 BP FEEDBK, X-MOD RATE DEPTH SHAPE RAND. Then a sound (KNOB 1 the sound): SIDE PITCH PMOD · DECAY NOISE COLOR · MODE PM.TYPE DRIVE · LAYER (no note) FEEDBK SEND (CHO / DLY / REV). Last LEVELS and STEREO IMAGE (a knob through the kit's stereo placings).

FILTER · EVERY ENGINE

TYPECUTRESDRV

LP · HP · BP · COMB. 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).

VOICE · PLAYING

VCEGLDGLMODPRIO

POLY · MONO · LEG · UNI; glide and its mode; LAST / LOW / HIGH priority. 8 voices shared by the six tracks (MONO and LEGATO keep their note).

DICE

SELECT on EDIT: a random factory preset of the engine, every parameter moved up to a quarter of its range. DRUM-X: both sides of every sound around the factory kit. On HOME (after YES): a new piece: a genre, an energy (SPACE · MID · FRANTIC), its orchestration, every track a role. GLO + G4 undoes.

MODULATION

ENV · LFO

ENV

ATKDECSUSREL

ENV DEST

FLTPITSHPLOOP

LOOP: held, the envelope cycles from the sustain: an ADSR-shaped LFO.

LFO

RATEWAVEPHSFADE

SIN TRI SAW SQR S&H

LFO DEST

PITFLTSHPAMP

MOD MATRIX · 4 SLOTS A TRACK

SLOTSRCDSTAMT

SOURCES

LFOENVVELKEYRANDMODWATEXPRM1M2M3M4STEP

DESTINATIONS

PITCHCUTSHPAMPPANDISTCHODLYREVRATEVIBE1…E8CLIPPNCH

E1…E8: the engine's own EDIT knobs. CLIP / PNCH: the master.

MSEQ · MACROS

MSEQ · A CV SEQUENCER PER TRACK

STEPLVLLENSLEW

16 levels, DIV on MSEQ 2, in time with the transport. Use it from MOD, SRC STEP.

MACROS M1–M4

Hold LFO: the knobs are M1–M4, latched until LFO again. Each session starts with 2 random routes a track; SELECT / F3 roll new ones, G3 clears. By hand: MOD, SRC M1…M4. Saved with the project.

SEQUENCER

64 steps a track, up to 4 notes a step, piano roll and drum grid. Hold a step + turn a knob: a parameter lock. Step recording: hold a chord + KNOB 1 its length; + ARP: arpeggiated (K1 rate, K2 order, K3 oct). COMP: a component a step (CHANCE, RATCH, ARP NOTES / SEQ / SCALE, TRIG, RAND, OCT, TONAL, BEND, ECHO, PULSE, JUMP, REV, FILL, KILL). SHIFT's CHANCE thins the whole track; C.LEN gives the components a length of their own (they drift over the steps). REC + knobs while playing: automation (64 records a section, MOTION page plays / clears them, AUTO LIST edits them).

PATTERN · SHIFT

LENDIVSWGGATE
OFSPITCHNCLEN

SCALE · ARP

ROOT and SCALE are every melodic track's: CHR MAJ MIN DOR MIX PEN MPEN HARM PHRY LYD LOC MEL BLUES WHOLE DIMHW DIMWH. QNT snaps keys or the sequence, TRN transposes, ALL TR (SCL 2) moves every sequence along the scale.

ARP MODES

OFF UP DN UPDN RND ORD REPEAT DNUP UP+8 CONV DIVG PINKY THUMB WALK CHORD TRNS (the keys transpose the sequence)

SONGS

8 projects × 4 sections (A–D), a song of up to 16 rows by bars (SAVE › ARRANGE; END: STOP, x2–x8, LOOP), SLOOP style. Each row can hold a scene: mutes, DRUM-X group mutes, macros and MIDI punch-ins. SAVE held plays sections live on the next bar, stores them, records the song (SONG REC). Each section keeps its sounds, steps, motion, kit and its SLICER.

EFFECTS

PER TRACK

FX · SENDS

DSTCHODLYREV

DIST

DSTTYPETONE-

SOFT · HARD · FOLD · CRUSH · RECT.

AUTOPAN

DEPTHRATESYNCWAVE

The track's pan swung L–R around its PAN. SYNC BEAT: RATE 4 BARS … 1/32, in time with the bar; FREE: in Hz. SIN · TRI · SAW · SQR · S&H, never a click.

SLICER · ONE ON A BUS

SLCRPATRATEDEPTH

OFF · GATE · STUT, 16 patterns, 1/8 … 32T. SL BUS: T1–T6 and FX (the delay / reverb / chorus returns) ON / OFF: everything on = the whole mix chopped after the effects. SL PITCH: the repeats' 16-step pitch (±24 st, tape style, QNT SCL to the scale).

DELAY · CHORUS

DLY

TIMEFDBKTONEMIX

DLY 2

WIDEPITCHSPRY-

Synced or free (5 ms – 1.48 s); PITCH / SPRY: a grain delay.

CHORUS

RATEDEPTHSTER-

STER: 0 as always, down to mono, up to twice as wide.

REVERB · FIVE MODELS

TYPESIZEDAMPPRE
MODRATEFILTWIDE
TYPEWHAT IT ISSIZEDAMPMODRATEWIDE
ROOMClassic roomdecaydarkenschorus on the tailits speedstereo
SPRINGAmp spring tanklength · decaydarkenswobblewobble speedstereo
SHIMRUp an octave on every pass; PRE → AIR (±24 st: down darker and lower, up airier and higher)decaydarkenshow much shimmer——
RESO4 strings tuned to the scale; PRE → PITCH (0–14 steps up), DAMP → FOLW (OFF / T1–T6: the chord follows that track's notes)how long they ringFOLWpast half: the chord opens——
CLOUDGranular wash; SIZE max freezes it; PRE → AIR (±24 st: the cloud down / up, darker / airier)decay · freezedarkensgrains pitched + chorusgrain densitygrain spread

MASTER

CLIPPNCHDUCKREL

CLIP saturates without getting louder. PNCH drives the drums: denser body. DUCK: the kick pulls the rest down (REL its release). An always-on leveler (slow 2:1, −9…+6 dB) before the limiter keeps patches at a steady volume.

PUNCH-IN FX (FX HELD)

REPEAT 1/8 · 1/16 · 1/32, LPF, HPF; on the notes: OCT−/+, ½ TEMPO, DEC−/+, STUTTER, ATK+, ARP, RANDOM. Knobs: FILTER CRUSH THROW DEPTH. Recordable per section.

+JIANT FM v0.6.59 \ No newline at end of file diff --git a/firmware/src/felucca.c b/firmware/src/felucca.c index bf005dbf..155e0d98 100644 --- a/firmware/src/felucca.c +++ b/firmware/src/felucca.c @@ -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" diff --git a/firmware/src/gfx.c b/firmware/src/gfx.c index 8df2fc13..0ebffc58 100644 --- a/firmware/src/gfx.c +++ b/firmware/src/gfx.c @@ -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); diff --git a/firmware/src/ui_draw.c b/firmware/src/ui_draw.c index f7d578b4..49e069c4 100644 --- a/firmware/src/ui_draw.c +++ b/firmware/src/ui_draw.c @@ -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); diff --git a/tools/gen_cheatsheets.py b/tools/gen_cheatsheets.py index 94112426..4aaba7c9 100644 --- a/tools/gen_cheatsheets.py +++ b/tools/gen_cheatsheets.py @@ -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'] diff --git a/tools/video/capture.c b/tools/video/capture.c index f5bfc4a1..8f2724eb 100644 --- a/tools/video/capture.c +++ b/tools/video/capture.c @@ -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 diff --git a/tools/video/capture_dice.c b/tools/video/capture_dice.c index ee160786..6376d4be 100644 --- a/tools/video/capture_dice.c +++ b/tools/video/capture_dice.c @@ -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