GUI: add an option for it

This commit is contained in:
tildearrow 2022-05-08 02:07:58 -05:00
parent 2c643aca4c
commit 4faa65a2e9
4 changed files with 7 additions and 1 deletions

View file

@ -598,7 +598,7 @@ struct MIDIMap {
int**** map;
std::vector<MIDIBind> binds;
bool noteInput, volInput, rawVolume, polyInput, directChannel, programChange, midiClock, midiTimeCode;
bool noteInput, volInput, rawVolume, polyInput, directChannel, programChange, midiClock, midiTimeCode, yamahaFMResponse;
// 0: disabled
//
// 1: C- C# D- D# E- F- F# G- G# A- A# B-
@ -660,6 +660,7 @@ struct MIDIMap {
programChange(true),
midiClock(false),
midiTimeCode(false),
yamahaFMResponse(false),
valueInputStyle(1),
valueInputControlMSB(0),
valueInputControlLSB(0),

View file

@ -138,6 +138,7 @@ bool MIDIMap::read(String path) {
UNDERSTAND_OPTION(programChange) else
UNDERSTAND_OPTION(midiClock) else
UNDERSTAND_OPTION(midiTimeCode) else
UNDERSTAND_OPTION(yamahaFMResponse) else
UNDERSTAND_OPTION(valueInputStyle) else
UNDERSTAND_OPTION(valueInputControlMSB) else
UNDERSTAND_OPTION(valueInputControlLSB) else
@ -203,6 +204,7 @@ bool MIDIMap::write(String path) {
WRITE_OPTION(programChange);
WRITE_OPTION(midiClock);
WRITE_OPTION(midiTimeCode);
WRITE_OPTION(yamahaFMResponse);
WRITE_OPTION(valueInputStyle);
WRITE_OPTION(valueInputControlMSB);
WRITE_OPTION(valueInputControlLSB);

View file

@ -640,6 +640,7 @@ void FurnaceGUI::drawSettings() {
//ImGui::Checkbox("Use raw velocity value (don't map from linear to log)",&midiMap.rawVolume);
//ImGui::Checkbox("Polyphonic/chord input",&midiMap.polyInput);
ImGui::Checkbox("Map MIDI channels to direct channels",&midiMap.directChannel);
ImGui::Checkbox("Map Yamaha FM voice data to instruments",&midiMap.yamahaFMResponse);
ImGui::Checkbox("Program change is instrument selection",&midiMap.programChange);
//ImGui::Checkbox("Listen to MIDI clock",&midiMap.midiClock);
//ImGui::Checkbox("Listen to MIDI time code",&midiMap.midiTimeCode);

View file

@ -4,6 +4,8 @@
bool FurnaceGUI::parseSysEx(unsigned char* data, size_t len) {
SafeReader reader(data,len);
if (!midiMap.yamahaFMResponse) return true;
try {
unsigned char isSysEx=reader.readC();
if (isSysEx!=0xf0) {