mirror of
https://github.com/charlesvestal/fm1-x0x.git
synced 2026-12-05 12:24:35 +01:00
Merge pull request #33 from zambari/step-length
The manual's paragraph merged with main's wording; the simulator's slideB.S and a scenario (longnotes).
This commit is contained in:
commit
f762dceef1
5 files changed
+179
-3
No files matched your search
+8
-1
@@ -283,7 +283,7 @@ There are two identical 303s, and each has its own sound and its own line.
|
||||
|
||||
**Steps.** Press a white key to turn that step on, and tap it again to turn it off. To edit a
|
||||
step, press SEQ, hold the step's key and turn the knobs. KNOB 1 sets the note, KNOB 2 the gate
|
||||
(REST, NOTE or TIE), KNOB 3 the accent and KNOB 4 the slide. OCT- and OCT+ move the held note an
|
||||
(REST, NOTE, a length or TIE: see Long notes below), KNOB 3 the accent and KNOB 4 the slide. OCT- and OCT+ move the held note an
|
||||
octave. An empty step turns on as soon as you press it, so you can press, hold and set its note in
|
||||
one go. A slide glides from this step's note into the next one. Holding a step on EDIT gives it a
|
||||
sound of its own instead (see P-locks in section 11).
|
||||
@@ -292,6 +292,13 @@ A **tie** holds the note before it through the step, so the note doesn't play ag
|
||||
screen, a tied note joins the note it holds in one long bar. Turn KNOB 1 on a tie to make it a
|
||||
note of its own.
|
||||
|
||||
**Long notes.** To make a note last several steps, press SEQ, hold the note's step key and press
|
||||
a later step key. The note now lasts up to and including that step, the steps between become ties,
|
||||
and the screen shows LEN and the number of steps. To make it one step again, hold its step key and
|
||||
press its last step key again. A note only grows forward, within the pattern's length. KNOB 2 does
|
||||
the same one step at a time: after NOTE it offers LEN 2, LEN 3 and so on up to the next note, and
|
||||
then SLIDE, which holds the note until the next one and glides into it.
|
||||
|
||||
**Keyboard.** Press REC and all 27 keys become a keyboard, and KEYS shows on the top line. The
|
||||
notes you play are written: step by step while the pattern is stopped, and live while it plays.
|
||||
OCT- and OCT+ change the octave. Play a key while you still hold another, and the 303 slides
|
||||
|
||||
+2
-1
@@ -158,8 +158,9 @@ nav.contents li { break-inside: avoid; }
|
||||
<h2 id="s6"><span class="num">6</span>303A and 303B</h2>
|
||||
<p>There are two identical 303s, and each has its own sound and its own line.</p>
|
||||
<div class="figs"><figure class="shot"><img src="img/screen-303.png" alt="The 303A screen: the pattern's notes on a piano roll from A1 to A3, with rows for accents (AC) and slides (SL), the scale A MIN and SEED B5CD. The 303A TONE knobs: CUTOFF 48, RESO 100, ENVMOD 85, DECAY 64." loading="lazy"><figcaption>303A</figcaption></figure></div>
|
||||
<p><strong>Steps.</strong> Press a white key to turn that step on, and tap it again to turn it off. To edit a step, press SEQ, hold the step's key and turn the knobs. KNOB 1 sets the note, KNOB 2 the gate (REST, NOTE or TIE), KNOB 3 the accent and KNOB 4 the slide. OCT- and OCT+ move the held note an octave. An empty step turns on as soon as you press it, so you can press, hold and set its note in one go. A slide glides from this step's note into the next one. Holding a step on EDIT gives it a sound of its own instead (see P-locks in section 11).</p>
|
||||
<p><strong>Steps.</strong> Press a white key to turn that step on, and tap it again to turn it off. To edit a step, press SEQ, hold the step's key and turn the knobs. KNOB 1 sets the note, KNOB 2 the gate (REST, NOTE, a length or TIE: see Long notes below), KNOB 3 the accent and KNOB 4 the slide. OCT- and OCT+ move the held note an octave. An empty step turns on as soon as you press it, so you can press, hold and set its note in one go. A slide glides from this step's note into the next one. Holding a step on EDIT gives it a sound of its own instead (see P-locks in section 11).</p>
|
||||
<p>A <strong>tie</strong> holds the note before it through the step, so the note doesn't play again. On the screen, a tied note joins the note it holds in one long bar. Turn KNOB 1 on a tie to make it a note of its own.</p>
|
||||
<p><strong>Long notes.</strong> To make a note last several steps, press SEQ, hold the note's step key and press a later step key. The note now lasts up to and including that step, the steps between become ties, and the screen shows LEN and the number of steps. To make it one step again, hold its step key and press its last step key again. A note only grows forward, within the pattern's length. KNOB 2 does the same one step at a time: after NOTE it offers LEN 2, LEN 3 and so on up to the next note, and then SLIDE, which holds the note until the next one and glides into it.</p>
|
||||
<p><strong>Keyboard.</strong> Press REC and all 27 keys become a keyboard, and KEYS shows on the top line. The notes you play are written: step by step while the pattern is stopped, and live while it plays. OCT- and OCT+ change the octave. Play a key while you still hold another, and the 303 slides between them. Press REC again to go back to steps.</p>
|
||||
<p><strong>Free play.</strong> To play the 303 without writing anything, press SEQ, turn SELECT to the KEYS page and set FREE PLAY to ON. Now the keys play the 303 on every 303 screen, stopped or playing, so you can try out lines and turn EDIT's knobs as you go. The top line says FREE PLAY. Nothing is written until you press REC, which records as above. Set FREE PLAY back to OFF to get the steps back. Each 303 has its own FREE PLAY, and both are off when you switch on.</p>
|
||||
<p><strong>The pages.</strong> EDIT has two pages. TONE has CUTOFF, RESO, ENVMOD and DECAY, and VOICE has ACCENT, WAVE (saw or square), DRIVE and SLIDE time. TUNE, VOLUME, DRIVE TYPE (off, soft or RAT) and ACCENT DECAY are in SEL's list. SEQ has the line's LENGTH (1–64 steps), RATE, DIRECTION (forward, reverse, ping-pong or random) and TRANSPOSE. Each 303's level, pan and sends are on the mixer (LFO).</p>
|
||||
|
||||
+117
-1
@@ -2045,6 +2045,112 @@ static void bass_kbd(int key, int down)
|
||||
}
|
||||
}
|
||||
|
||||
/* how many steps the note at step s lasts: itself and the TIEs after it */
|
||||
static int bass_note_len(const bpart_t *bp, int s)
|
||||
{
|
||||
int len = bp->len ? bp->len : 16, n = 1;
|
||||
while (n < len && bstep_gate(&bp->step[(s + n) % len]) == G_TIE)
|
||||
n++;
|
||||
return n;
|
||||
}
|
||||
|
||||
/* a step held, another pressed after it: the note lasts up to and including that one (TIEs in
|
||||
* between, the TIEs after it rests). Pressing its current last step again: back to one step. Only
|
||||
* forward, within the pattern. */
|
||||
static void bass_tie_to(bpart_t *bp, int from, int to)
|
||||
{
|
||||
int len = bp->len ? bp->len : 16, s, n;
|
||||
if (to <= from || to >= len || bstep_gate(&bp->step[from]) == G_REST)
|
||||
return;
|
||||
n = bass_note_len(bp, from);
|
||||
if (from + n - 1 == to) /* already ends there: one step */
|
||||
to = from;
|
||||
for (s = from + 1; s <= to; s++)
|
||||
bp->step[s].flags = G_TIE;
|
||||
for (; s < len && bstep_gate(&bp->step[s]) == G_TIE; s++)
|
||||
bp->step[s].flags = G_REST;
|
||||
ui.step_edited = 1; /* (releasing the held step keeps it) */
|
||||
mark_dirty();
|
||||
{
|
||||
char t[16];
|
||||
put_i(put_s(t, "LENGTH "), bass_note_len(bp, from));
|
||||
say(t, 0);
|
||||
}
|
||||
}
|
||||
|
||||
/* the held step's GATE knob walks REST, NOTE, a note 2, 3, ... steps long, TIE, and wraps.
|
||||
* State k: 0 REST, 1 NOTE, 2 and up a note k steps long, BASS_GS_TIE a tie. A length that would reach the
|
||||
* next note instead ties up to the step before it and sets SLIDE there, so it glides into that note
|
||||
* (the last length offered; a lower one clears that slide). Lengths stop at the pattern's end; TIE is
|
||||
* offered only after a step that sounds (a NOTE or a TIE) to tie to. */
|
||||
#define BASS_GS_TIE 1000 /* above any length */
|
||||
|
||||
/* steps from s to the next NOTE after it, or a large number when none is left in the pattern */
|
||||
static int bass_next_note(const bpart_t *bp, int s)
|
||||
{
|
||||
int len = bp->len ? bp->len : 16, d;
|
||||
for (d = 1; s + d < len; d++)
|
||||
if (bstep_gate(&bp->step[s + d]) == G_NOTE)
|
||||
return d;
|
||||
return 99;
|
||||
}
|
||||
|
||||
/* the note at s, a NOTE, slides into the next note at its tail's end */
|
||||
static int bass_slides_on(const bpart_t *bp, int s)
|
||||
{
|
||||
int n = bass_note_len(bp, s);
|
||||
return bass_next_note(bp, s) == n && (bp->step[s + n - 1].flags & BS_SLIDE);
|
||||
}
|
||||
|
||||
/* the states step s may take, in knob order; returns how many */
|
||||
static int bass_gate_states(const bpart_t *bp, int s, int *k)
|
||||
{
|
||||
int len = bp->len ? bp->len : 16, m = 0, n, d = bass_next_note(bp, s);
|
||||
k[m++] = 0;
|
||||
k[m++] = 1;
|
||||
for (n = 2; n <= d + 1 && (n <= d ? s + n - 1 < len : 1); n++)
|
||||
k[m++] = n; /* n == d + 1: the slide into the next note */
|
||||
if (s > 0 && bstep_gate(&bp->step[s - 1]) != G_REST)
|
||||
k[m++] = BASS_GS_TIE;
|
||||
return m;
|
||||
}
|
||||
|
||||
static int bass_gate_state(const bpart_t *bp, int s)
|
||||
{
|
||||
int g = bstep_gate(&bp->step[s]);
|
||||
if (g == G_TIE)
|
||||
return BASS_GS_TIE;
|
||||
if (g == G_REST)
|
||||
return 0;
|
||||
return bass_note_len(bp, s) + bass_slides_on(bp, s);
|
||||
}
|
||||
|
||||
static void bass_set_gate_state(bpart_t *bp, int s, int k)
|
||||
{
|
||||
int len = bp->len ? bp->len : 16, i, n = k >= 2 && k != BASS_GS_TIE ? k : 1, d;
|
||||
bstep_t *st = &bp->step[s];
|
||||
if (bstep_gate(st) == G_NOTE && bass_slides_on(bp, s)) /* its old slide into the next note */
|
||||
bp->step[s + bass_note_len(bp, s) - 1].flags &= (uint8_t)~BS_SLIDE;
|
||||
for (i = s + 1; i < len && bstep_gate(&bp->step[i]) == G_TIE; i++) /* its old tail: rests */
|
||||
bp->step[i].flags = G_REST;
|
||||
st->flags = (uint8_t)((st->flags & ~BS_GATE_MASK) | (k == BASS_GS_TIE ? G_TIE : k == 0 ? G_REST : G_NOTE));
|
||||
d = bass_next_note(bp, s);
|
||||
for (i = 1; i < n && i < d && s + i < len; i++)
|
||||
bp->step[s + i].flags = G_TIE;
|
||||
if (n > d) /* reaches the next note: glide into it */
|
||||
bp->step[s + d - 1].flags |= BS_SLIDE;
|
||||
}
|
||||
|
||||
/* the GATE knob turned by e on step s */
|
||||
static void bass_gate_turn(bpart_t *bp, int s, int e)
|
||||
{
|
||||
int k[NSTEPS + 3], m =bass_gate_states(bp, s, k), cur = bass_gate_state(bp, s), j = 0, i;
|
||||
for (i = 0; i < m; i++) /* its place in the list, or the last one below it */
|
||||
if (k[i] <= cur)
|
||||
j = i;
|
||||
bass_set_gate_state(bp, s, k[(j + (e > 0 ? 1 : m - 1)) % m]);
|
||||
}
|
||||
|
||||
/* an edit sounds as the drum keys do (KEY SOUND): while stopped or recording, or always */
|
||||
static int key_sounds(void) { return proj.set.keysound || !seq.playing || ui.rec; }
|
||||
static void bass_step_key(int white, int down)
|
||||
@@ -2053,6 +2159,10 @@ static void bass_step_key(int white, int down)
|
||||
bpart_t *bp = &cur_pat()->bass[b];
|
||||
if (s >= NSTEPS)
|
||||
return;
|
||||
if (down && ui.view == V_SEQ && ui.held_step >= 0 && ui.held_step != s) { /* a later step: the note's length */
|
||||
bass_tie_to(bp, ui.held_step, s);
|
||||
return;
|
||||
}
|
||||
if (down) { /* an empty step is on at once: hold it to edit it */
|
||||
ui.held_step = (int8_t)s;
|
||||
ui.step_edited = 0;
|
||||
@@ -2628,7 +2738,7 @@ static void input(void)
|
||||
if (i == 0) {
|
||||
held_note_by(e);
|
||||
} else if (i == 1) {
|
||||
st->flags = (uint8_t)((st->flags & ~BS_GATE_MASK) | (bstep_gate(st) + (e > 0 ? 1 : 2)) % 3);
|
||||
bass_gate_turn(bp, ui.held_step, e);
|
||||
} else if (i == 2) {
|
||||
st->flags ^= BS_ACCENT;
|
||||
} else {
|
||||
@@ -3215,6 +3325,8 @@ static void draw_303(int band, int gen)
|
||||
q = put_note(q, held_note_of(bp, s) + bp->transpose - 24);
|
||||
if (bstep_gate(st) == G_TIE)
|
||||
q = put_s(q, " TIE");
|
||||
else if (bstep_gate(st) == G_NOTE && bass_note_len(bp, s) > 1)
|
||||
q = put_i(put_s(q, " LEN "), bass_note_len(bp, s));
|
||||
if (st->flags & BS_ACCENT)
|
||||
q = put_s(q, " ACC");
|
||||
if (st->flags & BS_SLIDE)
|
||||
@@ -4070,6 +4182,10 @@ static void draw_knobs(void)
|
||||
cv_rect(i * 60, 14, 1, 50, C_LINE);
|
||||
if (i == 0)
|
||||
put_note(v, held_note_of(bp, ui.held_step) + bp->transpose - 24);
|
||||
else if (i == 1 && bstep_gate(st) == G_NOTE && bass_slides_on(bp, ui.held_step))
|
||||
put_s(v, "SLIDE");
|
||||
else if (i == 1 && bstep_gate(st) == G_NOTE && bass_note_len(bp, ui.held_step) > 1)
|
||||
put_i(put_s(v, "LEN"), bass_note_len(bp, ui.held_step));
|
||||
else if (i == 1)
|
||||
put_s(v, G[bstep_gate(st)]);
|
||||
else
|
||||
|
||||
@@ -989,6 +989,10 @@ static int expect(const char *what, const char *val)
|
||||
int b, s;
|
||||
sscanf(what, "gate%d.%d", &b, &s);
|
||||
got = bstep_gate(&proj.pat[seq.ppat[PART_303A + b]].bass[b].step[s]);
|
||||
} else if (!strncmp(what, "slide", 5)) { /* slideB.S: 303 B step S slides into the next */
|
||||
int b, s;
|
||||
sscanf(what, "slide%d.%d", &b, &s);
|
||||
got = (proj.pat[seq.ppat[PART_303A + b]].bass[b].step[s].flags & BS_SLIDE) != 0;
|
||||
} else if (!strncmp(what, "note", 4)) {
|
||||
int b, s;
|
||||
sscanf(what, "note%d.%d", &b, &s);
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
# 303 long notes on SEQ (#33): hold a step and press a later one, and the note lasts to it (ties
|
||||
# between); its last step again: one step. KNOB 2 (a step a turn) walks NOTE, LEN 2, LEN 3 ... and SLIDE into the
|
||||
# next note.
|
||||
wait 300
|
||||
turn ALGO 2
|
||||
tap SEQ
|
||||
key w2 down
|
||||
tapkey w5
|
||||
key w2 up
|
||||
expect gate0.2 1
|
||||
expect gate0.3 2
|
||||
expect gate0.4 2
|
||||
expect gate0.5 2
|
||||
expect gate0.6 0
|
||||
# shorter: the ties after it rest
|
||||
key w2 down
|
||||
tapkey w3
|
||||
key w2 up
|
||||
expect gate0.3 2
|
||||
expect gate0.4 0
|
||||
expect gate0.5 0
|
||||
# its last step again: one step
|
||||
key w2 down
|
||||
tapkey w3
|
||||
key w2 up
|
||||
expect gate0.2 1
|
||||
expect gate0.3 0
|
||||
# KNOB 2 with a note at step 8: LEN 2 ... LEN 6, then SLIDE (ties to step 7, which slides into 8)
|
||||
tapkey w8
|
||||
key w2 down
|
||||
spin K2 1
|
||||
expect gate0.3 2
|
||||
expect gate0.4 0
|
||||
spin K2 1
|
||||
spin K2 1
|
||||
spin K2 1
|
||||
spin K2 1
|
||||
expect gate0.7 2
|
||||
expect slide0.7 0
|
||||
spin K2 1
|
||||
expect gate0.7 2
|
||||
expect slide0.7 1
|
||||
# back a step: LEN 6, the slide gone
|
||||
spin K2 -1
|
||||
expect slide0.7 0
|
||||
expect gate0.7 2
|
||||
key w2 up
|
||||
expect gate0.8 1
|
||||
Reference in new issue
Block a user