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

NavigationView #3320

Conversation

todd-gochenour
Copy link
Contributor

@todd-gochenour todd-gochenour commented Jan 29, 2025

NavigationView

There are three things to remember while navigating the rows and columns of the Deluge UI, the current bar, the current subdivision and the key/scale. Navigating between different Clip Views to Song View to Arranger View to Performance View and Automation View, these things sometimes change unexpectedly. Then one must press buttons and encoders to see temporary popups that reveal these things. NavigationView instead places this information on the top line of the OLED main canvas replacing the 'SYNTH' label.

This implementation of NavigationView preserves the current functionality of the OLED main canvas when Isomorphic or Piano keyboards are set as default. NavigationView is enabled when the In-Key Keyboard is the default.

Layout of the OLED display

+---------------------+
|3/4:1 1/32 C      120| The top line of the OLED display is called the 'Dashboard'.
|  000 RICH SAW BASS  | The middle line is called the 'Mainboard'.
|Section 1            | The bottom line is called the 'Baseboard'.
+---------------------+

Horizontal Scroll/Bars and Beats

On the left corner of the Dashboard the current/total bar count is displayed as a fraction (eg. 1/8 is the first bar of eight bars total). When the zoom level increases beyond a sixteenth note, the current quarter note beat of a bar appears (eg. 3/4:1 at 1/32 note zoom level). When the zoom level is 1/128, the beat subdivision is added (eg. 3/4:1:3). When the zoom magnification is reduced again the display returns to just current/total bars. Turning the HORIZONTAL encoder will change these numbers in place without a popup appearing.

Subdivision/Zoom Magnification/Length of Note

Next is the zoom magnification for a single column of pads (eg. 1/16 for a sixteenth note, 1/2 for a half note). When zoom reduces magnification to whole 'bars per column' the display reads 1B/C or 2B/C. Pressing down and turning the HORIZONTAL encoder and this info changes in place without a popup appearing.

Key and Scale

For SYNTH, MIDI and CV output types, shown next is the current key root note and scale. The words 'Major' and 'Minor' are omitted. Minor scales are represented with a dash '-' suffix like is done in the chord library. When the mode/scale is neither Major or Minor, the scale name is displayed without the word 'Minor' (eg. Eb- Melodic). KIT and AUDIO clips do not display a key. AUDIO clips display one of three output types; Player, Sampler or Looper. Pressing SHIFT-SCALE will change the chosen scale in place without a popup appearing.

EDIT: Key and Scale

Instead of using church modes names like Dorian, the display of scale now shows the mode degree as a roman numeral. Instead of Dorian there is a 'II', for Phrygian there is 'III'. Instead of Lydian there is 'IV' and for Mixolydian there is a 'V'. Instead of Minor there is 'VI'. Locrian is 'VII'. Major is blank. The exotic scales like melodic minor, harmonic minor and pentatonic still display their scale names.

Beats per Minute

Right justified on the dashboard is displayed the BPM (Beats per Minute). BPM is displayed only when the dashboard doesn't already show Scale or AUDIO output type information. Turning the TEMPO encoder will change this number in place if visible otherwise show a popup.

Title Name

The mainboard with the larger font displays CLIP or SONG name and remains visible in all views including AUTOMATION and PERFORMANCE. The labels for output types "MIDI", "MPE", "Internal" and "CV" become prefixes to their channel number shown as titles for MIDI and CV clips.

Parameters

Navigation is allowed while editing parameters in AUTOMATION view but not in PERFORMANCE which puts a label on the dashboard instead. In both views, the baseboard displays parameter names and values as they are being altered (eg. 'LPF Frequency:L14-R36' when a range of two pads is selected together). When a parameter is automated the phrase (Automated) appears on the dashboard instead of scale.

Cue Countdown

On the right side of the baseboard playback appears the "Bars/Beats remaining" countdown shown when a group launch event is about to occur. This cue notice reads 'Q3:4' and counts down to 'Q1:1' before disappearing again.

EDIT: Cue Countdown

The cue countdown has been moved to the top line dashboard positioned to overlay the BPM tempo. When the tempo is modified while a cue is displayed the tempo change appears in a popup instead of inline on the screen.

Strategy for Implementation

The code is found in the file 'src\deluge\gui\views\navigation_view.cpp'. The strategy is to delegate updates of the OLED screen to a NavigationView singleton 'naviview' whenever another View writes information to the main OLED canvas. Code implementation takes the form of this pattern:

if (naviview.useNavigationView()) { 
  naviview.drawDashboard();
} else {
  canvas.drawStringCentred(outputTypeText, yPos, kTextSpacingX, kTextSpacingY);
}

or

if (naviview.useNavigationView()) {
  naviview.drawMainboard(nameToDraw);
}
else if (stringLengthPixels <= OLED_MAIN_WIDTH_PIXELS) {
  canvas.drawStringCentred(nameToDraw, yPos, kTextTitleSpacingX, kTextTitleSizeY);
}
else {
  canvas.drawString(nameToDraw, 0, yPos, kTextTitleSpacingX, kTextTitleSizeY);
  deluge::hid::display::OLED::setupSideScroller(0, nameToDraw, 0, 
          OLED_MAIN_WIDTH_PIXELS, yPos,
          yPos + kTextTitleSizeY, kTextTitleSpacingX,
          kTextTitleSizeY, false);
}

Display Popups

Instead of showing popups which obscure the main content of the OLED screen, delegate to NavigationView display of the info on the screen. Code that calls display->displayPopup(), display->popupTextTemporary() or drawPermanentPopupLookingText(), like in the procedures displayNumberOfBarsAndBeats(), displayZoomLevel(), displayLoopsRemainingPopup() and displayTempoBPM(), use the same delegation strategy as illustrated above.

if (naviview.useNavigationView()) {
  naviview.drawRemainingCountdown(popupMsg.c_str());
}
else if (display->haveOLED() && !ephemeral) {
  deluge::hid::display::OLED::clearMainImage();
  deluge::hid::display::OLED::drawPermanentPopupLookingText(popupMsg.c_str());
  deluge::hid::display::OLED::sendMainImage();
}
else {
  display->displayPopup(popupMsg.c_str(), 1, true);
}

Unit Test Script

  • Settings/Defaults/Key and turn the horizontal encoder right once to move the cursor to the second letter in the range, then set this second letter to 'B'. When a new song is created (SHIFT-NEW) any of the twelve keys will be randomly chosen.
  • Settings/Defaults/UI/Keyboard/Layout toggle between isomorphic and in-key to see the layout shift from classic style to dashboard and back again.
  • press SHIFT-NEW. Switching between both layout styles, notice the information which appears first thing with the default synth clip. By default, there is one bar in the clip and each column is a sixteenth note so the entire 8x16 note grid is one bar in width. Because of the default key range set previously, there is a random key chosen and displayed on the dashboard identifying the note of colored audition pad.
  • Press SHIFT-HORIZONTAL encoder three times. The clip now has 8 bars and each column is a half note. 8x2=16 and so the entire 8x16 pad is still the full width of the clip. No horizontal scrolling.
  • Increase the magnification by pressing down and turning to the right 4 times the HORIZONTAL encoder to return to a sixteenth note zoom level. Now horizontal scrolling is allowed from 1 to 8 bars. Notice the dashboard update in place without a popup.
  • Press the CLIP button. Notice the automation overview preserves the name of the clip as the title.
  • Press LPF Frequency pad. Notice the parameter and value listed on the bottom line of the display. Notice also that the dashboard returns signaling that scrolling and zooming are allowed.
  • Press any two pads. Notice the parameter value showing left and right values. Notice the '(automated)' appear on the top line.
  • Scroll the SELECT encoder to see various links of text for the parameter name on the bottom line. If the line is too long it will set up a side scroller to reveal the rest.
  • Press the CLIP button to exit automation. Press it again. Notice the transition between views.
  • Press the SONG button. Notice the transition between views.
  • Press the KEYBOARD button. Notice the layout for PERFORMANCE view. Notice that the SONG name is still visible.
  • Turn the TEMPO encoder. Notice that the dashboard BPM display changes instead of a popup display.
  • Press KEYBOARD to exist PERFORMANCE. Notice the transition between views.
  • Press the CLIP button and then the KIT button. Notice Key/Scale is now missing from the dashboard.
  • Press the KEYBOARD view hides navigation information and displays the keyboard name instead.
  • Press the MIDI button. Notice the title "MIDI 1". Turn SELECT encoder to see "INT. TRANSPOSE", "MPE LOWER" and "MPE UPPER".
  • Press the CV button. Notice the title "CV 1". Turn the SELECT encode to see "CV 2" and "CV 1 AND 2".
  • Press the SYNTH button. Notice the transitions between output types only changes the main title and the top and bottom lines remain consistent.
  • Press SHIFT-SCALE two times to choose Dorian. Notice the '-' for minor and the '- DORIAN' appear in the dashboard. Notice that BPM has given way to the label. Turn the TEMPO encoder for a popup display now that BPM is hidden.
  • Press SONG button. The BPM display appears right justified on the dashboard and the 'Dorian' label is truncated. Increase zoom magnification to 1/128 and see the dashboard text grow and the BPM continues to truncate.
  • Press an empty row to create a new synth. Notice the defaults of the clip returned to 1 bar in length and 1/16 in magnitude. Scroll the first clip to something other than the first bar and then switch between clips to notice how the navigation changes from (clip1) 3/8 to (clip2) 1/1 back to (clip 1) 1/8. The SONG scroll location and zoom tend to stay the same as the last clip. SONG total bar length is the length of the longest clip.
  • Press SONG button. Press and hold an empty clip and press the SELECT encoder. Then press the clip button again to see AUDIO1 'player'. Scroll the SELECT encoder to see 'sampler' and 'looper' appear instead of the Key/Scale.
  • Load a sample into AUDIO1 Player, Turn SHIFT-HORIZONTAL encoder to the right to add sixteenth notes and time stretch the sample. The calculation of the audio clip length updates in the dashboard.
  • Open or create a song with multiple sections that have a number of repeats (2 or 4) set up per section. When one section completes it transitions to the next. Start the launch sequence and see the cue appear in the baseboard. Enter into PERFORMANCE view and interact with parameters and see value appear in the baseboard. Unlike drawPermanentPopupLookingText(), the cue does not occupy the entire screen.
  • In SONG view press and hold any row pad to see the clip's NavigationView appear temporarily on the screen.
  • With a new song, create the first clip with 8 bars and the second clip with less than 1 (13 sixteenth notes).
  • Press SONG and RECORD and let play for a few rounds to record the clips into the ARRANGER view. Stop PLAY and press SONG to enter ARRANGER view. The navigation scrolling and zoom for ARRANGER is different than for a CLIP. ARRANGER gives extra blank space at the end after the last clip ends to expand the arrangement. The display of total number of bars will be larger than the actual length of the arrangement.
  • Play arrangement with CROSS-SCREEN button on. The Auto scrolling of the arrangement updates the current bar reported in the dashboard.
  • Press HORIZONTRAL encoder and BACK/REDO at the same time to clear the arrangement. Navigation resets to 1/1. Add clips and see total bar count increase.
  • Playing the arrangement with CROSS-SCREEN auto scrolling on will update the current bar number displayed while scrolling. When playback ends the UI snaps back to where it started.
  • Change the tempo while a cue countdown is displayed at the top right corner overlaying the BPM. Tempo changes will appear as a popup while the cue is present. Otherwise, it will change inline.

Copy link
Contributor

github-actions bot commented Jan 29, 2025

Test Results

107 tests  ±0   107 ✅ ±0   1s ⏱️ -1s
 16 suites ±0     0 💤 ±0 
 16 files   ±0     0 ❌ ±0 

Results for commit cc6670d. ± Comparison against base commit 571a2ac.

♻️ This comment has been updated with latest results.

overlaying the BPM.  Display mode degree as a roman
numeral instead of the church modes names.
@todd-gochenour
Copy link
Contributor Author

I have moved the Remaining Countdown 'cue' to appear at the upper left corner of the OLED display overlaying the BPM. Changing the tempo when a cue is displayed will show the change as a popup.

I changed the display of scale from church modes names to the mode degree as a roman numeral. Instead of Dorian there is a 'II', for Phrygian there is 'III'. Instead of Lydian there is 'IV' and for Mixolydian there is a 'V'. Instead of Minor there is 'VI'. The exotic scales like melodic minor, harmonic minor and pentatonic all still use their scale names.

@seangoodvibes
Copy link
Collaborator

seangoodvibes commented Feb 6, 2025

image

I don't think this is going to work for automation view.

Try scrolling to the patch cables in automation view and see how they're rendered on the display.

If you have two sources and a destination there won't be enough space to write out the patch cable + the potential left and right values

Also my personal preference is to keep automation view as is

--

Regarding the horizontal scrolling

I think we should be maintaining the current format displayed which is: 1:1:1

--

I also feel like we should not enforce all these changes on people as people have already complained about a "cluttered display" with just the song view additions of BPM and Scale.

People want the ability to have a streamlined display. We were recently discussing adding a toggle to remove the song view additions.

So we would need a way of toggling / configuring what is on the display through the default menu, both for song view and clip view.

--

Re scales: I think removing the names in favour of Roman numerals is going to be confusing as that is what people are used to.

@todd-gochenour
Copy link
Contributor Author

I withdraw this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants