Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature / Kit Arpeggiator #3388

Open
wants to merge 8 commits into
base: community
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ also affect normal sequenced notes while arpeggiator is Off.
- Added `LOCK` parameter to allow you to freeze the current set of randomized values so the sequence has a repeatable pattern.
- Added new `WALK1`, `WALK2`, `WALK3` and `PATTERN` note modes.
- Exposed several parameters from the `Randomizer` also for non-arpeggiated notes: `Velocity Spread`, `Note probability`, and `Reverse Probability`.
- Added `KIT ARPEGGIATOR` for `KIT` clips. This arpeggiator is a new layer on top of the kit rows, which will control which rows receive note ON's and note OFF's. That means that the kit rows can have their own arpeggiators also enabled. You can access the new menu when `Affect-Entire` is enabled in the `Kit` and you access the menu with `Select` knob.

### MIDI

Expand Down
5 changes: 5 additions & 0 deletions docs/community_features.md
Original file line number Diff line number Diff line change
Expand Up @@ -856,6 +856,9 @@ to each individual note onset. ([#1978])

- ([#1198] [#2978] [#2985] [#2990] [#3079] [#3285]) For a detailed description of this feature, please refer to the feature
documentation: [Arpeggiator Documentation]
- ([#3388]) Added `KIT ARPEGGIATOR` for `KIT` clips. This allows the user to engage an arpeggiator layer on top of the kit rows,
which will control which rows receive note ON's and note OFF's. That means that the kit rows can have their own arpeggiators also
enabled, which allows for unlimited possible pattern combinations. This feature is also explained in [Arpeggiator Documentation]

#### 4.3.9 - Velocity View

Expand Down Expand Up @@ -1611,6 +1614,8 @@ different firmware

[#3352]: https://github.com/SynthstromAudible/DelugeFirmware/pull/3352

[#3388]: https://github.com/SynthstromAudible/DelugeFirmware/pull/3388

[Automation View Documentation]: features/automation_view.md

[Arpeggiator Documentation]: features/arpeggiator.md
Expand Down
36 changes: 36 additions & 0 deletions docs/features/arpeggiator.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,3 +200,39 @@ This submenu contains parameters that are useful if you have an MPE controller c
- `Off`: This disables control of velocity with MPE.
- `Aftertouch (AFTE)`: The pressure applied to the key sets the velocity of the note.
- `MPE Y (Y)`: The Y position on the MPE controller sets the velocity of the note.

## Kit Arpeggiator

The `Kit Arpeggiator` is a new layer on top of the kit rows, which will control which rows receive note ON's and note OFF's.
That means that the kit rows can have their own arpeggiators also enabled. If you want to use the `Kit Arpeggiator`, you need to
enable `Affect-Entire` in the `Kit`. Then access the menu with `Select` knob and go to the `Kit Arpeggiator` submenu.

The `Kit Arpeggiator` parameters are also controllable with `MIDI FOLLOW`.

### Opting in and out of the Kit Arpeggiator

Kit rows by default opt-in to the `Kit Arpeggiator`. You can make a kit row opt-out of it by going into
the `Arpeggiator` submenu from the kit row menu and disabling the option `Include in Kit Arp`.

There is a special case where the kit row is forced to opt-out of the `Kit Arpeggiator`, which is when their notes in the sequencer
don't have "tails". That is, if when you paint a note in the sequencer, it doesn't allow you to extend its length, it means this kit row
is going to be excluded from the `Kit Arpeggiator`. This happens when you load a sample in the row and the sample mode is set to `Once`.
Or it could also happen when you load a synth preset and you set the `Env1 Sustain` to zero.

### Reverse Probability

The `Reverse Probability` parameter is available for the `Kit Arpeggiator`, but it works a little bit differently than the same
parameter for sounds. In this case it is able to "invert" the `Reverse` setting for each note, which means that:
- If `Reverse Probability` evaluates to `Yes` for a note, and the kit row's own `Reverse` evaluates to "play forward", then
this will be inverted and the sample will play in reverse.
- If `Reverse Probability` evaluates to `Yes` for a note, and the kit row's own `Reverse` evaluates to "play in reverse", then
this will be inverted and the sample will play forward.
- If `Reverse Probability` evaluates to `No` for a note, then, the kit row's `Reverse` settings will be respected.

### Tips for using the Kit Arpeggiator

- To be able to use the `Kit Arpeggiator` with a sliced sample, remember to set all kit rows to sample mode `Cut`. You can do this by
entering sample mode menu for any kit row, and while holding the `Affect-Entire` button, you can change the sample mode to `Cut`.
That will apply the change to all kit rows. Then it is up to you how you place the notes, but a simple experiment could be to
place a long note occupying the whole length of the clip for all the kit rows, then enable the `Kit Arpeggiator` and have fun
playing with the settings.
60 changes: 60 additions & 0 deletions docs/menu_hierarchies.md
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,7 @@ The Sound menu contains the following menu hierarchy:
- Disabled (OFF)
- Aftertouch
- MPE Y (Y)
- Include in Kit Arp (KARP) (NOTE: available only for Kit Rows)
</details>

<details><summary>Randomizer (RAND)</summary>
Expand Down Expand Up @@ -1146,6 +1147,63 @@ The Kit FX menu contains the following menu hierarchy:
- Pitch (PITC)
- Pan
</details>
<details><summary>Kit Arpeggiator (KARP)</summary>

- Enabled (ON)
- Basic
- Gate
- Sync
NOTE: These options can change depending on how your default resolution is set

- Off
- 2-Bar
- 1-Bar
- 2nd-Notes
- 4th-Notes
- 8th-Notes
- 16th-Notes
- 32nd-Notes
- 64th-Notes
- 128th-Notes
- 2-Bar-TPLTS
- 1-Bar-TPLTS
- 2nd-TPLTS
- 4th-TPLTS
- 8th-TPLTS
- 16th-TPLTS
- 32nd-TPLTS
- 64th-TPLTS
- 128th-TPLTS
- 2-Bar-DTTED
- 1-Bar-DTTED
- 2nd-DTTED
- 4th-DTTED
- 8th-DTTED
- 16th-DTTED
- 32nd-DTTED
- 64th-DTTED
- 128th-DTTED
- Rate
- Pattern
- Note Mode (NMOD)
- Up
- Down
- Up & Down (UPDN)
- Played Order (PLAY)
- Random (RAND)
- Step Repeat (REPE)
- Rhythm (RHYT)
- Sequence Length (LENG)
- Randomizer
- Lock Randomizer (LOCK)
- Gate Spread (GATE)
- Velocity Spread (VELO)
- Ratchet Amount (RATC)
- Ratchet Probability (RPRO)
- Note Probability (NOTE)
- Bass Probability (BASS)
- Reverse Probability (RVRS)
</details>
<details><summary>Compressor (COMP)</summary>

- Threshold (THRE)
Expand Down Expand Up @@ -1398,6 +1456,7 @@ The MIDI menu contains the following menu hierarchy:
- Disabled (OFF)
- Aftertouch
- MPE Y (Y)
- Include in Kit Arp (KARP) (NOTE: available only for Kit Rows)
</details>
<details><summary>Randomizer (RAND)</summary>

Expand Down Expand Up @@ -1506,6 +1565,7 @@ The CV menu contains the following menu hierarchy:
- Disabled (OFF)
- Aftertouch
- MPE Y (Y)
- Include in Kit Arp (KARP) (NOTE: available only for Kit Rows)
</details>
<details><summary>Randomizer (RAND)</summary>

Expand Down
3 changes: 2 additions & 1 deletion src/deluge/gui/l10n/english.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@
"STRING_FOR_UP_DOWN": "Up & Down",
"STRING_FOR_AS_PLAYED": "Played Order",
"STRING_FOR_ALTERNATE": "Alternate",
"STRING_FOR_ARP": "Arpeggiator",
"STRING_FOR_SEQUENCE": "Sequencer",

"STRING_FOR_FIFTH": "5TH",
Expand Down Expand Up @@ -436,6 +435,7 @@
"STRING_FOR_RATCHET_PROBABILITY": "Ratchet Probability",
"STRING_FOR_REVERSE_PROBABILITY": "Reverse Probability",
"STRING_FOR_SEQUENCE_LENGTH": "Sequence Length",
"STRING_FOR_INCLUDE_IN_KIT_ARP": "Include in Kit Arp",
"STRING_FOR_RANDOMIZER_LOCK": "Lock Randomizer",
"STRING_FOR_WALK": "Walk",
"STRING_FOR_WALK1": "Walk1",
Expand Down Expand Up @@ -594,6 +594,7 @@
"STRING_FOR_PRESET": "PRESET",
"STRING_FOR_MODE": "MODE",
"STRING_FOR_ARPEGGIATOR": "ARPEGGIATOR",
"STRING_FOR_KIT_ARPEGGIATOR": "KIT ARPEGGIATOR",
"STRING_FOR_RANDOMIZER": "RANDOMIZER",
"STRING_FOR_PATTERN": "PATTERN",
"STRING_FOR_POLYPHONY": "POLYPHONY",
Expand Down
3 changes: 2 additions & 1 deletion src/deluge/gui/l10n/g_english.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ PLACE_SDRAM_DATA Language english{
{STRING_FOR_UP_DOWN, "Up & Down"},
{STRING_FOR_AS_PLAYED, "Played Order"},
{STRING_FOR_ALTERNATE, "Alternate"},
{STRING_FOR_ARP, "Arpeggiator"},
{STRING_FOR_SEQUENCE, "Sequencer"},
{STRING_FOR_FIFTH, "5TH"},
{STRING_FOR_SUS2, "SUS2"},
Expand Down Expand Up @@ -394,6 +393,7 @@ PLACE_SDRAM_DATA Language english{
{STRING_FOR_RATCHET_PROBABILITY, "Ratchet Probability"},
{STRING_FOR_REVERSE_PROBABILITY, "Reverse Probability"},
{STRING_FOR_SEQUENCE_LENGTH, "Sequence Length"},
{STRING_FOR_INCLUDE_IN_KIT_ARP, "Include in Kit Arp"},
{STRING_FOR_RANDOMIZER_LOCK, "Lock Randomizer"},
{STRING_FOR_WALK, "Walk"},
{STRING_FOR_WALK1, "Walk1"},
Expand Down Expand Up @@ -544,6 +544,7 @@ PLACE_SDRAM_DATA Language english{
{STRING_FOR_PRESET, "PRESET"},
{STRING_FOR_MODE, "MODE"},
{STRING_FOR_ARPEGGIATOR, "ARPEGGIATOR"},
{STRING_FOR_KIT_ARPEGGIATOR, "KIT ARPEGGIATOR"},
{STRING_FOR_RANDOMIZER, "RANDOMIZER"},
{STRING_FOR_PATTERN, "PATTERN"},
{STRING_FOR_POLYPHONY, "POLYPHONY"},
Expand Down
3 changes: 2 additions & 1 deletion src/deluge/gui/l10n/g_seven_segment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ PLACE_SDRAM_DATA Language seven_segment{
{STRING_FOR_AS_PLAYED, "PLAY"},
{STRING_FOR_PATTERN, "PATT"},
{STRING_FOR_ALTERNATE, "ALT"},
{STRING_FOR_ARP, "ARP"},
{STRING_FOR_SEQUENCE, "SEQ"},
{STRING_FOR_KIT_ARPEGGIATOR, "KARP"},
{STRING_FOR_CV_OUTPUT_N, "OUT*"},
{STRING_FOR_CV_OUTPUT_1, "OUT1"},
{STRING_FOR_CV_OUTPUT_2, "OUT2"},
Expand Down Expand Up @@ -282,6 +282,7 @@ PLACE_SDRAM_DATA Language seven_segment{
{STRING_FOR_RATCHET_PROBABILITY, "RPRO"},
{STRING_FOR_REVERSE_PROBABILITY, "RVRS"},
{STRING_FOR_SEQUENCE_LENGTH, "LENG"},
{STRING_FOR_INCLUDE_IN_KIT_ARP, "KARP"},
{STRING_FOR_RANDOMIZER_LOCK, "LOCK"},
{STRING_FOR_WALK1, "WLK1"},
{STRING_FOR_WALK2, "WLK2"},
Expand Down
4 changes: 3 additions & 1 deletion src/deluge/gui/l10n/seven_segment.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,10 @@
"STRING_FOR_AS_PLAYED": "PLAY",
"STRING_FOR_PATTERN": "PATT",
"STRING_FOR_ALTERNATE": "ALT",
"STRING_FOR_ARP": "ARP",
"STRING_FOR_SEQUENCE": "SEQ",

"STRING_FOR_KIT_ARPEGGIATOR": "KARP",

"STRING_FOR_CV_OUTPUT_N": "OUT*",
"STRING_FOR_CV_OUTPUT_1": "OUT1",
"STRING_FOR_CV_OUTPUT_2": "OUT2",
Expand Down Expand Up @@ -291,6 +292,7 @@
"STRING_FOR_RATCHET_PROBABILITY": "RPRO",
"STRING_FOR_REVERSE_PROBABILITY": "RVRS",
"STRING_FOR_SEQUENCE_LENGTH": "LENG",
"STRING_FOR_INCLUDE_IN_KIT_ARP": "KARP",
"STRING_FOR_RANDOMIZER_LOCK": "LOCK",
"STRING_FOR_WALK1": "WLK1",
"STRING_FOR_WALK2": "WLK2",
Expand Down
3 changes: 2 additions & 1 deletion src/deluge/gui/l10n/strings.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ enum class String : size_t {
STRING_FOR_UP_DOWN,
STRING_FOR_AS_PLAYED,
STRING_FOR_ALTERNATE,
STRING_FOR_ARP,
STRING_FOR_SEQUENCE,

// gui/menu_item/arpeggiator/chord_type.h
Expand Down Expand Up @@ -418,6 +417,7 @@ enum class String : size_t {
STRING_FOR_RATCHET_PROBABILITY,
STRING_FOR_REVERSE_PROBABILITY,
STRING_FOR_SEQUENCE_LENGTH,
STRING_FOR_INCLUDE_IN_KIT_ARP,
STRING_FOR_RANDOMIZER_LOCK,
STRING_FOR_WALK,
STRING_FOR_WALK1,
Expand Down Expand Up @@ -582,6 +582,7 @@ enum class String : size_t {
STRING_FOR_MODE,
STRING_FOR_PRESET,
STRING_FOR_ARPEGGIATOR,
STRING_FOR_KIT_ARPEGGIATOR,
STRING_FOR_RANDOMIZER,
STRING_FOR_PATTERN,
STRING_FOR_POLYPHONY,
Expand Down
14 changes: 13 additions & 1 deletion src/deluge/gui/menu_item/arpeggiator/arp_unpatched_param.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "gui/ui/sound_editor.h"

namespace deluge::gui::menu_item::arpeggiator {
class ArpSoundUnpatchedParam final : public UnpatchedParam {
class ArpUnpatchedParam final : public UnpatchedParam {
public:
using UnpatchedParam::UnpatchedParam;
bool isRelevant(ModControllableAudio* modControllable, int32_t whichThing) override {
Expand All @@ -30,6 +30,18 @@
}
};

class ArpSoundOnlyUnpatchedParam final : public UnpatchedParam {
public:
using UnpatchedParam::UnpatchedParam;
bool isRelevant(ModControllableAudio* modControllable, int32_t whichThing) override {
return !soundEditor.editingCVOrMIDIClip() && !soundEditor.editingKitAffectEntire()
&& !soundEditor.editingNonAudioDrumRow();
}
void getColumnLabel(StringBuf& label) override {
label.append(deluge::l10n::getView(deluge::l10n::built_in::seven_segment, this->name).data());

Check failure on line 41 in src/deluge/gui/menu_item/arpeggiator/arp_unpatched_param.h

View workflow job for this annotation

GitHub Actions / clang-tidy-review

clang-tidy: error

result of a `data()` call may not be null terminated, provide size information to the callee to prevent potential issues [bugprone-suspicious-stringview-data-usage,-warnings-as-errors]
}
};

class ArpNonKitSoundUnpatchedParam final : public UnpatchedParam {
public:
using UnpatchedParam::UnpatchedParam;
Expand Down
2 changes: 1 addition & 1 deletion src/deluge/gui/menu_item/arpeggiator/chord_type.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class ChordType : public Selection {
}
}
bool isRelevant(ModControllableAudio* modControllable, int32_t whichThing) override {
return soundEditor.editingKit() && !soundEditor.editingGateDrumRow();
return soundEditor.editingKitRow() && !soundEditor.editingGateDrumRow();
}
void getColumnLabel(StringBuf& label) override {
label.append(deluge::l10n::get(deluge::l10n::built_in::seven_segment, this->name));
Expand Down
65 changes: 65 additions & 0 deletions src/deluge/gui/menu_item/arpeggiator/include_in_kit_arp.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/*
* Copyright (c) 2014-2023 Synthstrom Audible Limited
*
* This file is part of The Synthstrom Audible Deluge Firmware.
*
* The Synthstrom Audible Deluge Firmware is free software: you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software Foundation,
* either version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with this program.
* If not, see <https://www.gnu.org/licenses/>.
*/
#pragma once
#include "gui/l10n/strings.h"
#include "gui/menu_item/selection.h"
#include "gui/ui/sound_editor.h"
#include "model/song/song.h"

namespace deluge::gui::menu_item::arpeggiator {
class IncludeInKitArp final : public Selection {
public:
using Selection::Selection;
void readCurrentValue() override {
if (!soundEditor.allowsNoteTails) {
this->setValue(0);
}
else {
this->setValue(soundEditor.currentArpSettings->includeInKitArp);

Check failure on line 32 in src/deluge/gui/menu_item/arpeggiator/include_in_kit_arp.h

View workflow job for this annotation

GitHub Actions / clang-tidy-review

clang-tidy: error

implicit conversion 'bool' -> 'int' [readability-implicit-bool-conversion,-warnings-as-errors]
}
}
void writeCurrentValue() override {
if (soundEditor.allowsNoteTails) {
auto current_value = this->getValue();
soundEditor.currentArpSettings->includeInKitArp = this->getValue() != 0;
}
}

deluge::vector<std::string_view> getOptions(OptType optType) override {

Check failure on line 42 in src/deluge/gui/menu_item/arpeggiator/include_in_kit_arp.h

View workflow job for this annotation

GitHub Actions / clang-tidy-review

clang-tidy: error

method 'getOptions' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]
(void)optType;
using enum l10n::String;
return {
l10n::getView(STRING_FOR_OFF), //<
l10n::getView(STRING_FOR_ON), //<
};
}

bool isRelevant(ModControllableAudio* modControllable, int32_t whichThing) override {
return soundEditor.editingKitRow();
}

void getColumnLabel(StringBuf& label) override {
label.append(deluge::l10n::getView(deluge::l10n::built_in::seven_segment, this->name).data());

Check failure on line 56 in src/deluge/gui/menu_item/arpeggiator/include_in_kit_arp.h

View workflow job for this annotation

GitHub Actions / clang-tidy-review

clang-tidy: error

result of a `data()` call may not be null terminated, provide size information to the callee to prevent potential issues [bugprone-suspicious-stringview-data-usage,-warnings-as-errors]
}

// flag this selection menu as a toggle menu so we can use a checkbox to toggle value
bool isToggle() override { return true; }

// don't enter menu on select button press
bool shouldEnterSubmenu() override { return false; }
};
} // namespace deluge::gui::menu_item::arpeggiator
2 changes: 1 addition & 1 deletion src/deluge/gui/menu_item/arpeggiator/mode.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class Mode final : public Selection {

// If was off, or is now becoming off...
if (soundEditor.currentArpSettings->mode == ArpMode::OFF || current_value == ArpMode::OFF) {
if (getCurrentClip()->isActiveOnOutput()) {
if (getCurrentClip()->isActiveOnOutput() && !soundEditor.editingKitAffectEntire()) {
char modelStackMemory[MODEL_STACK_MAX_SIZE];
ModelStackWithThreeMainThings* modelStack = soundEditor.getCurrentModelStack(modelStackMemory);

Expand Down
2 changes: 1 addition & 1 deletion src/deluge/gui/menu_item/arpeggiator/note_mode.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class NoteMode : public Selection {
soundEditor.currentArpSettings->flagForceArpRestart = true;
}
bool isRelevant(ModControllableAudio* modControllable, int32_t whichThing) override {
return !soundEditor.editingKit();
return !soundEditor.editingKitRow();
}
void getColumnLabel(StringBuf& label) override {
label.append(deluge::l10n::get(deluge::l10n::built_in::seven_segment, this->name));
Expand Down
2 changes: 1 addition & 1 deletion src/deluge/gui/menu_item/arpeggiator/note_mode_for_drums.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class NoteModeForDrums : public Selection {
soundEditor.currentArpSettings->flagForceArpRestart = true;
}
bool isRelevant(ModControllableAudio* modControllable, int32_t whichThing) override {
return soundEditor.editingKit() && !soundEditor.editingGateDrumRow();
return soundEditor.editingKitRow() && !soundEditor.editingGateDrumRow();
}
void getColumnLabel(StringBuf& label) override {
label.append(deluge::l10n::get(deluge::l10n::built_in::seven_segment, this->name));
Expand Down
Loading
Loading