Skip to content

Commit

Permalink
Feature / Stutter as individual settings menu for each clip / kit row…
Browse files Browse the repository at this point in the history
… / kit global / song global (#3226)

* Implement Stutter as individual settings menu for each modControllableAudio clip

* more work

* more work

* wip

* Implemented pingpong

* Copy stutter config from one clip to another

* Fix compile

* update docs
  • Loading branch information
soymonitus authored Jan 19, 2025
1 parent f8a9c57 commit 9a57771
Show file tree
Hide file tree
Showing 27 changed files with 347 additions and 85 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,14 @@
- Added a boss/roland style Dimension effect
- Made grain much faster and updated controls
- Added LPF to Mutable Instruments Reverb
- Added an option to reverse the stutter effect
- Added two more envelopes (Envelope 3 and Envelope 4), which you can access from the sound editor menu.

#### <ins>Per-clip Stutter with options: Quantize, Reverse, and Ping-Pong</ins>
- Now the stutter buffer can also be set to play in reverse, and ping-pong.
- A new menu has been added to the `SONG` menu, under `FX` submenu, to set the stutter configuration for the song.
- An extra menu has been added per sound source (either synths, kit rows, affect-entire kits, or audio clips) to
set the stutter configuration independently of the song configuration if you wish.

### User Interface

#### <ins>Accessibility</ins>
Expand Down
21 changes: 7 additions & 14 deletions docs/community_features.md
Original file line number Diff line number Diff line change
Expand Up @@ -669,16 +669,12 @@ and a comb filter. Controls are the normal rate/depth/feedback/offset.
removes itself from the signal path.
- Note that it has no effect on square waves, it's best with sines and triangles

#### 4.2.8 - Quantized Stutter

- ([#357]) Set the stutter effect to be quantized to `4TH, 8TH, 16TH, 32ND, and 64TH` rate before triggering it. Once
you have pressed the `STUTTER`-related gold encoder, then the selected value will be the center value of the encoder
and you can go up and down with the golden encoder and come back to the original rate by centering the encoder (LEDs
will flash indicating it).

- This feature is `OFF` by default and can be set to `ON` or `OFF` via `SETTINGS > COMMUNITY FEATURES`.

#### 4.2.8 - Per-clip Stutter with options: Quantize, Reverse, and Ping-Pong

- ([#3226]) Now the stutter buffer can also be set to play in reverse, and ping-pong. A new menu has been added to
the `SONG` menu, under `FX` submenu, to set the stutter configuration for the song. An extra menu has been added
per sound source (either synths, kit rows, affect-entire kits, or audio clips) to set the stutter configuration
independently of the song configuration if you wish.

#### 4.2.9 - Reverb Improvements

Expand Down Expand Up @@ -1198,11 +1194,6 @@ Note: these settings are saved to `SETTINGS/CommunityFeatures.XML` on your SD ca
* `Alternative Golden Knob Delay Params (DELA)`
* When On, it changes the behaviour of the Mod Encoder button action from the default (PingPong and Type) to the
alternative params (SyncType and SyncLevel).
* `Stutter Rate Quantize (STUT)`
* When On, the ability to set the stutterer effect to be quantized to 4th, 8th, 16th, 32nd, and 64th rate when
selecting it is enabled.
* `Reverse Stutter Rate (RSTUT)`
* When On, the stutter buffer is reversed.
* `Allow Insecure Develop Sysex Messages (SYSX)`
* When On, the ability to load firmware over USB is enabled.
* `Sync Scaling Action (SCAL)`
Expand Down Expand Up @@ -1576,6 +1567,8 @@ different firmware

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

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

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

[Automation View Documentation]: features/automation_view.md
Expand Down
23 changes: 23 additions & 0 deletions docs/menu_hierarchies.md
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,11 @@ The Song menu contains the following menu hierarchy:
- Pan
- Reverb Sidechain (SIDE)
- Volume Ducking (VOLU)

- Stutter (STUT)
- Quantize (QTZ)
- Reverse (REVE)
- Ping-Pong (PING)

- Mod-FX (MODU)
- Type
Expand Down Expand Up @@ -838,6 +843,12 @@ The Sound menu contains the following menu hierarchy:
- Pan
- Reverb Sidechain (SIDE)
- Volume Ducking (VOLU)

- Stutter (STUT)
- Use Song Settings (SONG)
- Quantize (QTZ)
- Reverse (REVE)
- Ping-Pong (PING)

- Mod-FX (MODU)
- Type
Expand Down Expand Up @@ -1217,6 +1228,12 @@ The Kit FX menu contains the following menu hierarchy:
- Pan
- Reverb Sidechain (SIDE)
- Volume Ducking (VOLU)

- Stutter (STUT)
- Use Song Settings (SONG)
- Quantize (QTZ)
- Reverse (REVE)
- Ping-Pong (PING)

- Mod-FX (MODU)
- Type
Expand Down Expand Up @@ -1787,6 +1804,12 @@ The Audio Clip menu contains the following menu hierarchy:
- Pan
- Reverb Sidechain (SIDE)
- Volume Ducking (VOLU)

- Stutter (STUT)
- Use Song Settings (SONG)
- Quantize (QTZ)
- Reverse (REVE)
- Ping-Pong (PING)

- Mod-FX (MODU)
- Type
Expand Down
1 change: 1 addition & 0 deletions src/deluge/gui/l10n/english.json
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@
"STRING_FOR_HUMANIZE_OR_QUANTIZE_ALL": "HUMANIZE/QUANTIZE ALL",
"STRING_FOR_QUANTIZE_ALL": "QUANTIZE ALL",
"STRING_FOR_QUANTIZE": "QUANTIZE",
"STRING_FOR_USE_SONG": "USE SONG SETTINGS",
"STRING_FOR_HUMANIZE_ALL": "HUMANIZE ALL",
"STRING_FOR_HUMANIZE": "HUMANIZE",
"STRING_FOR_VELOCITY_DECREASED": "Velocity decreased",
Expand Down
1 change: 1 addition & 0 deletions src/deluge/gui/l10n/g_english.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ PLACE_SDRAM_DATA Language english{
{STRING_FOR_HUMANIZE_OR_QUANTIZE_ALL, "HUMANIZE/QUANTIZE ALL"},
{STRING_FOR_QUANTIZE_ALL, "QUANTIZE ALL"},
{STRING_FOR_QUANTIZE, "QUANTIZE"},
{STRING_FOR_USE_SONG, "USE SONG SETTINGS"},
{STRING_FOR_HUMANIZE_ALL, "HUMANIZE ALL"},
{STRING_FOR_HUMANIZE, "HUMANIZE"},
{STRING_FOR_VELOCITY_DECREASED, "Velocity decreased"},
Expand Down
1 change: 1 addition & 0 deletions src/deluge/gui/l10n/g_seven_segment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ PLACE_SDRAM_DATA Language seven_segment{
{STRING_FOR_HUMANIZE_OR_QUANTIZE_ALL, "ALL"},
{STRING_FOR_QUANTIZE_ALL, "QTZA"},
{STRING_FOR_QUANTIZE, "QTZ"},
{STRING_FOR_USE_SONG, "SONG"},
{STRING_FOR_HUMANIZE_ALL, "HUMA"},
{STRING_FOR_HUMANIZE, "HUM"},
{STRING_FOR_VELOCITY_DECREASED, "LESS"},
Expand Down
1 change: 1 addition & 0 deletions src/deluge/gui/l10n/seven_segment.json
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@
"STRING_FOR_HUMANIZE_OR_QUANTIZE_ALL": "ALL",
"STRING_FOR_QUANTIZE_ALL": "QTZA",
"STRING_FOR_QUANTIZE": "QTZ",
"STRING_FOR_USE_SONG": "SONG",
"STRING_FOR_HUMANIZE_ALL": "HUMA",
"STRING_FOR_HUMANIZE": "HUM",
"STRING_FOR_VELOCITY_DECREASED": "LESS",
Expand Down
1 change: 1 addition & 0 deletions src/deluge/gui/l10n/strings.h
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ enum class String : size_t {
STRING_FOR_HUMANIZE_OR_QUANTIZE_ALL,
STRING_FOR_QUANTIZE_ALL,
STRING_FOR_QUANTIZE,
STRING_FOR_USE_SONG,
STRING_FOR_HUMANIZE_ALL,
STRING_FOR_HUMANIZE,
STRING_FOR_VELOCITY_DECREASED,
Expand Down
4 changes: 0 additions & 4 deletions src/deluge/gui/menu_item/runtime_feature/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ SettingToggle menuPatchCableResolution(RuntimeFeatureSettingType::PatchCableReso
SettingToggle menuCatchNotes(RuntimeFeatureSettingType::CatchNotes);
SettingToggle menuDeleteUnusedKitRows(RuntimeFeatureSettingType::DeleteUnusedKitRows);
SettingToggle menuAltGoldenKnobDelayParams(RuntimeFeatureSettingType::AltGoldenKnobDelayParams);
SettingToggle menuQuantizedStutterRate(RuntimeFeatureSettingType::QuantizedStutterRate);
SettingToggle menuReverseStutterRate(RuntimeFeatureSettingType::ReverseStutterRate);
Setting menuSyncScalingAction(RuntimeFeatureSettingType::SyncScalingAction);
DevSysexSetting menuDevSysexAllowed(RuntimeFeatureSettingType::DevSysexAllowed);
SettingToggle menuHighlightIncomingNotes(RuntimeFeatureSettingType::HighlightIncomingNotes);
Expand All @@ -60,8 +58,6 @@ std::array<MenuItem*, RuntimeFeatureSettingType::MaxElement - kNonTopLevelSettin
&menuCatchNotes,
&menuDeleteUnusedKitRows,
&menuAltGoldenKnobDelayParams,
&menuQuantizedStutterRate,
&menuReverseStutterRate,
&menuDevSysexAllowed,
&menuSyncScalingAction,
&menuHighlightIncomingNotes,
Expand Down
35 changes: 35 additions & 0 deletions src/deluge/gui/menu_item/stutter/ping_pong.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* 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/menu_item/toggle.h"
#include "gui/ui/sound_editor.h"
#include "model/mod_controllable/mod_controllable_audio.h"

namespace deluge::gui::menu_item::stutter {

class PingPongStutter final : public Toggle {
public:
using Toggle::Toggle;
void readCurrentValue() override { this->setValue(soundEditor.currentModControllable->stutterConfig.pingPong); }
void writeCurrentValue() override { soundEditor.currentModControllable->stutterConfig.pingPong = this->getValue(); }
bool isRelevant(ModControllableAudio* modControllable, int32_t whichThing) override {
return soundEditor.currentModControllable->isSong()
|| !soundEditor.currentModControllable->stutterConfig.useSongStutter;
}
};

} // namespace deluge::gui::menu_item::stutter
37 changes: 37 additions & 0 deletions src/deluge/gui/menu_item/stutter/quantized.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* 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/menu_item/toggle.h"
#include "gui/ui/sound_editor.h"
#include "model/mod_controllable/mod_controllable_audio.h"

namespace deluge::gui::menu_item::stutter {

class QuantizedStutter final : public Toggle {
public:
using Toggle::Toggle;
void readCurrentValue() override { this->setValue(soundEditor.currentModControllable->stutterConfig.quantized); }
void writeCurrentValue() override {
soundEditor.currentModControllable->stutterConfig.quantized = this->getValue();
}
bool isRelevant(ModControllableAudio* modControllable, int32_t whichThing) override {
return soundEditor.currentModControllable->isSong()
|| !soundEditor.currentModControllable->stutterConfig.useSongStutter;
}
};

} // namespace deluge::gui::menu_item::stutter
35 changes: 35 additions & 0 deletions src/deluge/gui/menu_item/stutter/reversed.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* 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/menu_item/toggle.h"
#include "gui/ui/sound_editor.h"
#include "model/mod_controllable/mod_controllable_audio.h"

namespace deluge::gui::menu_item::stutter {

class ReversedStutter final : public Toggle {
public:
using Toggle::Toggle;
void readCurrentValue() override { this->setValue(soundEditor.currentModControllable->stutterConfig.reversed); }
void writeCurrentValue() override { soundEditor.currentModControllable->stutterConfig.reversed = this->getValue(); }
bool isRelevant(ModControllableAudio* modControllable, int32_t whichThing) override {
return soundEditor.currentModControllable->isSong()
|| !soundEditor.currentModControllable->stutterConfig.useSongStutter;
}
};

} // namespace deluge::gui::menu_item::stutter
49 changes: 49 additions & 0 deletions src/deluge/gui/menu_item/stutter/use_song_stutter.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*
* 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/menu_item/toggle.h"
#include "gui/ui/sound_editor.h"
#include "model/mod_controllable/mod_controllable_audio.h"
#include "model/song/song.h"

namespace deluge::gui::menu_item::stutter {

class UseSongStutter final : public Toggle {
public:
using Toggle::Toggle;
void readCurrentValue() override {
this->setValue(soundEditor.currentModControllable->stutterConfig.useSongStutter);
}
void writeCurrentValue() override {
bool value = this->getValue();
if (!value) {
// Copy current song settings to this clip settings
soundEditor.currentModControllable->stutterConfig.quantized =
currentSong->globalEffectable.stutterConfig.quantized;
soundEditor.currentModControllable->stutterConfig.reversed =
currentSong->globalEffectable.stutterConfig.reversed;
soundEditor.currentModControllable->stutterConfig.pingPong =
currentSong->globalEffectable.stutterConfig.pingPong;
}
soundEditor.currentModControllable->stutterConfig.useSongStutter = value;
}
bool isRelevant(ModControllableAudio* modControllable, int32_t whichThing) override {
return !soundEditor.currentModControllable->isSong();
}
};

} // namespace deluge::gui::menu_item::stutter
23 changes: 23 additions & 0 deletions src/deluge/gui/ui/menus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@
#include "gui/menu_item/song/midi_learn.h"
#include "gui/menu_item/source/patched_param/fm.h"
#include "gui/menu_item/stem_export/start.h"
#include "gui/menu_item/stutter/ping_pong.h"
#include "gui/menu_item/stutter/quantized.h"
#include "gui/menu_item/stutter/reversed.h"
#include "gui/menu_item/stutter/use_song_stutter.h"
#include "gui/menu_item/submenu.h"
#include "gui/menu_item/submenu/MPE.h"
#include "gui/menu_item/submenu/actual_source.h"
Expand Down Expand Up @@ -424,6 +428,22 @@ Submenu delayMenu{
},
};

// Stutter ----------------------------------------------------------------------------------
stutter::UseSongStutter stutterUseSongMenu{STRING_FOR_USE_SONG, STRING_FOR_USE_SONG};
stutter::QuantizedStutter stutterQuantizedMenu{STRING_FOR_QUANTIZE, STRING_FOR_QUANTIZE};
stutter::ReversedStutter stutterReversedMenu{STRING_FOR_REVERSE, STRING_FOR_REVERSE};
stutter::PingPongStutter stutterPingPongMenu{STRING_FOR_PING_PONG, STRING_FOR_PING_PONG};

Submenu stutterMenu{
STRING_FOR_STUTTER,
{
&stutterUseSongMenu,
&stutterQuantizedMenu,
&stutterReversedMenu,
&stutterPingPongMenu,
},
};

// Bend Ranges -------------------------------------------------------------------------------

bend_range::Main mainBendRangeMenu{STRING_FOR_NORMAL};
Expand Down Expand Up @@ -697,6 +717,7 @@ Submenu globalFXMenu{
&globalEQMenu,
&globalDelayMenu,
&globalReverbMenu,
&stutterMenu,
&globalModFXMenu,
&globalDistortionMenu,
},
Expand Down Expand Up @@ -763,6 +784,7 @@ Submenu audioClipFXMenu{
&eqMenu,
&globalDelayMenu,
&globalReverbMenu,
&stutterMenu,
&globalModFXMenu,
&audioClipDistortionMenu,
},
Expand Down Expand Up @@ -1275,6 +1297,7 @@ Submenu soundFXMenu{
&eqMenu,
&delayMenu,
&reverbMenu,
&stutterMenu,
&modFXMenu,
&soundDistortionMenu,
&noiseMenu,
Expand Down
Loading

0 comments on commit 9a57771

Please sign in to comment.