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

Network + Arturia combined #778

Closed
wants to merge 9 commits into from
Closed
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
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ jobs:
with:
name: ${{ env.artifactName }} # Exported above
path: ./sdcard/*
retention-days: 3 # To not exceed the free MB/month quota so quickly
- name: Upload to GitHub Releases (only when building from main branch)
if: ${{ github.ref == 'refs/heads/main' }}
run: |
Expand Down
3 changes: 2 additions & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ CMSIS_DIR = ../CMSIS_5/CMSIS
OBJS = main.o kernel.o minidexed.o config.o userinterface.o uimenu.o \
mididevice.o midikeyboard.o serialmididevice.o pckeyboard.o \
sysexfileloader.o performanceconfig.o perftimer.o \
effect_compressor.o effect_platervbstereo.o uibuttons.o midipin.o
effect_compressor.o effect_platervbstereo.o uibuttons.o midipin.o \
dawcontroller.o

OPTIMIZE = -O3

Expand Down
133 changes: 132 additions & 1 deletion src/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,19 +178,35 @@ void CConfig::Load (void)

m_nMIDIButtonCh = m_Properties.GetNumber ("MIDIButtonCh", 0);
m_nMIDIButtonNotes = m_Properties.GetNumber ("MIDIButtonNotes", 0);

m_nMIDIButtonPrev = m_Properties.GetNumber ("MIDIButtonPrev", 0);
m_nMIDIButtonNext = m_Properties.GetNumber ("MIDIButtonNext", 0);
m_nMIDIButtonBack = m_Properties.GetNumber ("MIDIButtonBack", 0);
m_nMIDIButtonSelect = m_Properties.GetNumber ("MIDIButtonSelect", 0);
m_nMIDIButtonHome = m_Properties.GetNumber ("MIDIButtonHome", 0);

m_MIDIButtonActionPrev = m_Properties.GetString ("MIDIButtonActionPrev", "");
m_MIDIButtonActionNext = m_Properties.GetString ("MIDIButtonActionNext", "");
m_MIDIButtonActionBack = m_Properties.GetString ("MIDIButtonActionBack", "");
m_MIDIButtonActionSelect = m_Properties.GetString ("MIDIButtonActionSelect", "");
m_MIDIButtonActionHome = m_Properties.GetString ("MIDIButtonActionHome", "");

m_nMIDIButtonPgmUp = m_Properties.GetNumber ("MIDIButtonPgmUp", 0);
m_nMIDIButtonPgmDown = m_Properties.GetNumber ("MIDIButtonPgmDown", 0);
m_nMIDIButtonBankUp = m_Properties.GetNumber ("MIDIButtonBankUp", 0);
m_nMIDIButtonBankDown = m_Properties.GetNumber ("MIDIButtonBankDown", 0);
m_nMIDIButtonTGUp = m_Properties.GetNumber ("MIDIButtonTGUp", 0);
m_nMIDIButtonTGDown = m_Properties.GetNumber ("MIDIButtonTGDown", 0);


m_MIDIButtonActionPgmUp = m_Properties.GetString ("MIDIButtonActionPgmUp", "");
m_MIDIButtonActionPgmDown = m_Properties.GetString ("MIDIButtonActionPgmDown", "");
m_MIDIButtonActionBankUp = m_Properties.GetString ("MIDIButtonActionBankUp", "");
m_MIDIButtonActionBankDown = m_Properties.GetString ("MIDIButtonActionBankDown", "");
m_MIDIButtonActionTGUp = m_Properties.GetString ("MIDIButtonActionTGUp", "");
m_MIDIButtonActionTGDown = m_Properties.GetString ("MIDIButtonActionTGDown", "");

m_bDAWControllerEnabled = m_Properties.GetNumber ("DAWControllerEnabled", 0) != 0;

m_bEncoderEnabled = m_Properties.GetNumber ("EncoderEnabled", 0) != 0;
m_nEncoderPinClock = m_Properties.GetNumber ("EncoderPinClock", 10);
m_nEncoderPinData = m_Properties.GetNumber ("EncoderPinData", 9);
Expand Down Expand Up @@ -652,6 +668,86 @@ unsigned CConfig::GetMIDIButtonHome (void) const
return m_nMIDIButtonHome;
}

void CConfig::SetMIDIButtonCh (unsigned v)
{
m_nMIDIButtonCh = v;
}

void CConfig::SetMIDIButtonPrev (unsigned v)
{
m_nMIDIButtonPrev = v;
}

void CConfig::SetMIDIButtonNext (unsigned v)
{
m_nMIDIButtonNext = v;
}

void CConfig::SetMIDIButtonBack (unsigned v)
{
m_nMIDIButtonBack = v;
}

void CConfig::SetMIDIButtonSelect (unsigned v)
{
m_nMIDIButtonSelect = v;
}

void CConfig::SetMIDIButtonHome (unsigned v)
{
m_nMIDIButtonHome = v;
}

const char *CConfig::GetMIDIButtonActionPrev (void) const
{
return m_MIDIButtonActionPrev.c_str();
}

const char *CConfig::GetMIDIButtonActionNext (void) const
{
return m_MIDIButtonActionNext.c_str();
}

const char *CConfig::GetMIDIButtonActionBack (void) const
{
return m_MIDIButtonActionBack.c_str();
}

const char *CConfig::GetMIDIButtonActionSelect (void) const
{
return m_MIDIButtonActionSelect.c_str();
}

const char *CConfig::GetMIDIButtonActionHome (void) const
{
return m_MIDIButtonActionHome.c_str();
}

void CConfig::SetMIDIButtonActionPrev (const char *v)
{
m_MIDIButtonActionPrev = v;
}

void CConfig::SetMIDIButtonActionNext (const char *v)
{
m_MIDIButtonActionNext = v;
}

void CConfig::SetMIDIButtonActionBack (const char *v)
{
m_MIDIButtonActionBack = v;
}

void CConfig::SetMIDIButtonActionSelect (const char *v)
{
m_MIDIButtonActionSelect = v;
}

void CConfig::SetMIDIButtonActionHome (const char *v)
{
m_MIDIButtonActionHome = v;
}

unsigned CConfig::GetMIDIButtonPgmUp (void) const
{
return m_nMIDIButtonPgmUp;
Expand Down Expand Up @@ -682,6 +778,41 @@ unsigned CConfig::GetMIDIButtonTGDown (void) const
return m_nMIDIButtonTGDown;
}

const char *CConfig::GetMIDIButtonActionPgmUp (void) const
{
return m_MIDIButtonActionPgmUp.c_str();
}

const char *CConfig::GetMIDIButtonActionPgmDown (void) const
{
return m_MIDIButtonActionPgmDown.c_str();
}

const char *CConfig::GetMIDIButtonActionBankUp (void) const
{
return m_MIDIButtonActionBankUp.c_str();
}

const char *CConfig::GetMIDIButtonActionBankDown (void) const
{
return m_MIDIButtonActionBankDown.c_str();
}

const char *CConfig::GetMIDIButtonActionTGUp (void) const
{
return m_MIDIButtonActionTGUp.c_str();
}

const char *CConfig::GetMIDIButtonActionTGDown (void) const
{
return m_MIDIButtonActionTGDown.c_str();
}

bool CConfig::GetDAWControllerEnabled (void) const
{
return m_bDAWControllerEnabled;
}

bool CConfig::GetEncoderEnabled (void) const
{
return m_bEncoderEnabled;
Expand Down
48 changes: 47 additions & 1 deletion src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,34 @@ class CConfig // Configuration for MiniDexed
// MIDI Button Navigation
unsigned GetMIDIButtonCh (void) const;
unsigned GetMIDIButtonNotes (void) const;

unsigned GetMIDIButtonPrev (void) const;
unsigned GetMIDIButtonNext (void) const;
unsigned GetMIDIButtonBack (void) const;
unsigned GetMIDIButtonSelect (void) const;
unsigned GetMIDIButtonHome (void) const;

void SetMIDIButtonCh (unsigned v);

void SetMIDIButtonPrev (unsigned v);
void SetMIDIButtonNext (unsigned v);
void SetMIDIButtonBack (unsigned v);
void SetMIDIButtonSelect (unsigned v);
void SetMIDIButtonHome (unsigned v);

// Action type for Midi buttons: "click", "doubleclick", "longpress", "dec", "inc", ""
const char *GetMIDIButtonActionPrev (void) const;
const char *GetMIDIButtonActionNext (void) const;
const char *GetMIDIButtonActionBack (void) const;
const char *GetMIDIButtonActionSelect (void) const;
const char *GetMIDIButtonActionHome (void) const;

void SetMIDIButtonActionPrev (const char *v);
void SetMIDIButtonActionNext (const char *v);
void SetMIDIButtonActionBack (const char *v);
void SetMIDIButtonActionSelect (const char *v);
void SetMIDIButtonActionHome (const char *v);

// MIDI Button Program and TG Selection
unsigned GetMIDIButtonPgmUp (void) const;
unsigned GetMIDIButtonPgmDown (void) const;
Expand All @@ -224,6 +246,16 @@ class CConfig // Configuration for MiniDexed
unsigned GetMIDIButtonTGUp (void) const;
unsigned GetMIDIButtonTGDown (void) const;

// Action type for buttons: "click", "doubleclick", "longpress", "dec", "inc", ""
const char *GetMIDIButtonActionPgmUp (void) const;
const char *GetMIDIButtonActionPgmDown (void) const;
const char *GetMIDIButtonActionBankUp (void) const;
const char *GetMIDIButtonActionBankDown (void) const;
const char *GetMIDIButtonActionTGUp (void) const;
const char *GetMIDIButtonActionTGDown (void) const;

bool GetDAWControllerEnabled (void) const;

// KY-040 Rotary Encoder
// GPIO pin numbers are chip numbers, not header positions
bool GetEncoderEnabled (void) const;
Expand Down Expand Up @@ -325,7 +357,7 @@ class CConfig // Configuration for MiniDexed
std::string m_ButtonActionBankDown;
std::string m_ButtonActionTGUp;
std::string m_ButtonActionTGDown;

unsigned m_nDoubleClickTimeout;
unsigned m_nLongPressTimeout;

Expand All @@ -343,6 +375,20 @@ class CConfig // Configuration for MiniDexed
unsigned m_nMIDIButtonTGUp;
unsigned m_nMIDIButtonTGDown;

std::string m_MIDIButtonActionPrev;
std::string m_MIDIButtonActionNext;
std::string m_MIDIButtonActionBack;
std::string m_MIDIButtonActionSelect;
std::string m_MIDIButtonActionHome;
std::string m_MIDIButtonActionPgmUp;
std::string m_MIDIButtonActionPgmDown;
std::string m_MIDIButtonActionBankUp;
std::string m_MIDIButtonActionBankDown;
std::string m_MIDIButtonActionTGUp;
std::string m_MIDIButtonActionTGDown;

bool m_bDAWControllerEnabled;

bool m_bEncoderEnabled;
unsigned m_nEncoderPinClock;
unsigned m_nEncoderPinData;
Expand Down
Loading