Skip to content
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
12 changes: 2 additions & 10 deletions core/AudioEngine/mtAudioSequencer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,25 +200,17 @@ void playerEngine::fxGlide(uint8_t fx_val, uint8_t fx_n)
uint8_t otherFx_n = !fx_n;

uint8_t maxFxGlide = sequencer.getFxMax(Sequencer::strFxConsts::FX_TYPE_GLIDE);
uint8_t minFxGlide = sequencer.getFxMin(Sequencer::strFxConsts::FX_TYPE_GLIDE);
uint8_t halfFxGlide = maxFxGlide / 2;

if (fx_n == MOST_SIGNIFICANT_FX)
{
currentSeqModValues.glide =
(fx_val > halfFxGlide)
? mapClamped<int>(fx_val, halfFxGlide, maxFxGlide, 1000, GLIDE_MAX)
: mapClamped<int>(fx_val, minFxGlide, halfFxGlide, GLIDE_MIN, 1000);
currentSeqModValues.glide = glideFxValueToMs(fx_val, maxFxGlide);
}
else if (fx_n == LEAST_SIGNIFICANT_FX)
{
if (!trackControlParameter[(int)controlType::sequencerMode + otherFx_n]
[(int)parameterList::glide])
{
currentSeqModValues.glide =
(fx_val > halfFxGlide)
? mapClamped<int>(fx_val, halfFxGlide, maxFxGlide, 1000, GLIDE_MAX)
: mapClamped<int>(fx_val, minFxGlide, halfFxGlide, GLIDE_MIN, 1000);
currentSeqModValues.glide = glideFxValueToMs(fx_val, maxFxGlide);
}
}
trackControlParameter[(int)controlType::sequencerMode + fx_n][(int)parameterList::glide] = 1;
Expand Down
6 changes: 6 additions & 0 deletions core/interface/configEditor/configMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ const strItemTypeListText programChangeInChannelSetup{ &mtConfig.midi.programCha
17,
notesChannel };
const strItemTypeListText middleCSetup{ &mtConfig.midi.middleC, 4, middleC };
const strItemTypeListText midiGlideModeSetup{ &mtConfig.midi.glideMode, 4, midiGlideMode };
const strItemTypeListTextWithAction slaveClockCompSetup{ &mtConfig.midi.slaveClockComp, std::size(slaveClockComp), slaveClockComp, setSlaveClockCompValue };

cMenuItem melClockIn(menuMidi, "Clock in", nullptr, menuTypeItemListText, &clockInSetup);
Expand All @@ -225,6 +226,11 @@ cMenuItem melNotesInChannel(menuMidi,
menuTypeItemListText,
&notesInChanneletup);
cMenuItem melNotsOutMode(menuMidi, "MIDI out", nullptr, menuTypeItemListText, &notesOutModeSetup);
cMenuItem melMidiGlideMode(menuMidi,
"MIDI Glide",
nullptr,
menuTypeItemListText,
&midiGlideModeSetup);
cMenuItem melCCInMode(menuMidi, "CC in", supportedCcInDesc, menuTypeItemListText, &ccInModeSetup);
cMenuItem melCCInChannel(menuMidi,
"CC in channel",
Expand Down
7 changes: 7 additions & 0 deletions core/interface/configEditor/configMenuDefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,13 @@ const char* const notesChannel[17] = {
"CH9", "CH10", "CH11", "CH12", "CH13", "CH14", "CH15", "CH16",
};

const char* const midiGlideMode[4] = {
"Off",
"Legato",
"Bend",
"Both",
};

const char* const slaveClockComp[kExternalClockCompMaxVal + 1] = {
"-6", "-5", "-4", "-3", "-2", "-1", "0", "1", "2", "3", "4", "5", "6",
};
Expand Down
6 changes: 6 additions & 0 deletions core/source/mtConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,11 @@ void checkConfig()
mtConfig.midi.programChangeInChannel = 0;
}

if (mtConfig.midi.glideMode > 3)
{
mtConfig.midi.glideMode = 0;
}

if (mtConfig.midi.middleC > 3)
{
mtConfig.midi.middleC = 2;
Expand Down Expand Up @@ -533,6 +538,7 @@ void resetConfig()
mtConfig.midi.slaveClockComp = kExternalClockCompDefaultVal;
mtConfig.midi.programChangeInMode = 0;
mtConfig.midi.programChangeInChannel = 0;
mtConfig.midi.glideMode = MIDI_GLIDE_MODE_OFF;

// values ----------------------------------------
mtConfig.values.padsLightBack = PADS_LIGHT_BACK_DEFAULT;
Expand Down
Loading
Loading