Skip to content

Commit 642c472

Browse files
committed
feat: add draggable waveform loop points
1 parent 9351581 commit 642c472

10 files changed

Lines changed: 682 additions & 136 deletions

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
1414
### Changed
1515
- Gain control moved from the Playback module to the Amp module in the signal chain
1616
- Renamed internal code to match UI labels: "Time/Pitch" and "Playback" modules, "Settings" button
17+
- Loop points now use dedicated waveform handles
1718

1819
### Fixed
1920
- Header action buttons now use theme-coloured outlines, and OFF states in light themes are easier to read
2021
- Bungee algorithm no longer produces loud static when Grain is set to Smooth
2122
- Fade overlay now updates immediately when changing global crossfade, loop mode, or reverse settings
23+
- Loop fade cursors now appear on the first loop or ping-pong seam, and saved projects once again restore their linked sample path correctly
2224

2325
## [0.11.0] - 2026-03-31
2426
### Added

src/PluginEditor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ static constexpr float kSliceLaneH = 20.0f;
99
static constexpr float kScrollbarH = 10.0f;
1010
static constexpr float kActionH = 22.0f;
1111
static constexpr float kWaveformMinH = 180.0f;
12-
static constexpr float kCollapsedSignalChainH = 94.0f;
12+
static constexpr float kCollapsedSignalChainH = 114.0f;
1313

1414
static juce::File getSettingsDir()
1515
{

src/PluginProcessor.cpp

Lines changed: 245 additions & 47 deletions
Large diffs are not rendered by default.

src/PluginProcessor.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ class IntersectProcessor : public juce::AudioProcessor
123123
FieldFilterEnvAmount,
124124
FieldFilterAsym,
125125
FieldCrossfade,
126+
FieldLoopStart,
127+
FieldLoopLength,
126128
};
127129

128130
enum class MidiEditAction

src/audio/Slice.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ enum LockBit : uint64_t
3939
kLockFilterEnvAmount = 0x80000000u,
4040
kLockFilterAsym = 0x100000000ull,
4141
kLockCrossfade = 0x200000000ull,
42-
kLockRepitchMode = 0x400000000ull
42+
kLockRepitchMode = 0x400000000ull,
43+
kLockLoopStart = 0x800000000ull,
44+
kLockLoopLength = 0x1000000000ull
4345
};
4446

4547
inline int getMaxCrossfadeLengthSamples (int sliceLen, bool /*pingPong*/)
@@ -121,6 +123,8 @@ struct Slice
121123
float filterEnvReleaseSec = 0.0f;
122124
float filterEnvAmount = 0.0f; // semitones bipolar
123125
float crossfadePct = 0.0f; // 0-100, percentage of the mode-dependent fade range
126+
int loopStartOffset = 0; // samples from slice start (0 = slice start)
127+
int loopLength = 0; // samples (0 = full slice length)
124128
uint64_t lockMask = 0;
125129
juce::Colour colour { 0.4f, 0.7f, 0.95f, 1.0f };
126130
};

src/audio/Voice.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ struct Voice
3131
bool pingPong = false;
3232
int muteGroup = 1; // default matches slice creation default; always overwritten in startVoice()
3333
bool looping = false;
34+
int loopStartSample = 0;
35+
int loopEndSample = 0;
36+
bool inLoopRegion = false;
3437
float volume = 1.0f;
3538
bool releaseTail = false;
3639
bool oneShot = false;

0 commit comments

Comments
 (0)