mirror of
https://github.com/juanjiant-bit/JIANT.git
synced 2026-12-06 12:54:29 +01:00
Parameter locks: hold a step on SEQ > STEP and turn a knob; SEQ > AUTO LIST lists and edits the locks and automation; lock edits undo. SEQ TOOLS (SEQ held on the SEQ pages): CLEAR, REVERSE, SHIFT, RANDOM, COOK, BEAT and the DRUM lane tools. REC layer (REC held): CLEAR, CLICK, COUNT-IN, CLICK LEVEL. Metronome and count-in (MENU > AUDIO), never in USB audio. MIDI CC map (5, 7, 10, 71..75, 91, 93, 94); DRUM lane levels (EDIT > LANES, LANES 2; projects FUN9). USB audio input at 44.1 or 48 kHz. Step recording at the cursor (SEQ > STEP, REC while stopped); restore the last session at power-on (MENU > SYSTEM > RESTORE LAST). Eight more ARP modes; MENU > CONTROL > SCALE LEDS; MENU > DISPLAY > SCREEN OFF. The header in three parts with a metronome; the new splash; the power-on LED sweep; DRUM grid beats on the key LEDs. Fast knob turns keep every click; KNOB ACCEL up to x8, on the FX and GLO layers too (#126). MASTER read from the pot before the audio starts, keys silent under the splash (#137). The update loader checks the whole package before erasing anything; robustness against damaged packages and stored data; sanitizer and fuzz runs in tests/run_tests.sh. Smaller icons in flash.
30 lines
1.3 KiB
C
30 lines
1.3 KiB
C
/* SPDX-License-Identifier: GPL-3.0-only
|
|
* Copyright (C) 2026 Leo Kuroshita (@kurogedelic), Hügelton Instruments */
|
|
/* MASTER (#137): the pot read before the audio starts, so the first block plays at its level (it was 2048, about
|
|
* 70 % of the knob, until the main loop's first read after the splash, then a 1/8-per-frame glide from mid-scale:
|
|
* the keys, live from the audio ISR at once, sounded loud under the splash with the knob turned down).
|
|
* master_knob: the pot x16, smoothed per UI frame (master_poll) */
|
|
static int32_t master_knob = 512 * 16;
|
|
static void master_poll(void)
|
|
{
|
|
int32_t a = fm1_adc_read(FM1_ADC_MASTER);
|
|
if (a >= 0) {
|
|
master_knob += (a * 16 - master_knob) / 8;
|
|
song.master_q12 = master_of_pot((uint32_t)(master_knob / 16));
|
|
}
|
|
}
|
|
/* power-on (main.c), before audio_init: the knob as it stands, no glide */
|
|
static void master_boot(void)
|
|
{
|
|
uint32_t i;
|
|
(void)fm1_adc_read(FM1_ADC_MASTER); /* (the first conversion after the pin setup: dropped) */
|
|
for (i = 0; i < 3u; i++) {
|
|
int32_t a = fm1_adc_read(FM1_ADC_MASTER);
|
|
if (a >= 0) {
|
|
master_knob = a * 16;
|
|
song.master_q12 = master_of_pot((uint32_t)a);
|
|
return;
|
|
}
|
|
} /* (no reading: felucca_init's level, the loop glides on) */
|
|
}
|