mirror of
https://codeberg.org/armin/chromaflock.git
synced 2026-09-01 04:10:47 +02:00
replace screenshot, fix arpeggiator reset
This commit is contained in:
parent
502565156b
commit
9b1d34b24c
2 changed files with 13 additions and 1 deletions
|
|
@ -68,6 +68,12 @@ public:
|
||||||
bool wasIdle = heldNotes.empty();
|
bool wasIdle = heldNotes.empty();
|
||||||
heldNotes.push_back(note);
|
heldNotes.push_back(note);
|
||||||
velocities[note] = velocity;
|
velocities[note] = velocity;
|
||||||
|
// The held set changed, so the pitch pool changed too. Restart the
|
||||||
|
// sequence from the top so the pattern always starts from a known
|
||||||
|
// note instead of continuing at stepIndex % newPoolSize.
|
||||||
|
stepIndex = 0;
|
||||||
|
randomOncePool.clear();
|
||||||
|
randomOnceOrder.clear();
|
||||||
// A fresh key press should sound immediately instead of waiting for
|
// A fresh key press should sound immediately instead of waiting for
|
||||||
// the next host-synced tick.
|
// the next host-synced tick.
|
||||||
if (wasIdle)
|
if (wasIdle)
|
||||||
|
|
@ -76,8 +82,12 @@ public:
|
||||||
|
|
||||||
void noteOff(int note) {
|
void noteOff(int note) {
|
||||||
auto it = std::find(heldNotes.begin(), heldNotes.end(), note);
|
auto it = std::find(heldNotes.begin(), heldNotes.end(), note);
|
||||||
if (it != heldNotes.end())
|
if (it != heldNotes.end()) {
|
||||||
heldNotes.erase(it);
|
heldNotes.erase(it);
|
||||||
|
stepIndex = 0;
|
||||||
|
randomOncePool.clear();
|
||||||
|
randomOnceOrder.clear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool hasHeldNotes() const { return !heldNotes.empty(); }
|
bool hasHeldNotes() const { return !heldNotes.empty(); }
|
||||||
|
|
@ -97,6 +107,8 @@ public:
|
||||||
heldNotes.clear();
|
heldNotes.clear();
|
||||||
stepIndex = 0;
|
stepIndex = 0;
|
||||||
needsImmediateStep = false;
|
needsImmediateStep = false;
|
||||||
|
randomOncePool.clear();
|
||||||
|
randomOnceOrder.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Advances one step. Notes that should stop go into `notesToStop`
|
// Advances one step. Notes that should stop go into `notesToStop`
|
||||||
|
|
|
||||||
BIN
shot.png
BIN
shot.png
Binary file not shown.
|
Before Width: | Height: | Size: 562 KiB After Width: | Height: | Size: 570 KiB |
Loading…
Add table
Add a link
Reference in a new issue