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

Master comp UI improvements #655

Merged
Merged
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
15 changes: 12 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,11 @@
"MIMode": "gdb",
"miDebuggerPath": "arm-none-eabi-gdb",
"windows": {
"miDebuggerPath": "${workspaceRoot}/toolchain/win32-x86_64/arm-none-eabi-gcc/bin/arm-none-eabi-gdb.exe"
"miDebuggerPath": "${workspaceRoot}/toolchain/win32-x86_64/arm-none-eabi-gcc/bin/arm-none-eabi-gdb.exe",
"debugServerPath": "C:/Program Files/SEGGER/JLink/JLinkGDBServerCL.exe",
},
"debugServerArgs": "-select USB -device R7S721020 -endian little -if SWD -speed auto -noir -LocalhostOnly -nologtofile -port 3333 -SWOPort 2332 -TelnetPort 2333",
"serverStarted": "Connected to target",
"linux": {
"miDebuggerPath": "${workspaceRoot}/toolchain/linux-x86_64/arm-none-eabi-gcc/bin/arm-none-eabi-gdb"
},
Expand All @@ -75,8 +78,11 @@
"MIMode": "gdb",
"miDebuggerPath": "arm-none-eabi-gdb",
"windows": {
"miDebuggerPath": "${workspaceRoot}/toolchain/win32-x86_64/arm-none-eabi-gcc/bin/arm-none-eabi-gdb.exe"
"miDebuggerPath": "${workspaceRoot}/toolchain/win32-x86_64/arm-none-eabi-gcc/bin/arm-none-eabi-gdb.exe",
"debugServerPath": "C:/Program Files/SEGGER/JLink/JLinkGDBServerCL.exe",
},
"debugServerArgs": "-select USB -device R7S721020 -endian little -if SWD -speed auto -noir -LocalhostOnly -nologtofile -port 3333 -SWOPort 2332 -TelnetPort 2333",
"serverStarted": "Connected to target",
"linux": {
"miDebuggerPath": "${workspaceRoot}/toolchain/linux-x86_64/arm-none-eabi-gcc/bin/arm-none-eabi-gdb"
},
Expand Down Expand Up @@ -115,8 +121,11 @@
"MIMode": "gdb",
"miDebuggerPath": "arm-none-eabi-gdb",
"windows": {
"miDebuggerPath": "${workspaceRoot}/toolchain/win32-x86_64/arm-none-eabi-gcc/bin/arm-none-eabi-gdb.exe"
"miDebuggerPath": "${workspaceRoot}/toolchain/win32-x86_64/arm-none-eabi-gcc/bin/arm-none-eabi-gdb.exe",
"debugServerPath": "C:/Program Files/SEGGER/JLink/JLinkGDBServerCL.exe",
},
"debugServerArgs": "-select USB -device R7S721020 -endian little -if SWD -speed auto -noir -LocalhostOnly -nologtofile -port 3333 -SWOPort 2332 -TelnetPort 2333",
"serverStarted": "Connected to target",
"linux": {
"miDebuggerPath": "${workspaceRoot}/toolchain/linux-x86_64/arm-none-eabi-gcc/bin/arm-none-eabi-gdb"
},
Expand Down
7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ add_compile_options(
-fdiagnostics-parseable-fixits
-fsigned-char

# Debug symbols
$<$<CONFIG:DEBUG,RELWITHDEBINFO>:-ggdb3> # Include
# Debug symbols, also for release so we get a full ELF
$<$<CONFIG:DEBUG,RELEASE,RELWITHDEBINFO>:-ggdb3> # Include

# Optimization level
$<$<CONFIG:DEBUG>:-Og>
Expand Down Expand Up @@ -215,7 +215,8 @@ target_link_options(deluge PUBLIC
LINKER:--gc-sections
LINKER:--entry=start # Set the entrypoint to 'start' (see RZA1/compiler/asm/start.S)

$<$<CONFIG:RELEASE>:LINKER:--strip-all> # Strip
# Enabled to generate a full ELF, objcopy will do the stripping
# $<$<CONFIG:RELEASE>:LINKER:--strip-all> # Strip

-nostartfiles # Don't emit startfiles

Expand Down
16 changes: 14 additions & 2 deletions docs/community_features.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ Here is a list of general improvements that have been made, ordered from newest
#### 3.7 - Mod Wheel
- ([#512]) Incoming mod wheel on non-MPE synths now maps to y axis

#### 3.8 - Visual Feedback on Value Changes with Mod Encoders and Increased Resolution for Value's in Menu's
- ([#636]) Changing parameter values with Mod (Gold) Encoders now displays a pop-up with the current value of the Parameter. The Menu's for Parameters and Patch Cables have also been adjusted to show the same value range as displayed with the Mod Encoders.
- This allows for better fine-tuning of values.
- The value range displayed is 0-50 for non-MIDI parameters and 0-127 for MIDI parameters.
- Note: In the Menu, if you wish to scroll through the parameter value range faster at an accelerated rate of +/- 5, hold Shift while turning the Select Encoder.

## 4. New Features Added

Here is a list of features that have been added to the firmware as a list, grouped by category:
Expand All @@ -58,7 +64,6 @@ Here is a list of features that have been added to the firmware as a list, group
- Default (DEFA) - the default Deluge clip type.
- Fill (FILL) - Fill clip. It appears orange/cyan on the status pads, and when triggered it will schedule itself to start at such a time that it _finishes_ at the start of the next loop. If the fill clip is longer than the remaining time, it is triggered immediately at a point midway through. The loop length is set by the longest playing clip, or by the total length of a section times the repeat count set for that section. **Limitation**: a fill clip is still subject to the one clip per instrument behavior of the Deluge. Fill clips can steal an output from another fill, but they cannot steal from a non-fill. This can lead to some fills never starting since a default type clip has the needed instrument. This can be worked around by cloning the instrument to an independent copy.


#### 4.1.4 - Catch Notes

- ([#221]) The normal behavior of the Deluge is to try to keep up with 'in progress' notes when instant switching between clips by playing them late. However this leads to glitches with drum clips and other percussive sounds. Changing this setting to OFF will prevent this behavior and *not* try to keep up with those notes, leading to smoother instant switching between clips.
Expand All @@ -74,7 +79,12 @@ Here is a list of features that have been added to the firmware as a list, group
- Compared to rows layout overdub recording and copying clips to arranger is currently not supported
- Every track (column) has a random generated color that can be changed in edit mode (see below)
- Launched clips are full color, unlaunched dimmed and during soloing all non soloed clips are greyed out
- A new menu to select the default Layout has been added in Shift+Selection Encoder -> Defaults -> UI -> Song -> Layout
- New default settings that can be reached with Shift+Selection Encoder -> Defaults -> UI -> Song
- Layout: Select the default layout for all new songs
- Grid
- Default active mode: "Selection" allows changing the mode as described below, all other settings will always make mode snap back to the configured one (default Selection)
- Select in green mode: Enabling this will make allow holding clips in green (launch) mode to change their parameters like in blue mode, tradeoff is arming is executed on finger up (default on)
- Empty pad unarm: Enabling will make pressing empty pads in a track unarm all playing tracks in that track (default off)
- There are different interaction modes that change how the grid behaves
- The mode can be changed by clicking on one of the colored pads in the Audition/Section column on the right
- To permanently switch the mode click on a pad and release, to temporarily switch hold the mode pad and use the grid, the mode will snap back to the current permanent one
Expand Down Expand Up @@ -197,6 +207,7 @@ Synchronization modes accessible through the "LFO SYNC" shortcut.
- Follow-up PR's:
- ([#347]) Added new automatable parameters
- ([#360]) Fixed interpolation bugs, added fine tuning for long presses, and added pad selection mode
- ([#636]) Updated Parameter Values displayed in Automation View to match Parameter Value Ranges displayed in the Menu's. E.g. instead of 0 - 128, it now displays 0 - 50 (except for Pan which now displays -25 to +25 and MIDI instrument clips which now display 0 - 127).

#### 4.3.6 - Set Probability By Row

Expand Down Expand Up @@ -390,4 +401,5 @@ This list includes all preprocessor switches that can alter firmware behaviour a
[#368]: https://github.com/SynthstromAudible/DelugeFirmware/pull/368
[#395]: https://github.com/SynthstromAudible/DelugeFirmware/pull/395
[#512]: https://github.com/SynthstromAudible/DelugeFirmware/pull/512
[#636]: https://github.com/SynthstromAudible/DelugeFirmware/pull/636
[Automation View Documentation]: https://github.com/SynthstromAudible/DelugeFirmware/blob/release/1.0/docs/features/automation_view.md
2 changes: 2 additions & 0 deletions docs/features/automation_view.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,9 @@ The Automation Editor **will:**
- enable you to quickly change parameters in focus for editing by turning select or using shift + shortcut pad
- enable you to view the current parameter value setting for the parameters that are currently automatable.
- illuminate each pad row according to the current value within the range of 0-128. E.g. bottom pad = 0-16, then 17-32, 33-48, 49-64, 65-80, 81-96, 97-112, 113-128)
> **Update** The values displayed in automation view have been updated to display the same value range displayed in the menu's for consistency across the Deluge UI. So instead of displaying 0 - 128, it now displays 0 - 50. Calculations in automation view are still being done based on the 0 - 128 range, but the display converts it to the 0 - 50 range.
- edit new or existing parameter automations on a per step basis, at any zoom level across the entire timeline. Each row in a step column corresponds to a range of values in the parameter value range (0-128) (see above). If you press the bottom row, the value will be set to 0. if you press the top row, the value will be set to 128. Pressing the rows in between increments/decrements the value by 18 (e.g. 0, 18, 36, 54, 72, 90, 108, 128).
> **Update** The values displayed in automation view have been updated to display the same value range displayed in the menu's for consistency across the Deluge UI. So instead of displaying 0 - 128, it now displays 0 - 50. Calculations in automation view are still being done based on the 0 - 128 range, but the display converts it to the 0 - 50 range.

![image](https://github.com/seangoodvibes/DelugeFirmware/assets/138174805/8cc7befa-9071-4bd3-ac3c-15049f69b250)

Expand Down
4 changes: 4 additions & 0 deletions linker_script_rz_a1l.ld
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ SECTIONS
/* ALIGN(0x20) is only necessary for v0 bootloaders */
.reset : ALIGN(0x20) /* 0x10 isn't enough. Not sure why any of this is necessary though. */
{
PROVIDE(program_code_start = .);

execute = .;
*start.S.obj (.text)
*start.S.obj (.rodata)
Expand Down Expand Up @@ -180,6 +182,8 @@ SECTIONS

_etext = .;
address_end_reset = .;

PROVIDE(program_code_end = .);
} > RAM012L

.rodata :
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_path(SET SHARED_INCLUDE ${CMAKE_CURRENT_LIST_DIR})

target_sources(deluge PUBLIC main.c resetprg.c c_lib_alternatives.S)
target_sources(deluge PUBLIC main.c resetprg.c fault_handler.c c_lib_alternatives.S)

add_subdirectory(deluge)
add_subdirectory(RZA1)
Expand Down
21 changes: 10 additions & 11 deletions src/RZA1/compiler/asm/reset_handler.S
Original file line number Diff line number Diff line change
Expand Up @@ -234,18 +234,17 @@ Finished:
/* Other Handler */
/* ========================================================================= */
undefined_handler:
B undefined_handler

svc_handler:
B svc_handler

prefetch_handler:
B prefetch_handler

abort_handler:
B abort_handler

prefetch_handler:
reserved_handler:
B reserved_handler
CPSID i /* Disable interrupt handling to preserve stack */
MOV r0, LR /* Store SYS LR value as first function parameter */
MOV r1, SP /* Store SYS SP value as second function parameter */
CPS #USR_MODE /* Switch into user mode to get those register values */
MOV r2, LR /* Store USR LR value as third function parameter */
MOV r3, SP /* Store USR SP value as fourth function parameter */
CPS #SYS_MODE /* Go back to SYS mode */
LDR r12,=handle_cpu_fault /* Load address of handle_cpu_fault */
BX r12 /* Jump to handle_cpu_fault without link */
.end

32 changes: 31 additions & 1 deletion src/definitions_cxx.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,23 @@ constexpr int32_t kNumPatchSources = static_cast<int32_t>(kLastPatchSource);
constexpr PatchSource kFirstLocalSource = PatchSource::ENVELOPE_0;
//constexpr PatchSource kFirstUnchangeableSource = PatchSource::VELOCITY;

//Automation Instrument Clip View constants
//Menu Min Max Values

//regular menu range e.g. 0 - 50
constexpr int32_t kMaxMenuValue = 50;
constexpr int32_t kMinMenuValue = 0;
constexpr int32_t kMidMenuValue = kMinMenuValue + ((kMaxMenuValue - kMinMenuValue) / 2);

//pan menu range e.g. -25 to +25
constexpr int32_t kMaxMenuPanValue = kMaxMenuValue / 2;
constexpr int32_t kMinMenuPanValue = -1 * kMaxMenuPanValue;

//patch cable menu range e.g. -5000 to 5000
constexpr int32_t kMaxMenuPatchCableValue = kMaxMenuValue * 100;
constexpr int32_t kMinMenuPatchCableValue = -1 * kMaxMenuPatchCableValue;
//

//Automation View constants
constexpr int32_t kNoSelection = 255;
constexpr int32_t kNumNonKitAffectEntireParamsForAutomation = 55;
constexpr int32_t kNumKitAffectEntireParamsForAutomation = 24;
Expand Down Expand Up @@ -721,6 +737,13 @@ enum class ModFXParam {
FEEDBACK,
OFFSET,
};

enum class CompParam {
RATIO,
ATTACK,
RELEASE,
};

constexpr auto kNumModFXParams = util::to_underlying(ModFXParam::OFFSET) + 1;

enum class PatchCableAcceptance {
Expand Down Expand Up @@ -1090,3 +1113,10 @@ enum SessionLayoutType : uint8_t {
SessionLayoutTypeGrid,
SessionLayoutTypeMaxElement // Keep as boundary
};

enum GridDefaultActiveMode : uint8_t {
GridDefaultActiveModeSelection,
GridDefaultActiveModeGreen,
GridDefaultActiveModeBlue,
GridDefaultActiveModeMaxElement // Keep as boundary
};
7 changes: 5 additions & 2 deletions src/deluge/dsp/master_compressor/master_compressor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ MasterCompressor::MasterCompressor() {
shape = getParamFromUserValue(Param::Unpatched::COMPRESSOR_SHAPE, 1);
//an appropriate range is 0-50*one q 15
threshold = ONE_Q31;
rawThreshold = 0;
follower = true;
//this is about a 1:1 ratio
ratio = ONE_Q31 >> 1;
Expand Down Expand Up @@ -64,6 +65,8 @@ void MasterCompressor::updateER() {
}

void MasterCompressor::render(StereoSample* buffer, uint16_t numSamples, q31_t volAdjustL, q31_t volAdjustR) {
ratio = (rawRatio >> 1) + (3 << 28);
threshold = ONE_Q31 - rawThreshold;
updateER();

q31_t over = std::max<float>(0, (meanVolume - threshdb) / 21) * ONE_Q31;
Expand Down Expand Up @@ -144,7 +147,7 @@ float MasterCompressor::calc_rms(StereoSample* buffer, uint16_t numSamples) {
void MasterCompressor::setup(int32_t a, int32_t r, int32_t t, int32_t rat) {
attack = a;
release = r;
threshold = t;
ratio = rat;
rawThreshold = t;
rawRatio = rat;
updateER();
}
2 changes: 2 additions & 0 deletions src/deluge/dsp/master_compressor/master_compressor.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ class MasterCompressor : public Compressor {
float calc_rms(StereoSample* buffer, uint16_t numSamples);
uint8_t gainReduction;
bool dither;
q31_t rawRatio;
q31_t rawThreshold;
q31_t threshold;
q31_t shape;
q31_t ratio;
Expand Down
6 changes: 5 additions & 1 deletion src/deluge/gui/l10n/english.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -466,13 +466,17 @@ PLACE_SDRAM_DATA Language english{
{STRING_FOR_COMMANDS, "Commands"},
{STRING_FOR_OUTPUT, "Output"},
{STRING_FOR_DEFAULT_UI, "UI"},
{STRING_FOR_DEFAULT_UI_GRID, "Grid"},
{STRING_FOR_DEFAULT_UI_DEFAULT_GRID_ACTIVE_MODE, "Default active mode"},
{STRING_FOR_DEFAULT_UI_DEFAULT_GRID_UNARM_EMPTY_PADS, "Empty pad unarm"},
{STRING_FOR_DEFAULT_UI_DEFAULT_GRID_ALLOW_GREEN_SELECTION, "Select in green mode"},
{STRING_FOR_DEFAULT_UI_DEFAULT_GRID_ACTIVE_MODE_SELECTION, "Selection"},
{STRING_FOR_DEFAULT_UI_LAYOUT, "Layout"},
{STRING_FOR_DEFAULT_UI_KEYBOARD, "Keyboard"},
{STRING_FOR_DEFAULT_UI_KEYBOARD_LAYOUT_ISOMORPHIC, "Isomorphic"},
{STRING_FOR_DEFAULT_UI_KEYBOARD_LAYOUT_INKEY, "In-Key"},
{STRING_FOR_DEFAULT_UI_SONG, "Song"},
{STRING_FOR_DEFAULT_UI_SONG_LAYOUT_ROWS, "Rows"},
{STRING_FOR_DEFAULT_UI_SONG_LAYOUT_GRID, "Grid"},
{STRING_FOR_INPUT, "Input"},
{STRING_FOR_TEMPO_MAGNITUDE_MATCHING, "Tempo magnitude matching"},
{STRING_FOR_TRIGGER_CLOCK, "Trigger clock"},
Expand Down
6 changes: 5 additions & 1 deletion src/deluge/gui/l10n/seven_segment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,13 +308,17 @@ PLACE_SDRAM_DATA Language seven_segment{
{STRING_FOR_COMMANDS, "CMD"},
{STRING_FOR_OUTPUT, "OUT"},
{STRING_FOR_DEFAULT_UI, "UI"},
{STRING_FOR_DEFAULT_UI_GRID, "GRID"},
{STRING_FOR_DEFAULT_UI_DEFAULT_GRID_ACTIVE_MODE, "DEFMODE"},
{STRING_FOR_DEFAULT_UI_DEFAULT_GRID_UNARM_EMPTY_PADS, "UNARM"},
{STRING_FOR_DEFAULT_UI_DEFAULT_GRID_ALLOW_GREEN_SELECTION, "GREENSELECT"},
{STRING_FOR_DEFAULT_UI_DEFAULT_GRID_ACTIVE_MODE_SELECTION, "SELE"},
{STRING_FOR_DEFAULT_UI_LAYOUT, "LAYT"},
{STRING_FOR_DEFAULT_UI_KEYBOARD, "KBD"},
{STRING_FOR_DEFAULT_UI_KEYBOARD_LAYOUT_ISOMORPHIC, "ISO"},
{STRING_FOR_DEFAULT_UI_KEYBOARD_LAYOUT_INKEY, "INKY"},
{STRING_FOR_DEFAULT_UI_SONG, "SONG"},
{STRING_FOR_DEFAULT_UI_SONG_LAYOUT_ROWS, "ROWS"},
{STRING_FOR_DEFAULT_UI_SONG_LAYOUT_GRID, "GRID"},
{STRING_FOR_INPUT, "IN"},
{STRING_FOR_TEMPO_MAGNITUDE_MATCHING, "MAGN"},
{STRING_FOR_TRIGGER_CLOCK, "TCLOCK"},
Expand Down
6 changes: 5 additions & 1 deletion src/deluge/gui/l10n/strings.h
Original file line number Diff line number Diff line change
Expand Up @@ -373,13 +373,17 @@ enum class String : size_t {
STRING_FOR_COMMANDS,
STRING_FOR_OUTPUT,
STRING_FOR_DEFAULT_UI,
STRING_FOR_DEFAULT_UI_GRID,
STRING_FOR_DEFAULT_UI_DEFAULT_GRID_ACTIVE_MODE,
STRING_FOR_DEFAULT_UI_DEFAULT_GRID_UNARM_EMPTY_PADS,
STRING_FOR_DEFAULT_UI_DEFAULT_GRID_ALLOW_GREEN_SELECTION,
STRING_FOR_DEFAULT_UI_DEFAULT_GRID_ACTIVE_MODE_SELECTION,
STRING_FOR_DEFAULT_UI_LAYOUT,
STRING_FOR_DEFAULT_UI_KEYBOARD,
STRING_FOR_DEFAULT_UI_KEYBOARD_LAYOUT_ISOMORPHIC,
STRING_FOR_DEFAULT_UI_KEYBOARD_LAYOUT_INKEY,
STRING_FOR_DEFAULT_UI_SONG,
STRING_FOR_DEFAULT_UI_SONG_LAYOUT_ROWS,
STRING_FOR_DEFAULT_UI_SONG_LAYOUT_GRID,
STRING_FOR_TEMPO_MAGNITUDE_MATCHING,
STRING_FOR_TRIGGER_CLOCK,
STRING_FOR_FM_MODULATOR_1,
Expand Down
4 changes: 2 additions & 2 deletions src/deluge/gui/menu_item/arpeggiator/midi_cv/gate.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ class Gate final : public Integer {
void readCurrentValue() override {
auto* current_clip = static_cast<InstrumentClip*>(currentSong->currentClip);
int64_t arp_gate = (int64_t)current_clip->arpeggiatorGate + 2147483648;
this->setValue((arp_gate * 50 + 2147483648) >> 32);
this->setValue((arp_gate * kMaxMenuValue + 2147483648) >> 32);
}
void writeCurrentValue() override {
(static_cast<InstrumentClip*>(currentSong->currentClip))->arpeggiatorGate =
(uint32_t)this->getValue() * 85899345 - 2147483648;
}
[[nodiscard]] int32_t getMaxValue() const override { return 50; }
[[nodiscard]] int32_t getMaxValue() const override { return kMaxMenuValue; }
bool isRelevant(Sound* sound, int32_t whichThing) override { return soundEditor.editingCVOrMIDIClip(); }
};
} // namespace deluge::gui::menu_item::arpeggiator::midi_cv
7 changes: 4 additions & 3 deletions src/deluge/gui/menu_item/arpeggiator/midi_cv/rate.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,21 @@ class Rate final : public Integer {
using Integer::Integer;
void readCurrentValue() override {
this->setValue(
(((int64_t)(static_cast<InstrumentClip*>(currentSong->currentClip))->arpeggiatorRate + 2147483648) * 50
(((int64_t)(static_cast<InstrumentClip*>(currentSong->currentClip))->arpeggiatorRate + 2147483648)
* kMaxMenuValue
+ 2147483648)
>> 32);
}
void writeCurrentValue() override {
if (this->getValue() == 25) {
if (this->getValue() == kMidMenuValue) {
(static_cast<InstrumentClip*>(currentSong->currentClip))->arpeggiatorRate = 0;
}
else {
(static_cast<InstrumentClip*>(currentSong->currentClip))->arpeggiatorRate =
(uint32_t)this->getValue() * 85899345 - 2147483648;
}
}
[[nodiscard]] int32_t getMaxValue() const override { return 50; }
[[nodiscard]] int32_t getMaxValue() const override { return kMaxMenuValue; }
bool isRelevant(Sound* sound, int32_t whichThing) override { return soundEditor.editingCVOrMIDIClip(); }
};
} // namespace deluge::gui::menu_item::arpeggiator::midi_cv
5 changes: 3 additions & 2 deletions src/deluge/gui/menu_item/audio_clip/attack.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@ class Attack final : public Integer {

void readCurrentValue() override {
this->setValue(
(((int64_t)(static_cast<AudioClip*>(currentSong->currentClip))->attack + 2147483648) * 50 + 2147483648)
(((int64_t)(static_cast<AudioClip*>(currentSong->currentClip))->attack + 2147483648) * kMaxMenuValue
+ 2147483648)
>> 32);
}
void writeCurrentValue() override {
(static_cast<AudioClip*>(currentSong->currentClip))->attack =
(uint32_t)this->getValue() * 85899345 - 2147483648;
}
[[nodiscard]] int32_t getMaxValue() const override { return 50; }
[[nodiscard]] int32_t getMaxValue() const override { return kMaxMenuValue; }
};
} // namespace deluge::gui::menu_item::audio_clip
2 changes: 1 addition & 1 deletion src/deluge/gui/menu_item/audio_clip/hpf_freq.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class HPFFreq final : public UnpatchedParam {

// 7SEG ONLY
void drawValue() override {
if (this->getValue() == 0) {
if (this->getValue() == kMinMenuValue) {
display->setText(l10n::get(l10n::String::STRING_FOR_DISABLED));
}
else {
Expand Down
Loading