Skip to content

Commit

Permalink
Merge branch 'dev/1.8' into dev/audio2
Browse files Browse the repository at this point in the history
  • Loading branch information
djphazer committed Dec 11, 2024
2 parents c157937 + b89ebf4 commit 92dfd69
Show file tree
Hide file tree
Showing 123 changed files with 1,314 additions and 790 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/custom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
env:
GH_COMMENT: ${{ github.event.comment.body }}
run: |
echo "OC_ARTIFACT_TAG=custom_${GITHUB_ACTOR}-$(sh software/res/oc_build_tag.sh)" | tr '/' '_' >> $GITHUB_ENV
echo "OC_ARTIFACT_TAG=custom_${GITHUB_ACTOR}-$(git rev-parse --short HEAD)" | tr '/' '_' >> $GITHUB_ENV
echo "CUSTOM_BUILD_FLAGS=$(python software/res/parse_build_request.py)" >> $GITHUB_ENV
- name: Cache PlatformIO
Expand Down
10 changes: 6 additions & 4 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,25 @@ TODO (Roadmap)
===

# v1.9
* Config files on LittleFS / SD for T4.x
* Unipolar variant of SequenceX?
* T4.1 - expand to 8 channels: Piqued, Quadraturia, Captain MIDI

# v2.0
* **Fully merge "abandoned/refactoring" branch from pld**
- this was mostly done on the dev/2.0 branch, needs rebase
- this is partially done on the dev/2.0 branch
* Auto-tuner with floor/ceiling detection (fail gracefully)
* generalized AppletParams for flexible assignment, extra virtual I/O
- MIDI Learn for anything
* Audio Applets for T4.1
* Integrate Calibr8or with DAC for global tracking adjustments

# ???
* MIDI looper applet!
* Update Boilerplates - I just assume this needs attention
* better Polyphonic MIDI input tracking
* MIDI output for all apps?
* MORE MIDI STUFF:
- MIDI looper applet!
- better Polyphonic MIDI input tracking
- MIDI output for all apps?

# APP IDEAS
* Two Spheres (two applets in series on each side)
Expand Down
54 changes: 34 additions & 20 deletions software/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ build_flags =
[env:T4]
build_flags =
${env.build_flags}
-DPEWPEWPEW
; -DPEWPEWPEW
-DDRUMMAP_GRIDS2
-DENABLE_APP_CALIBR8OR
-DENABLE_APP_SCENES
Expand Down Expand Up @@ -85,11 +85,6 @@ lib_ignore = Audio, Wire
build_flags = ${env:T4.build_flags}
-DOC_VERSION_EXTRA="\"_T40\""

[env:T40_flipped]
extends = env:T40
build_flags = ${env:T40.build_flags}
-DFLIP_180

[env:T41]
board = teensy41
board_build.f_cpu = 600000000
Expand All @@ -105,6 +100,7 @@ build_flags = ${env.build_flags}
; -DENABLE_APP_POLYLFO
; -DENABLE_APP_BYTEBEATGEN
; -DENABLE_APP_BBGEN
-DENABLE_APP_PASSENCORE
-DOC_VERSION_EXTRA="\"_T41\""

[env:antihem]
Expand Down Expand Up @@ -133,7 +129,30 @@ build_flags =
; -DENABLE_APP_AUTOMATONNETZ
-DENABLE_APP_BBGEN
-DENABLE_APP_REFERENCES
-DPEWPEWPEW

[env:prod]
extends = env:T3
build_flags =
${env.build_flags}
-DENABLE_APP_CALIBR8OR
-DENABLE_APP_SCENES
; -DENABLE_APP_ENIGMA
; -DENABLE_APP_MIDI
-DENABLE_APP_PONG
-DENABLE_APP_PIQUED
-DENABLE_APP_POLYLFO
-DENABLE_APP_PASSENCORE
; -DENABLE_APP_H1200
-DENABLE_APP_BYTEBEATGEN
-DENABLE_APP_BBGEN
; -DENABLE_APP_REFERENCES
-DDRUMMAP_GRIDS2

[env:prod_vor]
extends = env:T3
build_flags =
${env:prod.build_flags}
-DVOR

[env:pewpewpew]
extends = env:T3
Expand All @@ -155,23 +174,12 @@ build_flags =
-DPEWPEWPEW
-DDRUMMAP_GRIDS2
-DOC_VERSION_EXTRA="\"_phz\""
[env:wepwepwep]
extends = env:T3
build_flags =
${env:pewpewpew.build_flags}
-DFLIP_180

[env:pewpewvor]
extends = env:T3
build_flags =
${env:pewpewpew.build_flags}
-DVOR
[env:wepwepvor]
extends = env:T3
build_flags =
${env:pewpewpew.build_flags}
-DVOR
-DFLIP_180

; --- Builds for Northern Light Modular 4U Buchla format
; default apps for NLM builds
Expand All @@ -190,7 +198,6 @@ build_flags =
; -DENABLE_APP_H1200
-DENABLE_APP_BYTEBEATGEN
-DENABLE_APP_BBGEN
-DPEWPEWPEW
-DNORTHERNLIGHT

; for old versions without inverted outputs
Expand All @@ -202,7 +209,6 @@ build_flags =
-DOC_VERSION_EXTRA="\"_NLM-DIY\""

; for the 2OC 4U module, right side
; also for the Easel cOC card
[env:nlm_right]
extends = env:nlm
build_flags =
Expand All @@ -225,6 +231,14 @@ build_flags =
-DNLM_hOC
-DOC_VERSION_EXTRA="\"_NLM-hOC\""

; for the cOC Easel card
[env:nlm_cardoc]
extends = env:nlm
build_flags =
${env:nlm.build_flags}
-DNLM_cardOC
-DOC_VERSION_EXTRA="\"_NLM-cardOC\""

[env:oc_dev]
extends = env:T3
build_flags = ${env.build_flags} -DOC_DEV
Expand Down
6 changes: 6 additions & 0 deletions software/res/parse_build_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
custom_defines += " -DVOR"
if f.startswith('BUCHLA') or f.startswith('NLM') or f.startswith('NORTHERN'):
custom_defines += " -DNORTHERNLIGHT"
if f.startswith('NLM_HOC'):
custom_defines += " -DNLM_hOC"
if f.startswith('NLM_CARDOC'):
custom_defines += " -DNLM_cardOC"
if f.startswith('NLM_2OC_L'):
custom_defines += " -DNORTHERNLIGHT_2OC_LEFTSIDE"
if f.startswith('CALIBR8'):
custom_defines += " -DENABLE_APP_CALIBR8OR"
if f.startswith('SCENE'):
Expand Down
17 changes: 9 additions & 8 deletions software/src/APP_ASR.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "util/util_turing.h"
#include "util/util_ringbuffer.h"
#include "util/util_integer_sequences.h"
#include "OC_ADC.h"
#include "OC_DAC.h"
#include "OC_menus.h"
#include "OC_scales.h"
Expand Down Expand Up @@ -106,15 +107,15 @@ class ASRApp : public settings::SettingsBase<ASRApp, ASR_SETTING_LAST> {
static constexpr size_t kHistoryDepth = 5;

#ifdef ARDUINO_TEENSY41
static constexpr ADC_CHANNEL CVInput1 = ADC_CHANNEL_5;
static constexpr ADC_CHANNEL CVInput2 = ADC_CHANNEL_6;
static constexpr ADC_CHANNEL CVInput3 = ADC_CHANNEL_7;
static constexpr ADC_CHANNEL CVInput4 = ADC_CHANNEL_8;
static constexpr ADC_CHANNEL &CVInput1 = ADC_CHANNEL_5;
static constexpr ADC_CHANNEL &CVInput2 = ADC_CHANNEL_6;
static constexpr ADC_CHANNEL &CVInput3 = ADC_CHANNEL_7;
static constexpr ADC_CHANNEL &CVInput4 = ADC_CHANNEL_8;
#else
static constexpr ADC_CHANNEL CVInput1 = ADC_CHANNEL_1;
static constexpr ADC_CHANNEL CVInput2 = ADC_CHANNEL_2;
static constexpr ADC_CHANNEL CVInput3 = ADC_CHANNEL_3;
static constexpr ADC_CHANNEL CVInput4 = ADC_CHANNEL_4;
static constexpr ADC_CHANNEL &CVInput1 = ADC_CHANNEL_1;
static constexpr ADC_CHANNEL &CVInput2 = ADC_CHANNEL_2;
static constexpr ADC_CHANNEL &CVInput3 = ADC_CHANNEL_3;
static constexpr ADC_CHANNEL &CVInput4 = ADC_CHANNEL_4;
#endif

int get_scale(uint8_t dummy) const {
Expand Down
2 changes: 1 addition & 1 deletion software/src/APP_CALIBR8OR.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ Calibr8orPreset cal8_presets[NR_OF_PRESETS];
class Calibr8or : public HSApplication {
public:
Calibr8or() {
for (int i = DAC_CHANNEL_A; i < DAC_CHANNEL_LAST; ++i) {
for (int i = 0; i < DAC_CHANNEL_LAST; ++i) {
channel[i].chan_ = DAC_CHANNEL(i);
}
}
Expand Down
24 changes: 12 additions & 12 deletions software/src/APP_HEMISPHERE.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ static constexpr int HEM_NR_OF_PRESETS = 16;
#elif defined(PEWPEWPEW)
static constexpr int HEM_NR_OF_PRESETS = 8;
#else
static constexpr int HEM_NR_OF_PRESETS = 4;
static constexpr int HEM_NR_OF_PRESETS = 8;
#endif

/* Hemisphere Preset
Expand Down Expand Up @@ -541,11 +541,6 @@ class HemisphereManager : public HSApplication {
if (HS::q_edit)
PokePopup(QUANTIZER_POPUP);

if (draw_applets && clock_setup) {
ClockSetup_instance.View();
draw_applets = false;
}

if (draw_applets) {
if (help_hemisphere > -1) {
int index = my_applet[help_hemisphere];
Expand All @@ -571,6 +566,11 @@ class HemisphereManager : public HSApplication {
} else if (HS::clock_m.IsPaused()) {
gfxIcon(56, 1, PAUSE_ICON);
}

// clock screen is an overlay
if (clock_setup) {
ClockSetup_instance.View();
}
}

// Overlay popup window last
Expand Down Expand Up @@ -657,7 +657,7 @@ class HemisphereManager : public HSApplication {

void DelegateSelectButtonPush(const UI::Event &event) {
bool down = (event.type == UI::EVENT_BUTTON_DOWN);
const int hemisphere = (event.control == OC::CONTROL_BUTTON_UP) ? LEFT_HEMISPHERE : RIGHT_HEMISPHERE;
const int hemisphere = (event.control == OC::CONTROL_BUTTON_A) ? LEFT_HEMISPHERE : RIGHT_HEMISPHERE;

if (!down && (preset_cursor || view_state != APPLETS)) {
// cancel preset select, or config screen on select button release
Expand All @@ -675,7 +675,7 @@ class HemisphereManager : public HSApplication {
// -- button down
if (down) {
// dual press for Clock Setup... check first_click, so we only process the 2nd button event
if (event.mask == (OC::CONTROL_BUTTON_UP | OC::CONTROL_BUTTON_DOWN) && hemisphere != first_click) {
if (event.mask == (OC::CONTROL_BUTTON_A | OC::CONTROL_BUTTON_B) && hemisphere != first_click) {
clock_setup = 1;
SetHelpScreen(-1);
select_mode = -1;
Expand Down Expand Up @@ -784,9 +784,9 @@ class HemisphereManager : public HSApplication {
break;
}
if (HS::q_edit) {
if (event.control == OC::CONTROL_BUTTON_UP)
if (event.control == OC::CONTROL_BUTTON_A)
HS::NudgeOctave(HS::qview, 1);
else if (event.control == OC::CONTROL_BUTTON_DOWN)
else if (event.control == OC::CONTROL_BUTTON_B)
HS::NudgeOctave(HS::qview, -1);
else
HS::q_edit = false;
Expand All @@ -797,7 +797,7 @@ class HemisphereManager : public HSApplication {
// most button-down events fall through here
case UI::EVENT_BUTTON_PRESS:

if (event.control == OC::CONTROL_BUTTON_UP || event.control == OC::CONTROL_BUTTON_DOWN) {
if (event.control == OC::CONTROL_BUTTON_A || event.control == OC::CONTROL_BUTTON_B) {
DelegateSelectButtonPush(event);
} else if (event.control == OC::CONTROL_BUTTON_L || event.control == OC::CONTROL_BUTTON_R) {
DelegateEncoderPush(event);
Expand All @@ -810,7 +810,7 @@ class HemisphereManager : public HSApplication {
break;

case UI::EVENT_BUTTON_LONG_PRESS:
if (event.control == OC::CONTROL_BUTTON_DOWN) ToggleConfigMenu();
if (event.control == OC::CONTROL_BUTTON_B) ToggleConfigMenu();
if (event.control == OC::CONTROL_BUTTON_L) ToggleClockRun();
break;

Expand Down
Loading

0 comments on commit 92dfd69

Please sign in to comment.