flat note names

This commit is contained in:
Eknous-P 2023-07-22 20:44:02 +04:00
parent d0404c9e10
commit 093df41ef9
5 changed files with 51 additions and 0 deletions

View File

@ -98,6 +98,10 @@ const char* FurnaceGUI::noteName(short note, short octave) {
if (seek<0 || seek>=180) {
return "???";
}
if (settings.flatNotes){
if (settings.germanNotation) return noteNamesGF[seek];
return noteNamesF[seek];
}
if (settings.germanNotation) return noteNamesG[seek];
return noteNames[seek];
}

View File

@ -1419,6 +1419,7 @@ class FurnaceGUI {
int chipNames;
int overflowHighlight;
int partyTime;
int flatNotes;
int germanNotation;
int stepOnDelete;
int scrollStep;

View File

@ -62,6 +62,42 @@ const char* noteNamesG[180]={
"C-9", "C#9", "D-9", "D#9", "E-9", "F-9", "F#9", "G-9", "G#9", "A-9", "A#9", "H-9"
};
const char* noteNamesF[180]={
"c_5", "dd5", "d_5", "ed5", "e_5", "f_5", "gd5", "g_5", "ad5", "a_5", "bd5", "b_5",
"c_4", "dd4", "d_4", "ed4", "e_4", "f_4", "gd4", "g_4", "ad4", "a_4", "bd4", "b_4",
"c_3", "dd3", "d_3", "ed3", "e_3", "f_3", "gd3", "g_3", "ad3", "a_3", "bd3", "b_3",
"c_2", "dd2", "d_2", "ed2", "e_2", "f_2", "gd2", "g_2", "ad2", "a_2", "bd2", "b_2",
"c_1", "dd1", "d_1", "ed1", "e_1", "f_1", "gd1", "g_1", "ad1", "a_1", "bd1", "b_1",
"C-0", "Db0", "D-0", "Eb0", "E-0", "F-0", "Gb0", "G-0", "Ab0", "A-0", "Bb0", "B-0",
"C-1", "Db1", "D-1", "Eb1", "E-1", "F-1", "Gb1", "G-1", "Ab1", "A-1", "Bb1", "B-1",
"C-2", "Db2", "D-2", "Eb2", "E-2", "F-2", "Gb2", "G-2", "Ab2", "A-2", "Bb2", "B-2",
"C-3", "Db3", "D-3", "Eb3", "E-3", "F-3", "Gb3", "G-3", "Ab3", "A-3", "Bb3", "B-3",
"C-4", "Db4", "D-4", "Eb4", "E-4", "F-4", "Gb4", "G-4", "Ab4", "A-4", "Bb4", "B-4",
"C-5", "Db5", "D-5", "Eb5", "E-5", "F-5", "Gb5", "G-5", "Ab5", "A-5", "Bb5", "B-5",
"C-6", "Db6", "D-6", "Eb6", "E-6", "F-6", "Gb6", "G-6", "Ab6", "A-6", "Bb6", "B-6",
"C-7", "Db7", "D-7", "Eb7", "E-7", "F-7", "Gb7", "G-7", "Ab7", "A-7", "Bb7", "B-7",
"C-8", "Db8", "D-8", "Eb8", "E-8", "F-8", "Gb8", "G-8", "Ab8", "A-8", "Bb8", "B-8",
"C-9", "Db9", "D-9", "Eb9", "E-9", "F-9", "Gb9", "G-9", "Ab9", "A-9", "Bb9", "B-9"
};
const char* noteNamesGF[180]={
"c_5", "dd5", "d_5", "ed5", "e_5", "f_5", "gd5", "g_5", "ad5", "a_5", "b_5", "h_5",
"c_4", "dd4", "d_4", "ed4", "e_4", "f_4", "gd4", "g_4", "ad4", "a_4", "b_4", "h_4",
"c_3", "dd3", "d_3", "ed3", "e_3", "f_3", "gd3", "g_3", "ad3", "a_3", "b_3", "h_3",
"c_2", "dd2", "d_2", "ed2", "e_2", "f_2", "gd2", "g_2", "ad2", "a_2", "b_2", "h_2",
"c_1", "dd1", "d_1", "ed1", "e_1", "f_1", "gd1", "g_1", "ad1", "a_1", "b_1", "h_1",
"C-0", "Db0", "D-0", "Eb0", "E-0", "F-0", "Gb0", "G-0", "Ab0", "A-0", "B-0", "H-0",
"C-1", "Db1", "D-1", "Eb1", "E-1", "F-1", "Gb1", "G-1", "Ab1", "A-1", "B-1", "H-1",
"C-2", "Db2", "D-2", "Eb2", "E-2", "F-2", "Gb2", "G-2", "Ab2", "A-2", "B-2", "H-2",
"C-3", "Db3", "D-3", "Eb3", "E-3", "F-3", "Gb3", "G-3", "Ab3", "A-3", "B-3", "H-3",
"C-4", "Db4", "D-4", "Eb4", "E-4", "F-4", "Gb4", "G-4", "Ab4", "A-4", "B-4", "H-4",
"C-5", "Db5", "D-5", "Eb5", "E-5", "F-5", "Gb5", "G-5", "Ab5", "A-5", "B-5", "H-5",
"C-6", "Db6", "D-6", "Eb6", "E-6", "F-6", "Gb6", "G-6", "Ab6", "A-6", "B-6", "H-6",
"C-7", "Db7", "D-7", "Eb7", "E-7", "F-7", "Gb7", "G-7", "Ab7", "A-7", "B-7", "H-7",
"C-8", "Db8", "D-8", "Eb8", "E-8", "F-8", "Gb8", "G-8", "Ab8", "A-8", "B-8", "H-8",
"C-9", "Db9", "D-9", "Eb9", "E-9", "F-9", "Gb9", "G-9", "Ab9", "A-9", "B-9", "H-9"
};
const char* pitchLabel[11]={
"1/6", "1/5", "1/4", "1/3", "1/2", "1x", "2x", "3x", "4x", "5x", "6x"
};

View File

@ -38,6 +38,8 @@ struct FurnaceGUIColorDef {
extern const int opOrder[4];
extern const char* noteNames[180];
extern const char* noteNamesG[180];
extern const char* noteNamesF[180];
extern const char* noteNamesGF[180];
extern const char* pitchLabel[11];
extern const char* insTypes[];
extern const char* sampleLoopModes[];

View File

@ -1783,6 +1783,11 @@ void FurnaceGUI::drawSettings() {
settings.viewPrevPattern=viewPrevPatternB;
}
bool flatNotesB=settings.flatNotes;
if (ImGui::Checkbox("Use flats instead of sharps",&flatNotesB)) {
settings.flatNotes=flatNotesB;
}
bool germanNotationB=settings.germanNotation;
if (ImGui::Checkbox("Use German notation",&germanNotationB)) {
settings.germanNotation=germanNotationB;
@ -2700,6 +2705,7 @@ void FurnaceGUI::syncSettings() {
settings.chipNames=e->getConfInt("chipNames",0);
settings.overflowHighlight=e->getConfInt("overflowHighlight",0);
settings.partyTime=e->getConfInt("partyTime",0);
settings.flatNotes=e->getConfInt("flatNotes",0);
settings.germanNotation=e->getConfInt("germanNotation",0);
settings.stepOnDelete=e->getConfInt("stepOnDelete",0);
settings.scrollStep=e->getConfInt("scrollStep",0);
@ -2842,6 +2848,7 @@ void FurnaceGUI::syncSettings() {
clampSetting(settings.chipNames,0,1);
clampSetting(settings.overflowHighlight,0,1);
clampSetting(settings.partyTime,0,1);
clampSetting(settings.flatNotes,0,1);
clampSetting(settings.germanNotation,0,1);
clampSetting(settings.stepOnDelete,0,1);
clampSetting(settings.scrollStep,0,1);
@ -3051,6 +3058,7 @@ void FurnaceGUI::commitSettings() {
e->setConf("chipNames",settings.chipNames);
e->setConf("overflowHighlight",settings.overflowHighlight);
e->setConf("partyTime",settings.partyTime);
e->setConf("flatNotes",settings.flatNotes);
e->setConf("germanNotation",settings.germanNotation);
e->setConf("stepOnDelete",settings.stepOnDelete);
e->setConf("scrollStep",settings.scrollStep);