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

Add multiple functions (velocity, mod, chord, chord memory, ...) to sidebar pads in keyboard views (#255) #901

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
e7a9a51
Add velocity on sidebar pads in isomorphic keyboard view
Dec 30, 2023
a277dfb
Change to velocity and mod in sidebar for isometric KB
robmccoll Jan 1, 2024
bb7afae
Velocity and mod to column controls, add to in_key, Display::displayP…
robmccoll Jan 9, 2024
ea5508e
Merge branch 'community' into feature/isomorphic_kb_velocity
robmccoll Jan 9, 2024
6d0e220
gitignore vim swap files
robmccoll Jan 13, 2024
f84939d
Start at instrument default velocity
robmccoll Jan 13, 2024
3d3b89f
Merge branch 'community' into feature/isomorphic_kb_velocity
robmccoll Jan 13, 2024
78cd35d
Fix keyboard screen padPressHeld, fix clamping un/signed rollover, sh…
robmccoll Jan 13, 2024
c57e049
Chord mode working, switching column functions, more fixes
robmccoll Jan 14, 2024
40dfd91
Add chord memory CMEM - bugged
robmccoll Jan 14, 2024
9f12190
Adding scale mode column control - working
robmccoll Jan 14, 2024
d27a6b8
Add dead pad state to keyboard, fix chord memory, comment out beat re…
robmccoll Jan 14, 2024
d363179
Change chord memory to save on short press to allow playing over chord
robmccoll Jan 14, 2024
b569fee
Merge branch 'community' into feature/isomorphic_kb_velocity
robmccoll Jan 14, 2024
ec8ce5d
Merge branch 'community' into feature/isomorphic_kb_velocity
robmccoll Jan 15, 2024
b4881be
Merge branch 'community' into feature/isomorphic_kb_velocity
robmccoll Jan 15, 2024
407b72e
Merge branch 'feature/isomorphic_kb_velocity' of github.com:robmccoll…
robmccoll Jan 15, 2024
7c04d32
Merge branch 'community' into feature/isomorphic_kb_velocity
m-m-adams Jan 29, 2024
d1e3243
update for rgb
m-m-adams Jan 29, 2024
d826303
Merge branch 'community' into feature/isomorphic_kb_velocity
m-m-adams Jan 29, 2024
7c2f0ff
format
m-m-adams Jan 29, 2024
9920a9e
show current velocity/mod as white instead of default
m-m-adams Jan 29, 2024
725f40a
Keyboard column control fixes
robmccoll Feb 11, 2024
6ee88a2
Add keyboard column functions to community_features.md
robmccoll Feb 13, 2024
e5b5060
Formatting
robmccoll Feb 13, 2024
8b9dc12
Merge branch 'community' into feature/isomorphic_kb_velocity
robmccoll Feb 13, 2024
440635f
formatting
robmccoll Feb 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,8 @@ __pycache__
/tests/_deps/*
*.a
*.jdebug.user

# vim
.*.swp
.*.swo
.session.vim
24 changes: 24 additions & 0 deletions docs/community_features.md
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,30 @@ Synchronization modes accessible through `SYNC` shortcuts for `ARP`, `LFO1`, `DE
**6.** Select a [script](https://norns.community/) on norns that supports grid controls (awake, boingg, rudiments, ... ).
**7.** The grid LEDs should light up indicating that norns is sending MIDI notes out on channel 16 to Deluge. Press a pad to see a change on norns indicating Deluge is sending MIDI notes out on channel 16.

#### 4.4.1.5 - Selectable Sidebar Functions
- ([#255]) In the keyboard view, a function can be mapped to each column of pads in the sidebar.
([#255]) In the keyboard view, each column of pads can be assigned a function.
You can change which function is selected by holding the top pad and turning the horizontal
encoder. Functions include:
- Velocity (VEL - Red): Low velocity is on the bottom pad and high on the top pad scaled linearly.
The range can be adjusted by holding the top or bottom pad and scrolling the vertical encoder.
Hold a pad down to change the velocity of notes played while held. The velocity will return to
default when you release the pad. Short press a pad to set a new default velocity.
- Modwheel (MOD - Blue): This is function controls the modwheel (Y) setting and has the same
controls as the velocity function.
- Chords (CHRD - Green): Press and hold or tap to either temporarily set a
chord or change the default chord. Any note you play will be interpreted as the root note
and the remaining notes will be played along with it. The default chord is none.
You can get back to none by short pressing the current chord. Chords include 5th, Sus2,
Minor, Major, Sus4, Minor7, Dom7, Major7. All are in closed root position.
- Chord Memory (CMEM - Cyan): Hold a chord down and press a pad to remember the chord. Press
that pad again to play it. You can play over the top of your saved chords. To clear a chord,
press shift and the pad you want to clear.
- Scale Mode (SMOD - Yellow): Press and hold a pad to temporarily change the scale of the
keyboard to the selected scale mode. Tap a scale mode to make it the new default. The scale
pads will default to the first 7 scale modes, but you can change any pad to any scale by
holding it down and turning the vertical encoder.

#### 4.4.2 - New scales

- ([#991]) Added new scales for instrument clips.
Expand Down
20 changes: 15 additions & 5 deletions src/deluge/gui/ui/keyboard/keyboard_screen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,7 @@ ActionResult KeyboardScreen::padAction(int32_t x, int32_t y, int32_t velocity) {
return soundEditorResult;
}

// Exit if pad is enabled but UI in wrong mode, this was removed as it prevented from changing root note
// if (!isUIModeWithinRange(padActionUIModes)
// && velocity) {
// return ActionResult::DEALT_WITH;
// }
int32_t markDead = -1;

// Pad pressed down, add to list if not full
if (velocity) {
Expand All @@ -108,6 +104,9 @@ ActionResult KeyboardScreen::padAction(int32_t x, int32_t y, int32_t velocity) {
// Pad was already active
if (pressedPads[idx].active && pressedPads[idx].x == x && pressedPads[idx].y == y) {
freeSlotIdx = -1; // If a free slot was found previously, reset it so we don't write a second entry
if ((AudioEngine::audioSampleTimer - pressedPads[idx].timeLastPadPress) > kHoldTime) {
pressedPads[idx].padPressHeld = true;
}
break;
}
}
Expand All @@ -117,6 +116,9 @@ ActionResult KeyboardScreen::padAction(int32_t x, int32_t y, int32_t velocity) {
pressedPads[freeSlotIdx].x = x;
pressedPads[freeSlotIdx].y = y;
pressedPads[freeSlotIdx].active = true;
pressedPads[freeSlotIdx].dead = false;
pressedPads[freeSlotIdx].padPressHeld = false;
pressedPads[freeSlotIdx].timeLastPadPress = AudioEngine::audioSampleTimer;
}
}

Expand All @@ -126,13 +128,21 @@ ActionResult KeyboardScreen::padAction(int32_t x, int32_t y, int32_t velocity) {
// Pad was already active
if (pressedPads[idx].active && pressedPads[idx].x == x && pressedPads[idx].y == y) {
pressedPads[idx].active = false;
markDead = idx;
if ((AudioEngine::audioSampleTimer - pressedPads[idx].timeLastPadPress) > kHoldTime) {
pressedPads[idx].padPressHeld = true;
}
break;
}
}
}

evaluateActiveNotes();

if (markDead != -1) {
pressedPads[markDead].dead = true;
}

// Handle setting root note
if (currentUIMode == UI_MODE_SCALE_MODE_BUTTON_PRESSED) {
if (sdRoutineLock) {
Expand Down