mirror of
https://github.com/juanjiant-bit/JIANT.git
synced 2026-12-05 12:24:42 +01:00
V10.8.78: RAMP as a MOD source (the owner: "poner RAMP como modificador en la mod matrix"): a step's RAMP without a lock drives the matrix's new source RAMP (26, appended), 0 -> 1 along its CURVE over its LENGTH (FROM OPP 1 -> 0; END BACK / HOLD / PING), to any DEST by its AMT; a RAMP with a lock glides it as before (old projects the same: a lockless RAMP never cuts a lock's glide); SEQ > COMP no NO LOCK, placed without one LOCK A PARAM OR MOD>RAMP; MOD's banner STEP RAMP; flash from comp_vname's labels / values / units one copy each and packed name tables (FR ORD DEC GRID_HIT MD H); tests/ramp_test: the FM-1's way to a lock end to end, RAMP on MOD; layout re-recorded (REPIN=keep: kx_src)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KMHk6yH4XbP1xxHYKCo9Mh
This commit is contained in:
16 files changed
+2256
-2110
No files matched your search
+10
-3
@@ -1403,8 +1403,13 @@ timing. Una nota tocada justo en el primer instante después de PLAY va al paso
|
||||
- **RAMP** (V10.6v, en el lugar de JUMP: un JUMP de antes se descarta): el primer lock de parámetro del paso es el
|
||||
parámetro y su destino; el valor se desliza hasta ahí **FROM KNOB** (desde el valor de la perilla) u **OPP** (desde
|
||||
el otro extremo del rango), en 1–32 pasos o 1–16 compases, con una CURVE: LIN, EXP, LOG, S, STEPS, ZIGZAG. Mientras
|
||||
corre no se reinicia solo, y al final y con STOP vuelve deslizándose a la perilla. Sin lock en el paso: nada. No
|
||||
está en GLO > G.COMP.
|
||||
corre no se reinicia solo, y al final y con STOP vuelve deslizándose a la perilla. No está en GLO > G.COMP.
|
||||
(V10.8.78) **Sin lock en el paso, RAMP es una fuente de modulación.** La fuente **RAMP** de la matriz MOD lo sigue:
|
||||
0 → 1 (FROM OPP: 1 → 0) con su CURVE durante su LENGTH, desde el paso donde está, y después lo que diga su END
|
||||
(vuelve a 0, HOLD, PING); ruteala en MOD (SRC RAMP, cualquier DEST, AMT) para barrer un filtro, un envío, una perilla
|
||||
EDIT, el tiempo del delay, una macro... Un paso con lock desliza el lock como antes (la RAMP de MOD queda en 0). Una
|
||||
RAMP por pista (la última lanzada; una sin lock no corta el deslizamiento de un lock en camino). Puesta sin lock,
|
||||
SEQ > COMP dice LOCK A PARAM OR MOD>RAMP.
|
||||
- **SHIFT**: los pasos que siguen suenan desde otro lugar, en ronda dentro del patrón (un mapa de reproducción: los
|
||||
pasos no se mueven), en las pasadas que elige su condición. **CHORD**: la nota del paso suena como acorde.
|
||||
- **SOUND** (pista DRUM): golpes SHORT, GHOST o FLAM. **BEND** (queda de antes): la nota se desliza ±12 semitonos.
|
||||
@@ -2461,7 +2466,9 @@ pequeña curva de respuesta donde iría la barra.
|
||||
- Fuentes: OFF, LFO, ENV, VEL, KEY, RAND, MODW (MIDI CC1), AT (aftertouch), EXPR (CC11), **M1–M4**, **STEP** (MSEQ), **NOISE** (un vagar aleatorio suave, un valor nuevo cada
|
||||
~46 ms: un temblor vivo sobre el filtro, el paneo, un envío), PROX, ENV2, IN ENV, T1 ENV–T6 ENV y (V10.7.22) **OCT+** /
|
||||
**OCT-** (las teclas de expresión, una nota mantenida + OCT+ / OCT−: OCT+ la curva suave 0→1 del bend, OCT- el vibrato
|
||||
entrando; ruteadas, mueven el DEST en vez de la afinación; para un trémolo sobre AMP usá un AMT negativo).
|
||||
entrando; ruteadas, mueven el DEST en vez de la afinación; para un trémolo sobre AMP usá un AMT negativo) y
|
||||
(V10.8.78) **RAMP** (el componente de paso RAMP de la pista en un paso sin lock: 0→1 durante su LENGTH con su CURVE,
|
||||
lanzado cada vez que suena ese paso; 0 en STOP).
|
||||
- Destinos: PITCH, CUT, SHP, AMP, PAN, DIST, CHO, DLY, REV, RATE (velocidad del LFO), VIB, **E1–E8** (las perillas
|
||||
EDIT propias del motor, mostradas por nombre), **CLIP** y **PNCH** (el master), y (0.7.0) los buses de FX: **D.TIM D.FB
|
||||
D.TON D.MIX** (DELAY TIME, FDBK, TONE, MIX), **R.SIZ R.DMP** (REVERB SIZE, DAMP), **C.RAT C.DEP** (CHORUS RATE,
|
||||
|
||||
+10
-2
@@ -1344,7 +1344,13 @@ to the last step).
|
||||
- **RAMP** (V10.6v, in JUMP's place: a JUMP of before is dropped): the step's first parameter lock is the parameter
|
||||
and its target; the value glides there **FROM KNOB** (the knob's value) or **OPP** (the other end of its range),
|
||||
over 1–32 steps or 1–16 bars, along a CURVE: LIN, EXP, LOG, S, STEPS, ZIGZAG. It never restarts itself while it
|
||||
runs, and glides back to the knob at its end and on STOP. No lock on the step: nothing. Not on GLO > G.COMP.
|
||||
runs, and glides back to the knob at its end and on STOP. Not on GLO > G.COMP.
|
||||
(V10.8.78) **No lock on the step: RAMP is a modulation source.** The MOD matrix's source **RAMP** follows it: 0 → 1
|
||||
(FROM OPP: 1 → 0) along its CURVE over its LENGTH, from the step it is on, then as its END says (back to 0, HOLD,
|
||||
PING); route it in MOD (SRC RAMP, any DEST, AMT) to sweep a filter, a send, an EDIT knob, the delay time, a macro...
|
||||
A step with a lock glides the lock as before (MOD's RAMP stays 0 then). One RAMP runs per track (the last launched;
|
||||
a lockless one does not cut a lock's glide on its way). Placed without a lock, SEQ > COMP says
|
||||
LOCK A PARAM OR MOD>RAMP.
|
||||
- **SHIFT**: the steps after it played from another place, round within the pattern (a playback map: the steps
|
||||
themselves never move), on the passes its condition picks. **CHORD**: the step's note played as a chord.
|
||||
- **SOUND** (a DRUM track): SHORT, GHOST or FLAM hits. **BEND** (kept from before): the note glides ±12 semitones.
|
||||
@@ -2334,7 +2340,9 @@ curve where the bar would be.
|
||||
- Sources: OFF, LFO, ENV, VEL, KEY, RAND, MODW (MIDI CC1), AT (aftertouch), EXPR (CC11), **M1–M4**, **STEP** (MSEQ), **NOISE** (a smooth random wander, a new value about every 46 ms: a living wobble on
|
||||
the filter, the pan, a send), PROX, ENV2, IN ENV, T1 ENV–T6 ENV, and (V10.7.22) **OCT+** / **OCT-** (the expression
|
||||
keys, a note held + OCT+ / OCT−: OCT+ the bend's eased 0→1 curve, OCT- the vibrato faded in; routed, they move the DEST
|
||||
instead of the pitch; for a tremolo on AMP use a negative AMT).
|
||||
instead of the pitch; for a tremolo on AMP use a negative AMT), and (V10.8.78) **RAMP** (the track's step component
|
||||
RAMP on a step without a lock: 0→1 over its LENGTH along its CURVE, launched each time that step plays; 0 when
|
||||
stopped).
|
||||
- Destinations: PITCH, CUT, SHP, AMP, PAN, DIST, CHO, DLY, REV, RATE (LFO rate), VIB, **E1–E8** (the engine's own
|
||||
EDIT knobs, shown by name), **CLIP** and **PNCH** (the master), and (0.7.0) the FX buses: **D.TIM D.FB D.TON D.MIX**
|
||||
(DELAY TIME, FDBK, TONE, MIX), **R.SIZ R.DMP** (REVERB SIZE, DAMP), **C.RAT C.DEP** (CHORUS RATE, DEPTH). AMT 64 at a
|
||||
|
||||
+16
-3
@@ -38,7 +38,16 @@
|
||||
* and the engines read t->p as before. An engine reads its parameters in note_on (events_block) unmodulated.
|
||||
* Nothing active (every slot with SRC, DST or AMT at 0): no work, and the sound is bit-identical. */
|
||||
enum { MS_OFF, MS_LFO, MS_ENV, MS_VEL, MS_KEY, MS_RAND, MS_MODW, MS_AT, MS_EXPR, MS_M1, MS_STEP = MS_M1 + 4, MS_NOISE, MS_PROX, MS_ENV2,
|
||||
MS_FOLLOW, MS_T1, MS_OCTUP = MS_T1 + NTRK, MS_OCTDN, MS_N }; /* (V10.54) FOLLOW: the audio input's envelope */
|
||||
MS_FOLLOW, MS_T1, MS_OCTUP = MS_T1 + NTRK, MS_OCTDN, MS_RAMP, MS_N }; /* (V10.54) FOLLOW: the audio input's envelope */
|
||||
/* (V10.6v) RAMP (core.h CV_RAMP_*, seq.c ramp_run): a track's one gliding parameter (the RAMP launched last): its id + 1 (0
|
||||
* none), the step that launched it, VALUE, LENGTH - 1; how far, Q24 of the way (past RAMP_ONE: the knob's value coming
|
||||
* back, in samples); the lock's value it goes to. (V10.8.78, the owner) id RAMP_MOD: a RAMP on a step without a lock, the
|
||||
* matrix's source RAMP (MS_RAMP, kx_src): `to` its value, Q15, 0 -> 1 along its CURVE over its LENGTH (FROM OPP: 1 -> 0;
|
||||
* END: BACK to 0, HOLD, PING), as a lock's value would glide */
|
||||
typedef struct { uint8_t id, st, val, len; uint32_t pos; int16_t to; uint8_t back; } ramp_t; /* (back: BOUNCE on its
|
||||
* way back, V10.7.62) */
|
||||
static ramp_t rmp[NTRK] __attribute__((section(".bss.swarm"))); /* (out of the merged statics, as fx.c's djf; seq.c's) */
|
||||
#define RAMP_MOD 0xFFu
|
||||
/* (V10.7.22, the owner) OCT+ / OCT-: the expression keys as sources (seq.c kx_block), 0..1 / bipolar; a route from one on
|
||||
* the track takes it off the pitch (OCT+ no bend, OCT- no pitch vibrato) */ /* (V10.22) ENV2: ENV > ENV 2, per voice */
|
||||
static volatile int16_t mod_prox; /* (V10.14) PROX, the Bluetooth proximity: 0..32767 (bt.c bt_prox_step, the main loop; 0
|
||||
@@ -224,11 +233,14 @@ static __attribute__((noinline)) int32_t kx_shape(uint32_t i, uint32_t k)
|
||||
int32_t x = (kx_amt[i][1] + 8) >> 4, q = (int16_t)kx_ph[i];
|
||||
return k ? (x * x >> 12) * (3 * 4096 - 2 * x) >> 12 : q * (32768 - (q < 0 ? -q : q)) >> 13;
|
||||
}
|
||||
/* (V10.7.22) the sources: OCT+ the bend's curve, Q15 (OCT BEND OFF: 0), OCT- the vibrato, its depth faded in, bipolar.
|
||||
/* (V10.7.22) the sources: OCT+ the bend's curve, Q15 (OCT BEND OFF: 0), OCT- the vibrato, its depth faded in, bipolar;
|
||||
* (V10.8.78) RAMP (rmp[], seq.c ramp_run).
|
||||
* (Out of line, as kx_shape and kx_route: new code at the image's end, the sound's code where it was) */
|
||||
static __attribute__((noinline)) int32_t kx_src(const track_t *t, uint32_t s)
|
||||
{
|
||||
uint32_t i = (uint32_t)(t - trk);
|
||||
if (s == MS_RAMP) /* (V10.8.78) the step component RAMP running (stopped: 0) */
|
||||
return song.playing && rmp[i].id == RAMP_MOD ? rmp[i].to : 0;
|
||||
return s == MS_OCTUP ? (kx_semi ? kx_shape(i, 1u) << 3 : 0) : kx_shape(i, 0u) * (kx_amt[i][0] >> 1) >> 15;
|
||||
}
|
||||
/* track i's slots routing OCT- (bit 0) / OCT+ (bit 1): those keys are off its pitch (seq.c kx_block) */
|
||||
@@ -244,7 +256,8 @@ static __attribute__((noinline)) uint32_t kx_route(uint32_t i)
|
||||
/* source s of the track: the per-track ones, the per-voice ones of the latest note-on */
|
||||
static int32_t mod_tsrc(const track_t *t, uint32_t s, int32_t lfo)
|
||||
{
|
||||
if (s >= MS_T1) return s < MS_OCTUP ? track_env[s - MS_T1] : kx_src(t, s); /* (V10.7.22 OCT+ OCT-: the keys) */
|
||||
if (s >= MS_T1) return s < MS_OCTUP ? track_env[s - MS_T1] : kx_src(t, s); /* (V10.7.22 OCT+ OCT-: the keys; V10.8.78
|
||||
* RAMP) */
|
||||
if ((s == MS_ENV || s == MS_ENV2) && (t->m_vi >= NVOICE || !t->v[t->m_vi].active)) return 0;
|
||||
switch (s) {
|
||||
case MS_LFO:
|
||||
|
||||
@@ -31,7 +31,7 @@ static const char PNB[] =
|
||||
/* N_MXM */ "M1\0" "M2\0" "M3\0" "M4\0"
|
||||
/* N_VPAL */ "MIXED\0" "THERMAL\0" "ORG/BLUE\0" "GRN/RED\0" "AMBER\0" "MONO\0"
|
||||
/* N_RFOLW */ "OFF\0" "T1\0" "T2\0" "T3\0" "T4\0" "T5\0" "T6\0"
|
||||
/* N_MSRC */ "OFF\0" "LFO\0" "ENV\0" "VEL\0" "KEY\0" "RAND\0" "MODW\0" "AT\0" "EXPR\0" "M1\0" "M2\0" "M3\0" "M4\0" "MSEQ\0" "NOISE\0" "PROX\0" "ENV2\0" "IN ENV\0" "T1 ENV\0" "T2 ENV\0" "T3 ENV\0" "T4 ENV\0" "T5 ENV\0" "T6 ENV\0" "OCT+\0" "OCT-\0"
|
||||
/* N_MSRC */ "OFF\0" "LFO\0" "ENV\0" "VEL\0" "KEY\0" "RAND\0" "MODW\0" "AT\0" "EXPR\0" "M1\0" "M2\0" "M3\0" "M4\0" "MSEQ\0" "NOISE\0" "PROX\0" "ENV2\0" "IN ENV\0" "T1 ENV\0" "T2 ENV\0" "T3 ENV\0" "T4 ENV\0" "T5 ENV\0" "T6 ENV\0" "OCT+\0" "OCT-\0" "RAMP\0"
|
||||
/* N_MDST */ "OFF\0" "PITCH\0" "CUT\0" "SHP\0" "AMP\0" "PAN\0" "DIST\0" "CHO\0" "DLY\0" "REV\0" "L.RATE\0" "L.PIT\0" "E1\0" "E2\0" "E3\0" "E4\0" "E5\0" "E6\0" "E7\0" "E8\0" "CLIP\0" "PNCH\0" "D.TIM\0" "D.FB\0" "D.TON\0" "D.MIX\0" "R.SIZ\0" "R.DMP\0" "C.RAT\0" "C.DEP\0" "F.CUT\0" "LEVEL\0" "M1\0" "M2\0" "M3\0" "M4\0"
|
||||
/* N_CHRD */ "OFF\0" "TRIAD\0" "7TH\0" "ADD9\0" "SUS2\0" "SUS4\0" "MAJ\0" "MIN\0" "7\0" "MAJ7\0" "MIN7\0" "POWER\0" "POP\0" "JAZZ\0" "SOUL\0" "DREAM\0" "QUART\0" "\0"
|
||||
/* N_DTYPE (V10.8.72: BYTE's formulas appended) */ "SOFT\0" "HARD\0" "FOLD\0" "CRUSH\0" "RECT\0" "AMP\0" "RING\0" "STEPS\0" "XOR\0" "WOB\0" "SFOLD\0" "SAT\0"
|
||||
@@ -102,22 +102,22 @@ static const char PNB[] =
|
||||
#define N_RFOLW ((const char *const *)(PNB + 783))
|
||||
#define N_RFOLW_N 7u
|
||||
#define N_MSRC ((const char *const *)(PNB + 805))
|
||||
#define N_MSRC_N 26u
|
||||
#define N_MDST ((const char *const *)(PNB + 935))
|
||||
#define N_MSRC_N 27u
|
||||
#define N_MDST ((const char *const *)(PNB + 940))
|
||||
#define N_MDST_N 36u
|
||||
#define N_CHRD ((const char *const *)(PNB + 1096))
|
||||
#define N_CHRD ((const char *const *)(PNB + 1101))
|
||||
#define N_CHRD_N 18u
|
||||
#define N_DTYPE ((const char *const *)(PNB + 1178))
|
||||
#define N_DTYPE ((const char *const *)(PNB + 1183))
|
||||
#define N_DTYPE_N 12u
|
||||
#define N_LWAVE6 ((const char *const *)(PNB + 1237))
|
||||
#define N_LWAVE6 ((const char *const *)(PNB + 1242))
|
||||
#define N_LWAVE6_N 6u
|
||||
#define N_LWAVE N_LWAVE6
|
||||
#define N_LWAVE_N 5u
|
||||
#define N_FTYPE ((const char *const *)(PNB + 1263))
|
||||
#define N_FTYPE ((const char *const *)(PNB + 1268))
|
||||
#define N_FTYPE_N 5u
|
||||
#define N_RTYPE ((const char *const *)(PNB + 1283))
|
||||
#define N_RTYPE ((const char *const *)(PNB + 1288))
|
||||
#define N_RTYPE_N 5u
|
||||
#define N_DTIME ((const char *const *)(PNB + 1312))
|
||||
#define N_DTIME ((const char *const *)(PNB + 1317))
|
||||
#define N_DTIME_N (DT_DOT + 3u)
|
||||
#define PN_AT(l, i) str_nth((const char *)(l), (unsigned)(i)) /* a packed list's name i */
|
||||
static const char *desc_nm(const param_desc_t *d, int32_t i) /* an enum's name i (a list of PNB's or of pointers) */
|
||||
|
||||
+30
-23
@@ -1972,12 +1972,7 @@ static uint32_t kb_drum_keys(void)
|
||||
return (drum_track(&trk[split_track(1)]) ? c : 0u) | (drum_track(&trk[split_track(0)]) ? ~c : 0u);
|
||||
}
|
||||
|
||||
/* (V10.6v) RAMP (core.h CV_RAMP_*): a track's one gliding parameter (the RAMP launched last): its id + 1 (0 none), the
|
||||
* step that launched it, VALUE, LENGTH - 1; how far, Q24 of the way (past RAMP_ONE: the knob's value coming back, in
|
||||
* samples); the lock's value it goes to */
|
||||
typedef struct { uint8_t id, st, val, len; uint32_t pos; int16_t to; uint8_t back; } ramp_t; /* (back: BOUNCE on its
|
||||
* way back, V10.7.62) */
|
||||
static ramp_t rmp[NTRK] __attribute__((section(".bss.swarm"))); /* (out of the merged statics, as fx.c's djf) */
|
||||
/* (V10.6v) RAMP: ramp_t, rmp[] (mod.c, V10.8.78: its source RAMP reads them) */
|
||||
#define RAMP_ONE (1u << 24)
|
||||
#define RAMP_BACK 1024u /* (~23 ms: the knob's value back without a click) */
|
||||
/* -------------------------------------------------------- sequencer --- */
|
||||
@@ -2464,44 +2459,56 @@ static __attribute__((noinline)) void ramp_run(track_t *t, const step_t *s, uint
|
||||
uint32_t ti = trk_index(t) % NTRK, k, id, u, b, st = t->seq_idx % NSTEP, bars;
|
||||
ramp_t *r = &rmp[ti];
|
||||
const motion_event_t *e;
|
||||
int32_t from, to, v, base;
|
||||
if (!motion_enabled(t)) { /* (its records off: so are its locks; motion_restore the values) */
|
||||
int32_t from, to, v, base = 0;
|
||||
int16_t *out;
|
||||
uint32_t mot = (uint32_t)motion_enabled(t), mod = r->id == RAMP_MOD;
|
||||
if (!mot && !mod) /* (its records off: so are its locks; motion_restore the values.
|
||||
* V10.8.78: MOD's RAMP goes on) */
|
||||
r->id = 0;
|
||||
return;
|
||||
}
|
||||
for (k = 0; s && play && k < 2u; k++) {
|
||||
uint32_t val = k ? s->carg2 : s->carg, l = s->clen[k];
|
||||
if (CO_ACT(k ? s->comp2 : s->comp) != CA_RAMP)
|
||||
continue;
|
||||
if (!(e = motion_lock_at(t, st))) /* (no lock: nothing) */
|
||||
if (!(e = mot ? motion_lock_at(t, st) : 0) && r->id && !mod) /* (V10.8.78) no lock: MOD's RAMP (mod.c kx_src); a
|
||||
* lock's glide on its way goes on (a project of before the same) */
|
||||
break;
|
||||
id = MOTION_ID(e) + 1u;
|
||||
id = e ? MOTION_ID(e) + 1u : RAMP_MOD;
|
||||
if (r->id == id && r->st == st && /* (running from here, more than half a step to go: on; a BOUNCE */
|
||||
(CV_RAMP_END(val) == 2u || /* never relaunched, V10.7.62) */
|
||||
r->pos + RAMP_ONE / (2u * (val & CV_RAMP_BARS ? (l % 16u + 1u) << 4 : l + 1u)) < RAMP_ONE))
|
||||
break;
|
||||
if (r->id && r->id != id)
|
||||
if (r->id && r->id != id && !mod)
|
||||
t->p[r->id - 1u] = motion_base[ti][r->id - 1u]; /* (another one: its knob's value back) */
|
||||
r->id = (uint8_t)id; r->st = (uint8_t)st; r->val = (uint8_t)val; r->len = (uint8_t)l;
|
||||
r->pos = 0; r->to = MOTION_VAL(e); r->back = 0;
|
||||
r->pos = 0; r->to = e ? MOTION_VAL(e) : 0; r->back = 0;
|
||||
mod = !e;
|
||||
break;
|
||||
}
|
||||
if (!r->id)
|
||||
return;
|
||||
id = r->id - 1u;
|
||||
motion_active[ti][id / 32u] |= 1u << (id % 32u); /* (a stop puts the knob's value back; seq_tick runs this after
|
||||
* each step's motion_step: its value over the lock's unlock) */
|
||||
base = motion_base[ti][id];
|
||||
to = r->to;
|
||||
if (mod) { /* (V10.8.78) MOD's RAMP: 0 -> 1 (Q15; OPP 1 -> 0), into r->to */
|
||||
to = CV_RAMP_OPP(r->val) ? 0 : 32767;
|
||||
out = &r->to;
|
||||
} else {
|
||||
motion_active[ti][id / 32u] |= 1u << (id % 32u); /* (a stop puts the knob's value back; seq_tick runs this
|
||||
* after each step's motion_step: its value over the lock's unlock) */
|
||||
base = motion_base[ti][id];
|
||||
to = r->to;
|
||||
out = &t->p[id];
|
||||
}
|
||||
b = r->pos - RAMP_ONE;
|
||||
if (r->pos < RAMP_ONE) { /* (on its way; the values between its ends: no fit) */
|
||||
const param_desc_t *d = param_desc_of(eng_idx(t->eng_req), id);
|
||||
bars = (r->val & CV_RAMP_BARS) != 0u;
|
||||
u = div_samples(bars ? 2u : (uint32_t)t->p[P_SDIV]) * (bars ? (r->len % 16u + 1u) << 4 : r->len + 1u);
|
||||
r->pos += (n << 16) / ((u >> 8) | 1u);
|
||||
if (r->pos > RAMP_ONE)
|
||||
r->pos = RAMP_ONE;
|
||||
from = CV_RAMP_OPP(r->val) ? (to >= (d->min + d->max) >> 1 ? d->min : d->max) : base;
|
||||
from = base;
|
||||
if (CV_RAMP_OPP(r->val)) {
|
||||
const param_desc_t *d = mod ? 0 : param_desc_of(eng_idx(t->eng_req), id);
|
||||
from = mod ? 32767 : to >= (d->min + d->max) >> 1 ? d->min : d->max;
|
||||
}
|
||||
b = (uint32_t)ramp_curve(CV_RAMP_CURVE(r->val), (int32_t)(r->pos >> 9)) >> 5;
|
||||
if (r->back) { /* (V10.7.62) BOUNCE: on its way back, the same curve */
|
||||
int32_t x = from;
|
||||
@@ -2513,10 +2520,10 @@ static __attribute__((noinline)) void ramp_run(track_t *t, const step_t *s, uint
|
||||
}
|
||||
} else if (CV_RAMP_END(r->val) == 1u) { /* (V10.7.62) HOLD: it stays there (a stop, the next launch: the
|
||||
* knob's back) */
|
||||
t->p[id] = (int16_t)to;
|
||||
*out = (int16_t)to;
|
||||
return;
|
||||
} else if (b >= RAMP_BACK) { /* (its end: the knob's) */
|
||||
t->p[id] = (int16_t)base;
|
||||
*out = (int16_t)base;
|
||||
r->id = 0;
|
||||
return;
|
||||
} else { /* (then the knob's value back, RAMP_BACK samples) */
|
||||
@@ -2525,7 +2532,7 @@ static __attribute__((noinline)) void ramp_run(track_t *t, const step_t *s, uint
|
||||
to = base;
|
||||
}
|
||||
v = from + ((to - from) * (int32_t)b >> 10);
|
||||
t->p[id] = (int16_t)v;
|
||||
*out = (int16_t)v;
|
||||
}
|
||||
/* (called through a pointer: seq_tick is inlined in RAM code, out of a direct call's reach of the image's end) */
|
||||
static void (*const volatile RAMP_RUN)(track_t *, const step_t *, uint32_t, uint32_t) = ramp_run;
|
||||
|
||||
+42
-30
@@ -1066,56 +1066,68 @@ static uint32_t comp_vat(uint32_t a, uint32_t i)
|
||||
}
|
||||
static void rate_name(const track_t *t, uint32_t n, char *b);
|
||||
/* KNOB 4's column: its label, value, unit */
|
||||
static const char ENT_ORD[] = "UP\0" "DOWN\0" "UP-DN\0" "RND"; /* (ARP's ORDER, ui_input.c's entry's too; V10.8.78: packed) */
|
||||
static const char GRID_HIT[] = "--\0" "ON\0" "x2\0" "x4\0" "x8\0" "SHORT\0" "GHOST\0" "FLAM"; /* (0.8.5) the grid's HIT of a
|
||||
* lane: --, ON, then its modes; SOUND's from 5 (V10.8.78: packed) */
|
||||
static void comp_vname(const track_t *t, const step_t *s, uint32_t a, uint32_t v, char *lb, char *val, char *un)
|
||||
{
|
||||
static const char *const ORD[4] = {"UP", "DOWN", "UP-DN", "RND"};
|
||||
static const char *const DEC[3] = {"FLAT", "FADE", "RISE"};
|
||||
static const char *const HIT[3] = {"SHORT", "GHOST", "FLAM"};
|
||||
static const char DEC[] = "FLAT\0" "FADE\0" "RISE"; /* (V10.8.78: packed, str_nth) */
|
||||
int32_t m;
|
||||
const char *L = 0, *V = 0, *U = 0;
|
||||
lb[0] = val[0] = un[0] = 0;
|
||||
switch (a) {
|
||||
case CA_ARP:
|
||||
str_cpy(lb, v & CV_ARP_SCALE ? "SCALE " : "NOTES ", 8);
|
||||
fmt_int(lb + 6, v & CV_ARP_SCALE ? CP_DEGS[CP_RNG(v)] : (int32_t)CP_RNG(v) + 1);
|
||||
str_cpy(val, ORD[CP_ORD(v)], 8); /* (gen3: ui_draw.c comp_value says DOWN UP-DN as DN UD) */
|
||||
V = str_nth(ENT_ORD, (unsigned)CP_ORD(v)); /* (gen3: ui_draw.c comp_value says DOWN UP-DN as DN UD) */
|
||||
rate_name(t, CP_RATES[CP_RATE(v) % CP_NRATE], un);
|
||||
break;
|
||||
case CA_SEQ: str_cpy(lb, "FROM", 8); fmt_int(val, (int32_t)(v & 63u) + 1); str_cpy(un, v & CV_SEQ_BOUNCE ? "PING" : "LOOP", 8); break;
|
||||
case CA_OCTU: case CA_OCTD: str_cpy(lb, "OCTAVES", 8); fmt_int(val, (int32_t)(v % 3u) + 1); break;
|
||||
case CA_RATCH: str_cpy(lb, "RATE", 8); val[0] = 'x'; fmt_int(val + 1, (int32_t)CV_RAT_HITS(v)); str_cpy(un, DEC[CV_RAT_DEC(v)], 8); break;
|
||||
case CA_STUT: str_cpy(lb, "EVERY", 8); fmt_int(val, (int32_t)(v % 4u) + 1); str_cpy(un, v % 4u ? "STEPS" : "STEP", 8); break;
|
||||
case CA_MUTE: str_cpy(lb, "MODE", 8); str_cpy(val, v ? "CUT" : "MUTE", 8); break;
|
||||
case CA_SEQ: L = "FROM"; m = (int32_t)(v & 63u); U = v & CV_SEQ_BOUNCE ? "PING" : "LOOP"; goto num;
|
||||
case CA_OCTU: case CA_OCTD: L = "OCTAVES"; m = (int32_t)(v % 3u); goto num;
|
||||
case CA_RATCH: L = "RATE"; val[0] = 'x'; fmt_int(val + 1, (int32_t)CV_RAT_HITS(v)); U = str_nth(DEC, (unsigned)CV_RAT_DEC(v)); break;
|
||||
case CA_STUT: L = "EVERY"; m = (int32_t)(v % 4u); U = m ? "STEPS" : "STEP"; goto num;
|
||||
case CA_MUTE: L = "MODE"; V = v ? "CUT" : "MUTE"; break;
|
||||
case CA_TRANS:
|
||||
str_cpy(lb, "MOVE", 8); m = CV_TR_MOVE(v);
|
||||
val[0] = m < 0 ? '-' : '+'; fmt_int(val + 1, m < 0 ? -m : m);
|
||||
if (CV_TR_RANGE(v) > 1u) { un[0] = 'R'; fmt_int(un + 1, (int32_t)CV_TR_RANGE(v)); } else str_cpy(un, "FIX", 8);
|
||||
L = "MOVE"; m = CV_TR_MOVE(v);
|
||||
if (CV_TR_RANGE(v) > 1u) { un[0] = 'R'; fmt_int(un + 1, (int32_t)CV_TR_RANGE(v)); } else U = "FIX";
|
||||
goto sgn;
|
||||
case CA_RAND: L = "RANGE"; m = (int32_t)(v % 7u); U = "DEG";
|
||||
num: /* (V10.8.78: VALUE 1.., one copy) */
|
||||
fmt_int(val, m + 1);
|
||||
break;
|
||||
case CA_RAND: str_cpy(lb, "RANGE", 8); fmt_int(val, (int32_t)(v % 7u) + 1); str_cpy(un, "DEG", 8); break;
|
||||
case CA_LOCK: { /* (V10.7.59) FILL: BANK, its name (a kit's / a synth's), STAIR xN */
|
||||
static const char DB[] = "SNARE\0" "TOMS\0" "HATS\0" "KICK\0" "CLAPS\0" "BREAK\0" "RIM\0" "MIX"; /* (V10.8.71: packed, str_nth) */
|
||||
static const char SB[] = "ROLL\0" "UP\0" "DOWN\0" "OCTAVE\0" "TRIPLET\0" "FADE\0" "RANDOM\0" "RISE"; /* (V10.8.71: packed, str_nth) */
|
||||
str_cpy(lb, "BANK", 8);
|
||||
if (v < 8u) str_cpy(val, t->engine == ENGI_DRUM ? str_nth(DB, (unsigned)(v)) : str_nth(SB, (unsigned)(v)), 8);
|
||||
else if (v == 8u) str_cpy(val, "RANDOM", 8);
|
||||
else { str_cpy(val, "STAIR", 8); un[0] = 'x'; fmt_int(un + 1, (int32_t)(v - 8u)); }
|
||||
L = "BANK";
|
||||
if (v < 8u) V = str_nth(t->engine == ENGI_DRUM ? DB : SB, (unsigned)(v));
|
||||
else if (v == 8u) V = "RANDOM";
|
||||
else { V = "STAIR"; un[0] = 'x'; fmt_int(un + 1, (int32_t)(v - 8u)); }
|
||||
break;
|
||||
}
|
||||
case CA_RAMP: { /* (V10.6v) FROM over its CURVE ("KNOB" "EXP"); no LOCK on the step:
|
||||
* NO LOCK (it does nothing) */
|
||||
case CA_RAMP: { /* (V10.6v) FROM over its CURVE ("KNOB" "EXP") */
|
||||
static const char CRV[] = "LIN\0" "EXP\0" "LOG\0" "S\0" "STEPS\0" "ZIGZAG"; /* (V10.8.71: packed, str_nth) */
|
||||
static const char *const FR[2][3] = {{"KNOB", "HOLD", "PING"}, {"OPP", "OP HOLD", "OP PING"}}; /* (V10.7.62) its
|
||||
* END on the label (BACK: FROM alone, as before): the card's
|
||||
* value has no room for a unit beside EXP or ZIGZAG */
|
||||
str_cpy(lb, !motion_lock_at(t, (uint32_t)(s - t->step) % NSTEP) ? "NO LOCK" : FR[CV_RAMP_OPP(v)][CV_RAMP_END(v) % 3u], 8);
|
||||
str_cpy(val, str_nth(CRV, (unsigned)(CV_RAMP_CURVE(v))), 8);
|
||||
static const char FR[] = "KNOB\0" "HOLD\0" "PING\0" "OPP\0" "OP HOLD\0" "OP PING"; /* (V10.7.62) its END on the
|
||||
* label (BACK: FROM alone, as before): the card's value has no
|
||||
* room for a unit beside EXP or ZIGZAG (V10.8.78: packed, str_nth) */
|
||||
L = str_nth(FR, (unsigned)(CV_RAMP_OPP(v) * 3u + CV_RAMP_END(v) % 3u)); /* (V10.8.78: no NO LOCK; without one
|
||||
* it is MOD's source RAMP) */
|
||||
V = str_nth(CRV, (unsigned)(CV_RAMP_CURVE(v)));
|
||||
break;
|
||||
}
|
||||
case CA_SOUND: str_cpy(lb, "HIT", 8); str_cpy(val, HIT[v % 3u], 8); break;
|
||||
case CA_CHORD: str_cpy(lb, "CHORD", 8); str_cpy(val, PN_AT(N_CHRD, 1u + v % CD_POW), 8); break;
|
||||
case CA_SHIFT: str_cpy(lb, "MOVE", 8); m = (int32_t)(v % 127u) - 63; val[0] = m < 0 ? '-' : '+'; fmt_int(val + 1, m < 0 ? -m : m); str_cpy(un, "ST", 8); break; /* (ST as BEND: "-63 STEPS" was cut to "-.." on the card) */
|
||||
case CA_BEND: str_cpy(lb, "BEND", 8); m = (int32_t)(v % 25u) - 12; val[0] = m < 0 ? '-' : '+'; fmt_int(val + 1, m < 0 ? -m : m); str_cpy(un, "ST", 8); break;
|
||||
case CA_SOUND: L = "HIT"; V = str_nth(GRID_HIT, 5u + v % 3u); break;
|
||||
case CA_CHORD: L = "CHORD"; V = PN_AT(N_CHRD, 1u + v % CD_POW); break;
|
||||
case CA_SHIFT: case CA_BEND: /* (SHIFT's ST as BEND's: "-63 STEPS" was cut to "-.." on the card) */
|
||||
L = a == CA_SHIFT ? "MOVE" : "BEND";
|
||||
m = a == CA_SHIFT ? (int32_t)(v % 127u) - 63 : (int32_t)(v % 25u) - 12;
|
||||
U = "ST";
|
||||
sgn: /* (V10.8.78: the signed VALUEs, one copy) */
|
||||
val[0] = m < 0 ? '-' : '+'; fmt_int(val + 1, m < 0 ? -m : m);
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
if (L) str_cpy(lb, L, 8); /* (V10.8.78: the labels, values and units, one copy each) */
|
||||
if (V) str_cpy(val, V, 8);
|
||||
if (U) str_cpy(un, U, 8);
|
||||
}
|
||||
static int keys_pg(uint32_t g) { return !ui.home && !ui.menu && !ui.confirm && !ui.layer && cur_page()->graph == g; } /* (V10.6o) */
|
||||
static int ckeys_on(void) { return keys_pg(GR_COMP); } /* (seq2g) */
|
||||
@@ -1205,8 +1217,8 @@ static void grid_hit(track_t *t, uint32_t i, uint32_t l, uint32_t on)
|
||||
step_clear(s);
|
||||
}
|
||||
}
|
||||
/* (0.8.5) the grid's HIT of lane l at step i as one list: --, ON, then its modes x2 x4 x8 SHORT GHOST FLAM (0..7) */
|
||||
static const char *const GRID_HIT[LM_N + 1] = {"--", "ON", "x2", "x4", "x8", "SHORT", "GHOST", "FLAM"};
|
||||
/* (0.8.5) the grid's HIT of lane l at step i as one list (GRID_HIT, above: 0..7) */
|
||||
_Static_assert(LM_N == 7, "GRID_HIT: --, ON and the modes");
|
||||
static uint32_t grid_hit_of(const step_t *s, uint32_t l)
|
||||
{
|
||||
return (step_lanes_of(TSEL,s) >> (l % NLANE)) & 1u ? 1u + step_lmode(s, l) : 0u;
|
||||
|
||||
@@ -1678,7 +1678,7 @@ static void draw_columns(void)
|
||||
fmt_int(sl + 1, TSEL->p[P_SLEN]);
|
||||
jam_card();
|
||||
hot_text_column(1, "LANE", drum_lane_name(TSEL, ui.lane));
|
||||
text_column(2, "HIT", GRID_HIT[grid_hit_of(st, ui.lane)], on ? VAL(2u) : T_DIM); /* (0.8.5: its mode) */
|
||||
text_column(2, "HIT", str_nth(GRID_HIT, grid_hit_of(st, ui.lane)), on ? VAL(2u) : T_DIM); /* (0.8.5: its mode) */
|
||||
text_column(3, "ACC", ac ? "ON" : "--", ac ? VAL(3u) : T_DIM);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -454,7 +454,7 @@ static param_desc_t eu_d;
|
||||
static const param_desc_t *eu_desc(uint32_t k, int16_t **valp)
|
||||
{
|
||||
static const char *const LN[NLANE + 1] = {"ALL", "BD", "SD", "CP", "CH", "OH", "TM", "RS", "CB"};
|
||||
static const char *const MD[2][EU_M] = {{"CONTOUR", "RANGE", "MOTIF", "VARY"}, {"ACCENT", "GHOST", "RATCHET", "VARY"}};
|
||||
static const char MD[] = "CONTOUR\0" "RANGE\0" "MOTIF\0" "VARY\0" "ACCENT\0" "GHOST\0" "RATCHET\0" "VARY"; /* (V10.8.78: packed, str_nth) */
|
||||
static const char *const CT[7] = {"WALK", "UP", "DOWN", "ARCH", "WAVE", "LEAP", "RANDOM"}; /* (V10.7.66, the owner) */
|
||||
static const char *const MO[5] = {"OFF", "2", "3", "4", "8"};
|
||||
static const char *const RO[4] = {"MELODY", "CHORDS", "BASS", "ARP"}; /* (V10.7.67, the owner) */
|
||||
@@ -472,7 +472,7 @@ static const param_desc_t *eu_desc(uint32_t k, int16_t **valp)
|
||||
else if (k == EK_K4) { eu_d.label = "ROLE"; eu_d.fmt = F_ENUM; eu_d.max = 3; eu_d.names = RO; eu_v[k] = e->role; } /* (V10.8.35, the
|
||||
* owner: what the track plays, up front; VARY on MELODY) */
|
||||
else {
|
||||
eu_d.label = MD[dr][k - EK_M0]; eu_d.max = 100; eu_v[k] = e->m[k - EK_M0];
|
||||
eu_d.label = str_nth(MD, dr * EU_M + (k - EK_M0)); eu_d.max = 100; eu_v[k] = e->m[k - EK_M0];
|
||||
if (!dr && k == EK_M0) { eu_d.fmt = F_ENUM; eu_d.max = 6; eu_d.names = CT; } /* (a melody: CONTOUR RANGE MOTIF CHORD) */
|
||||
else if (!dr && k == EK_M0 + 1u) { eu_d.min = 2; eu_d.max = 15; eu_v[k] = e->m[1] ? e->m[1] : 5; }
|
||||
else if (!dr && k == EK_M0 + 2u) { eu_d.fmt = F_ENUM; eu_d.max = 4; eu_d.names = MO; }
|
||||
|
||||
@@ -1168,7 +1168,7 @@ static __attribute__((noinline)) void comp_knob(uint32_t slot, int32_t steps)
|
||||
if (na == CA_ARP || na == CA_STUT) *lp = 3; /* (an ARP, a STUTTER: four steps to start with) */
|
||||
if (na == CA_RAMP) { /* (V10.6v: a RAMP 16 steps; the step's LOCK is what it moves) */
|
||||
*lp = 15;
|
||||
if (!motion_lock_at(TSEL, ui.cursor % NSTEP)) ui_message("LOCK A PARAM");
|
||||
if (!motion_lock_at(TSEL, ui.cursor % NSTEP)) ui_message("LOCK A PARAM OR MOD>RAMP"); /* (V10.8.78) */
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -2005,13 +2005,12 @@ static void rec_clear_auto(uint32_t b)
|
||||
* keys moves on one step (wrapping inside LEN) */
|
||||
/* (0.6.37) the entry let go: a chord held for LEN steps (TIEs after it), or arpeggiated (ARP pressed while held): its
|
||||
* notes over the octaves in the ORDER, one every RES steps; the cursor after it */
|
||||
static const char *const ENT_ORD[4] = {"UP", "DOWN", "UP-DN", "RND"};
|
||||
static const char ENT_RES[] = "1/16\0" "1/8\0" "1/8.\0" "1/4"; /* (V10.8.71: packed, str_nth) */
|
||||
static void ent_message(void)
|
||||
{
|
||||
char a[24], b[24];
|
||||
if (ui.ent_arp) {
|
||||
str_cpy(a, "ARP ", sizeof a); str_cat(a, ENT_ORD[ui.ent_ord & 3u], 8);
|
||||
str_cpy(a, "ARP ", sizeof a); str_cat(a, str_nth(ENT_ORD, ui.ent_ord & 3u), 8); /* (ui.c) */
|
||||
str_cpy(b, str_nth(ENT_RES, (unsigned)((ui.ent_res - 1u) & 3u)), 8); str_cat(b, " x", 4);
|
||||
fmt_cat(b, ui.ent_oct); str_cat(b, " OCT", 6);
|
||||
} else {
|
||||
@@ -2481,7 +2480,7 @@ static const char MX_SRC_FULL[] = /* (V10.8.69: packed, str_nth; was a table o
|
||||
"OFF\0" "LFO\0" "ENVELOPE\0" "VELOCITY\0" "KEY TRACK\0" "RANDOM\0" "MOD WHEEL\0" "AFTERTOUCH\0"
|
||||
"EXPRESSION\0" "MACRO 1\0" "MACRO 2\0" "MACRO 3\0" "MACRO 4\0" "MOD SEQUENCE\0" "NOISE\0" "PROXIMITY\0"
|
||||
"ENVELOPE 2\0" "INPUT LEVEL\0" "T1 LEVEL\0" "T2 LEVEL\0" "T3 LEVEL\0" "T4 LEVEL\0" "T5 LEVEL\0"
|
||||
"T6 LEVEL\0" "OCT+ KEY\0" "OCT- KEY";
|
||||
"T6 LEVEL\0" "OCT+ KEY\0" "OCT- KEY\0" "STEP RAMP"; /* (V10.8.78: RAMP, the step component's) */
|
||||
static const char MX_DST_FULL[] = /* (V10.8.69: packed, str_nth; was a table of pointers) */
|
||||
"OFF\0" "PITCH\0" "FILTER CUTOFF\0" "SHAPE\0" "AMP\0" "PAN\0" "DIST SEND\0" "CHORUS SEND\0" "DELAY SEND\0"
|
||||
"REVERB SEND\0" "LFO RATE\0" "VIBRATO\0" "\0" "\0" "\0" "\0" "\0" "\0" "\0" "\0" "MASTER CLIP\0"
|
||||
|
||||
@@ -121,10 +121,9 @@ static uint32_t layer_btn(void) { return LAYERS[ui.layer % LAYER_N].btn; }
|
||||
static uint32_t layer_open(void);
|
||||
static const char *layer_head(void) /* FX: LATCH, and the MIDI effects' tracks (A#4) */
|
||||
{
|
||||
static const char *const H[3][3] = {{"[FX] HOLD", "[FX] HOLD", "[FX] HOLD"}, /* (V10.7.59: every track, no SYN DRM) */
|
||||
{"[FX] LATCH", "[FX] LATCH", "[FX] LATCH"},
|
||||
{"[FX] LOCKED", "[FX] LOCKED", "[FX] LOCKED"}};
|
||||
return ui.layer == LAYER_FX ? H[fx_lock && !ui.ly ? 2 : perf_latch_on ? 1 : 0][pfx_tgt % 3u] : LAYERS[ui.layer % LAYER_N].head;
|
||||
static const char H[] = "[FX] HOLD\0" "[FX] LATCH\0" "[FX] LOCKED"; /* (V10.7.59: every track, no SYN DRM; V10.8.78:
|
||||
* one per state, packed) */
|
||||
return ui.layer == LAYER_FX ? str_nth(H, fx_lock && !ui.ly ? 2u : perf_latch_on ? 1u : 0u) : LAYERS[ui.layer % LAYER_N].head;
|
||||
}
|
||||
static uint32_t layer_open(void)
|
||||
{
|
||||
|
||||
@@ -263,7 +263,7 @@ int main(void)
|
||||
#ifndef EXPR_HASH_ONLY /* (the sources: not in V10.7.21) */
|
||||
ck("OCT+ / OCT- appended (24, 25), every source before them where it was: a stored project's matrix the same",
|
||||
MS_MODW == 6 && MS_PROX == 15 && MS_FOLLOW == 17 && MS_T1 == 18 && MS_OCTUP == MS_T1 + NTRK && MS_OCTUP == 24 &&
|
||||
MS_OCTDN == 25 && MS_N == 26 && str_eq(PN_AT(N_MSRC, MS_OCTUP), "OCT+") && str_eq(PN_AT(N_MSRC, MS_OCTDN), "OCT-") &&
|
||||
MS_OCTDN == 25 && MS_N == 27 /* (V10.8.78: RAMP appended, 26) */ && str_eq(PN_AT(N_MSRC, MS_OCTUP), "OCT+") && str_eq(PN_AT(N_MSRC, MS_OCTDN), "OCT-") &&
|
||||
str_eq(PN_AT(N_MSRC, MS_T1 + NTRK - 1), "T6 ENV") && TP[P_M1SRC].max == MS_N - 1 && !MS_BIPOLAR(MS_OCTDN) && !MS_VOICE(MS_OCTUP));
|
||||
setup();
|
||||
midi_out_mode = MO_ALL;
|
||||
|
||||
+106
-4
@@ -121,8 +121,8 @@ static int ramp_tests(void)
|
||||
seq_start();
|
||||
rrun(t, 20, v);
|
||||
for (i = 0; i < 20u; i++) ok &= v[i] == 40;
|
||||
ok &= !rmp[0].id;
|
||||
rcheck("a STOP puts the knob's value back; a RAMP without a LOCK does nothing", ok);
|
||||
ok &= rmp[0].id == RAMP_MOD; /* (V10.8.78: MOD's RAMP alone; no slot reads it) */
|
||||
rcheck("a STOP puts the knob's value back; a RAMP without a LOCK moves no parameter", ok);
|
||||
}
|
||||
{ /* the knob's value back without a jump: RAMP_BACK samples of a line */
|
||||
int32_t mx = 0, pv;
|
||||
@@ -186,8 +186,8 @@ static int ramp_tests(void)
|
||||
go_page(GR_COMP); cursor_set(0); frame();
|
||||
for (a = 0; a < 40u && comp_view() != CA_RAMP; a++) turn(EN_K1, 1);
|
||||
frame();
|
||||
ok = comp_view() == CA_RAMP && t->step[0].clen[0] == 15u && strstr(ui.msg, "LOCK A PARAM") != 0;
|
||||
ok &= !strncmp(ui.col[3], "NO LOCK|LIN|", 12);
|
||||
ok = comp_view() == CA_RAMP && t->step[0].clen[0] == 15u && strstr(ui.msg, "LOCK A PARAM OR MOD>RAMP") != 0;
|
||||
ok &= !strncmp(ui.col[3], "KNOB|LIN|", 9); /* (V10.8.78: no NO LOCK, MOD's RAMP without one) */
|
||||
motion_set_lock(t, 0, P_E4, 100);
|
||||
turn(EN_K4, 7); frame(); /* OPP EXP */
|
||||
ok &= t->step[0].carg == 7u && !strncmp(ui.col[3], "OPP|EXP|", 8);
|
||||
@@ -217,6 +217,108 @@ static int ramp_tests(void)
|
||||
rcheck(" every LENGTH in bars x every VALUE, plain and LARGE: the cards whole", !cut);
|
||||
}
|
||||
}
|
||||
{ /* (V10.8.78) end to end as on the FM-1: a DRUM track's step 1 (a hit), SEQ > COMP KNOB 1 to RAMP, SEQ > STEP the
|
||||
* step's key held + KNOB 1 (a lock of HOME's first knob), PLAY: it glides there over the RAMP's 16 steps */
|
||||
uint32_t a, k0, id;
|
||||
int16_t base;
|
||||
ui_power_on(); song.sel = 3; t = &trk[3];
|
||||
track_defaults_steps(t); t->p[P_SLEN] = 16; grid_hit(t, 0, 0, 1);
|
||||
go_page(GR_COMP); cursor_set(0); frame();
|
||||
for (a = 0; a < 40u && comp_view() != CA_RAMP; a++) turn(EN_K1, 1);
|
||||
go_page(GR_ROLL); frame();
|
||||
k0 = key_at(0, 0); id = lock_id(0);
|
||||
fm1_in.notes |= 1u << k0; host_notes |= 1u << k0; frame();
|
||||
turn(EN_K1, 20);
|
||||
fm1_in.notes &= ~(1u << k0); frame();
|
||||
base = t->p[id];
|
||||
seq_start();
|
||||
for (i = 0; i < 16u; i++) {
|
||||
uint32_t b, per = div_samples((uint32_t)t->p[P_SDIV]);
|
||||
for (b = 0; b < per / CTL; b++) seq_tick(t, CTL);
|
||||
v[i] = t->p[id];
|
||||
}
|
||||
seq_stop();
|
||||
ok = CO_ACT(t->step[0].comp) == CA_RAMP && motion_lock_count(t) == 1u && v[0] > base && v[15] >= base + 18 &&
|
||||
v[7] > v[0] && v[15] > v[7] && t->p[id] == base;
|
||||
printf("ramp: the UI's lock (id %u, %d -> %d):", id, base, base + 20); for (i = 0; i < 16u; i++) printf(" %d", v[i]); printf("\n");
|
||||
rcheck("the FM-1's way: COMP KNOB 1 RAMP, STEP a step held + KNOB 1 its lock, PLAY: the lock glides there", ok);
|
||||
}
|
||||
{ /* (V10.8.78, the owner) RAMP as a MOD source (mod.c MS_RAMP): a step's RAMP drives the matrix, with or without a
|
||||
* lock; nothing routed: as before */
|
||||
int32_t sg[40];
|
||||
uint32_t a;
|
||||
t = rpat(16, 0, 7, 0, 0); /* (LIN from KNOB, 8 steps, no lock) */
|
||||
t->p[P_M2SRC] = MS_RAMP; t->p[P_M2DST] = MD_E1 + 4; t->p[P_M2AMT] = 64; /* (slot 2: RAMP -> E5, ANALOG's CUT) */
|
||||
seq_start();
|
||||
for (i = 0; i < 20u; i++) {
|
||||
rrun(t, 1, v);
|
||||
sg[i] = mod_tsrc(t, MS_RAMP, 0);
|
||||
if (i == 3u) { /* (the matrix moves CUT this block, mod_end puts the knob's back) */
|
||||
mod_begin(t); v[30] = t->p[P_E4]; mod_end(t);
|
||||
}
|
||||
}
|
||||
seq_stop();
|
||||
ok = sg[0] > 3000 && sg[0] < 5000 && sg[7] >= 32000 && sg[8] == 0 && sg[15] == 0 && sg[16] > sg[0] - 200 && sg[16] < sg[0] + 200;
|
||||
for (i = 1; i < 8u; i++) ok &= sg[i] > sg[i - 1u];
|
||||
ok &= v[30] > 40 + 50 && t->p[P_E4] == 40 && !motion_lock_count(t) && mod_tsrc(t, MS_RAMP, 0) == 0;
|
||||
if (!ok) printf(" mod: %d %d %d %d %d | %d %d\n", sg[0], sg[7], sg[8], sg[15], sg[16], v[30], t->p[P_E4]);
|
||||
printf("ramp: MOD RAMP by step:"); for (i = 0; i < 18u; i++) printf(" %d", (int)(sg[i] >> 8)); printf(" (CUT moved: %d)\n", v[30]);
|
||||
rcheck("MOD SRC RAMP, no lock: 0 -> 1 over its 8 steps, back to 0, again each pass; CUT moved by the slot; STOP: 0", ok);
|
||||
{ /* a lock's glide on its way: a RAMP without a lock on a later step does not cut it (a project of before the
|
||||
* same), the matrix's RAMP follows the glide */
|
||||
int16_t w[24];
|
||||
t = rpat(16, 0, 11, 120, 1);
|
||||
seq_start(); rrun(t, 24, w); seq_stop();
|
||||
t = rpat(16, 0, 11, 120, 1);
|
||||
t->step[4].comp = CO_MAKE(CA_RAMP, CC_ALWAYS); t->step[4].clen[0] = 1;
|
||||
seq_start(); rrun(t, 24, v); seq_stop();
|
||||
ok = !memcmp(v, w, sizeof w) && v[10] > 100;
|
||||
rcheck(" a RAMP without a lock while a lock's glide runs: the glide goes on, the values as before", ok);
|
||||
}
|
||||
t = rpat(16, 6u | CV_RAMP_ENDV(1), 3, 0, 0); /* (OPP, HOLD, 4 steps) */
|
||||
t->p[P_M1SRC] = MS_RAMP; t->p[P_M1DST] = MD_PAN; t->p[P_M1AMT] = -40;
|
||||
seq_start();
|
||||
for (i = 0; i < 10u; i++) { rrun(t, 1, v); sg[i] = mod_tsrc(t, MS_RAMP, 0); }
|
||||
seq_stop();
|
||||
ok = sg[0] > 24000 && sg[1] < sg[0] && sg[3] < 600 && sg[4] == 0 && sg[9] == 0;
|
||||
t = rpat(16, CV_RAMP_ENDV(1), 3, 0, 0); /* (KNOB, HOLD) */
|
||||
t->p[P_M1SRC] = MS_RAMP; t->p[P_M1DST] = MD_PAN; t->p[P_M1AMT] = 40;
|
||||
motion_set_enabled(t, 0); /* (AUTOMATION off: its locks off, the matrix's RAMP not) */
|
||||
seq_start();
|
||||
for (i = 0; i < 10u; i++) { rrun(t, 1, v); sg[i] = mod_tsrc(t, MS_RAMP, 0); }
|
||||
seq_stop();
|
||||
ok &= sg[3] > 32000 && sg[9] == 32767;
|
||||
rcheck(" FROM OPP: 1 -> 0; HOLD: 1 held; AUTOMATION off: the matrix's RAMP still runs", ok);
|
||||
{ /* with a lock: the lock glides as before (the same values); MOD's RAMP is the RAMPs without one */
|
||||
int16_t w[24];
|
||||
t = rpat(16, 1u, 3, 100, 1);
|
||||
seq_start(); rrun(t, 24, w); seq_stop();
|
||||
t = rpat(16, 1u, 3, 100, 1);
|
||||
t->p[P_M1SRC] = MS_RAMP; t->p[P_M1DST] = MD_PAN; t->p[P_M1AMT] = 40;
|
||||
seq_start();
|
||||
for (i = 0, ok = 1; i < 24u; i++) { rrun(t, 1, v); ok &= v[0] == w[i]; sg[i] = mod_tsrc(t, MS_RAMP, 0); }
|
||||
seq_stop();
|
||||
if (!ok) printf(" lock+mod: glide differs\n");
|
||||
for (i = 0; i < 24u; i++) ok &= sg[i] == 0;
|
||||
rcheck(" a step with a lock: the lock's glide the same as before, MOD's RAMP 0 (a RAMP drives one or the other)", ok);
|
||||
}
|
||||
/* the UI: MOD's SRC to RAMP (KNOB 2), its names; SEQ > COMP: RAMP with no lock, its card FROM + CURVE */
|
||||
t = rpat(16, 0, 7, 0, 0);
|
||||
t->step[0].comp = t->step[0].carg = t->step[0].clen[0] = 0;
|
||||
go_page(GR_MOD); frame();
|
||||
turn(EN_K1, 1); frame(); /* (slot 2) */
|
||||
for (a = 0; a < 40u && t->p[P_M2SRC] != MS_RAMP; a++) turn(EN_K2, 1);
|
||||
turn(EN_K3, 16); turn(EN_K4, 30); frame();
|
||||
ok = t->p[P_M2SRC] == MS_RAMP && str_eq(PN_AT(N_MSRC, MS_RAMP), "RAMP") && strstr(ui.col[1], "RAMP") == ui.col[1] + 4 &&
|
||||
str_eq(str_nth(MX_SRC_FULL, MS_RAMP), "STEP RAMP") && t->p[P_M2DST] && t->p[P_M2AMT];
|
||||
printf("ramp: MOD cards: [%s] [%s] [%s] [%s]\n", ui.col[0], ui.col[1], ui.col[2], ui.col[3]);
|
||||
go_page(GR_COMP); cursor_set(0); frame();
|
||||
for (a = 0; a < 40u && comp_view() != CA_RAMP; a++) turn(EN_K1, 1);
|
||||
frame();
|
||||
ok &= comp_view() == CA_RAMP && !strncmp(ui.col[3], "KNOB|LIN|", 9);
|
||||
printf("ramp: COMP cards: [%s] [%s] [%s] [%s]\n", ui.col[0], ui.col[1], ui.col[2], ui.col[3]);
|
||||
rcheck(" MOD: KNOB 2 SRC to RAMP (named so, STEP RAMP in full); SEQ > COMP: RAMP without a lock, FROM + CURVE", ok);
|
||||
}
|
||||
return rbad;
|
||||
}
|
||||
int main(void)
|
||||
|
||||
+2010
-2011
File diff suppressed because it is too large.
Load diff
+11
-11
@@ -169,7 +169,7 @@ cm_one 894 text
|
||||
comp_any 22 text
|
||||
comp_arg 20 text comp_slot
|
||||
comp_col 60 text
|
||||
comp_columns 1602 text comp_arg comp_slot comp_view empty_column fmt_int hot_unit_column motion_lock_at str_cat str_cpy str_len str_nth text_column tsel_p unit_column val_col
|
||||
comp_columns 1432 text comp_arg comp_slot comp_view empty_column fmt_int hot_unit_column str_cat str_cpy str_len str_nth text_column tsel_p unit_column val_col
|
||||
comp_knob 1022 text chain_busy comp_slot comp_view cond_at cond_idx motion_lock_at tsel_p ui_message
|
||||
comp_legacy 26 text
|
||||
comp_migrate 298 text cm_one
|
||||
@@ -257,7 +257,7 @@ dly_rev_set 108 text *
|
||||
dly_wow_adv 154 hot_text
|
||||
draw_act_column 86 text act_col act_ready
|
||||
draw_column 2994 text card_h card_heat card_line card_y cv_begin cv_blit cv_keycap cv_pset cv_rect cv_rrect cv_text_fit cv_text_in cv_text_on face_has gauge_col heat_on ink_w kc_w large_kind lz_on roll_note roll_text str_cat str_cpy str_eq str_hash str_len text_w tsel_p ux_mix
|
||||
draw_columns 8744 text act_cols act_ready bt_hw_seg card_mot_of comp_columns cur_page draw_act_column draw_column drum_lane_name drum_note_lane dx_pagen dx_send_ix empty_column enum_rank ev_fix ev_id_ok ev_row ev_rows fit_span fm6_max fmt_frac fmt_int focus_k focus_slot fop_byte fop_bytes fop_field fop_ok gauge_column graph_project_used grid_hit_of home_macros home_param hot_gauge_column hot_text_column hot_unit_column jam_card jam_end jam_len list_get lock_held lock_id lyric_pick macro_cards memset mod_dst_name mod_dst_scope motion_base_value motion_count motion_enabled motion_lock_count motion_lock_get note_len note_name page_desc param_format pf_column preset_favorite preset_pos ratio_d save_level sec_col song_end_row split_field split_value st_micro step_accents_of step_lanes_of step_on str_cat str_cpy str_len str_nth sw_ui_cards_bt text_column track_desc trackgen_cards_bt trk_level tsel_p unit_column up_slot_label up_used val_col
|
||||
draw_columns 8752 text act_cols act_ready bt_hw_seg card_mot_of comp_columns cur_page draw_act_column draw_column drum_lane_name drum_note_lane dx_pagen dx_send_ix empty_column enum_rank ev_fix ev_id_ok ev_row ev_rows fit_span fm6_max fmt_frac fmt_int focus_k focus_slot fop_byte fop_bytes fop_field fop_ok gauge_column graph_project_used grid_hit_of home_macros home_param hot_gauge_column hot_text_column hot_unit_column jam_card jam_end jam_len list_get lock_held lock_id lyric_pick macro_cards memset mod_dst_name mod_dst_scope motion_base_value motion_count motion_enabled motion_lock_count motion_lock_get note_len note_name page_desc param_format pf_column preset_favorite preset_pos ratio_d save_level sec_col song_end_row split_field split_value st_micro step_accents_of step_lanes_of step_on str_cat str_cpy str_len str_nth sw_ui_cards_bt text_column track_desc trackgen_cards_bt trk_level tsel_p unit_column up_slot_label up_used val_col
|
||||
draw_confirm 1428 text cv_begin cv_blit cv_pset cv_rect cv_rrect cv_text_flags cv_text_in cv_text_on dice_side dlg_button dlg_card dlg_crumb dlg_tabs fmt_cat graph_project_used ink_in project_name scr_fill str_cat str_cpy str_len text_fit text_w tsel_p up_name up_slot_label
|
||||
draw_countin 374 text cv_begin cv_blit cv_key_hint draw_text_box kh_ink lcd_sync scr_fill str_cpy
|
||||
draw_crumbs 474 text cv_text_fit cv_text_on cv_text_r fmt_frac fmt_int foot_crumbs foot_strip lz_fam lz_on nav_groups str_cat str_len text_w
|
||||
@@ -402,7 +402,7 @@ eng_rank 34 text eng_live
|
||||
eng_vis 24 text
|
||||
eng_voice_weight 48 text
|
||||
ent_commit 456 text cursor_set memset rng tsel_p
|
||||
ent_message 210 text fmt_cat str_cat str_cpy str_nth
|
||||
ent_message 216 text fmt_cat str_cat str_cpy str_nth
|
||||
enum_order 54 text
|
||||
enum_rank 94 text enum_order
|
||||
enum_skip 32 text fm6_slot_ok
|
||||
@@ -798,7 +798,7 @@ gx_sound 606 text gch gr grr
|
||||
gz_get 34 text boot_lz4
|
||||
hc_run 518 text memcpy rec_on seq_src
|
||||
head_load 58 text
|
||||
head_msg 288 text cv_text cv_text_fit text_w
|
||||
head_msg 268 text cv_text cv_text_fit str_nth text_w
|
||||
head_trk 86 text cur_page
|
||||
heat_bar 98 text cv_rect heat_col
|
||||
heat_col 64 text
|
||||
@@ -859,7 +859,7 @@ kc_w 22 text
|
||||
kern 78 text glyph_at
|
||||
key_black 28 text
|
||||
key_next 336 text drum_oct_note dxo_on midi_local_held mo_key mo_kon
|
||||
key_off 278 text * drum_oct_note dxo_off input_off midi_local_held mo_koff rec_release trk_note_off
|
||||
key_off 278 text drum_oct_note dxo_off input_off midi_local_held mo_koff rec_release trk_note_off
|
||||
key_place 46 text key_black
|
||||
keys_mode 32 text ckeys_on grid_on name_on skeys_on
|
||||
keys_pg 56 text cur_page
|
||||
@@ -874,7 +874,7 @@ kx_block 680 text kx_route kx_shape midi_out_event_at
|
||||
kx_frame 202 text motion_capture rec_on tsel_p
|
||||
kx_route 68 text
|
||||
kx_shape 64 text
|
||||
kx_src 76 text kx_shape
|
||||
kx_src 126 text kx_shape
|
||||
large_kind 96 text cur_page name_on
|
||||
latch_release 76 text mo_koff trk_note_off
|
||||
layer_allowed 44 text dlg_on name_on
|
||||
@@ -1217,7 +1217,7 @@ ott_lin 44 text
|
||||
ott_log2 38 text
|
||||
ott_put 80 text
|
||||
page_big 92 text cv_text face_has text_w
|
||||
page_desc 2432 text eu_of page_desc_v str_cpy str_len str_nth track_desc tsel_p
|
||||
page_desc 2428 text eu_of page_desc_v str_cpy str_len str_nth track_desc tsel_p
|
||||
page_desc_v 298 text
|
||||
page_entered 352 text cur_page ev_fix fmt_cat fmt_int fx_mod_of fx_trk_k lock_page_ok seq_roll_view str_cpy str_len tsel_p ui_say
|
||||
page_first 28 text
|
||||
@@ -1388,7 +1388,7 @@ project_used 24 text
|
||||
punch_gain 82 text
|
||||
quiet_tail_lv 138 text kit_faded voice_held
|
||||
ramp 230 text
|
||||
ramp_run 684 text * div_samples motion_enabled motion_lock_at param_desc_of
|
||||
ramp_run 826 text * div_samples motion_enabled motion_lock_at param_desc_of
|
||||
ratio_d 58 text
|
||||
rec_clear_auto 580 text chain_busy memset motion_guard motion_restore str_cat str_cpy str_len ui_message
|
||||
rec_clearable 34 text motion_count seq_is_empty tsel_p
|
||||
@@ -1442,10 +1442,10 @@ sc_track 334 text input_on midi_local_held mo_key mo_kon rec_note rec_on scn_not
|
||||
scale_mask 32 text
|
||||
scale_snap 52 text scale_mask
|
||||
scale_steps 112 text scale_mask scale_snap
|
||||
scene_drum_tick 272 text * div_samples trk_note_off trk_note_on
|
||||
scene_drum_tick 272 text div_samples trk_note_off trk_note_on
|
||||
scene_follow 156 text sc_track scene_follow_off
|
||||
scene_follow_off 82 text * input_off mo_koff
|
||||
scene_key 322 text * input_off kb_map midi_local_held mo_koff sc_track
|
||||
scene_follow_off 82 text input_off mo_koff
|
||||
scene_key 322 text input_off kb_map midi_local_held mo_koff sc_track
|
||||
scn_notes 280 text chord_build_mode
|
||||
scope_at 238 text cv_rect scope_lod scope_seg
|
||||
scope_lod 110 text scope_seg
|
||||
|
||||
@@ -336,7 +336,7 @@ P_COUNT 69): slot k (1..4) is `SRCk`, `DSTk`, `AMTk` at ids 49 + 3 (k − 1) ..
|
||||
|
||||
| id | label | values |
|
||||
| --- | --- | --- |
|
||||
| 49, 52, 55, 58 | SRC1..SRC4 | enum: 0 OFF, 1 LFO, 2 ENV, 3 VEL, 4 KEY, 5 RAND, 6 MODW (CC1), 7 AT (channel aftertouch), 8 EXPR (CC11), 9..12 M1..M4 (JIANT: the project's macros, 0..1; LFO held turns them), 13 STEP, 14 NOISE, 15 PROX, 16 ENV2, 17 IN ENV, 18..23 T1 ENV..T6 ENV, 24 OCT+, 25 OCT- (V10.7.22: the expression keys; appended, the numbers before them kept) |
|
||||
| 49, 52, 55, 58 | SRC1..SRC4 | enum: 0 OFF, 1 LFO, 2 ENV, 3 VEL, 4 KEY, 5 RAND, 6 MODW (CC1), 7 AT (channel aftertouch), 8 EXPR (CC11), 9..12 M1..M4 (JIANT: the project's macros, 0..1; LFO held turns them), 13 STEP, 14 NOISE, 15 PROX, 16 ENV2, 17 IN ENV, 18..23 T1 ENV..T6 ENV, 24 OCT+, 25 OCT- (V10.7.22: the expression keys; appended, the numbers before them kept), 26 RAMP (V10.8.78: the step component RAMP without a lock) |
|
||||
| 50, 53, 56, 59 | DST1..DST4 | enum (22 names): 0 OFF, 1 PITCH, 2 CUT, 3 SHP, 4 AMP (per voice); 5 PAN, 6 DIST, 7 CHO, 8 DLY, 9 REV, 10 RATE (LFO rate), 11 VIB (LFO pitch depth), 12..19 E1..E8 = `P_E0..P_E7` (per block); 20 CLIP, 21 PNCH (JIANT: the master's G_CLIP / G_PUNCH, the slots of every track adding) |
|
||||
| 51, 54, 57, 60 | AMT1..AMT4 | −64..63 (fmt BIPCT) |
|
||||
|
||||
|
||||
+1
-1
@@ -1600,7 +1600,7 @@ function makeMockDevice(opt = {}) {
|
||||
const NONOFF = ["OFF", "ON"], NDIV = ["1/4", "1/8", "1/16", "1/32", "8T", "16T", "1/2", "1/1", "2BAR", "4BAR"], NGO = ["--", "GO"], NDASH = ["--"];
|
||||
const D = (label, fmt, min, max, def, names = null, unit = "") => ({ label, fmt, min, max, def, names, unit });
|
||||
const E = (label, names, def) => D(label, F.ENUM, 0, names.length - 1, def, names);
|
||||
const MSRC = ["OFF", "LFO", "ENV", "VEL", "KEY", "RAND", "MODW", "AT", "EXPR", "M1", "M2", "M3", "M4", "MSEQ", "NOISE", "PROX", "ENV2", "IN ENV", "T1 ENV", "T2 ENV", "T3 ENV", "T4 ENV", "T5 ENV", "T6 ENV", "OCT+", "OCT-"]; /* (V10.14 PROX, V10.22 ENV2, V10.7.22 OCT+ OCT-) */
|
||||
const MSRC = ["OFF", "LFO", "ENV", "VEL", "KEY", "RAND", "MODW", "AT", "EXPR", "M1", "M2", "M3", "M4", "MSEQ", "NOISE", "PROX", "ENV2", "IN ENV", "T1 ENV", "T2 ENV", "T3 ENV", "T4 ENV", "T5 ENV", "T6 ENV", "OCT+", "OCT-", "RAMP"]; /* (V10.14 PROX, V10.22 ENV2, V10.7.22 OCT+ OCT-, V10.8.78 RAMP) */
|
||||
const MDST = ["OFF", "PITCH", "CUT", "SHP", "AMP", "PAN", "DIST", "CHO", "DLY", "REV", "L.RATE", "L.PIT", "E1", "E2", "E3", "E4", "E5", "E6", "E7", "E8", "CLIP", "PNCH", "D.TIM", "D.FB", "D.TON", "D.MIX", "R.SIZ", "R.DMP", "C.RAT", "C.DEP", "F.CUT", "LEVEL"];
|
||||
const TP = [
|
||||
D("LEVEL", F.DB, 0, 127, 104),
|
||||
|
||||
Reference in new issue
Block a user