summaryrefslogtreecommitdiff
path: root/muse2
diff options
context:
space:
mode:
Diffstat (limited to 'muse2')
-rw-r--r--muse2/muse/arranger/arrangerview.cpp3
-rw-r--r--muse2/muse/conf.cpp305
-rw-r--r--muse2/muse/conf.h2
-rw-r--r--muse2/muse/gconfig.cpp2
-rw-r--r--muse2/muse/gconfig.h2
-rw-r--r--muse2/muse/midiedit/scoreedit.cpp1
-rw-r--r--muse2/muse/songfile.cpp4
7 files changed, 163 insertions, 156 deletions
diff --git a/muse2/muse/arranger/arrangerview.cpp b/muse2/muse/arranger/arrangerview.cpp
index 28cf54fb..96ce4c09 100644
--- a/muse2/muse/arranger/arrangerview.cpp
+++ b/muse2/muse/arranger/arrangerview.cpp
@@ -380,6 +380,7 @@ void ArrangerView::writeStatus(int level, Xml& xml) const
xml.tag(level++, "arrangerview");
TopWin::writeStatus(level, xml);
xml.intTag(level, "tool", editTools->curTool());
+ arranger->writeStatus(level,xml);
xml.tag(level, "/arrangerview");
}
@@ -399,6 +400,8 @@ void ArrangerView::readStatus(Xml& xml)
editTools->set(xml.parseInt());
else if (tag == "topwin")
TopWin::readStatus(xml);
+ else if (tag == "arranger")
+ arranger->readStatus(xml);
else
xml.unknown("ArrangerView");
break;
diff --git a/muse2/muse/conf.cpp b/muse2/muse/conf.cpp
index ac6a7de6..7cf8e680 100644
--- a/muse2/muse/conf.cpp
+++ b/muse2/muse/conf.cpp
@@ -520,7 +520,7 @@ static void readSeqConfiguration(Xml& xml)
// readConfiguration
//---------------------------------------------------------
-void readConfiguration(Xml& xml, bool readOnlySequencer)
+void readConfiguration(Xml& xml, bool readOnlySequencer, bool doReadGlobalConfig)
{
int mixers = 0;
for (;;) {
@@ -547,8 +547,97 @@ void readConfiguration(Xml& xml, bool readOnlySequencer)
xml.skip(tag);
break;
}
+
+
+
+
+
+ else if (tag == "midiInputDevice")
+ MusEGlobal::midiInputPorts = xml.parseInt();
+ else if (tag == "midiInputChannel")
+ MusEGlobal::midiInputChannel = xml.parseInt();
+ else if (tag == "midiRecordType")
+ MusEGlobal::midiRecordType = xml.parseInt();
+ else if (tag == "midiThruType")
+ MusEGlobal::midiThruType = xml.parseInt();
+ else if (tag == "midiFilterCtrl1")
+ MusEGlobal::midiFilterCtrl1 = xml.parseInt();
+ else if (tag == "midiFilterCtrl2")
+ MusEGlobal::midiFilterCtrl2 = xml.parseInt();
+ else if (tag == "midiFilterCtrl3")
+ MusEGlobal::midiFilterCtrl3 = xml.parseInt();
+ else if (tag == "midiFilterCtrl4")
+ MusEGlobal::midiFilterCtrl4 = xml.parseInt();
+ else if (tag == "waveTracksVisible")
+ WaveTrack::setVisible((bool)xml.parseInt());
+ else if (tag == "auxTracksVisible")
+ AudioAux::setVisible((bool)xml.parseInt());
+ else if (tag == "groupTracksVisible")
+ AudioGroup::setVisible((bool)xml.parseInt());
+ else if (tag == "midiTracksVisible")
+ MidiTrack::setVisible((bool)xml.parseInt());
+ else if (tag == "inputTracksVisible")
+ AudioInput::setVisible((bool)xml.parseInt());
+ else if (tag == "outputTracksVisible")
+ AudioOutput::setVisible((bool)xml.parseInt());
+ else if (tag == "synthTracksVisible")
+ SynthI::setVisible((bool)xml.parseInt());
+ else if (tag == "bigtimeVisible")
+ MusEConfig::config.bigTimeVisible = xml.parseInt();
+ else if (tag == "transportVisible")
+ MusEConfig::config.transportVisible = xml.parseInt();
+ else if (tag == "mixer1Visible")
+ MusEConfig::config.mixer1Visible = xml.parseInt();
+ else if (tag == "mixer2Visible")
+ MusEConfig::config.mixer2Visible = xml.parseInt();
+ else if (tag == "mtctype")
+ mtcType= xml.parseInt();
+ else if (tag == "sendClockDelay")
+ syncSendFirstClockDelay = xml.parseUInt();
+ else if (tag == "extSync")
+ extSyncFlag.setValue(xml.parseInt());
+ else if (tag == "useJackTransport")
+ {
+ useJackTransport.setValue(xml.parseInt());
+ }
+ else if (tag == "jackTransportMaster")
+ {
+ jackTransportMaster = xml.parseInt();
+ if(audioDevice)
+ audioDevice->setMaster(jackTransportMaster);
+ }
+ else if (tag == "mtcoffset") {
+ QString qs(xml.parse1());
+ QByteArray ba = qs.toLatin1();
+ const char* str = ba.constData();
+ int h, m, s, f, sf;
+ sscanf(str, "%d:%d:%d:%d:%d", &h, &m, &s, &f, &sf);
+ mtcOffset = MTC(h, m, s, f, sf);
+ }
+ else if (tag == "midiTransform")
+ readMidiTransform(xml);
+ else if (tag == "midiInputTransform")
+ readMidiInputTransform(xml);
+ else if (tag == "geometryTransport")
+ MusEConfig::config.geometryTransport = readGeometry(xml, tag);
+ else if (tag == "geometryBigTime")
+ MusEConfig::config.geometryBigTime = readGeometry(xml, tag);
+
+ else if (!doReadGlobalConfig) {
+ xml.skip(tag);
+ break;
+ }
+
+ // ---- Global and/or per-song config stuff ends here ----
+
+
- if (tag == "theme")
+ // ---- Global config stuff begins here ----
+
+ else if (tag == "geometryMain")
+ MusEConfig::config.geometryMain = readGeometry(xml, tag);
+
+ else if (tag == "theme")
MusEConfig::config.style = xml.parse1();
else if (tag == "styleSheetFile")
MusEConfig::config.styleSheetFile = xml.parse1();
@@ -729,7 +818,7 @@ void readConfiguration(Xml& xml, bool readOnlySequencer)
else if (tag == "synthTrackBg")
MusEConfig::config.synthTrackBg = readColor(xml);
- else if (tag == "extendedMidi")
+ else if (tag == "extendedMidi") //FINDMICHJETZT begin
MusEConfig::config.extendedMidi = xml.parseInt();
else if (tag == "midiExportDivision")
MusEConfig::config.midiDivision = xml.parseInt();
@@ -743,50 +832,6 @@ void readConfiguration(Xml& xml, bool readOnlySequencer)
MusEConfig::config.expOptimNoteOffs = xml.parseInt();
else if (tag == "importMidiSplitParts")
MusEConfig::config.importMidiSplitParts = xml.parseInt();
- else if (tag == "midiInputDevice")
- MusEGlobal::midiInputPorts = xml.parseInt();
- else if (tag == "midiInputChannel")
- MusEGlobal::midiInputChannel = xml.parseInt();
- else if (tag == "midiRecordType")
- MusEGlobal::midiRecordType = xml.parseInt();
- else if (tag == "midiThruType")
- MusEGlobal::midiThruType = xml.parseInt();
- else if (tag == "midiFilterCtrl1")
- MusEGlobal::midiFilterCtrl1 = xml.parseInt();
- else if (tag == "midiFilterCtrl2")
- MusEGlobal::midiFilterCtrl2 = xml.parseInt();
- else if (tag == "midiFilterCtrl3")
- MusEGlobal::midiFilterCtrl3 = xml.parseInt();
- else if (tag == "midiFilterCtrl4")
- MusEGlobal::midiFilterCtrl4 = xml.parseInt();
- else if (tag == "waveTracksVisible")
- WaveTrack::setVisible((bool)xml.parseInt());
- else if (tag == "auxTracksVisible")
- AudioAux::setVisible((bool)xml.parseInt());
- else if (tag == "groupTracksVisible")
- AudioGroup::setVisible((bool)xml.parseInt());
- else if (tag == "midiTracksVisible")
- MidiTrack::setVisible((bool)xml.parseInt());
- else if (tag == "inputTracksVisible")
- AudioInput::setVisible((bool)xml.parseInt());
- else if (tag == "outputTracksVisible")
- AudioOutput::setVisible((bool)xml.parseInt());
- else if (tag == "synthTracksVisible")
- SynthI::setVisible((bool)xml.parseInt());
- else if (tag == "bigtimeVisible")
- MusEConfig::config.bigTimeVisible = xml.parseInt();
- else if (tag == "transportVisible")
- MusEConfig::config.transportVisible = xml.parseInt();
- else if (tag == "markerVisible")
- MusEConfig::config.markerVisible = xml.parseInt();
-
- else if (tag == "mixerVisible")
- // MusEConfig::config.mixerVisible = xml.parseInt(); // Obsolete
- xml.skip(tag);
- else if (tag == "mixer1Visible")
- MusEConfig::config.mixer1Visible = xml.parseInt();
- else if (tag == "mixer2Visible")
- MusEConfig::config.mixer2Visible = xml.parseInt();
else if (tag == "showSplashScreen")
MusEConfig::config.showSplashScreen = xml.parseInt();
@@ -800,20 +845,7 @@ void readConfiguration(Xml& xml, bool readOnlySequencer)
MusEConfig::config.canvasBgPixmap = xml.parse1();
else if (tag == "canvasCustomBgList")
MusEConfig::config.canvasCustomBgList = xml.parse1().split(";", QString::SkipEmptyParts);
- else if (tag == "geometryMain")
- MusEConfig::config.geometryMain = readGeometry(xml, tag);
- else if (tag == "geometryTransport")
- MusEConfig::config.geometryTransport = readGeometry(xml, tag);
- else if (tag == "geometryBigTime")
- MusEConfig::config.geometryBigTime = readGeometry(xml, tag);
- else if (tag == "geometryPianoroll")
- MusEConfig::config.geometryPianoroll = readGeometry(xml, tag);
- else if (tag == "geometryDrumedit")
- MusEConfig::config.geometryDrumedit = readGeometry(xml, tag);
- else if (tag == "geometryMixer")
- // MusEConfig::config.geometryMixer = readGeometry(xml, tag); // Obsolete
- xml.skip(tag);
//else if (tag == "mixer1")
// MusEConfig::config.mixer1.read(xml);
//else if (tag == "mixer2")
@@ -835,69 +867,16 @@ void readConfiguration(Xml& xml, bool readOnlySequencer)
MusEConfig::config.transportHandleColor = readColor(xml);
else if (tag == "waveEditBackgroundColor")
MusEConfig::config.waveEditBackgroundColor = readColor(xml);
- else if (tag == "txDeviceId")
- //txDeviceId = xml.parseInt();
- xml.parseInt();
- else if (tag == "rxDeviceId")
- //rxDeviceId = xml.parseInt();
- xml.parseInt();
- else if (tag == "txSyncPort")
- //txSyncPort= xml.parseInt();
- xml.parseInt();
- else if (tag == "rxSyncPort")
- //rxSyncPort= xml.parseInt();
- xml.parseInt();
- else if (tag == "mtctype")
- mtcType= xml.parseInt();
- else if (tag == "sendClockDelay")
- syncSendFirstClockDelay = xml.parseUInt();
- else if (tag == "extSync")
- extSyncFlag.setValue(xml.parseInt());
- else if (tag == "useJackTransport")
- {
- useJackTransport.setValue(xml.parseInt());
- }
- else if (tag == "jackTransportMaster")
- {
- jackTransportMaster = xml.parseInt();
- if(audioDevice)
- audioDevice->setMaster(jackTransportMaster);
- }
- else if (tag == "syncgentype") {
- // for compatibility
- //int syncGenType= xml.parseInt();
- //genMTCSync = syncGenType == 1;
- //genMCSync = syncGenType == 2;
- xml.parseInt();
- }
- else if (tag == "genMTCSync")
- //genMTCSync = xml.parseInt();
- xml.parseInt();
- else if (tag == "genMCSync")
- //genMCSync = xml.parseInt();
- xml.parseInt();
- else if (tag == "genMMC")
- //genMMC = xml.parseInt();
- xml.parseInt();
- else if (tag == "acceptMTC")
- //acceptMTC = xml.parseInt();
- xml.parseInt();
- else if (tag == "acceptMMC")
- //acceptMMC = xml.parseInt();
- xml.parseInt();
- else if (tag == "acceptMC")
- //acceptMC = xml.parseInt();
- xml.parseInt();
- else if (tag == "mtcoffset") {
- QString qs(xml.parse1());
- QByteArray ba = qs.toLatin1();
- const char* str = ba.constData();
- int h, m, s, f, sf;
- sscanf(str, "%d:%d:%d:%d:%d", &h, &m, &s, &f, &sf);
- mtcOffset = MTC(h, m, s, f, sf);
- }
//else if (tag == "midiSyncInfo")
// readConfigMidiSyncInfo(xml);
+ /* Obsolete. FINDMICH flo93
+ else if (tag == "arranger") {
+ if (MusEGlobal::muse && MusEGlobal::muse->arranger())
+ MusEGlobal::muse->arranger()->readStatus(xml);
+ else
+ xml.skip(tag);
+ }
+ */
else if (tag == "drumedit")
DrumEdit::readConfiguration(xml);
else if (tag == "pianoroll")
@@ -918,12 +897,7 @@ void readConfiguration(Xml& xml, bool readOnlySequencer)
MarkerView::readConfiguration(xml);
else if (tag == "arrangerview")
MusEArranger::ArrangerView::readConfiguration(xml);
- else if (tag == "arranger") {
- if (MusEGlobal::muse && MusEGlobal::muse->arranger())
- MusEGlobal::muse->arranger()->readStatus(xml);
- else
- xml.skip(tag);
- }
+
else if (tag == "dialogs")
read_function_dialog_config(xml);
else if (tag == "shortcuts")
@@ -932,12 +906,6 @@ void readConfiguration(Xml& xml, bool readOnlySequencer)
MusEConfig::config.division = xml.parseInt();
else if (tag == "guiDivision")
MusEConfig::config.guiDivision = xml.parseInt();
- else if (tag == "samplerate")
- xml.parseInt();
- else if (tag == "segmentsize")
- xml.parseInt();
- else if (tag == "segmentcount")
- xml.parseInt();
else if (tag == "rtcTicks")
MusEConfig::config.rtcTicks = xml.parseInt();
else if (tag == "minMeter")
@@ -964,10 +932,6 @@ void readConfiguration(Xml& xml, bool readOnlySequencer)
MusEConfig::config.guiRefresh = xml.parseInt();
else if (tag == "userInstrumentsDir")
MusEConfig::config.userInstrumentsDir = xml.parse1();
- else if (tag == "midiTransform")
- readMidiTransform(xml);
- else if (tag == "midiInputTransform")
- readMidiInputTransform(xml);
else if (tag == "startMode")
MusEConfig::config.startMode = xml.parseInt();
else if (tag == "startSong")
@@ -981,6 +945,57 @@ void readConfiguration(Xml& xml, bool readOnlySequencer)
else if (tag == "popupsDefaultStayOpen")
MusEConfig::config.popupsDefaultStayOpen = xml.parseInt();
+ // ---- the following only skips obsolete entries ----
+ else if ((tag == "arranger") || (tag == "geometryPianoroll") || (tag == "geometryDrumedit"))
+ xml.skip(tag);
+ else if (tag == "markerVisible")
+ //MusEConfig::config.markerVisible = xml.parseInt(); //Obsolete FINDMICH flo93
+ xml.skip(tag);
+ else if (tag == "mixerVisible")
+ // MusEConfig::config.mixerVisible = xml.parseInt(); // Obsolete
+ xml.skip(tag);
+ else if (tag == "geometryMixer")
+ // MusEConfig::config.geometryMixer = readGeometry(xml, tag); // Obsolete
+ xml.skip(tag);
+ else if (tag == "txDeviceId")
+ //txDeviceId = xml.parseInt();
+ xml.parseInt();
+ else if (tag == "rxDeviceId")
+ //rxDeviceId = xml.parseInt();
+ xml.parseInt();
+ else if (tag == "txSyncPort")
+ //txSyncPort= xml.parseInt();
+ xml.parseInt();
+ else if (tag == "rxSyncPort")
+ //rxSyncPort= xml.parseInt();
+ xml.parseInt();
+ else if (tag == "syncgentype") {
+ // for compatibility
+ //int syncGenType= xml.parseInt();
+ //genMTCSync = syncGenType == 1;
+ //genMCSync = syncGenType == 2;
+ xml.parseInt();
+ }
+ else if (tag == "genMTCSync")
+ //genMTCSync = xml.parseInt();
+ xml.parseInt();
+ else if (tag == "genMCSync")
+ //genMCSync = xml.parseInt();
+ xml.parseInt();
+ else if (tag == "genMMC")
+ //genMMC = xml.parseInt();
+ xml.parseInt();
+ else if (tag == "acceptMTC")
+ //acceptMTC = xml.parseInt();
+ xml.parseInt();
+ else if (tag == "acceptMMC")
+ //acceptMMC = xml.parseInt();
+ xml.parseInt();
+ else if (tag == "acceptMC")
+ //acceptMC = xml.parseInt();
+ xml.parseInt();
+ else if ((tag == "samplerate") || (tag == "segmentsize") || (tag == "segmentcount"))
+ xml.parseInt();
else
xml.unknown("configuration");
break;
@@ -1039,7 +1054,7 @@ bool readConfiguration()
else if (skipmode)
break;
else if (tag == "configuration")
- readConfiguration(xml,false);
+ readConfiguration(xml,false, true /* read global config as well */);
else
xml.unknown("muse config");
break;
@@ -1335,8 +1350,6 @@ void MusE::writeGlobalConfiguration(int level, Xml& xml) const
xml.qrectTag(level, "geometryMain", MusEConfig::config.geometryMain);
xml.qrectTag(level, "geometryTransport", MusEConfig::config.geometryTransport);
xml.qrectTag(level, "geometryBigTime", MusEConfig::config.geometryBigTime);
- xml.qrectTag(level, "geometryPianoroll", MusEConfig::config.geometryPianoroll);
- xml.qrectTag(level, "geometryDrumedit", MusEConfig::config.geometryDrumedit);
//xml.qrectTag(level, "geometryMixer", MusEConfig::config.geometryMixer); // Obsolete
xml.intTag(level, "bigtimeVisible", MusEConfig::config.bigTimeVisible);
@@ -1463,10 +1476,10 @@ void MusE::writeConfiguration(int level, Xml& xml) const
xml.intTag(level, "bigtimeVisible", viewBigtimeAction->isChecked());
xml.intTag(level, "transportVisible", viewTransportAction->isChecked());
- xml.intTag(level, "markerVisible", viewMarkerAction->isChecked());
+ //xml.intTag(level, "markerVisible", viewMarkerAction->isChecked()); // Obsolete. FINDMICH flo93
//xml.intTag(level, "mixerVisible", menuView->isItemChecked(aid1)); // Obsolete
- xml.geometryTag(level, "geometryMain", this);
+ // xml.geometryTag(level, "geometryMain", this); // Obsolete. FINDMICH flo93
if (transport)
xml.geometryTag(level, "geometryTransport", transport);
if (bigtime)
@@ -1483,15 +1496,9 @@ void MusE::writeConfiguration(int level, Xml& xml) const
//mixer2->write(level, xml, "mixer2");
mixer2->write(level, xml);
- _arranger->writeStatus(level, xml);
+ //_arranger->writeStatus(level, xml); // Obsolete. FINDMICH flo93
writeSeqConfiguration(level, xml, true);
- DrumEdit::writeConfiguration(level, xml);
- PianoRoll::writeConfiguration(level, xml);
- ScoreEdit::write_configuration(level, xml);
- MasterEdit::writeConfiguration(level, xml);
- WaveEdit::writeConfiguration(level, xml);
-
write_function_dialog_config(level, xml);
writeMidiTransforms(level, xml);
diff --git a/muse2/muse/conf.h b/muse2/muse/conf.h
index 25cba677..4190b671 100644
--- a/muse2/muse/conf.h
+++ b/muse2/muse/conf.h
@@ -48,6 +48,6 @@ class MidiFileConfig : public QDialog, public Ui::ConfigMidiFileBase {
class Xml;
extern bool readConfiguration();
-extern void readConfiguration(Xml&, bool readOnlySequencer);
+extern void readConfiguration(Xml&, bool readOnlySequencer, bool doReadGlobalConfig);
#endif
diff --git a/muse2/muse/gconfig.cpp b/muse2/muse/gconfig.cpp
index 7d6dcde6..354e4cbc 100644
--- a/muse2/muse/gconfig.cpp
+++ b/muse2/muse/gconfig.cpp
@@ -144,8 +144,6 @@ GlobalConfigValues config = {
QRect(0, 0, 400, 300), // GeometryMain;
QRect(0, 0, 200, 100), // GeometryTransport;
QRect(0, 0, 600, 200), // GeometryBigTime;
- QRect(0, 0, 400, 300), // GeometryPianoroll;
- QRect(0, 0, 400, 300), // GeometryDrumedit;
//QRect(0, 0, 300, 500), // GeometryMixer; // Obsolete
{
QString("Mixer A"),
diff --git a/muse2/muse/gconfig.h b/muse2/muse/gconfig.h
index 1801df5f..f50984f8 100644
--- a/muse2/muse/gconfig.h
+++ b/muse2/muse/gconfig.h
@@ -126,8 +126,6 @@ struct GlobalConfigValues {
QRect geometryMain;
QRect geometryTransport;
QRect geometryBigTime;
- QRect geometryPianoroll;
- QRect geometryDrumedit;
// QRect geometryMixer;
MixerConfig mixer1;
MixerConfig mixer2;
diff --git a/muse2/muse/midiedit/scoreedit.cpp b/muse2/muse/midiedit/scoreedit.cpp
index 491cbc3e..9637334e 100644
--- a/muse2/muse/midiedit/scoreedit.cpp
+++ b/muse2/muse/midiedit/scoreedit.cpp
@@ -4586,6 +4586,7 @@ void ScoreCanvas::add_new_parts(const std::map< Part*, std::set<Part*> >& param)
* o cakewalk-mode is ignored when saving config
*
* CURRENT TODO
+ * o drum editor has "clef column"
* ! o fix sigedit boxes (see also "important todo")
* o ticks-to-quarter spinboxes
* o newly created windows have to be focussed!
diff --git a/muse2/muse/songfile.cpp b/muse2/muse/songfile.cpp
index 2763f1b6..344ecc89 100644
--- a/muse2/muse/songfile.cpp
+++ b/muse2/muse/songfile.cpp
@@ -1247,9 +1247,9 @@ void MusE::read(Xml& xml, bool skipConfig, bool isTemplate)
else if (tag == "configuration")
if (skipConfig)
//xml.skip(tag);
- readConfiguration(xml,true /* only read sequencer settings */);
+ readConfiguration(xml,true /* only read sequencer settings */, false /* do NOT read global settings */);
else
- readConfiguration(xml, false);
+ readConfiguration(xml, false, false /* do NOT read global settings */);
else if (tag == "song")
{
song->read(xml, isTemplate);