diff options
author | Tim E. Real <termtech@rogers.com> | 2012-11-03 12:05:56 +0000 |
---|---|---|
committer | Tim E. Real <termtech@rogers.com> | 2012-11-03 12:05:56 +0000 |
commit | 31f618e5461553bd7836677f944acfa233e5ae3c (patch) | |
tree | 9ce5c671ed1a089bb2cd19692db5a9c45951b237 /muse2/muse/instruments | |
parent | b45ce65ca39817a0678f2172410b71433f79f736 (diff) |
Improved: Instrument Editor, fFixed MANY bugs. Should be SOLID now.
Improved: Midi controller graph 'Ctrl' popup menus.
Improved: Aftertouch and PolyAftertouch (channel/key pressure) are true MusE controllers now.
TODO: Still W.I.P. See ChangeLog
Diffstat (limited to 'muse2/muse/instruments')
-rw-r--r-- | muse2/muse/instruments/editinstrument.cpp | 939 | ||||
-rw-r--r-- | muse2/muse/instruments/editinstrument.h | 15 | ||||
-rw-r--r-- | muse2/muse/instruments/editinstrumentbase.ui | 1946 |
3 files changed, 1752 insertions, 1148 deletions
diff --git a/muse2/muse/instruments/editinstrument.cpp b/muse2/muse/instruments/editinstrument.cpp index 57c466b8..3dc4488d 100644 --- a/muse2/muse/instruments/editinstrument.cpp +++ b/muse2/muse/instruments/editinstrument.cpp @@ -35,6 +35,7 @@ #include <QStringListModel> #include <QScrollBar> #include <QVariant> +#include <QList> #include <list> #include "editinstrument.h" @@ -45,7 +46,7 @@ #include "midictrl.h" #include "gconfig.h" #include "icons.h" - +#include "popupmenu.h" #include "dlist.h" #include "drummap.h" #include "header.h" @@ -59,7 +60,7 @@ namespace MusEGui { enum { COL_CNAME = 0, COL_TYPE, - COL_HNUM, COL_LNUM, COL_MIN, COL_MAX, COL_DEF + COL_HNUM, COL_LNUM, COL_MIN, COL_MAX, COL_DEF, COL_SHOW_MIDI, COL_SHOW_DRUM }; //--------------------------------------------------------- @@ -88,12 +89,6 @@ EditInstrument::EditInstrument(QWidget* parent, Qt::WFlags fl) checkBoxXG->setVisible(false); // populate instrument list - // Populate common controller list. - for(int i = 0; i < 128; ++i) - { - QListWidgetItem *lci = new QListWidgetItem(MusECore::midiCtrlName(i)); - listController->addItem(lci); - } oldMidiInstrument = 0; oldPatchItem = 0; for (MusECore::iMidiInstrument i = MusECore::midiInstruments.begin(); i != MusECore::midiInstruments.end(); ++i) { @@ -132,6 +127,7 @@ EditInstrument::EditInstrument(QWidget* parent, Qt::WFlags fl) dlist_header->hideSection(COL_MUTE); dlist_header->hide(); + ctrlValidLabel->setPixmap(*greendotIcon); connect(patchFromBox, SIGNAL(valueChanged(int)), this, SLOT(patchCollectionSpinboxChanged(int))); connect(patchToBox, SIGNAL(valueChanged(int)), this, SLOT(patchCollectionSpinboxChanged(int))); @@ -193,17 +189,18 @@ EditInstrument::EditInstrument(QWidget* parent, Qt::WFlags fl) connect(deleteController, SIGNAL(clicked()), SLOT(deleteControllerClicked())); connect(newController, SIGNAL(clicked()), SLOT(newControllerClicked())); connect(addController, SIGNAL(clicked()), SLOT(addControllerClicked())); - connect(listController, SIGNAL(itemDoubleClicked(QListWidgetItem*)), SLOT(addControllerClicked())); - connect(ctrlType,SIGNAL(activated(int)), SLOT(ctrlTypeChanged(int))); + connect(ctrlType,SIGNAL(activated(int)), SLOT(ctrlTypeChanged())); connect(ctrlName, SIGNAL(returnPressed()), SLOT(ctrlNameReturn())); connect(ctrlName, SIGNAL(lostFocus()), SLOT(ctrlNameReturn())); - connect(spinBoxHCtrlNo, SIGNAL(valueChanged(int)), SLOT(ctrlHNumChanged(int))); - connect(spinBoxLCtrlNo, SIGNAL(valueChanged(int)), SLOT(ctrlLNumChanged(int))); + connect(spinBoxHCtrlNo, SIGNAL(valueChanged(int)), SLOT(ctrlNumChanged())); + connect(spinBoxLCtrlNo, SIGNAL(valueChanged(int)), SLOT(ctrlNumChanged())); connect(spinBoxMin, SIGNAL(valueChanged(int)), SLOT(ctrlMinChanged(int))); connect(spinBoxMax, SIGNAL(valueChanged(int)), SLOT(ctrlMaxChanged(int))); connect(spinBoxDefault, SIGNAL(valueChanged(int)), SLOT(ctrlDefaultChanged(int))); connect(nullParamSpinBoxH, SIGNAL(valueChanged(int)), SLOT(ctrlNullParamHChanged(int))); connect(nullParamSpinBoxL, SIGNAL(valueChanged(int)), SLOT(ctrlNullParamLChanged(int))); + connect(ctrlShowInMidi,SIGNAL(stateChanged(int)), SLOT(ctrlShowInMidiChanged(int))); + connect(ctrlShowInDrum,SIGNAL(stateChanged(int)), SLOT(ctrlShowInDrumChanged(int))); connect(tabWidget3, SIGNAL(currentChanged(QWidget*)), SLOT(tabChanged(QWidget*))); connect(sysexList, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), @@ -212,7 +209,23 @@ EditInstrument::EditInstrument(QWidget* parent, Qt::WFlags fl) connect(newSysex, SIGNAL(clicked()), SLOT(newSysexClicked())); } +void EditInstrument::findInstrument(const QString& find_instrument) +{ + if(find_instrument.isEmpty()) + return; + QList<QListWidgetItem*> found = instrumentList->findItems(find_instrument, Qt::MatchExactly); + if(!found.isEmpty()) + instrumentList->setCurrentItem(found.at(0)); +} + +void EditInstrument::showTab(TabType n) +{ + if(n >= tabWidget3->count()) + return; + tabWidget3->setCurrentIndex(n); +} + void EditInstrument::patchCollectionSpinboxChanged(int) { if (patchFromBox->value() > patchToBox->value()) @@ -1608,6 +1621,8 @@ QTreeWidgetItem* EditInstrument::addControllerToView(MusECore::MidiController* m def.setNum(defval); break; case MusECore::MidiController::Pitch: + case MusECore::MidiController::PolyAftertouch: + case MusECore::MidiController::Aftertouch: hnum = "---"; lnum = "---"; min.setNum(mctrl->minVal()); @@ -1634,7 +1649,17 @@ QTreeWidgetItem* EditInstrument::addControllerToView(MusECore::MidiController* m break; } - QTreeWidgetItem* ci = new QTreeWidgetItem(viewController, QStringList() << mctrl->name() << int2ctrlType(t) << hnum << lnum << min << max << def); + QString show_midi, show_drum; + if(mctrl->showInTracks() & MusECore::MidiController::ShowInMidi) + show_midi = "X"; + if(mctrl->showInTracks() & MusECore::MidiController::ShowInDrum) + show_drum = "X"; + QTreeWidgetItem* ci = new QTreeWidgetItem(viewController, + QStringList() << mctrl->name() << int2ctrlType(t) << hnum << lnum << min << max << def << show_midi << show_drum); + ci->setTextAlignment(0, Qt::AlignLeft | Qt::AlignVCenter); + ci->setTextAlignment(1, Qt::AlignLeft | Qt::AlignVCenter); + for(int i = 2; i < 9; ++i) + ci->setTextAlignment(i, Qt::AlignRight | Qt::AlignVCenter); QVariant v = qVariantFromValue((void*)(mctrl)); ci->setData(0, Qt::UserRole, v); @@ -1665,7 +1690,7 @@ void EditInstrument::controllerChanged() int ctrlH = (c->num() >> 8) & 0x7f; int ctrlL = c->num() & 0x7f; - if((c->num() & 0xff) == 0xff) + if(c->isPerNoteController()) ctrlL = -1; MusECore::MidiController::ControllerType type = MusECore::midiControllerType(c->num()); @@ -1673,6 +1698,9 @@ void EditInstrument::controllerChanged() ctrlType->blockSignals(true); ctrlType->setCurrentIndex(type); ctrlType->blockSignals(false); + + ctrlShowInMidi->setChecked(c->showInTracks() & MusECore::MidiController::ShowInMidi); + ctrlShowInDrum->setChecked(c->showInTracks() & MusECore::MidiController::ShowInDrum); spinBoxHCtrlNo->blockSignals(true); spinBoxLCtrlNo->blockSignals(true); @@ -1736,6 +1764,20 @@ void EditInstrument::controllerChanged() spinBoxMax->setValue(c->maxVal()); enableDefaultControls(true, false); break; + case MusECore::MidiController::PolyAftertouch: + case MusECore::MidiController::Aftertouch: + spinBoxHCtrlNo->setEnabled(false); + spinBoxLCtrlNo->setEnabled(false); + spinBoxHCtrlNo->setValue(0); + spinBoxLCtrlNo->setValue(0); + spinBoxMin->setEnabled(true); + spinBoxMax->setEnabled(true); + spinBoxMin->setRange(0, 127); + spinBoxMax->setRange(0, 127); + spinBoxMin->setValue(c->minVal()); + spinBoxMax->setValue(c->maxVal()); + enableDefaultControls(true, false); + break; case MusECore::MidiController::Program: spinBoxHCtrlNo->setEnabled(false); spinBoxLCtrlNo->setEnabled(false); @@ -1778,6 +1820,9 @@ void EditInstrument::controllerChanged() spinBoxMin->blockSignals(false); spinBoxMax->blockSignals(false); spinBoxDefault->blockSignals(false); + + ctrlValidLabel->setPixmap(*greendotIcon); + enableNonCtrlControls(true); } //--------------------------------------------------------- @@ -1794,9 +1839,6 @@ void EditInstrument::ctrlNameReturn() QString cName = ctrlName->text(); - if(c->name() == cName) - return; - MusECore::MidiControllerList* cl = workingInstrument.controller(); for(MusECore::ciMidiController ic = cl->begin(); ic != cl->end(); ++ic) { @@ -1818,6 +1860,9 @@ void EditInstrument::ctrlNameReturn() } } + if(c->name() == cName) + return; + c->setName(ctrlName->text()); item->setText(COL_CNAME, ctrlName->text()); workingInstrument.setDirty(true); @@ -1827,172 +1872,286 @@ void EditInstrument::ctrlNameReturn() // ctrlTypeChanged //--------------------------------------------------------- -void EditInstrument::ctrlTypeChanged(int idx) +void EditInstrument::ctrlTypeChanged() { QTreeWidgetItem* item = viewController->currentItem(); if (item == 0) return; - MusECore::MidiController::ControllerType t = (MusECore::MidiController::ControllerType)idx; + MusECore::MidiController::ControllerType t = MusECore::ctrlType2Int(ctrlType->currentText()); MusECore::MidiController* c = (MusECore::MidiController*)item->data(0, Qt::UserRole).value<void*>(); + //if(t == MusECore::midiControllerType(c->num())) + // return; + + // REMOVE Tim. + //if(c->showInTracks() & MusECore::MidiController::ShowInMidi) + // item->setText(COL_SHOW_MIDI, "Y"); + //if(c->showInTracks() & MusECore::MidiController::ShowInDrum) + // item->setText(COL_SHOW_DRUM, "Y"); + + int hnum = 0, lnum = 0; + +// spinBoxMin->blockSignals(true); +// spinBoxMax->blockSignals(true); +// spinBoxDefault->blockSignals(true); +// + switch (t) { + case MusECore::MidiController::Controller7: + spinBoxHCtrlNo->setEnabled(false); + spinBoxLCtrlNo->setEnabled(true); +// spinBoxMin->setEnabled(true); +// spinBoxMax->setEnabled(true); +// enableDefaultControls(true, false); +// spinBoxMin->setRange(-128, 127); +// spinBoxMax->setRange(-128, 127); +// spinBoxMin->setValue(0); +// spinBoxMax->setValue(127); +// spinBoxDefault->setRange(spinBoxMin->value() - 1, spinBoxMax->value()); +// spinBoxDefault->setValue(spinBoxDefault->minimum()); + lnum = spinBoxLCtrlNo->value(); + break; + case MusECore::MidiController::RPN: + case MusECore::MidiController::NRPN: + spinBoxHCtrlNo->setEnabled(true); + spinBoxLCtrlNo->setEnabled(true); +// spinBoxMin->setEnabled(true); +// spinBoxMax->setEnabled(true); +// enableDefaultControls(true, false); +// spinBoxMin->setRange(-128, 127); +// spinBoxMax->setRange(-128, 127); +// spinBoxMin->setValue(0); +// spinBoxMax->setValue(127); +// spinBoxDefault->setRange(spinBoxMin->value() - 1, spinBoxMax->value()); +// spinBoxDefault->setValue(spinBoxDefault->minimum()); + hnum = spinBoxHCtrlNo->value(); + lnum = spinBoxLCtrlNo->value(); + break; + case MusECore::MidiController::Controller14: + case MusECore::MidiController::RPN14: + case MusECore::MidiController::NRPN14: + spinBoxHCtrlNo->setEnabled(true); + spinBoxLCtrlNo->setEnabled(true); +// spinBoxMin->setEnabled(true); +// spinBoxMax->setEnabled(true); +// enableDefaultControls(true, false); +// spinBoxMin->setRange(-16384, 16383); +// spinBoxMax->setRange(-16384, 16383); +// spinBoxMin->setValue(0); +// spinBoxMax->setValue(16383); +// spinBoxDefault->setRange(spinBoxMin->value() - 1, spinBoxMax->value()); +// spinBoxDefault->setValue(spinBoxDefault->minimum()); + hnum = spinBoxHCtrlNo->value(); + lnum = spinBoxLCtrlNo->value(); + break; + case MusECore::MidiController::Pitch: + spinBoxHCtrlNo->setEnabled(false); + spinBoxLCtrlNo->setEnabled(false); +// spinBoxMin->setEnabled(true); +// spinBoxMax->setEnabled(true); +// enableDefaultControls(true, false); +// spinBoxMin->setRange(-8192, 8191); +// spinBoxMax->setRange(-8192, 8191); +// spinBoxMin->setValue(-8192); +// spinBoxMax->setValue(8191); +// spinBoxDefault->setRange(spinBoxMin->value() - 1, spinBoxMax->value()); +// spinBoxDefault->setValue(spinBoxDefault->minimum()); + break; + case MusECore::MidiController::PolyAftertouch: + case MusECore::MidiController::Aftertouch: + spinBoxHCtrlNo->setEnabled(false); + spinBoxLCtrlNo->setEnabled(false); +// spinBoxMin->setEnabled(true); +// spinBoxMax->setEnabled(true); +// enableDefaultControls(true, false); +// spinBoxMin->setRange(0, 127); +// spinBoxMax->setRange(0, 127); +// spinBoxMin->setValue(0); +// spinBoxMax->setValue(127); +// spinBoxDefault->setRange(spinBoxMin->value() - 1, spinBoxMax->value()); +// spinBoxDefault->setValue(spinBoxDefault->minimum()); + break; + case MusECore::MidiController::Program: + spinBoxHCtrlNo->setEnabled(false); + spinBoxLCtrlNo->setEnabled(false); +// spinBoxMin->setEnabled(false); +// spinBoxMax->setEnabled(false); +// enableDefaultControls(false, true); +// spinBoxMin->setRange(0, 0); +// spinBoxMax->setRange(0, 0); +// spinBoxMin->setValue(0); +// spinBoxMax->setValue(0); +// spinBoxDefault->setRange(0, 0); +// spinBoxDefault->setValue(0); + break; + // Shouldn't happen... + default: + spinBoxHCtrlNo->setEnabled(false); + spinBoxLCtrlNo->setEnabled(false); + spinBoxMin->setEnabled(false); + spinBoxMax->setEnabled(false); + enableDefaultControls(false, false); + spinBoxMin->blockSignals(false); + spinBoxMax->blockSignals(false); + return; + break; + } + +// spinBoxMin->blockSignals(false); +// spinBoxMax->blockSignals(false); +// spinBoxDefault->blockSignals(false); +// + int new_num = MusECore::MidiController::genNum(t, hnum, lnum); + MusECore::MidiControllerList* cl = workingInstrument.controller(); + // Check if either a per-note controller, or else a regular controller already exists. + if(!cl->ctrlAvailable(new_num, c)) + { + ctrlValidLabel->setPixmap(*reddotIcon); + enableNonCtrlControls(false); + return; + } + + ctrlValidLabel->setPixmap(*greendotIcon); + if(t == MusECore::midiControllerType(c->num())) + { + enableNonCtrlControls(true); return; + } - item->setText(COL_TYPE, ctrlType->currentText()); + cl->erase(c->num()); + c->setNum(new_num); + cl->add(c); - int hnum = 0, lnum = 0; + enableNonCtrlControls(true); + item->setText(COL_TYPE, ctrlType->currentText()); + spinBoxMin->blockSignals(true); spinBoxMax->blockSignals(true); spinBoxDefault->blockSignals(true); - + switch (t) { case MusECore::MidiController::Controller7: - spinBoxHCtrlNo->setEnabled(false); - spinBoxLCtrlNo->setEnabled(true); - spinBoxMin->setEnabled(true); - spinBoxMax->setEnabled(true); - enableDefaultControls(true, false); + //spinBoxMin->setEnabled(true); + //spinBoxMax->setEnabled(true); + //enableDefaultControls(true, false); spinBoxMin->setRange(-128, 127); spinBoxMax->setRange(-128, 127); - spinBoxMin->setValue(0); spinBoxMax->setValue(127); spinBoxDefault->setRange(spinBoxMin->value() - 1, spinBoxMax->value()); - spinBoxDefault->setValue(spinBoxDefault->minimum()); - lnum = spinBoxLCtrlNo->value(); - if(lnum == -1) item->setText(COL_LNUM, QString("*")); - else + else item->setText(COL_LNUM, QString().setNum(lnum)); item->setText(COL_HNUM, QString("---")); item->setText(COL_MIN, QString().setNum(spinBoxMin->value())); item->setText(COL_MAX, QString().setNum(spinBoxMax->value())); item->setText(COL_DEF, QString("---")); break; - case MusECore::MidiController::RPN: case MusECore::MidiController::NRPN: - spinBoxHCtrlNo->setEnabled(true); - spinBoxLCtrlNo->setEnabled(true); - spinBoxMin->setEnabled(true); - spinBoxMax->setEnabled(true); - enableDefaultControls(true, false); + //spinBoxMin->setEnabled(true); + //spinBoxMax->setEnabled(true); + //enableDefaultControls(true, false); spinBoxMin->setRange(-128, 127); spinBoxMax->setRange(-128, 127); - spinBoxMin->setValue(0); spinBoxMax->setValue(127); spinBoxDefault->setRange(spinBoxMin->value() - 1, spinBoxMax->value()); spinBoxDefault->setValue(spinBoxDefault->minimum()); - - hnum = spinBoxHCtrlNo->value(); - lnum = spinBoxLCtrlNo->value(); - if(lnum == -1) item->setText(COL_LNUM, QString("*")); - else + else item->setText(COL_LNUM, QString().setNum(lnum)); item->setText(COL_HNUM, QString().setNum(hnum)); item->setText(COL_MIN, QString().setNum(spinBoxMin->value())); item->setText(COL_MAX, QString().setNum(spinBoxMax->value())); item->setText(COL_DEF, QString("---")); break; - case MusECore::MidiController::Controller14: case MusECore::MidiController::RPN14: case MusECore::MidiController::NRPN14: - spinBoxHCtrlNo->setEnabled(true); - spinBoxLCtrlNo->setEnabled(true); - spinBoxMin->setEnabled(true); - spinBoxMax->setEnabled(true); - enableDefaultControls(true, false); + //spinBoxMin->setEnabled(true); + //spinBoxMax->setEnabled(true); + //enableDefaultControls(true, false); spinBoxMin->setRange(-16384, 16383); spinBoxMax->setRange(-16384, 16383); - spinBoxMin->setValue(0); spinBoxMax->setValue(16383); spinBoxDefault->setRange(spinBoxMin->value() - 1, spinBoxMax->value()); spinBoxDefault->setValue(spinBoxDefault->minimum()); - - hnum = spinBoxHCtrlNo->value(); - lnum = spinBoxLCtrlNo->value(); if(lnum == -1) item->setText(COL_LNUM, QString("*")); - else + else item->setText(COL_LNUM, QString().setNum(lnum)); item->setText(COL_HNUM, QString().setNum(hnum)); item->setText(COL_MIN, QString().setNum(spinBoxMin->value())); item->setText(COL_MAX, QString().setNum(spinBoxMax->value())); item->setText(COL_DEF, QString("---")); break; - case MusECore::MidiController::Pitch: - spinBoxHCtrlNo->setEnabled(false); - spinBoxLCtrlNo->setEnabled(false); - spinBoxMin->setEnabled(true); - spinBoxMax->setEnabled(true); - enableDefaultControls(true, false); + //spinBoxMin->setEnabled(true); + //spinBoxMax->setEnabled(true); + //enableDefaultControls(true, false); spinBoxMin->setRange(-8192, 8191); spinBoxMax->setRange(-8192, 8191); - spinBoxMin->setValue(-8192); spinBoxMax->setValue(8191); spinBoxDefault->setRange(spinBoxMin->value() - 1, spinBoxMax->value()); spinBoxDefault->setValue(spinBoxDefault->minimum()); - - item->setText(COL_LNUM, QString("---")); - item->setText(COL_HNUM, QString("---")); - item->setText(COL_MIN, QString().setNum(spinBoxMin->value())); - item->setText(COL_MAX, QString().setNum(spinBoxMax->value())); - item->setText(COL_DEF, QString("---")); + item->setText(COL_LNUM, QString("---")); + item->setText(COL_HNUM, QString("---")); + item->setText(COL_MIN, QString().setNum(spinBoxMin->value())); + item->setText(COL_MAX, QString().setNum(spinBoxMax->value())); + item->setText(COL_DEF, QString("---")); + break; + case MusECore::MidiController::PolyAftertouch: + case MusECore::MidiController::Aftertouch: + //spinBoxMin->setEnabled(true); + //spinBoxMax->setEnabled(true); + //enableDefaultControls(true, false); + spinBoxMin->setRange(0, 127); + spinBoxMax->setRange(0, 127); + spinBoxMin->setValue(0); + spinBoxMax->setValue(127); + spinBoxDefault->setRange(spinBoxMin->value() - 1, spinBoxMax->value()); + spinBoxDefault->setValue(spinBoxDefault->minimum()); + item->setText(COL_LNUM, QString("---")); + item->setText(COL_HNUM, QString("---")); + item->setText(COL_MIN, QString().setNum(spinBoxMin->value())); + item->setText(COL_MAX, QString().setNum(spinBoxMax->value())); + item->setText(COL_DEF, QString("---")); break; - case MusECore::MidiController::Program: - spinBoxHCtrlNo->setEnabled(false); - spinBoxLCtrlNo->setEnabled(false); - spinBoxMin->setEnabled(false); - spinBoxMax->setEnabled(false); - enableDefaultControls(false, true); + //spinBoxMin->setEnabled(false); + //spinBoxMax->setEnabled(false); + //enableDefaultControls(false, true); spinBoxMin->setRange(0, 0); spinBoxMax->setRange(0, 0); - spinBoxMin->setValue(0); spinBoxMax->setValue(0); spinBoxDefault->setRange(0, 0); spinBoxDefault->setValue(0); - - item->setText(COL_LNUM, QString("---")); - item->setText(COL_HNUM, QString("---")); - item->setText(COL_MIN, QString("---")); - item->setText(COL_MAX, QString("---")); - item->setText(COL_DEF, QString("---")); + item->setText(COL_LNUM, QString("---")); + item->setText(COL_HNUM, QString("---")); + item->setText(COL_MIN, QString("---")); + item->setText(COL_MAX, QString("---")); + item->setText(COL_DEF, QString("---")); break; - // Shouldn't happen... default: - spinBoxHCtrlNo->setEnabled(false); - spinBoxLCtrlNo->setEnabled(false); - spinBoxMin->setEnabled(false); - spinBoxMax->setEnabled(false); - enableDefaultControls(false, false); - - spinBoxMin->blockSignals(false); - spinBoxMax->blockSignals(false); return; - break; - } - + } + spinBoxMin->blockSignals(false); spinBoxMax->blockSignals(false); spinBoxDefault->blockSignals(false); - - c->setNum(MusECore::MidiController::genNum(t, hnum, lnum)); - + + setDefaultPatchControls(0xffffff); if(t == MusECore::MidiController::Program) { @@ -2014,21 +2173,99 @@ void EditInstrument::ctrlTypeChanged(int idx) } //--------------------------------------------------------- +// ctrlShowInMidiChanged +//--------------------------------------------------------- + +void EditInstrument::ctrlShowInMidiChanged(int state) + { + QTreeWidgetItem* item = viewController->currentItem(); + if (item == 0) + return; + MusECore::MidiController* c = (MusECore::MidiController*)item->data(0, Qt::UserRole).value<void*>(); + int show = c->showInTracks(); + if((show & MusECore::MidiController::ShowInMidi) == (state == Qt::Checked)) + return; + if(state == Qt::Checked) + { + c->setShowInTracks(show | MusECore::MidiController::ShowInMidi); + item->setText(COL_SHOW_MIDI, "X"); + } + else + { + c->setShowInTracks(show & ~MusECore::MidiController::ShowInMidi); + item->setText(COL_SHOW_MIDI, ""); + } + workingInstrument.setDirty(true); + } + +//--------------------------------------------------------- +// ctrlShowInMidiChanged +//--------------------------------------------------------- + +void EditInstrument::ctrlShowInDrumChanged(int state) + { + QTreeWidgetItem* item = viewController->currentItem(); + if (item == 0) + return; + MusECore::MidiController* c = (MusECore::MidiController*)item->data(0, Qt::UserRole).value<void*>(); + int show = c->showInTracks(); + if((show & MusECore::MidiController::ShowInDrum) == (state == Qt::Checked)) + return; + if(state == Qt::Checked) + { + c->setShowInTracks(show | MusECore::MidiController::ShowInDrum); + item->setText(COL_SHOW_DRUM, "X"); + } + else + { + c->setShowInTracks(show & ~MusECore::MidiController::ShowInDrum); + item->setText(COL_SHOW_DRUM, ""); + } + workingInstrument.setDirty(true); + } + +// REMOVE Tim. +/* +//--------------------------------------------------------- // ctrlHNumChanged //--------------------------------------------------------- void EditInstrument::ctrlHNumChanged(int val) { QTreeWidgetItem* item = viewController->currentItem(); - if (item == 0) return; + MusECore::MidiController* c = (MusECore::MidiController*)item->data(0, Qt::UserRole).value<void*>(); + int n = spinBoxLCtrlNo->isEnabled() ? spinBoxLCtrlNo->value() & 0xff : c->num() & 0xff; + MusECore::MidiControllerList* cl = workingInstrument.controller(); + MusECore::MidiController::ControllerType t = MusECore::ctrlType2Int(ctrlType->currentText()); + int tn = MusECore::midiCtrlTerms2Number(t); + if((tn & 0xffff0000) == MusECore::CTRL_INTERNAL_OFFSET) // Error, should not happen. + return; + int new_num = tn | ((val & 0xff) << 8) | n; + // Check if either a per-note controller, or else a regular controller already exists. + if(!cl->ctrlAvailable(new_num, c)) + { + ctrlValidLabel->setPixmap(*reddotIcon); + enableNonCtrlControls(false); + return; + } + ctrlValidLabel->setPixmap(*greendotIcon); + enableNonCtrlControls(true); + cl->erase(c->num()); + c->setNum(new_num); + cl->add(c); QString s; + if(c->isPerNoteController()) + item->setText(COL_LNUM, QString("*")); + else + { + s.setNum(n); + item->setText(COL_LNUM, s); + } s.setNum(val); - MusECore::MidiController* c = (MusECore::MidiController*)item->data(0, Qt::UserRole).value<void*>(); - int n = c->num() & 0x7fff00ff; - c->setNum(n | ((val & 0xff) << 8)); item->setText(COL_HNUM, s); + item->setText(COL_TYPE, ctrlType->currentText()); workingInstrument.setDirty(true); } @@ -2039,20 +2276,136 @@ void EditInstrument::ctrlHNumChanged(int val) void EditInstrument::ctrlLNumChanged(int val) { QTreeWidgetItem* item = viewController->currentItem(); - if (item == 0) return; MusECore::MidiController* c = (MusECore::MidiController*)item->data(0, Qt::UserRole).value<void*>(); - int n = c->num() & ~0xff; - c->setNum(n | (val & 0xff)); - if(val == -1) + int n = spinBoxHCtrlNo->isEnabled() ? (spinBoxHCtrlNo->value() & 0x7f) << 8 : c->num() & 0x7f00; + MusECore::MidiControllerList* cl = workingInstrument.controller(); + MusECore::MidiController::ControllerType t = MusECore::ctrlType2Int(ctrlType->currentText()); + int tn = MusECore::midiCtrlTerms2Number(t); + if((tn & 0xffff0000) == MusECore::CTRL_INTERNAL_OFFSET) // Error, should not happen. + return; + int new_num = tn | n | (val & 0xff); + // Check if either a per-note controller, or else a regular controller already exists. + if(!cl->ctrlAvailable(new_num, c)) + { + ctrlValidLabel->setPixmap(*reddotIcon); + enableNonCtrlControls(false); + return; + } + ctrlValidLabel->setPixmap(*greendotIcon); + enableNonCtrlControls(true); + cl->erase(c->num()); + c->setNum(new_num); + cl->add(c); + QString s; + if(c->isPerNoteController()) item->setText(COL_LNUM, QString("*")); else { - QString s; s.setNum(val); item->setText(COL_LNUM, s); - } + } + if(t == MusECore::MidiController::Controller7) + item->setText(COL_HNUM, "---"); + else + { + s.setNum(n >> 8); + item->setText(COL_HNUM, s); + } + item->setText(COL_TYPE, ctrlType->currentText()); + workingInstrument.setDirty(true); + } +*/ + +//--------------------------------------------------------- +// ctrlNumChanged +//--------------------------------------------------------- + +void EditInstrument::ctrlNumChanged() + { + QTreeWidgetItem* item = viewController->currentItem(); + if (item == 0) + return; + MusECore::MidiController::ControllerType t = MusECore::ctrlType2Int(ctrlType->currentText()); + int hnum = 0, lnum = 0; + switch (t) { + case MusECore::MidiController::Controller7: + lnum = spinBoxLCtrlNo->value(); + break; + case MusECore::MidiController::Controller14: + case MusECore::MidiController::RPN: + case MusECore::MidiController::NRPN: + case MusECore::MidiController::RPN14: + case MusECore::MidiController::NRPN14: + hnum = spinBoxHCtrlNo->value(); + lnum = spinBoxLCtrlNo->value(); + break; + // Should not happen... + case MusECore::MidiController::Pitch: + case MusECore::MidiController::PolyAftertouch: + case MusECore::MidiController::Aftertouch: + case MusECore::MidiController::Program: + case MusECore::MidiController::Velo: + return; + default: + printf("EditInstrument::ctrlNumChanged Error: Unknown control type\n"); + return; + break; + } + + int new_num = MusECore::MidiController::genNum(t, hnum, lnum); + if(new_num == -1) + { + printf("EditInstrument::ctrlNumChanged Error: genNum returned -1\n"); + return; + } + + + //int n = spinBoxLCtrlNo->isEnabled() ? spinBoxLCtrlNo->value() & 0xff : c->num() & 0xff; + MusECore::MidiControllerList* cl = workingInstrument.controller(); + MusECore::MidiController* c = (MusECore::MidiController*)item->data(0, Qt::UserRole).value<void*>(); + + //int tn = MusECore::midiCtrlTerms2Number(t); + //if((tn & 0xffff0000) == MusECore::CTRL_INTERNAL_OFFSET) // Error, should not happen. + // return; + //int new_num = tn | ((val & 0xff) << 8) | n; + // Check if either a per-note controller, or else a regular controller already exists. + if(!cl->ctrlAvailable(new_num, c)) + { + ctrlValidLabel->setPixmap(*reddotIcon); + enableNonCtrlControls(false); + return; + } + ctrlValidLabel->setPixmap(*greendotIcon); + enableNonCtrlControls(true); + if(cl->erase(c->num()) == 0) + printf("EditInstrument::ctrlNumChanged Warning: Erase failed! Proceeding anyway.\n"); + c->setNum(new_num); + cl->add(c); + QString s; + if(c->isPerNoteController()) + item->setText(COL_LNUM, QString("*")); + else { + s.setNum(lnum); + item->setText(COL_LNUM, s); + } + switch (t) { + case MusECore::MidiController::Controller7: + item->setText(COL_HNUM, "---"); + break; + case MusECore::MidiController::Controller14: + case MusECore::MidiController::RPN: + case MusECore::MidiController::NRPN: + case MusECore::MidiController::RPN14: + case MusECore::MidiController::NRPN14: + s.setNum(hnum); + item->setText(COL_HNUM, s); + break; + default: + return; + } + item->setText(COL_TYPE, ctrlType->currentText()); workingInstrument.setDirty(true); } @@ -2080,6 +2433,8 @@ void EditInstrument::ctrlMinChanged(int val) case MusECore::MidiController::Controller7: case MusECore::MidiController::RPN: case MusECore::MidiController::NRPN: + case MusECore::MidiController::PolyAftertouch: + case MusECore::MidiController::Aftertouch: rng = 127; break; case MusECore::MidiController::Controller14: @@ -2164,6 +2519,8 @@ void EditInstrument::ctrlMaxChanged(int val) case MusECore::MidiController::Controller7: case MusECore::MidiController::RPN: case MusECore::MidiController::NRPN: + case MusECore::MidiController::PolyAftertouch: + case MusECore::MidiController::Aftertouch: rng = 127; break; case MusECore::MidiController::Controller14: @@ -2788,56 +3145,112 @@ void EditInstrument::newControllerClicked() ctrl->setInitVal(MusECore::CTRL_VAL_UNKNOWN); QTreeWidgetItem* ci = viewController->currentItem(); - + + int l = 0; + int h = 0; + int hmax = 0x100; // To allow for quick multiple successive controller creation. // If there's a current controller item selected, copy initial values from it. - bool found = false; if(ci) { MusECore::MidiController* selctl = (MusECore::MidiController*)ci->data(0, Qt::UserRole).value<void*>(); - - // Auto increment controller number. - int l = selctl->num() & 0x7f; - int h = selctl->num() & 0xffffff00; - // Ignore internal controllers and wild cards. - if(((h & 0xff0000) != 0x40000) && ((selctl->num() & 0xff) != 0xff)) + if(((selctl->num() & 0xff0000) != MusECore::CTRL_INTERNAL_OFFSET) && !selctl->isPerNoteController()) { - // Assign. - *ctrl = *selctl; - - for (int i = 1; i < 128; ++i) + switch(MusECore::midiControllerType(selctl->num())) { - int j = ((i + l) & 0x7f) | h; + case MusECore::MidiController::Controller7: + // Auto increment controller number. + l = selctl->num() & 0x7f; + *ctrl = *selctl; // Assign. + break; + case MusECore::MidiController::Controller14: + case MusECore::MidiController::RPN: + case MusECore::MidiController::NRPN: + case MusECore::MidiController::RPN14: + case MusECore::MidiController::NRPN14: + // Auto increment controller number. + l = selctl->num() & 0x7f; + h = selctl->num() & 0xffffff00; + *ctrl = *selctl; // Assign. + break; + // Don't duplicate these types. + case MusECore::MidiController::Pitch: + case MusECore::MidiController::Program: + case MusECore::MidiController::PolyAftertouch: + case MusECore::MidiController::Aftertouch: + case MusECore::MidiController::Velo: + break; + default: + printf("error: newControllerClicked: Unknown control type!\n"); + delete ctrl; + return; + } + } + } + + bool found = false; + for(int k = (h & 0xffff0000); k < MusECore::CTRL_NONE_OFFSET; k += 0x10000) + { + // Don't copy internal controllers. + if(k == MusECore::CTRL_INTERNAL_OFFSET) + { + found = true; + continue; + } + if(k == 0) + // We're currently within the Controller7 group, limit the hi-number loop to one go (j = 0). + hmax = 0x100; + else + // All other relevant controllers use hi and lo numbers. + hmax = 0x10000; + for(int j = 0; j < hmax; j += 0x100) + { + for(int i = 0; i < 128; ++i) + { + int num = ((i + l) & 0x7f) | ((h + j) & 0x7f00) | k; found = false; - for (MusECore::iMidiController ic = cl->begin(); ic != cl->end(); ++ic) + // First check if there's already a per-note controller for this control number. + if(cl->find(num | 0xff) != cl->end()) { - MusECore::MidiController* c = ic->second; - if(c->num() == j) - { - found = true; - break; - } + found = true; + break; // Next outer loop (hi-number) iteration... } - if(!found) + // Now check if the actual control number is NOT already taken. + if(cl->find(num) == cl->end()) { - ctrl->setNum(j); + ctrl->setNum(num); break; - } - } + } + // Actual number was also taken. Keep iterating lo-number... + found = true; + } + if(!found) + break; } - } + if(!found) + break; + } + + if(found) + { + QMessageBox::critical(this, tr("New controller: Error"), tr("Error! All control numbers are taken up!\nClean up the instrument!")); + delete ctrl; + return; + } ctrl->setName(cName); workingInstrument.controller()->add(ctrl); QTreeWidgetItem* item = addControllerToView(ctrl); - - viewController->blockSignals(true); - item->setSelected(true); - viewController->blockSignals(false); - - controllerChanged(); + + if(viewController->currentItem() != item) + { + viewController->blockSignals(true); + viewController->setCurrentItem(item); + viewController->blockSignals(false); + controllerChanged(); + } workingInstrument.setDirty(true); } @@ -2848,75 +3261,132 @@ void EditInstrument::newControllerClicked() void EditInstrument::addControllerClicked() { - QListWidgetItem* idx = listController->currentItem(); - if(idx == 0) - return; - - int lnum = -1; - QString name = listController->currentItem()->text(); - for(int i = 0; i < 128; i++) - { - if(MusECore::midiCtrlName(i) == name) - { - lnum = i; - break; - } - } - if(lnum == -1) + // Add Common Controls not already found in instrument: + PopupMenu* pup = new PopupMenu(true); // true = enable stay open. Don't bother with parent. + MusECore::MidiControllerList* cl = workingInstrument.controller(); + for(int num = 0; num < 127; ++num) { - printf("Add controller: Controller not found: %s\n", name.toLatin1().constData()); - return; + // If it's not already in the parent menu... + if(cl->find(num) == cl->end()) + pup->addAction(MusECore::midiCtrlName(num, true))->setData(num); } - int num = MusECore::MidiController::genNum(MusECore::MidiController::Controller7, 0, lnum); - + connect(pup, SIGNAL(triggered(QAction*)), SLOT(ctrlPopupTriggered(QAction*))); + pup->exec(mapToGlobal(QPoint(0,0))); + delete pup; + + + + + + +// REMOVE Tim. +// QListWidgetItem* idx = listController->currentItem(); +// if(idx == 0) +// return; + +// int lnum = -1; +// QString name = listController->currentItem()->text(); +// for(int i = 0; i < 128; i++) +// { +// if(MusECore::midiCtrlName(i) == name) +// { +// lnum = i; +// break; +// } +// } + +// if(lnum == -1) +// { +// printf("Add controller: Controller not found: %s\n", name.toLatin1().constData()); +// return; +// } +// +// int num = MusECore::MidiController::genNum(MusECore::MidiController::Controller7, 0, lnum); +// +// MusECore::MidiControllerList* cl = workingInstrument.controller(); +// for(MusECore::iMidiController ic = cl->begin(); ic != cl->end(); ++ic) +// { +// MusECore::MidiController* c = ic->second; +// if(c->name() == name) +// { +// QMessageBox::critical(this, +// tr("MusE: Cannot add common controller"), +// tr("A controller named '%1' already exists.").arg(name), +// QMessageBox::Ok, +// Qt::NoButton, +// Qt::NoButton); +// +// return; +// } +// +// if(c->num() == num) +// { +// QMessageBox::critical(this, +// tr("MusE: Cannot add common controller"), +// tr("A controller number %1 already exists.").arg(num), +// QMessageBox::Ok, +// Qt::NoButton, +// Qt::NoButton); +// +// return; +// } +// } +// +// MusECore::MidiController* ctrl = new MusECore::MidiController(); +// ctrl->setNum(num); +// ctrl->setMinVal(0); +// ctrl->setMaxVal(127); +// ctrl->setInitVal(MusECore::CTRL_VAL_UNKNOWN); +// ctrl->setName(name); +// +// workingInstrument.controller()->add(ctrl); +// +// QTreeWidgetItem* item = addControllerToView(ctrl); +// +// viewController->blockSignals(true); +// item->setSelected(true); +// viewController->blockSignals(false); +// +// controllerChanged(); +// +// workingInstrument.setDirty(true); +} + +//--------------------------------------------------------- +// ctrlPopupTriggered +//--------------------------------------------------------- + +void EditInstrument::ctrlPopupTriggered(QAction* act) +{ + if(!act || (act->data().toInt() == -1)) + return; + int rv = act->data().toInt(); MusECore::MidiControllerList* cl = workingInstrument.controller(); - for(MusECore::iMidiController ic = cl->begin(); ic != cl->end(); ++ic) + if(cl->find(rv) == cl->end()) { - MusECore::MidiController* c = ic->second; - if(c->name() == name) - { - QMessageBox::critical(this, - tr("MusE: Cannot add common controller"), - tr("A controller named '%1' already exists.").arg(name), - QMessageBox::Ok, - Qt::NoButton, - Qt::NoButton); - - return; - } + int num = rv; // = MusECore::MidiController::genNum(MusECore::MidiController::Controller7, 0, rv); + MusECore::MidiController* ctrl = new MusECore::MidiController(); + ctrl->setNum(num); + ctrl->setMinVal(0); + ctrl->setMaxVal(127); + ctrl->setInitVal(MusECore::CTRL_VAL_UNKNOWN); + ctrl->setName(MusECore::midiCtrlName(num, false)); - if(c->num() == num) + workingInstrument.controller()->add(ctrl); + + QTreeWidgetItem* item = addControllerToView(ctrl); + + if(viewController->currentItem() != item) { - QMessageBox::critical(this, - tr("MusE: Cannot add common controller"), - tr("A controller number %1 already exists.").arg(num), - QMessageBox::Ok, - Qt::NoButton, - Qt::NoButton); - - return; + viewController->blockSignals(true); + viewController->setCurrentItem(item); + viewController->blockSignals(false); + controllerChanged(); } + + workingInstrument.setDirty(true); } - - MusECore::MidiController* ctrl = new MusECore::MidiController(); - ctrl->setNum(num); - ctrl->setMinVal(0); - ctrl->setMaxVal(127); - ctrl->setInitVal(MusECore::CTRL_VAL_UNKNOWN); - ctrl->setName(name); - - workingInstrument.controller()->add(ctrl); - - QTreeWidgetItem* item = addControllerToView(ctrl); - - viewController->blockSignals(true); - item->setSelected(true); - viewController->blockSignals(false); - - controllerChanged(); - - workingInstrument.setDirty(true); } //--------------------------------------------------------- @@ -3105,6 +3575,81 @@ void EditInstrument::enableDefaultControls(bool enVal, bool enPatch) } //--------------------------------------------------------- +// enableNonCtrlControls +//--------------------------------------------------------- + +void EditInstrument::enableNonCtrlControls(bool v) +{ + QTreeWidgetItem* sel = viewController->selectedItems().size() ? viewController->selectedItems()[0] : 0; + + if(!sel || !sel->data(0, Qt::UserRole).value<void*>()) + return; + MusECore::MidiController* c = (MusECore::MidiController*)sel->data(0, Qt::UserRole).value<void*>(); + MusECore::MidiController::ControllerType type = MusECore::midiControllerType(c->num()); + + if(v) + { + switch (type) { + case MusECore::MidiController::Controller7: + spinBoxMin->setEnabled(true); + spinBoxMax->setEnabled(true); + enableDefaultControls(true, false); + break; + case MusECore::MidiController::RPN: + case MusECore::MidiController::NRPN: + spinBoxMin->setEnabled(true); + spinBoxMax->setEnabled(true); + enableDefaultControls(true, false); + break; + case MusECore::MidiController::Controller14: + case MusECore::MidiController::RPN14: + case MusECore::MidiController::NRPN14: + spinBoxMin->setEnabled(true); + spinBoxMax->setEnabled(true); + enableDefaultControls(true, false); + break; + case MusECore::MidiController::Pitch: + spinBoxMin->setEnabled(true); + spinBoxMax->setEnabled(true); + enableDefaultControls(true, false); + break; + case MusECore::MidiController::PolyAftertouch: + case MusECore::MidiController::Aftertouch: + spinBoxMin->setEnabled(true); + spinBoxMax->setEnabled(true); + enableDefaultControls(true, false); + break; + case MusECore::MidiController::Program: + spinBoxMin->setEnabled(false); + spinBoxMax->setEnabled(false); + enableDefaultControls(false, true); + break; + default: + spinBoxMin->setEnabled(false); + spinBoxMax->setEnabled(false); + enableDefaultControls(false, false); + break; + } + } + else + { + spinBoxDefault->setEnabled(false); + patchButton->setEnabled(false); + defPatchH->setEnabled(false); + defPatchL->setEnabled(false); + defPatchProg->setEnabled(false); + + spinBoxMin->setEnabled(false); + spinBoxMax->setEnabled(false); + } + + ctrlShowInMidi->setEnabled(v); + ctrlShowInDrum->setEnabled(v); + + ctrlName->setEnabled(v); +} + +//--------------------------------------------------------- // setDefaultPatchName //--------------------------------------------------------- diff --git a/muse2/muse/instruments/editinstrument.h b/muse2/muse/instruments/editinstrument.h index 90745301..ac4da064 100644 --- a/muse2/muse/instruments/editinstrument.h +++ b/muse2/muse/instruments/editinstrument.h @@ -33,6 +33,8 @@ class QMenu; class QCloseEvent; class QGridLayout; class QStringListModel; +class QString; +class QAction; namespace MusEGui { @@ -70,6 +72,7 @@ class EditInstrument : public QMainWindow, public Ui::EditInstrumentBase { QTreeWidgetItem* addControllerToView(MusECore::MidiController* mctrl); QString getPatchItemText(int); void enableDefaultControls(bool, bool); + void enableNonCtrlControls(bool); void setDefaultPatchName(int); int getDefaultPatchNumber(); void setDefaultPatchNumbers(int); @@ -98,13 +101,15 @@ class EditInstrument : public QMainWindow, public Ui::EditInstrumentBase { void deleteControllerClicked(); void newControllerClicked(); void addControllerClicked(); - void ctrlTypeChanged(int); + void ctrlPopupTriggered(QAction*); + void ctrlTypeChanged(); void ctrlNameReturn(); - void ctrlHNumChanged(int); - void ctrlLNumChanged(int); + void ctrlNumChanged(); void ctrlMinChanged(int); void ctrlMaxChanged(int); void ctrlDefaultChanged(int); + void ctrlShowInMidiChanged(int); + void ctrlShowInDrumChanged(int); void sysexChanged(QListWidgetItem*, QListWidgetItem*); void deleteSysexClicked(); void newSysexClicked(); @@ -124,7 +129,11 @@ class EditInstrument : public QMainWindow, public Ui::EditInstrumentBase { void fetchPatchCollection(); public: + enum TabType { Patches=0, DrumMaps=1, Controllers=2, Sysex=3 }; + EditInstrument(QWidget* parent = 0, Qt::WFlags fl = Qt::Window); + void findInstrument(const QString& find_instrument); + void showTab(TabType); }; } // namespace MusEGui diff --git a/muse2/muse/instruments/editinstrumentbase.ui b/muse2/muse/instruments/editinstrumentbase.ui index e1f935d5..8e3e7db0 100644 --- a/muse2/muse/instruments/editinstrumentbase.ui +++ b/muse2/muse/instruments/editinstrumentbase.ui @@ -6,14 +6,14 @@ <rect> <x>0</x> <y>0</y> - <width>802</width> - <height>505</height> + <width>772</width> + <height>421</height> </rect> </property> <property name="minimumSize"> <size> - <width>802</width> - <height>464</height> + <width>0</width> + <height>0</height> </size> </property> <property name="windowTitle"> @@ -25,8 +25,8 @@ <widget class="QSplitter" name="splitter4"> <property name="minimumSize"> <size> - <width>780</width> - <height>365</height> + <width>0</width> + <height>0</height> </size> </property> <property name="orientation"> @@ -346,6 +346,19 @@ </property> </widget> </item> + <item> + <spacer name="horizontalSpacer_2"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> </layout> </item> </layout> @@ -444,945 +457,9 @@ </item> </layout> </widget> - <widget class="QWidget" name="controllerTab"> - <attribute name="title"> - <string>Contro&ller</string> - </attribute> - <layout class="QVBoxLayout"> - <item> - <widget class="QSplitter" name="splitter6"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <widget class="QWidget" name="layout13"> - <layout class="QVBoxLayout"> - <item> - <widget class="QLabel" name="textLabel1"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Common:</string> - </property> - <property name="wordWrap"> - <bool>false</bool> - </property> - </widget> - </item> - <item> - <widget class="QListWidget" name="listController"> - <property name="toolTip"> - <string/> - </property> - <property name="whatsThis"> - <string>This is a list of commonly used midi controllers. -Note that in MusE pitch and program changes are -handled like normal controllers.</string> - </property> - </widget> - </item> - </layout> - </widget> - <widget class="QWidget" name="layout17"> - <layout class="QVBoxLayout"> - <item> - <widget class="QTreeWidget" name="viewController"> - <property name="toolTip"> - <string>List of defined controllers</string> - </property> - <property name="whatsThis"> - <string>List of defined controllers.</string> - </property> - <property name="frameShape"> - <enum>QFrame::StyledPanel</enum> - </property> - <property name="frameShadow"> - <enum>QFrame::Sunken</enum> - </property> - <property name="allColumnsShowFocus"> - <bool>true</bool> - </property> - <column> - <property name="text"> - <string>Name </string> - </property> - </column> - <column> - <property name="text"> - <string>Type </string> - </property> - </column> - <column> - <property name="text"> - <string>H-Ctrl</string> - </property> - </column> - <column> - <property name="text"> - <string>L-Ctrl</string> - </property> - </column> - <column> - <property name="text"> - <string>Min </string> - </property> - </column> - <column> - <property name="text"> - <string>Max </string> - </property> - </column> - <column> - <property name="text"> - <string>Def </string> - </property> - </column> - </widget> - </item> - <item> - <widget class="QGroupBox" name="GroupBox1"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="title"> - <string>Properties</string> - </property> - <layout class="QVBoxLayout"> - <item> - <layout class="QHBoxLayout"> - <item> - <widget class="QLabel" name="TextLabel1_3"> - <property name="text"> - <string>Name:</string> - </property> - <property name="wordWrap"> - <bool>false</bool> - </property> - </widget> - </item> - <item> - <widget class="QLineEdit" name="ctrlName"> - <property name="toolTip"> - <string/> - </property> - <property name="whatsThis"> - <string>Midi controller name</string> - </property> - </widget> - </item> - </layout> - </item> - <item> - <layout class="QHBoxLayout"> - <item> - <widget class="QLabel" name="TextLabel2_4"> - <property name="text"> - <string>Type:</string> - </property> - <property name="wordWrap"> - <bool>false</bool> - </property> - </widget> - </item> - <item> - <widget class="QComboBox" name="ctrlType"> - <property name="toolTip"> - <string>Midi controller type</string> - </property> - <property name="whatsThis"> - <string>Midi controller type</string> - </property> - <item> - <property name="text"> - <string>Control7</string> - </property> - </item> - <item> - <property name="text"> - <string>Control14</string> - </property> - </item> - <item> - <property name="text"> - <string>RPN</string> - </property> - </item> - <item> - <property name="text"> - <string>NRPN</string> - </property> - </item> - <item> - <property name="text"> - <string>RPN14</string> - </property> - </item> - <item> - <property name="text"> - <string>NRPN14</string> - </property> - </item> - <item> - <property name="text"> - <string>Pitch</string> - </property> - </item> - <item> - <property name="text"> - <string>Program</string> - </property> - </item> - </widget> - </item> - <item> - <spacer name="spacer15"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Expanding</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QLabel" name="TextLabel3_2"> - <property name="text"> - <string>H-Ctrl</string> - </property> - <property name="wordWrap"> - <bool>false</bool> - </property> - <property name="indent"> - <number>10</number> - </property> - </widget> - </item> - <item> - <widget class="QSpinBox" name="spinBoxHCtrlNo"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="toolTip"> - <string>Midi controller number high byte</string> - </property> - <property name="whatsThis"> - <string>Midi controller number high byte</string> - </property> - <property name="minimum"> - <number>0</number> - </property> - <property name="maximum"> - <number>127</number> - </property> - <property name="value"> - <number>0</number> - </property> - </widget> - </item> - <item> - <spacer name="spacer16"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Expanding</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QLabel" name="TextLabel2_3_2"> - <property name="text"> - <string>L-Ctrl</string> - </property> - <property name="wordWrap"> - <bool>false</bool> - </property> - <property name="indent"> - <number>10</number> - </property> - </widget> - </item> - <item> - <widget class="QSpinBox" name="spinBoxLCtrlNo"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="toolTip"> - <string>Midi controller number low byte (* means drum controller)</string> - </property> - <property name="whatsThis"> - <string>Midi controller number low byte. -If low byte is * then the controller is a - 'drum controller'. For drum tracks and - GS/XG type songs and instruments. -Allows controllers for each instrument in - Muse's drum map. The low byte will be - replaced by the 'ANote' in the drum map. -Examples: The GS and XG instruments' - Drum controllers.</string> - </property> - <property name="specialValueText"> - <string comment="wild card">*</string> - </property> - <property name="minimum"> - <number>-1</number> - </property> - <property name="maximum"> - <number>127</number> - </property> - <property name="value"> - <number>0</number> - </property> - </widget> - </item> - </layout> - </item> - <item> - <layout class="QHBoxLayout"> - <item> - <widget class="QLabel" name="textLabel4_2"> - <property name="text"> - <string>Range:</string> - </property> - <property name="wordWrap"> - <bool>false</bool> - </property> - </widget> - </item> - <item> - <spacer name="spacer17"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Expanding</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QLabel" name="TextLabel1_2_2"> - <property name="text"> - <string>Min</string> - </property> - <property name="alignment"> - <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> - </property> - <property name="wordWrap"> - <bool>false</bool> - </property> - <property name="indent"> - <number>10</number> - </property> - </widget> - </item> - <item> - <widget class="QSpinBox" name="spinBoxMin"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="toolTip"> - <string>Minimum value. If negative, auto-translate.</string> - </property> - <property name="whatsThis"> - <string>Minimum value. If the minimum value - is negative, the range will automatically - be translated to a positive range. - -Useful for controllers which should be - displayed with zero bias. For example, -'Pan': Minimum: -64 Maximum: 63 -True range: Min: 0 Max: 127 (bias = 64) -'CoarseTuning': Min: -24 Max: 23 -True range: Min: 40 Max: 87 (bias = 64) - -Bias is determined from controller type: -7-bit Controller7 / RPN: Bias = 64 -14-bit Controller14 / RPN14: Bias = 8192 - -Type 'Pitch' is the exception. It is biased - at zero, even with a negative minimum: -'Pitch': Min: -8192 Max: 8191 -True range: Min: -8192 Max: 8191 (bias 0)</string> - </property> - <property name="minimum"> - <number>-16384</number> - </property> - <property name="maximum"> - <number>16383</number> - </property> - </widget> - </item> - <item> - <spacer name="spacer18"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Expanding</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QLabel" name="TextLabel2_2_2"> - <property name="text"> - <string>Max</string> - </property> - <property name="alignment"> - <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> - </property> - <property name="wordWrap"> - <bool>false</bool> - </property> - <property name="indent"> - <number>10</number> - </property> - </widget> - </item> - <item> - <widget class="QSpinBox" name="spinBoxMax"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="toolTip"> - <string>Maximum value</string> - </property> - <property name="whatsThis"> - <string>Maximum value</string> - </property> - <property name="minimum"> - <number>-16384</number> - </property> - <property name="maximum"> - <number>16383</number> - </property> - <property name="value"> - <number>127</number> - </property> - </widget> - </item> - </layout> - </item> - <item> - <layout class="QGridLayout"> - <item row="1" column="0" colspan="2"> - <spacer name="spacer13_2"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Expanding</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item row="0" column="0"> - <widget class="QLabel" name="textLabel1_3"> - <property name="text"> - <string>Default:</string> - </property> - <property name="alignment"> - <set>Qt::AlignVCenter</set> - </property> - <property name="wordWrap"> - <bool>false</bool> - </property> - </widget> - </item> - <item row="0" column="6"> - <widget class="QLabel" name="textLabel2_4"> - <property name="text"> - <string>L-Bank</string> - </property> - <property name="wordWrap"> - <bool>false</bool> - </property> - </widget> - </item> - <item row="0" column="5"> - <widget class="QSpinBox" name="defPatchH"> - <property name="specialValueText"> - <string>off</string> - </property> - <property name="minimum"> - <number>0</number> - </property> - <property name="maximum"> - <number>128</number> - </property> - <property name="value"> - <number>0</number> - </property> - </widget> - </item> - <item row="0" column="7"> - <widget class="QSpinBox" name="defPatchL"> - <property name="specialValueText"> - <string>off</string> - </property> - <property name="minimum"> - <number>0</number> - </property> - <property name="maximum"> - <number>128</number> - </property> - <property name="value"> - <number>0</number> - </property> - </widget> - </item> - <item row="1" column="6"> - <widget class="QLabel" name="textLabel3"> - <property name="text"> - <string>Progr.</string> - </property> - <property name="wordWrap"> - <bool>false</bool> - </property> - </widget> - </item> - <item row="1" column="7"> - <widget class="QSpinBox" name="defPatchProg"> - <property name="specialValueText"> - <string>off</string> - </property> - <property name="minimum"> - <number>0</number> - </property> - <property name="maximum"> - <number>128</number> - </property> - <property name="value"> - <number>0</number> - </property> - </widget> - </item> - <item row="1" column="2" colspan="4"> - <widget class="QPushButton" name="patchButton"> - <property name="enabled"> - <bool>true</bool> - </property> - <property name="minimumSize"> - <size> - <width>210</width> - <height>0</height> - </size> - </property> - <property name="text"> - <string>???</string> - </property> - <property name="shortcut"> - <string/> - </property> - </widget> - </item> - <item row="0" column="4"> - <widget class="QLabel" name="textLabel1_5"> - <property name="text"> - <string>H-Bank</string> - </property> - <property name="wordWrap"> - <bool>false</bool> - </property> - </widget> - </item> - <item row="0" column="3"> - <spacer name="spacer12_2"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Expanding</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item row="0" column="1" colspan="2"> - <widget class="QSpinBox" name="spinBoxDefault"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>85</width> - <height>32767</height> - </size> - </property> - <property name="toolTip"> - <string>Default value. Off: No default.</string> - </property> - <property name="whatsThis"> - <string>Default (initial) value. Off means no default. - -If a default value is chosen, the value will be sent - to the controller when the controller is added to - the song (in piano roll or event editor). When - the song is re-loaded, the value is sent again. -Otherwise the controller remains at its last value. -Controllers are also automatically added to a - song upon reception of a midi controller event. - -Caution! Watch out for controllers such as - 'Sustain' and 'ResetAllController' with default - values. You should probably turn 'off' their - default (in piano roll or drum edit, and - instrument editor).</string> - </property> - <property name="specialValueText"> - <string comment="dont care">off</string> - </property> - <property name="minimum"> - <number>-1</number> - </property> - <property name="maximum"> - <number>16383</number> - </property> - <property name="value"> - <number>-1</number> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </widget> - </item> - <item> - <layout class="QHBoxLayout"> - <item> - <widget class="QToolButton" name="addController"> - <property name="toolTip"> - <string>Add common controller</string> - </property> - <property name="text"> - <string>&Add</string> - </property> - <property name="shortcut"> - <string>Alt+A</string> - </property> - </widget> - </item> - <item> - <widget class="QToolButton" name="deleteController"> - <property name="toolTip"> - <string>Delete controller</string> - </property> - <property name="text"> - <string>&Delete</string> - </property> - <property name="shortcut"> - <string>Alt+D</string> - </property> - </widget> - </item> - <item> - <widget class="QToolButton" name="newController"> - <property name="toolTip"> - <string>Create a new controller</string> - </property> - <property name="text"> - <string>New &Controller</string> - </property> - <property name="shortcut"> - <string>Alt+C</string> - </property> - </widget> - </item> - <item> - <spacer name="spacer13"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Expanding</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>200</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QLabel" name="nullValLabelH"> - <property name="text"> - <string>Null Param Hi:</string> - </property> - <property name="wordWrap"> - <bool>false</bool> - </property> - </widget> - </item> - <item> - <widget class="QSpinBox" name="nullParamSpinBoxH"> - <property name="toolTip"> - <string>Null parameter number High byte</string> - </property> - <property name="whatsThis"> - <string>If set, these 'null' parameter numbers will - be sent after each RPN/NRPN event. -This prevents subsequent 'data' events - from corrupting the RPN/NRPN controller. -Typically, set to 127/127, or an unused - RPN/NRPN controller number.</string> - </property> - <property name="specialValueText"> - <string>off</string> - </property> - <property name="minimum"> - <number>-1</number> - </property> - <property name="maximum"> - <number>127</number> - </property> - <property name="value"> - <number>127</number> - </property> - </widget> - </item> - <item> - <spacer name="spacer13_3"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Expanding</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>200</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QLabel" name="nullValLabelL"> - <property name="text"> - <string> Lo:</string> - </property> - <property name="wordWrap"> - <bool>false</bool> - </property> - </widget> - </item> - <item> - <widget class="QSpinBox" name="nullParamSpinBoxL"> - <property name="toolTip"> - <string>Null parameter number Low byte</string> - </property> - <property name="whatsThis"> - <string>If set, these 'null' parameter numbers will - be sent after each RPN/NRPN event. -This prevents subsequent 'data' events - from corrupting the RPN/NRPN controller. -Typically, set to 127/127, or an unused - RPN/NRPN controller number.</string> - </property> - <property name="specialValueText"> - <string>off</string> - </property> - <property name="minimum"> - <number>-1</number> - </property> - <property name="maximum"> - <number>127</number> - </property> - <property name="value"> - <number>127</number> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </widget> - </widget> - </item> - </layout> - </widget> - <widget class="QWidget" name="sysExTab"> - <attribute name="title"> - <string>S&ysEx</string> - </attribute> - <layout class="QVBoxLayout"> - <item> - <widget class="QSplitter" name="splitter2"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <widget class="QWidget" name="layout12"> - <layout class="QVBoxLayout"> - <item> - <widget class="QLabel" name="textLabel2_3"> - <property name="text"> - <string>SysEx List:</string> - </property> - <property name="wordWrap"> - <bool>false</bool> - </property> - </widget> - </item> - <item> - <widget class="QListWidget" name="sysexList"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - </widget> - </item> - </layout> - </widget> - <widget class="QWidget" name="layout11"> - <layout class="QVBoxLayout"> - <item> - <widget class="QLabel" name="textLabel1_4"> - <property name="text"> - <string>Name:</string> - </property> - <property name="wordWrap"> - <bool>false</bool> - </property> - </widget> - </item> - <item> - <widget class="QLineEdit" name="sysexName"/> - </item> - <item> - <widget class="QLabel" name="label_2"> - <property name="text"> - <string>Comment:</string> - </property> - </widget> - </item> - <item> - <widget class="QTextEdit" name="sysexComment"/> - </item> - <item> - <widget class="QLabel" name="textLabel1_2"> - <property name="text"> - <string>Hex Entry:</string> - </property> - <property name="wordWrap"> - <bool>false</bool> - </property> - </widget> - </item> - <item> - <widget class="QTextEdit" name="sysexData"/> - </item> - <item> - <layout class="QHBoxLayout"> - <item> - <widget class="QToolButton" name="deleteSysex"> - <property name="text"> - <string>&Delete</string> - </property> - <property name="shortcut"> - <string>Alt+D</string> - </property> - </widget> - </item> - <item> - <widget class="QToolButton" name="newSysex"> - <property name="text"> - <string>New SysE&x</string> - </property> - <property name="shortcut"> - <string>Alt+X</string> - </property> - </widget> - </item> - <item> - <spacer name="spacer12"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Expanding</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>60</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - </layout> - </item> - </layout> - </widget> - </widget> - </item> - </layout> - </widget> <widget class="QWidget" name="drumTab"> <attribute name="title"> - <string>Drummaps</string> + <string>Drum&maps</string> </attribute> <layout class="QHBoxLayout" name="horizontalLayout_4"> <item> @@ -1796,6 +873,982 @@ Typically, set to 127/127, or an unused </item> </layout> </widget> + <widget class="QWidget" name="controllerTab"> + <attribute name="title"> + <string>Contro&llers</string> + </attribute> + <layout class="QVBoxLayout" name="verticalLayout_4"> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_7"> + <item> + <widget class="QLabel" name="nullValLabelH"> + <property name="text"> + <string>Null Parameters: Hi:</string> + </property> + <property name="wordWrap"> + <bool>false</bool> + </property> + </widget> + </item> + <item> + <widget class="QSpinBox" name="nullParamSpinBoxH"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Maximum" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="toolTip"> + <string>Null parameter number High byte</string> + </property> + <property name="whatsThis"> + <string>If set, these 'null' parameter numbers will + be sent after each RPN/NRPN event. +This prevents subsequent 'data' events + from corrupting the RPN/NRPN controller. +Typically, set to 127/127, or an unused + RPN/NRPN controller number.</string> + </property> + <property name="specialValueText"> + <string>off</string> + </property> + <property name="minimum"> + <number>-1</number> + </property> + <property name="maximum"> + <number>127</number> + </property> + <property name="value"> + <number>127</number> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="nullValLabelL"> + <property name="text"> + <string> Lo:</string> + </property> + <property name="wordWrap"> + <bool>false</bool> + </property> + </widget> + </item> + <item> + <widget class="QSpinBox" name="nullParamSpinBoxL"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Maximum" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="toolTip"> + <string>Null parameter number Low byte</string> + </property> + <property name="whatsThis"> + <string>If set, these 'null' parameter numbers will + be sent after each RPN/NRPN event. +This prevents subsequent 'data' events + from corrupting the RPN/NRPN controller. +Typically, set to 127/127, or an unused + RPN/NRPN controller number.</string> + </property> + <property name="specialValueText"> + <string>off</string> + </property> + <property name="minimum"> + <number>-1</number> + </property> + <property name="maximum"> + <number>127</number> + </property> + <property name="value"> + <number>127</number> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_3"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item> + <widget class="QTreeWidget" name="viewController"> + <property name="toolTip"> + <string>List of defined controllers</string> + </property> + <property name="whatsThis"> + <string>List of defined controllers.</string> + </property> + <property name="frameShape"> + <enum>QFrame::StyledPanel</enum> + </property> + <property name="frameShadow"> + <enum>QFrame::Sunken</enum> + </property> + <property name="allColumnsShowFocus"> + <bool>true</bool> + </property> + <attribute name="headerDefaultSectionSize"> + <number>60</number> + </attribute> + <attribute name="headerMinimumSectionSize"> + <number>30</number> + </attribute> + <attribute name="headerStretchLastSection"> + <bool>false</bool> + </attribute> + <column> + <property name="text"> + <string>Name </string> + </property> + <property name="textAlignment"> + <set>AlignLeft|AlignVCenter</set> + </property> + </column> + <column> + <property name="text"> + <string>Type </string> + </property> + <property name="textAlignment"> + <set>AlignLeft|AlignVCenter</set> + </property> + </column> + <column> + <property name="text"> + <string>H-Ctrl</string> + </property> + <property name="textAlignment"> + <set>AlignRight|AlignVCenter</set> + </property> + </column> + <column> + <property name="text"> + <string>L-Ctrl</string> + </property> + <property name="textAlignment"> + <set>AlignRight|AlignVCenter</set> + </property> + </column> + <column> + <property name="text"> + <string>Min </string> + </property> + <property name="textAlignment"> + <set>AlignRight|AlignVCenter</set> + </property> + </column> + <column> + <property name="text"> + <string>Max </string> + </property> + <property name="textAlignment"> + <set>AlignRight|AlignVCenter</set> + </property> + </column> + <column> + <property name="text"> + <string>Def </string> + </property> + <property name="textAlignment"> + <set>AlignRight|AlignVCenter</set> + </property> + </column> + <column> + <property name="text"> + <string>Midi</string> + </property> + <property name="textAlignment"> + <set>AlignRight|AlignVCenter</set> + </property> + </column> + <column> + <property name="text"> + <string>Drum</string> + </property> + <property name="textAlignment"> + <set>AlignRight|AlignVCenter</set> + </property> + </column> + </widget> + </item> + <item> + <widget class="QGroupBox" name="GroupBox1"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="title"> + <string>Properties</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout_3"> + <property name="spacing"> + <number>2</number> + </property> + <property name="margin"> + <number>2</number> + </property> + <item> + <layout class="QHBoxLayout"> + <item> + <widget class="QLabel" name="TextLabel1_3"> + <property name="text"> + <string>Name:</string> + </property> + <property name="wordWrap"> + <bool>false</bool> + </property> + </widget> + </item> + <item> + <widget class="QLineEdit" name="ctrlName"> + <property name="toolTip"> + <string/> + </property> + <property name="whatsThis"> + <string>Midi controller name</string> + </property> + </widget> + </item> + <item> + <widget class="QToolButton" name="newController"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Maximum" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="toolTip"> + <string>Create a new controller</string> + </property> + <property name="text"> + <string>New &Controller</string> + </property> + <property name="shortcut"> + <string>Alt+C</string> + </property> + </widget> + </item> + <item> + <widget class="QToolButton" name="addController"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Maximum" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="toolTip"> + <string>Add common controller</string> + </property> + <property name="text"> + <string>&Add Common...</string> + </property> + <property name="shortcut"> + <string>Alt+A</string> + </property> + </widget> + </item> + <item> + <widget class="QToolButton" name="deleteController"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Maximum" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="toolTip"> + <string>Delete controller</string> + </property> + <property name="text"> + <string>&Delete</string> + </property> + <property name="shortcut"> + <string>Alt+D</string> + </property> + </widget> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_6"> + <item> + <widget class="QLabel" name="TextLabel2_4"> + <property name="text"> + <string>Type:</string> + </property> + <property name="wordWrap"> + <bool>false</bool> + </property> + </widget> + </item> + <item> + <widget class="QComboBox" name="ctrlType"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Maximum" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="toolTip"> + <string>Midi controller type</string> + </property> + <property name="whatsThis"> + <string>Midi controller type</string> + </property> + <item> + <property name="text"> + <string>Control7</string> + </property> + </item> + <item> + <property name="text"> + <string>Control14</string> + </property> + </item> + <item> + <property name="text"> + <string>RPN</string> + </property> + </item> + <item> + <property name="text"> + <string>NRPN</string> + </property> + </item> + <item> + <property name="text"> + <string>RPN14</string> + </property> + </item> + <item> + <property name="text"> + <string>NRPN14</string> + </property> + </item> + <item> + <property name="text"> + <string>Pitch</string> + </property> + </item> + <item> + <property name="text"> + <string>Program</string> + </property> + </item> + <item> + <property name="text"> + <string>PolyAftertouch</string> + </property> + </item> + <item> + <property name="text"> + <string>Aftertouch</string> + </property> + </item> + </widget> + </item> + <item> + <widget class="QLabel" name="TextLabel3_2"> + <property name="text"> + <string>H-Ctrl</string> + </property> + <property name="wordWrap"> + <bool>false</bool> + </property> + <property name="indent"> + <number>10</number> + </property> + </widget> + </item> + <item> + <widget class="QSpinBox" name="spinBoxHCtrlNo"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Maximum" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="toolTip"> + <string>Midi controller number high byte</string> + </property> + <property name="whatsThis"> + <string>Midi controller number high byte</string> + </property> + <property name="minimum"> + <number>0</number> + </property> + <property name="maximum"> + <number>127</number> + </property> + <property name="value"> + <number>0</number> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="TextLabel2_3_2"> + <property name="text"> + <string>L-Ctrl</string> + </property> + <property name="wordWrap"> + <bool>false</bool> + </property> + <property name="indent"> + <number>10</number> + </property> + </widget> + </item> + <item> + <widget class="QSpinBox" name="spinBoxLCtrlNo"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Maximum" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="toolTip"> + <string>Midi controller number low byte (* means drum controller)</string> + </property> + <property name="whatsThis"> + <string>Midi controller number low byte. +If low byte is * then the controller is a + 'drum controller'. For drum tracks and + GS/XG type songs and instruments. +Allows controllers for each instrument in + Muse's drum map. The low byte will be + replaced by the 'ANote' in the drum map. +Examples: The GS and XG instruments' + Drum controllers.</string> + </property> + <property name="specialValueText"> + <string comment="wild card">*</string> + </property> + <property name="minimum"> + <number>-1</number> + </property> + <property name="maximum"> + <number>127</number> + </property> + <property name="value"> + <number>0</number> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="ctrlValidLabel"> + <property name="text"> + <string>W</string> + </property> + </widget> + </item> + <item> + <spacer name="spacer16"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Expanding</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>0</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout"> + <item> + <widget class="QLabel" name="textLabel4_2"> + <property name="text"> + <string>Range:</string> + </property> + <property name="wordWrap"> + <bool>false</bool> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="TextLabel1_2_2"> + <property name="text"> + <string>Min</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + <property name="wordWrap"> + <bool>false</bool> + </property> + <property name="indent"> + <number>10</number> + </property> + </widget> + </item> + <item> + <widget class="QSpinBox" name="spinBoxMin"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Maximum" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="toolTip"> + <string>Minimum value. If negative, auto-translate.</string> + </property> + <property name="whatsThis"> + <string>Minimum value. If the minimum value + is negative, the range will automatically + be translated to a positive range. + +Useful for controllers which should be + displayed with zero bias. For example, +'Pan': Minimum: -64 Maximum: 63 +True range: Min: 0 Max: 127 (bias = 64) +'CoarseTuning': Min: -24 Max: 23 +True range: Min: 40 Max: 87 (bias = 64) + +Bias is determined from controller type: +7-bit Controller7 / RPN: Bias = 64 +14-bit Controller14 / RPN14: Bias = 8192 + +Type 'Pitch' is the exception. It is biased + at zero, even with a negative minimum: +'Pitch': Min: -8192 Max: 8191 +True range: Min: -8192 Max: 8191 (bias 0)</string> + </property> + <property name="minimum"> + <number>-16384</number> + </property> + <property name="maximum"> + <number>16383</number> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="TextLabel2_2_2"> + <property name="text"> + <string>Max</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + <property name="wordWrap"> + <bool>false</bool> + </property> + <property name="indent"> + <number>10</number> + </property> + </widget> + </item> + <item> + <widget class="QSpinBox" name="spinBoxMax"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Maximum" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="toolTip"> + <string>Maximum value</string> + </property> + <property name="whatsThis"> + <string>Maximum value</string> + </property> + <property name="minimum"> + <number>-16384</number> + </property> + <property name="maximum"> + <number>16383</number> + </property> + <property name="value"> + <number>127</number> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>22</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QLabel" name="label_3"> + <property name="text"> + <string>Show in tracks:</string> + </property> + </widget> + </item> + <item> + <widget class="QCheckBox" name="ctrlShowInMidi"> + <property name="text"> + <string>Midi</string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="QCheckBox" name="ctrlShowInDrum"> + <property name="text"> + <string>Drum</string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <spacer name="spacer18"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Expanding</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>0</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_5"> + <item> + <widget class="QLabel" name="textLabel1_3"> + <property name="text"> + <string>Default:</string> + </property> + <property name="alignment"> + <set>Qt::AlignVCenter</set> + </property> + <property name="wordWrap"> + <bool>false</bool> + </property> + </widget> + </item> + <item> + <widget class="QSpinBox" name="spinBoxDefault"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Maximum" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>0</height> + </size> + </property> + <property name="toolTip"> + <string>Default value. Off: No default.</string> + </property> + <property name="whatsThis"> + <string>Default (initial) value. Off means no default. + +If a default value is chosen, the value will be sent + to the controller when the controller is added to + the song (in piano roll or event editor). When + the song is re-loaded, the value is sent again. +Otherwise the controller remains at its last value. +Controllers are also automatically added to a + song upon reception of a midi controller event. + +Caution! Watch out for controllers such as + 'Sustain' and 'ResetAllController' with default + values. You should probably turn 'off' their + default (in piano roll or drum edit, and + instrument editor).</string> + </property> + <property name="specialValueText"> + <string comment="dont care">off</string> + </property> + <property name="minimum"> + <number>-1</number> + </property> + <property name="maximum"> + <number>16383</number> + </property> + <property name="value"> + <number>-1</number> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="textLabel1_5"> + <property name="text"> + <string>H-Bank</string> + </property> + <property name="wordWrap"> + <bool>false</bool> + </property> + </widget> + </item> + <item> + <widget class="QSpinBox" name="defPatchH"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Maximum" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="specialValueText"> + <string>off</string> + </property> + <property name="minimum"> + <number>0</number> + </property> + <property name="maximum"> + <number>128</number> + </property> + <property name="value"> + <number>0</number> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="textLabel2_4"> + <property name="text"> + <string>L-Bank</string> + </property> + <property name="wordWrap"> + <bool>false</bool> + </property> + </widget> + </item> + <item> + <widget class="QSpinBox" name="defPatchL"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Maximum" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="specialValueText"> + <string>off</string> + </property> + <property name="minimum"> + <number>0</number> + </property> + <property name="maximum"> + <number>128</number> + </property> + <property name="value"> + <number>0</number> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="textLabel3"> + <property name="text"> + <string>Progr.</string> + </property> + <property name="wordWrap"> + <bool>false</bool> + </property> + </widget> + </item> + <item> + <widget class="QSpinBox" name="defPatchProg"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Maximum" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="specialValueText"> + <string>off</string> + </property> + <property name="minimum"> + <number>0</number> + </property> + <property name="maximum"> + <number>128</number> + </property> + <property name="value"> + <number>0</number> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="patchButton"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>0</height> + </size> + </property> + <property name="text"> + <string>???</string> + </property> + <property name="shortcut"> + <string/> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + </item> + </layout> + </widget> + <widget class="QWidget" name="sysExTab"> + <attribute name="title"> + <string>S&ysEx</string> + </attribute> + <layout class="QVBoxLayout"> + <item> + <widget class="QSplitter" name="splitter2"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <widget class="QWidget" name="layout12"> + <layout class="QVBoxLayout"> + <item> + <widget class="QLabel" name="textLabel2_3"> + <property name="text"> + <string>SysEx List:</string> + </property> + <property name="wordWrap"> + <bool>false</bool> + </property> + </widget> + </item> + <item> + <widget class="QListWidget" name="sysexList"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + </widget> + </item> + </layout> + </widget> + <widget class="QWidget" name="layout11"> + <layout class="QVBoxLayout"> + <item> + <widget class="QLabel" name="textLabel1_4"> + <property name="text"> + <string>Name:</string> + </property> + <property name="wordWrap"> + <bool>false</bool> + </property> + </widget> + </item> + <item> + <widget class="QLineEdit" name="sysexName"/> + </item> + <item> + <widget class="QLabel" name="label_2"> + <property name="text"> + <string>Comment:</string> + </property> + </widget> + </item> + <item> + <widget class="QTextEdit" name="sysexComment"/> + </item> + <item> + <widget class="QLabel" name="textLabel1_2"> + <property name="text"> + <string>Hex Entry:</string> + </property> + <property name="wordWrap"> + <bool>false</bool> + </property> + </widget> + </item> + <item> + <widget class="QTextEdit" name="sysexData"/> + </item> + <item> + <layout class="QHBoxLayout"> + <item> + <widget class="QToolButton" name="deleteSysex"> + <property name="text"> + <string>&Delete</string> + </property> + <property name="shortcut"> + <string>Alt+D</string> + </property> + </widget> + </item> + <item> + <widget class="QToolButton" name="newSysex"> + <property name="text"> + <string>New SysE&x</string> + </property> + <property name="shortcut"> + <string>Alt+X</string> + </property> + </widget> + </item> + <item> + <spacer name="spacer12"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Expanding</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>60</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + </layout> + </widget> + </widget> + </item> + </layout> + </widget> </widget> </widget> </item> @@ -1821,8 +1874,8 @@ Typically, set to 127/127, or an unused <rect> <x>0</x> <y>0</y> - <width>802</width> - <height>21</height> + <width>772</width> + <height>23</height> </rect> </property> <property name="defaultUp"> @@ -1960,14 +2013,11 @@ Typically, set to 127/127, or an unused <tabstop>checkBoxGM</tabstop> <tabstop>checkBoxGS</tabstop> <tabstop>checkBoxXG</tabstop> - <tabstop>listController</tabstop> - <tabstop>viewController</tabstop> <tabstop>ctrlName</tabstop> <tabstop>ctrlType</tabstop> <tabstop>spinBoxHCtrlNo</tabstop> <tabstop>spinBoxLCtrlNo</tabstop> <tabstop>spinBoxMin</tabstop> - <tabstop>spinBoxMax</tabstop> <tabstop>spinBoxDefault</tabstop> <tabstop>sysexList</tabstop> <tabstop>sysexName</tabstop> |