diff --git a/data/locale/ar.ts b/data/locale/ar.ts
index 1f159c42a2a..0d44c22bf5c 100644
--- a/data/locale/ar.ts
+++ b/data/locale/ar.ts
@@ -6361,7 +6361,7 @@ Please make sure you have write permission to the file and the directory contain
- InstrumentMiscView
+ InstrumentTuningView
diff --git a/data/locale/bs.ts b/data/locale/bs.ts
index 506b401bd61..7abf0baf1e1 100644
--- a/data/locale/bs.ts
+++ b/data/locale/bs.ts
@@ -3677,7 +3677,7 @@ You can remove and move mixer channels in the context menu, which is accessed by
- InstrumentMiscView
+ InstrumentTuningView
diff --git a/data/locale/ca.ts b/data/locale/ca.ts
index 765cf3b6081..0e27c39db80 100644
--- a/data/locale/ca.ts
+++ b/data/locale/ca.ts
@@ -6360,7 +6360,7 @@ Please make sure you have write permission to the file and the directory contain
- InstrumentMiscView
+ InstrumentTuningView
diff --git a/data/locale/cs.ts b/data/locale/cs.ts
index 0ed175022be..022f554592a 100644
--- a/data/locale/cs.ts
+++ b/data/locale/cs.ts
@@ -6361,7 +6361,7 @@ Ověřte si prosím, zda máte povolen zápis do souboru a do složky, ve které
- InstrumentMiscView
+ InstrumentTuningView
diff --git a/data/locale/de.ts b/data/locale/de.ts
index 51ca7d56204..7817857fdff 100644
--- a/data/locale/de.ts
+++ b/data/locale/de.ts
@@ -6361,7 +6361,7 @@ Please make sure you have write permission to the file and the directory contain
- InstrumentMiscView
+ InstrumentTuningView
diff --git a/data/locale/el.ts b/data/locale/el.ts
index 320a6657f61..07e61778f1e 100644
--- a/data/locale/el.ts
+++ b/data/locale/el.ts
@@ -6360,7 +6360,7 @@ Please make sure you have write permission to the file and the directory contain
- InstrumentMiscView
+ InstrumentTuningView
diff --git a/data/locale/en.ts b/data/locale/en.ts
index e52ae39ab7e..15c3ab1f07c 100644
--- a/data/locale/en.ts
+++ b/data/locale/en.ts
@@ -6362,7 +6362,7 @@ Please make sure you have write permission to the file and the directory contain
- InstrumentMiscView
+ InstrumentTuningView
diff --git a/data/locale/eo.ts b/data/locale/eo.ts
index 005ee8100bf..0dd9c405f67 100644
--- a/data/locale/eo.ts
+++ b/data/locale/eo.ts
@@ -6360,7 +6360,7 @@ Please make sure you have write permission to the file and the directory contain
- InstrumentMiscView
+ InstrumentTuningView
diff --git a/data/locale/es.ts b/data/locale/es.ts
index 4fc4951ef92..3953ddc11bf 100644
--- a/data/locale/es.ts
+++ b/data/locale/es.ts
@@ -6361,7 +6361,7 @@ Asegúrate de tener permisos de escritura tanto del archivo como del directorio
- InstrumentMiscView
+ InstrumentTuningView
diff --git a/data/locale/eu.ts b/data/locale/eu.ts
index 25c165f81f8..fe6495c0a65 100644
--- a/data/locale/eu.ts
+++ b/data/locale/eu.ts
@@ -6641,7 +6641,7 @@ Please make sure you have write permission to the file and the directory contain
- InstrumentMiscView
+ InstrumentTuningView
diff --git a/data/locale/fa.ts b/data/locale/fa.ts
index 181ca0ca1ff..b376a8424f8 100644
--- a/data/locale/fa.ts
+++ b/data/locale/fa.ts
@@ -6360,7 +6360,7 @@ Please make sure you have write permission to the file and the directory contain
- InstrumentMiscView
+ InstrumentTuningView
diff --git a/data/locale/fr.ts b/data/locale/fr.ts
index 2c65444a8e0..4862f4263ce 100644
--- a/data/locale/fr.ts
+++ b/data/locale/fr.ts
@@ -6645,7 +6645,7 @@ Veuillez vous assurez que vous avez les droits d'écriture sur le fichier e
- InstrumentMiscView
+ InstrumentTuningView
diff --git a/data/locale/gl.ts b/data/locale/gl.ts
index cf04fd5d428..a1a9e6bf1a4 100644
--- a/data/locale/gl.ts
+++ b/data/locale/gl.ts
@@ -6360,7 +6360,7 @@ Please make sure you have write permission to the file and the directory contain
- InstrumentMiscView
+ InstrumentTuningView
diff --git a/data/locale/he.ts b/data/locale/he.ts
index ee5a23613b2..fef0caa9178 100644
--- a/data/locale/he.ts
+++ b/data/locale/he.ts
@@ -6361,7 +6361,7 @@ Please make sure you have write permission to the file and the directory contain
- InstrumentMiscView
+ InstrumentTuningView
diff --git a/data/locale/hi_IN.ts b/data/locale/hi_IN.ts
index 15550231f85..82cf364e332 100644
--- a/data/locale/hi_IN.ts
+++ b/data/locale/hi_IN.ts
@@ -6362,7 +6362,7 @@ Please make sure you have write permission to the file and the directory contain
- InstrumentMiscView
+ InstrumentTuningView
diff --git a/data/locale/hu_HU.ts b/data/locale/hu_HU.ts
index 83605994674..a0f1e4d4542 100644
--- a/data/locale/hu_HU.ts
+++ b/data/locale/hu_HU.ts
@@ -6366,7 +6366,7 @@ Ellenőrizd, hogy rendelkezel-e a szükséges engedélyekkel és próbáld újra
- InstrumentMiscView
+ InstrumentTuningView
diff --git a/data/locale/id.ts b/data/locale/id.ts
index e381ea726d8..c504740e936 100644
--- a/data/locale/id.ts
+++ b/data/locale/id.ts
@@ -6362,7 +6362,7 @@ Pastikan Anda memiliki izin menulis ke file dan direktori yang berisi berkas ter
- InstrumentMiscView
+ InstrumentTuningView
diff --git a/data/locale/it.ts b/data/locale/it.ts
index ff146d47120..d5a68e6e7c3 100644
--- a/data/locale/it.ts
+++ b/data/locale/it.ts
@@ -6366,7 +6366,7 @@ Si prega di controllare i permessi di scrittura sul file e la cartella che lo co
- InstrumentMiscView
+ InstrumentTuningView
diff --git a/data/locale/ja.ts b/data/locale/ja.ts
index e10ca511818..14b38c6984f 100644
--- a/data/locale/ja.ts
+++ b/data/locale/ja.ts
@@ -6362,7 +6362,7 @@ Please make sure you have write permission to the file and the directory contain
- InstrumentMiscView
+ InstrumentTuningView
diff --git a/data/locale/ka.ts b/data/locale/ka.ts
index 1956d8d04e5..51eededf26b 100644
--- a/data/locale/ka.ts
+++ b/data/locale/ka.ts
@@ -6360,7 +6360,7 @@ Please make sure you have write permission to the file and the directory contain
- InstrumentMiscView
+ InstrumentTuningView
diff --git a/data/locale/ko.ts b/data/locale/ko.ts
index 7373b5ca9a7..43b99e7f437 100644
--- a/data/locale/ko.ts
+++ b/data/locale/ko.ts
@@ -6364,7 +6364,7 @@ Please make sure you have write permission to the file and the directory contain
- InstrumentMiscView
+ InstrumentTuningView
diff --git a/data/locale/ms_MY.ts b/data/locale/ms_MY.ts
index 209d51d108c..ff34784219a 100644
--- a/data/locale/ms_MY.ts
+++ b/data/locale/ms_MY.ts
@@ -6360,7 +6360,7 @@ Please make sure you have write permission to the file and the directory contain
- InstrumentMiscView
+ InstrumentTuningView
diff --git a/data/locale/nb.ts b/data/locale/nb.ts
index 3675b7f589c..659344d64de 100644
--- a/data/locale/nb.ts
+++ b/data/locale/nb.ts
@@ -6360,7 +6360,7 @@ Please make sure you have write permission to the file and the directory contain
- InstrumentMiscView
+ InstrumentTuningView
diff --git a/data/locale/nl.ts b/data/locale/nl.ts
index ad630a249c9..7ff3e8735a8 100644
--- a/data/locale/nl.ts
+++ b/data/locale/nl.ts
@@ -6362,7 +6362,7 @@ Zorg ervoor dat u schrijfbevoegdheid heeft voor het bestand en voor de map die h
- InstrumentMiscView
+ InstrumentTuningView
diff --git a/data/locale/oc.ts b/data/locale/oc.ts
index 58c81c96453..045eaf3ad69 100644
--- a/data/locale/oc.ts
+++ b/data/locale/oc.ts
@@ -6360,7 +6360,7 @@ Please make sure you have write permission to the file and the directory contain
- InstrumentMiscView
+ InstrumentTuningView
diff --git a/data/locale/pl.ts b/data/locale/pl.ts
index bb0c64edec0..ff36a8daca6 100644
--- a/data/locale/pl.ts
+++ b/data/locale/pl.ts
@@ -6646,7 +6646,7 @@ Upewnij się, że masz uprawnienia do zapisu do pliku i katalogu zawierającego
- InstrumentMiscView
+ InstrumentTuningView
diff --git a/data/locale/pt.ts b/data/locale/pt.ts
index b375e289f38..f8cfe76181c 100644
--- a/data/locale/pt.ts
+++ b/data/locale/pt.ts
@@ -6363,7 +6363,7 @@ Please make sure you have write permission to the file and the directory contain
- InstrumentMiscView
+ InstrumentTuningView
diff --git a/data/locale/ro.ts b/data/locale/ro.ts
index eceb45a6485..58abbba9959 100644
--- a/data/locale/ro.ts
+++ b/data/locale/ro.ts
@@ -6361,7 +6361,7 @@ Please make sure you have write permission to the file and the directory contain
- InstrumentMiscView
+ InstrumentTuningView
diff --git a/data/locale/ru.ts b/data/locale/ru.ts
index 8235f291f34..73b7e06ad2e 100644
--- a/data/locale/ru.ts
+++ b/data/locale/ru.ts
@@ -6375,7 +6375,7 @@ Please make sure you have write permission to the file and the directory contain
- InstrumentMiscView
+ InstrumentTuningView
diff --git a/data/locale/sl.ts b/data/locale/sl.ts
index 3ad55a4c044..e7bfbc3081c 100644
--- a/data/locale/sl.ts
+++ b/data/locale/sl.ts
@@ -6360,7 +6360,7 @@ Please make sure you have write permission to the file and the directory contain
- InstrumentMiscView
+ InstrumentTuningView
diff --git a/data/locale/sr.ts b/data/locale/sr.ts
index 9b90164ab3b..183936bc74c 100644
--- a/data/locale/sr.ts
+++ b/data/locale/sr.ts
@@ -2956,7 +2956,7 @@ You can remove and move mixer channels in the context menu, which is accessed by
- InstrumentMiscView
+ InstrumentTuningView
diff --git a/data/locale/sv.ts b/data/locale/sv.ts
index 4963b07a9ad..f5d4e0fb496 100644
--- a/data/locale/sv.ts
+++ b/data/locale/sv.ts
@@ -6644,7 +6644,7 @@ Se till att du har skrivbehörighet till filen och mappen som innehåller filen
- InstrumentMiscView
+ InstrumentTuningView
diff --git a/data/locale/tr.ts b/data/locale/tr.ts
index 387be6d8b96..b899337a543 100644
--- a/data/locale/tr.ts
+++ b/data/locale/tr.ts
@@ -6646,7 +6646,7 @@ Lütfen dosyaya ve dosyayı içeren dizine yazma izniniz olduğundan emin olun v
- InstrumentMiscView
+ InstrumentTuningView
diff --git a/data/locale/uk.ts b/data/locale/uk.ts
index 50df10e4b72..9fb6389c956 100644
--- a/data/locale/uk.ts
+++ b/data/locale/uk.ts
@@ -6361,7 +6361,7 @@ Please make sure you have write permission to the file and the directory contain
- InstrumentMiscView
+ InstrumentTuningView
diff --git a/data/locale/zh_CN.ts b/data/locale/zh_CN.ts
index 63b22df9902..9b783b963dd 100644
--- a/data/locale/zh_CN.ts
+++ b/data/locale/zh_CN.ts
@@ -6370,7 +6370,7 @@ Please make sure you have write permission to the file and the directory contain
- InstrumentMiscView
+ InstrumentTuningView
diff --git a/data/locale/zh_TW.ts b/data/locale/zh_TW.ts
index 791a45599f9..a3a727edb0b 100644
--- a/data/locale/zh_TW.ts
+++ b/data/locale/zh_TW.ts
@@ -6361,7 +6361,7 @@ Please make sure you have write permission to the file and the directory contain
- InstrumentMiscView
+ InstrumentTuningView
diff --git a/data/themes/default/edit_draw_small.png b/data/themes/default/edit_draw_small.png
new file mode 100644
index 00000000000..9979c822345
Binary files /dev/null and b/data/themes/default/edit_draw_small.png differ
diff --git a/data/themes/default/tuning_tab.png b/data/themes/default/tuning_tab.png
new file mode 100644
index 00000000000..41c4f2d9fde
Binary files /dev/null and b/data/themes/default/tuning_tab.png differ
diff --git a/include/InstrumentTrack.h b/include/InstrumentTrack.h
index f21723363e3..5efafe0c72b 100644
--- a/include/InstrumentTrack.h
+++ b/include/InstrumentTrack.h
@@ -51,7 +51,7 @@ namespace gui
class InstrumentTrackView;
class InstrumentTrackWindow;
-class InstrumentMiscView;
+class InstrumentTuningView;
class MidiCCRackView;
} // namespace gui
@@ -315,7 +315,7 @@ protected slots:
friend class gui::InstrumentTrackView;
friend class gui::InstrumentTrackWindow;
friend class NotePlayHandle;
- friend class gui::InstrumentMiscView;
+ friend class gui::InstrumentTuningView;
friend class gui::MidiCCRackView;
} ;
diff --git a/include/InstrumentTrackWindow.h b/include/InstrumentTrackWindow.h
index d41bbdac894..971c63899c3 100644
--- a/include/InstrumentTrackWindow.h
+++ b/include/InstrumentTrackWindow.h
@@ -47,7 +47,7 @@ class MixerLineLcdSpinBox;
class InstrumentFunctionArpeggioView;
class InstrumentFunctionNoteStackingView;
class InstrumentMidiIOView;
-class InstrumentMiscView;
+class InstrumentTuningView;
class InstrumentSoundShapingView;
class InstrumentTrackShapingView;
class InstrumentTrackView;
@@ -154,7 +154,7 @@ protected slots:
InstrumentFunctionArpeggioView* m_arpeggioView;
InstrumentMidiIOView * m_midiView;
EffectRackView * m_effectView;
- InstrumentMiscView *m_miscView;
+ InstrumentTuningView *m_tuningView;
// test-piano at the bottom of every instrument-settings-window
diff --git a/include/InstrumentMiscView.h b/include/InstrumentTuningView.h
similarity index 72%
rename from include/InstrumentMiscView.h
rename to include/InstrumentTuningView.h
index 28f3c6a8e63..4ee18dc8466 100644
--- a/include/InstrumentMiscView.h
+++ b/include/InstrumentTuningView.h
@@ -1,9 +1,9 @@
/*
- * InstrumentMiscView.h - widget in instrument-track-window for setting up
- * miscellaneous options not covered by other tabs
+ * InstrumentTuningView.h - widget in instrument-track-window for setting up
+ * tuning and transposition options
*
* Copyright (c) 2005-2014 Tobias Doerffel
- * Copyright (c) 2020 Martin Pavelek
+ * Copyright (c) 2020-2022 Martin Pavelek
*
* This file is part of LMMS - https://lmms.io
*
@@ -24,11 +24,13 @@
*
*/
-#ifndef LMMS_GUI_INSTRUMENT_MISC_VIEW_H
-#define LMMS_GUI_INSTRUMENT_MISC_VIEW_H
+#ifndef LMMS_GUI_INSTRUMENT_TUNING_VIEW_H
+#define LMMS_GUI_INSTRUMENT_TUNING_VIEW_H
#include
+class QLabel;
+
namespace lmms
{
@@ -42,15 +44,17 @@ class GroupBox;
class LedCheckBox;
-class InstrumentMiscView : public QWidget
+class InstrumentTuningView : public QWidget
{
Q_OBJECT
public:
- InstrumentMiscView(InstrumentTrack *it, QWidget *parent);
+ InstrumentTuningView(InstrumentTrack *it, QWidget *parent);
GroupBox *pitchGroupBox() {return m_pitchGroupBox;}
GroupBox *microtunerGroupBox() {return m_microtunerGroupBox;}
+ QLabel *microtunerNotSupportedLabel() {return m_microtunerNotSupportedLabel;}
+
ComboBox *scaleCombo() {return m_scaleCombo;}
ComboBox *keymapCombo() {return m_keymapCombo;}
@@ -60,6 +64,8 @@ class InstrumentMiscView : public QWidget
GroupBox *m_pitchGroupBox;
GroupBox *m_microtunerGroupBox;
+ QLabel *m_microtunerNotSupportedLabel;
+
ComboBox *m_scaleCombo;
ComboBox *m_keymapCombo;
@@ -71,4 +77,4 @@ class InstrumentMiscView : public QWidget
} // namespace lmms
-#endif // LMMS_GUI_INSTRUMENT_MISC_VIEW_H
+#endif // LMMS_GUI_INSTRUMENT_TUNING_VIEW_H
diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt
index 9f940c0354b..afed153f928 100644
--- a/src/gui/CMakeLists.txt
+++ b/src/gui/CMakeLists.txt
@@ -61,7 +61,7 @@ SET(LMMS_SRCS
gui/instrument/EnvelopeAndLfoView.cpp
gui/instrument/InstrumentFunctionViews.cpp
gui/instrument/InstrumentMidiIOView.cpp
- gui/instrument/InstrumentMiscView.cpp
+ gui/instrument/InstrumentTuningView.cpp
gui/instrument/InstrumentSoundShapingView.cpp
gui/instrument/InstrumentTrackWindow.cpp
gui/instrument/InstrumentView.cpp
diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp
index 559756169c6..10805fe01c4 100644
--- a/src/gui/MainWindow.cpp
+++ b/src/gui/MainWindow.cpp
@@ -363,10 +363,12 @@ void MainWindow::finalize()
}
edit_menu->addSeparator();
- edit_menu->addAction( embed::getIconPixmap( "setup_general" ),
- tr( "Settings" ),
- this, SLOT(showSettingsDialog()));
- connect( edit_menu, SIGNAL(aboutToShow()), this, SLOT(updateUndoRedoButtons()));
+ edit_menu->addAction(embed::getIconPixmap("microtuner"), tr("Scales and keymaps"),
+ this, SLOT(toggleMicrotunerWin()));
+ edit_menu->addAction(embed::getIconPixmap("setup_general"), tr("Settings"),
+ this, SLOT(showSettingsDialog()));
+
+ connect(edit_menu, SIGNAL(aboutToShow()), this, SLOT(updateUndoRedoButtons()));
m_viewMenu = new QMenu( this );
menuBar()->addMenu( m_viewMenu )->setText( tr( "&View" ) );
@@ -485,10 +487,6 @@ void MainWindow::finalize()
tr("Show/hide project notes") + " (Ctrl+7)", this, SLOT(toggleProjectNotesWin()), m_toolBar);
project_notes_window->setShortcut( Qt::CTRL + Qt::Key_7 );
- auto microtuner_window = new ToolButton(embed::getIconPixmap("microtuner"),
- tr("Microtuner configuration") + " (Ctrl+8)", this, SLOT(toggleMicrotunerWin()), m_toolBar);
- microtuner_window->setShortcut( Qt::CTRL + Qt::Key_8 );
-
m_toolBarLayout->addWidget( song_editor_window, 1, 1 );
m_toolBarLayout->addWidget( pattern_editor_window, 1, 2 );
m_toolBarLayout->addWidget( piano_roll_window, 1, 3 );
@@ -496,7 +494,6 @@ void MainWindow::finalize()
m_toolBarLayout->addWidget( mixer_window, 1, 5 );
m_toolBarLayout->addWidget( controllers_window, 1, 6 );
m_toolBarLayout->addWidget( project_notes_window, 1, 7 );
- m_toolBarLayout->addWidget( microtuner_window, 1, 8 );
m_toolBarLayout->setColumnStretch( 100, 1 );
// setup-dialog opened before?
@@ -1100,10 +1097,6 @@ void MainWindow::updateViewMenu()
tr( "Project Notes" ) + "\tCtrl+7",
this, SLOT(toggleProjectNotesWin())
);
- m_viewMenu->addAction(embed::getIconPixmap( "microtuner" ),
- tr( "Microtuner" ) + "\tCtrl+8",
- this, SLOT(toggleMicrotunerWin())
- );
m_viewMenu->addSeparator();
diff --git a/src/gui/MicrotunerConfig.cpp b/src/gui/MicrotunerConfig.cpp
index 7ab4cc0b1ac..4156b9e79df 100644
--- a/src/gui/MicrotunerConfig.cpp
+++ b/src/gui/MicrotunerConfig.cpp
@@ -56,8 +56,8 @@ namespace lmms::gui
MicrotunerConfig::MicrotunerConfig() :
QWidget(),
- m_scaleComboModel(nullptr, tr("Selected scale")),
- m_keymapComboModel(nullptr, tr("Selected keymap")),
+ m_scaleComboModel(nullptr, tr("Selected scale slot")),
+ m_keymapComboModel(nullptr, tr("Selected keymap slot")),
m_firstKeyModel(0, 0, NumKeys - 1, nullptr, tr("First key")),
m_lastKeyModel(NumKeys - 1, 0, NumKeys - 1, nullptr, tr("Last key")),
m_middleKeyModel(DefaultMiddleKey, 0, NumKeys - 1, nullptr, tr("Middle key")),
@@ -75,7 +75,7 @@ MicrotunerConfig::MicrotunerConfig() :
#endif
setWindowIcon(embed::getIconPixmap("microtuner"));
- setWindowTitle(tr("Microtuner"));
+ setWindowTitle(tr("Microtuner Configuration"));
// Organize into 2 main columns: scales and keymaps
auto microtunerLayout = new QGridLayout();
@@ -84,7 +84,7 @@ MicrotunerConfig::MicrotunerConfig() :
// ----------------------------------
// Scale sub-column
//
- auto scaleLabel = new QLabel(tr("Scale:"));
+ auto scaleLabel = new QLabel(tr("Scale slot to edit:"));
microtunerLayout->addWidget(scaleLabel, 0, 0, 1, 2, Qt::AlignBottom);
for (unsigned int i = 0; i < MaxScaleCount; i++)
@@ -102,6 +102,8 @@ MicrotunerConfig::MicrotunerConfig() :
auto loadScaleButton = new QPushButton(tr("Load"));
auto saveScaleButton = new QPushButton(tr("Save"));
+ loadScaleButton->setToolTip(tr("Load scale definition from a file."));
+ saveScaleButton->setToolTip(tr("Save scale definition to a file."));
microtunerLayout->addWidget(loadScaleButton, 3, 0, 1, 1);
microtunerLayout->addWidget(saveScaleButton, 3, 1, 1, 1);
connect(loadScaleButton, &QPushButton::clicked, [=] {loadScaleFromFile();});
@@ -112,14 +114,15 @@ MicrotunerConfig::MicrotunerConfig() :
m_scaleTextEdit->setToolTip(tr("Enter intervals on separate lines. Numbers containing a decimal point are treated as cents.\nOther inputs are treated as integer ratios and must be in the form of \'a/b\' or \'a\'.\nUnity (0.0 cents or ratio 1/1) is always present as a hidden first value; do not enter it manually."));
microtunerLayout->addWidget(m_scaleTextEdit, 4, 0, 2, 2);
- auto applyScaleButton = new QPushButton(tr("Apply scale"));
+ auto applyScaleButton = new QPushButton(tr("Apply scale changes"));
+ applyScaleButton->setToolTip(tr("Verify and apply changes made to the selected scale. To use the scale, select it in the settings of a supported instrument."));
microtunerLayout->addWidget(applyScaleButton, 6, 0, 1, 2);
connect(applyScaleButton, &QPushButton::clicked, [=] {applyScale();});
// ----------------------------------
// Mapping sub-column
//
- auto keymapLabel = new QLabel(tr("Keymap:"));
+ auto keymapLabel = new QLabel(tr("Keymap slot to edit:"));
microtunerLayout->addWidget(keymapLabel, 0, 2, 1, 2, Qt::AlignBottom);
for (unsigned int i = 0; i < MaxKeymapCount; i++)
@@ -137,6 +140,8 @@ MicrotunerConfig::MicrotunerConfig() :
auto loadKeymapButton = new QPushButton(tr("Load"));
auto saveKeymapButton = new QPushButton(tr("Save"));
+ loadKeymapButton->setToolTip(tr("Load key mapping definition from a file."));
+ saveKeymapButton->setToolTip(tr("Save key mapping definition to a file."));
microtunerLayout->addWidget(loadKeymapButton, 3, 2, 1, 1);
microtunerLayout->addWidget(saveKeymapButton, 3, 3, 1, 1);
connect(loadKeymapButton, &QPushButton::clicked, [=] {loadKeymapFromFile();});
@@ -181,7 +186,8 @@ MicrotunerConfig::MicrotunerConfig() :
baseFreqSpin->setToolTip(tr("Base note frequency"));
keymapRangeLayout->addWidget(baseFreqSpin, 1, 1, 1, 2);
- auto applyKeymapButton = new QPushButton(tr("Apply keymap"));
+ auto applyKeymapButton = new QPushButton(tr("Apply keymap changes"));
+ applyKeymapButton->setToolTip(tr("Verify and apply changes made to the selected key mapping. To use the mapping, select it in the settings of a supported instrument."));
microtunerLayout->addWidget(applyKeymapButton, 6, 2, 1, 2);
connect(applyKeymapButton, &QPushButton::clicked, [=] {applyKeymap();});
diff --git a/src/gui/instrument/InstrumentTrackWindow.cpp b/src/gui/instrument/InstrumentTrackWindow.cpp
index 43cca0dac1f..28cd8c6c8aa 100644
--- a/src/gui/instrument/InstrumentTrackWindow.cpp
+++ b/src/gui/instrument/InstrumentTrackWindow.cpp
@@ -49,7 +49,7 @@
#include "InstrumentFunctions.h"
#include "InstrumentFunctionViews.h"
#include "InstrumentMidiIOView.h"
-#include "InstrumentMiscView.h"
+#include "InstrumentTuningView.h"
#include "InstrumentSoundShapingView.h"
#include "InstrumentTrack.h"
#include "InstrumentTrackView.h"
@@ -255,25 +255,25 @@ InstrumentTrackWindow::InstrumentTrackWindow( InstrumentTrackView * _itv ) :
instrumentFunctionsLayout->addStretch();
// MIDI tab
- m_midiView = new InstrumentMidiIOView( m_tabWidget );
+ m_midiView = new InstrumentMidiIOView(m_tabWidget);
// FX tab
- m_effectView = new EffectRackView( m_track->m_audioPort.effects(), m_tabWidget );
+ m_effectView = new EffectRackView(m_track->m_audioPort.effects(), m_tabWidget);
- // MISC tab
- m_miscView = new InstrumentMiscView( m_track, m_tabWidget );
+ // Tuning tab
+ m_tuningView = new InstrumentTuningView(m_track, m_tabWidget);
- m_tabWidget->addTab( m_ssView, tr( "Envelope, filter & LFO" ), "env_lfo_tab", 1 );
- m_tabWidget->addTab( instrumentFunctions, tr( "Chord stacking & arpeggio" ), "func_tab", 2 );
- m_tabWidget->addTab( m_effectView, tr( "Effects" ), "fx_tab", 3 );
- m_tabWidget->addTab( m_midiView, tr( "MIDI" ), "midi_tab", 4 );
- m_tabWidget->addTab( m_miscView, tr( "Miscellaneous" ), "misc_tab", 5 );
+ m_tabWidget->addTab(m_ssView, tr("Envelope, filter & LFO"), "env_lfo_tab", 1);
+ m_tabWidget->addTab(instrumentFunctions, tr("Chord stacking & arpeggio"), "func_tab", 2);
+ m_tabWidget->addTab(m_effectView, tr("Effects"), "fx_tab", 3);
+ m_tabWidget->addTab(m_midiView, tr("MIDI"), "midi_tab", 4);
+ m_tabWidget->addTab(m_tuningView, tr("Tuning and transposition"), "tuning_tab", 5);
adjustTabSize(m_ssView);
adjustTabSize(instrumentFunctions);
m_effectView->resize(EffectRackView::DEFAULT_WIDTH, INSTRUMENT_HEIGHT - 4 - 1);
adjustTabSize(m_midiView);
- adjustTabSize(m_miscView);
+ adjustTabSize(m_tuningView);
// setup piano-widget
m_pianoView = new PianoView( this );
@@ -376,12 +376,14 @@ void InstrumentTrackWindow::modelChanged()
if (m_track->instrument() && m_track->instrument()->flags().testFlag(Instrument::Flag::IsMidiBased))
{
- m_miscView->microtunerGroupBox()->hide();
+ m_tuningView->microtunerNotSupportedLabel()->show();
+ m_tuningView->microtunerGroupBox()->hide();
m_track->m_microtuner.enabledModel()->setValue(false);
}
else
{
- m_miscView->microtunerGroupBox()->show();
+ m_tuningView->microtunerNotSupportedLabel()->hide();
+ m_tuningView->microtunerGroupBox()->show();
}
m_ssView->setModel( &m_track->m_soundShaping );
@@ -389,11 +391,11 @@ void InstrumentTrackWindow::modelChanged()
m_arpeggioView->setModel( &m_track->m_arpeggio );
m_midiView->setModel( &m_track->m_midiPort );
m_effectView->setModel( m_track->m_audioPort.effects() );
- m_miscView->pitchGroupBox()->setModel(&m_track->m_useMasterPitchModel);
- m_miscView->microtunerGroupBox()->setModel(m_track->m_microtuner.enabledModel());
- m_miscView->scaleCombo()->setModel(m_track->m_microtuner.scaleModel());
- m_miscView->keymapCombo()->setModel(m_track->m_microtuner.keymapModel());
- m_miscView->rangeImportCheckbox()->setModel(m_track->m_microtuner.keyRangeImportModel());
+ m_tuningView->pitchGroupBox()->setModel(&m_track->m_useMasterPitchModel);
+ m_tuningView->microtunerGroupBox()->setModel(m_track->m_microtuner.enabledModel());
+ m_tuningView->scaleCombo()->setModel(m_track->m_microtuner.scaleModel());
+ m_tuningView->keymapCombo()->setModel(m_track->m_microtuner.keymapModel());
+ m_tuningView->rangeImportCheckbox()->setModel(m_track->m_microtuner.keyRangeImportModel());
updateName();
}
diff --git a/src/gui/instrument/InstrumentMiscView.cpp b/src/gui/instrument/InstrumentTuningView.cpp
similarity index 69%
rename from src/gui/instrument/InstrumentMiscView.cpp
rename to src/gui/instrument/InstrumentTuningView.cpp
index 514db579cb6..355d7d18c73 100644
--- a/src/gui/instrument/InstrumentMiscView.cpp
+++ b/src/gui/instrument/InstrumentTuningView.cpp
@@ -1,8 +1,8 @@
/*
- * InstrumentMiscView.cpp - Miscellaneous instrument settings
+ * InstrumentTuningView.cpp - Instrument settings for tuning and transpositions
*
* Copyright (c) 2005-2014 Tobias Doerffel
- * Copyright (c) 2020 Martin Pavelek
+ * Copyright (c) 2020-2022 Martin Pavelek
*
* This file is part of LMMS - https://lmms.io
*
@@ -23,24 +23,28 @@
*
*/
-#include "InstrumentMiscView.h"
+#include "InstrumentTuningView.h"
#include
#include
+#include
#include
#include "ComboBox.h"
#include "GroupBox.h"
+#include "GuiApplication.h"
#include "gui_templates.h"
#include "InstrumentTrack.h"
#include "LedCheckBox.h"
+#include "MainWindow.h"
+#include "PixmapButton.h"
namespace lmms::gui
{
-InstrumentMiscView::InstrumentMiscView(InstrumentTrack *it, QWidget *parent) :
+InstrumentTuningView::InstrumentTuningView(InstrumentTrack *it, QWidget *parent) :
QWidget(parent)
{
auto layout = new QVBoxLayout(this);
@@ -60,6 +64,11 @@ InstrumentMiscView::InstrumentMiscView(InstrumentTrack *it, QWidget *parent) :
masterPitchLayout->addWidget(tlabel);
// Microtuner settings
+ m_microtunerNotSupportedLabel = new QLabel(tr("Microtuner is not available for MIDI-based instruments."));
+ m_microtunerNotSupportedLabel->setWordWrap(true);
+ m_microtunerNotSupportedLabel->hide();
+ layout->addWidget(m_microtunerNotSupportedLabel);
+
m_microtunerGroupBox = new GroupBox(tr("MICROTUNER"));
m_microtunerGroupBox->setModel(it->m_microtuner.enabledModel());
layout->addWidget(m_microtunerGroupBox);
@@ -67,8 +76,22 @@ InstrumentMiscView::InstrumentMiscView(InstrumentTrack *it, QWidget *parent) :
auto microtunerLayout = new QVBoxLayout(m_microtunerGroupBox);
microtunerLayout->setContentsMargins(8, 18, 8, 8);
+ auto scaleEditLayout = new QHBoxLayout();
+ scaleEditLayout->setContentsMargins(0, 0, 4, 0);
+ microtunerLayout->addLayout(scaleEditLayout);
+
auto scaleLabel = new QLabel(tr("Active scale:"));
- microtunerLayout->addWidget(scaleLabel);
+ scaleEditLayout->addWidget(scaleLabel);
+
+ QPixmap editPixmap(embed::getIconPixmap("edit_draw_small"));
+ auto editPixButton = new PixmapButton(this, tr("Edit scales and keymaps"));
+ editPixButton->setToolTip(tr("Edit scales and keymaps"));
+ editPixButton->setInactiveGraphic(editPixmap);
+ editPixButton->setActiveGraphic(editPixmap);
+ editPixButton->setFixedSize(16, 16);
+ connect(editPixButton, SIGNAL(clicked()), getGUI()->mainWindow(), SLOT(toggleMicrotunerWin()));
+
+ scaleEditLayout->addWidget(editPixButton);
m_scaleCombo = new ComboBox();
m_scaleCombo->setModel(it->m_microtuner.scaleModel());