diff --git a/CHANGELOG.md b/CHANGELOG.md
index 920c326e66..b66b206f78 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -74,6 +74,7 @@ set the stutter configuration independently of the song configuration if you wis
#### Audio Clips
- Added audio output modes, and changed audio clip monitoring to be seperate from source selection. Monitoring is now on
when the output is a SAMPLER or a LOOPER, chosen by turning the select knob in an audio clip.
+- Added the ability to trim from the start of an audio clip without reversing it (enable in Community Features menu).
#### Instrument Clip View
diff --git a/docs/community_features.md b/docs/community_features.md
index 1d8f01cdfe..ea17fe4e70 100644
--- a/docs/community_features.md
+++ b/docs/community_features.md
@@ -1175,6 +1175,18 @@ for the Lumi Keys Studio Edition, described below.
- While Lumi has limited options for MPE separation, it will be configured to align with the dominant MPE range
defined on the Deluge (upper or lower dominant).
+### 4.11.0 - Audio Clip View - Trimming Clips
+
+- ([#3291]) Added a new `STRING_FOR_COMMUNITY_FEATURE_TRIM_FROM_START_OF_AUDIO_CLIP` feature to allow users to trim from the start of a clip without needing to reverse it.
+ - Pressing a pad in the first column of an audio clip now makes it flash green allowing you to move the start position. The new start position snaps to column one.
+ - You can revert to an earlier portion by pressing undo (or reverse the clip and altering as before).
+ - This lets you easily alter the start of an audio clip without time stretching.
+ - Previously, this was only possible by reversing the audio clip and trimming the start as if it were the end.
+ - This feature is `OFF` by default and can be set to `ON` or `OFF` via `SETTINGS > COMMUNITY FEATURES`.
+
+See this demo for more details:
+[Audio Clip View - Trimming Tips](https://www.youtube.com/watch?v=iWhVUsx40Mg&t=45s&ab_channel=RonCavagnaro).
+
## 5. Community Features Menu (aka Runtime Settings)
In the main menu of the Deluge (accessed by pressing both "SHIFT" + the "SELECT" encoder) there is
@@ -1240,6 +1252,8 @@ Note: these settings are saved to `SETTINGS/CommunityFeatures.XML` on your SD ca
* When On, the number of `TAP TEMPO` button presses to engage `TAP TEMPO` is changed to `FOUR (4)` to avoid mistakingly changing tempo.
* `Horizontal menus (HORI)`
* When On, some menu items render in horizontal menus, with multiple items visible and editable at the same time.
+* `Trim from start of audio clips (TRIM)`
+ * When On, the ability to trim from the start of an audio clip without needing to reverse it is enabled.
## 6. Sysex Handling
@@ -1576,6 +1590,8 @@ different firmware
[#3285]: https://github.com/SynthstromAudible/DelugeFirmware/pull/3285
+[#3291]: https://github.com/SynthstromAudible/DelugeFirmware/pull/3291
+
[Automation View Documentation]: features/automation_view.md
[Arpeggiator Documentation]: features/arpeggiator.md
diff --git a/docs/menu_hierarchies.md b/docs/menu_hierarchies.md
index 861e665887..09dd6a56df 100644
--- a/docs/menu_hierarchies.md
+++ b/docs/menu_hierarchies.md
@@ -424,6 +424,9 @@ NOTE: These options can change depending on how your default resolution is set
- Grid View Loop Pads (LOOP)
- OFF
- ON
+ - Trim from start of audio clips (TRIM)
+ - OFF
+ - ON
Firmware Version (FIRM)
@@ -548,7 +551,7 @@ The Song menu contains the following menu hierarchy:
- Pan
- Reverb Sidechain (SIDE)
- Volume Ducking (VOLU)
-
+
- Stutter (STUT)
- Quantize (QTZ)
- Reverse (REVE)
@@ -843,7 +846,7 @@ The Sound menu contains the following menu hierarchy:
- Pan
- Reverb Sidechain (SIDE)
- Volume Ducking (VOLU)
-
+
- Stutter (STUT)
- Use Song Settings (SONG)
- Quantize (QTZ)
@@ -1228,7 +1231,7 @@ The Kit FX menu contains the following menu hierarchy:
- Pan
- Reverb Sidechain (SIDE)
- Volume Ducking (VOLU)
-
+
- Stutter (STUT)
- Use Song Settings (SONG)
- Quantize (QTZ)
@@ -1430,7 +1433,7 @@ The CV menu contains the following menu hierarchy:
- Gate
- Sync
NOTE: These options can change depending on how your default resolution is set
-
+
- Off
- 2-Bar
- 1-Bar
@@ -1804,7 +1807,7 @@ The Audio Clip menu contains the following menu hierarchy:
- Pan
- Reverb Sidechain (SIDE)
- Volume Ducking (VOLU)
-
+
- Stutter (STUT)
- Use Song Settings (SONG)
- Quantize (QTZ)
diff --git a/src/deluge/gui/colour/rgb.h b/src/deluge/gui/colour/rgb.h
index a9d883adbe..72686f6dfc 100644
--- a/src/deluge/gui/colour/rgb.h
+++ b/src/deluge/gui/colour/rgb.h
@@ -32,6 +32,14 @@ class RGB {
/// Blue channel
channel_type b = 0;
+ /// Copies RGB values from a colour
+ constexpr RGB& operator=(const RGB& other) {
+ r = other.r;
+ g = other.g;
+ b = other.b;
+ return *this;
+ }
+
/**
* @brief Construct a monochrome (white) shade
*
diff --git a/src/deluge/gui/l10n/english.json b/src/deluge/gui/l10n/english.json
index ba212be581..2055637972 100644
--- a/src/deluge/gui/l10n/english.json
+++ b/src/deluge/gui/l10n/english.json
@@ -553,6 +553,7 @@
"STRING_FOR_COMMUNITY_FEATURE_GRID_VIEW_LOOP_PADS": "Grid View Loop Layer Pads",
"STRING_FOR_COMMUNITY_FEATURE_ALTERNATIVE_TAP_TEMPO_BEHAVIOUR": "Alternative Tap Tempo Behaviour",
"STRING_FOR_COMMUNITY_FEATURE_HORIZONTAL_MENUS": "Horizontal menus",
+ "STRING_FOR_COMMUNITY_FEATURE_TRIM_FROM_START_OF_AUDIO_CLIP": "Trim from start of audio clips",
"STRING_FOR_TRACK_STILL_HAS_CLIPS_IN_SESSION": "Track still has clips in session",
"STRING_FOR_DELETE_ALL_TRACKS_CLIPS_FIRST": "Delete all track's clips first",
diff --git a/src/deluge/gui/l10n/g_english.cpp b/src/deluge/gui/l10n/g_english.cpp
index 56378a482c..e73ab1705f 100644
--- a/src/deluge/gui/l10n/g_english.cpp
+++ b/src/deluge/gui/l10n/g_english.cpp
@@ -507,6 +507,7 @@ PLACE_SDRAM_DATA Language english{
{STRING_FOR_COMMUNITY_FEATURE_GRID_VIEW_LOOP_PADS, "Grid View Loop Layer Pads"},
{STRING_FOR_COMMUNITY_FEATURE_ALTERNATIVE_TAP_TEMPO_BEHAVIOUR, "Alternative Tap Tempo Behaviour"},
{STRING_FOR_COMMUNITY_FEATURE_HORIZONTAL_MENUS, "Horizontal menus"},
+ {STRING_FOR_COMMUNITY_FEATURE_TRIM_FROM_START_OF_AUDIO_CLIP, "Trim from start of audio clips"},
{STRING_FOR_TRACK_STILL_HAS_CLIPS_IN_SESSION, "Track still has clips in session"},
{STRING_FOR_DELETE_ALL_TRACKS_CLIPS_FIRST, "Delete all track's clips first"},
{STRING_FOR_CANT_DELETE_FINAL_CLIP, "Can't delete final Clip"},
diff --git a/src/deluge/gui/l10n/g_seven_segment.cpp b/src/deluge/gui/l10n/g_seven_segment.cpp
index d04f68453e..5cd8cb9191 100644
--- a/src/deluge/gui/l10n/g_seven_segment.cpp
+++ b/src/deluge/gui/l10n/g_seven_segment.cpp
@@ -408,6 +408,7 @@ PLACE_SDRAM_DATA Language seven_segment{
{STRING_FOR_COMMUNITY_FEATURE_ALTERNATIVE_PLAYBACK_START_BEHAVIOUR, "STAR"},
{STRING_FOR_COMMUNITY_FEATURE_GRID_VIEW_LOOP_PADS, "LOOP"},
{STRING_FOR_COMMUNITY_FEATURE_ALTERNATIVE_TAP_TEMPO_BEHAVIOUR, "TAPT"},
+ {STRING_FOR_COMMUNITY_FEATURE_TRIM_FROM_START_OF_AUDIO_CLIP, "TRIM"},
{STRING_FOR_TRACK_STILL_HAS_CLIPS_IN_SESSION, "CANT"},
{STRING_FOR_DELETE_ALL_TRACKS_CLIPS_FIRST, "CANT"},
{STRING_FOR_CANT_DELETE_FINAL_CLIP, "CANT"},
diff --git a/src/deluge/gui/l10n/seven_segment.json b/src/deluge/gui/l10n/seven_segment.json
index 3618d0ca82..e437cb7f31 100644
--- a/src/deluge/gui/l10n/seven_segment.json
+++ b/src/deluge/gui/l10n/seven_segment.json
@@ -421,6 +421,7 @@
"STRING_FOR_COMMUNITY_FEATURE_ALTERNATIVE_PLAYBACK_START_BEHAVIOUR": "STAR",
"STRING_FOR_COMMUNITY_FEATURE_GRID_VIEW_LOOP_PADS": "LOOP",
"STRING_FOR_COMMUNITY_FEATURE_ALTERNATIVE_TAP_TEMPO_BEHAVIOUR": "TAPT",
+ "STRING_FOR_COMMUNITY_FEATURE_TRIM_FROM_START_OF_AUDIO_CLIP": "TRIM",
"STRING_FOR_TRACK_STILL_HAS_CLIPS_IN_SESSION": "CANT",
"STRING_FOR_DELETE_ALL_TRACKS_CLIPS_FIRST": "CANT",
@@ -450,7 +451,6 @@
"STRING_FOR_WRONG_SIZE": "SIZE FAIL",
"STRING_FOR_BAD_KEY": "KEY FAIL",
- "STRING_FOR_CLIP_CLEARED": "CLEAR",
"STRING_FOR_SAMPLE_CLEARED": "CLEAR",
"STRING_FOR_NOTES_CLEARED": "CLEAR",
"STRING_FOR_AUTOMATION_CLEARED": "CLEAR",
diff --git a/src/deluge/gui/l10n/strings.h b/src/deluge/gui/l10n/strings.h
index cbf5a65154..4afe6330fd 100644
--- a/src/deluge/gui/l10n/strings.h
+++ b/src/deluge/gui/l10n/strings.h
@@ -538,6 +538,7 @@ enum class String : size_t {
STRING_FOR_COMMUNITY_FEATURE_GRID_VIEW_LOOP_PADS,
STRING_FOR_COMMUNITY_FEATURE_ALTERNATIVE_TAP_TEMPO_BEHAVIOUR,
STRING_FOR_COMMUNITY_FEATURE_HORIZONTAL_MENUS,
+ STRING_FOR_COMMUNITY_FEATURE_TRIM_FROM_START_OF_AUDIO_CLIP,
STRING_FOR_TRACK_STILL_HAS_CLIPS_IN_SESSION,
STRING_FOR_DELETE_ALL_TRACKS_CLIPS_FIRST,
diff --git a/src/deluge/gui/menu_item/runtime_feature/settings.cpp b/src/deluge/gui/menu_item/runtime_feature/settings.cpp
index 00f97341b2..d130281aa0 100644
--- a/src/deluge/gui/menu_item/runtime_feature/settings.cpp
+++ b/src/deluge/gui/menu_item/runtime_feature/settings.cpp
@@ -49,6 +49,7 @@ SettingToggle menuAlternativePlaybackStartBehaviour(RuntimeFeatureSettingType::A
SettingToggle menuEnableGridViewLoopPads(RuntimeFeatureSettingType::EnableGridViewLoopPads);
SettingToggle menuAlternativeTapTempoBehaviour(RuntimeFeatureSettingType::AlternativeTapTempoBehaviour);
SettingToggle menuHorizontalMenus(RuntimeFeatureSettingType::HorizontalMenus);
+SettingToggle menuTrimFromStartOfAudioClip(RuntimeFeatureSettingType::TrimFromStartOfAudioClip);
std::array