summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--muse/ChangeLog3
-rw-r--r--muse/muse/app.cpp133
-rw-r--r--muse/muse/app.h20
-rw-r--r--muse/muse/audio.cpp43
-rw-r--r--muse/muse/conf.cpp137
-rw-r--r--muse/muse/driver/jack.cpp10
-rw-r--r--muse/muse/event.cpp2
-rw-r--r--muse/muse/gconfig.cpp18
-rw-r--r--muse/muse/gconfig.h34
-rw-r--r--muse/muse/globals.cpp2
-rw-r--r--muse/muse/globals.h2
-rw-r--r--muse/muse/mixer/amixer.cpp272
-rw-r--r--muse/muse/mixer/amixer.h33
-rw-r--r--muse/muse/seqmsg.cpp4
-rw-r--r--muse/muse/shortcuts.cpp4
-rw-r--r--muse/muse/shortcuts.h1
-rw-r--r--muse/muse/song.cpp4
-rw-r--r--muse/muse/widgets/genset.cpp88
-rw-r--r--muse/muse/widgets/genset.h1
-rw-r--r--muse/muse/widgets/gensetbase.ui119
-rw-r--r--muse/muse/widgets/musewidgetsplug.cpp18
21 files changed, 844 insertions, 104 deletions
diff --git a/muse/ChangeLog b/muse/ChangeLog
index 7379985d..3815497f 100644
--- a/muse/ChangeLog
+++ b/muse/ChangeLog
@@ -1,3 +1,6 @@
+17.01.2010
+ * Feature: MusE now has two mixers, with selectable track type display. (T356)
+ - Changes to .med file were needed. Tested OK so far with old and new song files.
12.01.2010
* Release: 1.0.1 (rj)
10.01.2010
diff --git a/muse/muse/app.cpp b/muse/muse/app.cpp
index d8fe90a8..ea294823 100644
--- a/muse/muse/app.cpp
+++ b/muse/muse/app.cpp
@@ -782,7 +782,9 @@ MusE::MusE(int argc, char** argv) : QMainWindow(0, "mainwindow")
midiTransformerDialog = 0;
shortcutConfig = 0;
appearance = 0;
- audioMixer = 0;
+ //audioMixer = 0;
+ mixer1 = 0;
+ mixer2 = 0;
watchdogThread = 0;
editInstrument = 0;
@@ -1110,10 +1112,15 @@ MusE::MusE(int argc, char** argv) : QMainWindow(0, "mainwindow")
QIconSet(*view_transport_windowIcon), tr("Transport Panel"), this, SLOT(toggleTransport()), 0);
bt_id = menuView->insertItem(
QIconSet(*view_bigtime_windowIcon), tr("Bigtime window"), this, SLOT(toggleBigTime()), 0);
- aid1 = menuView->insertItem(
- QIconSet(*mixerSIcon), tr("Mixer"), this, SLOT(toggleMixer()), 0);
-// aid2 = menuView->insertItem(
-// QIconSet(*cliplistSIcon), tr("Cliplist"), this, SLOT(startClipList()), 0);
+ //aid1 = menuView->insertItem(
+ // QIconSet(*mixerSIcon), tr("Mixer"), this, SLOT(toggleMixer()), 0);
+ aid1a = menuView->insertItem(
+ QIconSet(*mixerSIcon), tr("Mixer A"), this, SLOT(toggleMixer1()), 0);
+ aid1b = menuView->insertItem(
+ QIconSet(*mixerSIcon), tr("Mixer B"), this, SLOT(toggleMixer2()), 0);
+ // p3.2.24
+ aid2 = menuView->insertItem(
+ QIconSet(*cliplistSIcon), tr("Cliplist"), this, SLOT(startClipList()), 0);
mr_id = menuView->insertItem(
QIconSet(*view_markerIcon), tr("Marker View"), this, SLOT(toggleMarker()), 0);
//markerAction->addTo(menuView);
@@ -1445,8 +1452,12 @@ void MusE::loadProjectFile(const QString& name, bool songTemplate, bool loadAll)
void MusE::loadProjectFile1(const QString& name, bool songTemplate, bool loadAll)
{
- if (audioMixer)
- audioMixer->clear();
+ //if (audioMixer)
+ // audioMixer->clear();
+ if (mixer1)
+ mixer1->clear();
+ if (mixer2)
+ mixer2->clear();
arranger->clear(); // clear track info
if (clearSong())
return;
@@ -1519,7 +1530,9 @@ void MusE::loadProjectFile1(const QString& name, bool songTemplate, bool loadAll
if (loadAll) {
showBigtime(config.bigTimeVisible);
- showMixer(config.mixerVisible);
+ //showMixer(config.mixerVisible);
+ showMixer1(config.mixer1Visible);
+ showMixer2(config.mixer1Visible);
showMarker(config.markerVisible);
resize(config.geometryMain.size());
move(config.geometryMain.topLeft());
@@ -2231,8 +2244,14 @@ void MusE::kbAccel(int key)
else if (key == shortcuts[SHRT_OPEN_BIGTIME].key) {
toggleBigTime();
}
+ //else if (key == shortcuts[SHRT_OPEN_MIXER].key) {
+ // toggleMixer();
+ // }
else if (key == shortcuts[SHRT_OPEN_MIXER].key) {
- toggleMixer();
+ toggleMixer1();
+ }
+ else if (key == shortcuts[SHRT_OPEN_MIXER2].key) {
+ toggleMixer2();
}
else if (key == shortcuts[SHRT_NEXT_MARKER].key) {
if (markerView)
@@ -3655,7 +3674,9 @@ void MusE::updateConfiguration()
menuView->setAccel(shortcuts[SHRT_OPEN_TRANSPORT].key, tr_id);
menuView->setAccel(shortcuts[SHRT_OPEN_BIGTIME].key, bt_id);
- menuView->setAccel(shortcuts[SHRT_OPEN_MIXER].key, aid1);
+ //menuView->setAccel(shortcuts[SHRT_OPEN_MIXER].key, aid1);
+ menuView->setAccel(shortcuts[SHRT_OPEN_MIXER].key, aid1a);
+ menuView->setAccel(shortcuts[SHRT_OPEN_MIXER2].key, aid1b);
// menuView->setAccel(shortcuts[SHRT_OPEN_CLIPS].key, aid2);
// markerAction->setAccel(shortcuts[SHRT_OPEN_MARKER].key );
menuView->setAccel(shortcuts[SHRT_OPEN_MARKER].key, mr_id );
@@ -3754,6 +3775,7 @@ void MusE::bigtimeClosed()
// showMixer
//---------------------------------------------------------
+/*
void MusE::showMixer(bool on)
{
if (on && audioMixer == 0) {
@@ -3766,26 +3788,107 @@ void MusE::showMixer(bool on)
audioMixer->setShown(on);
menuView->setItemChecked(aid1, on);
}
+*/
+
+//---------------------------------------------------------
+// showMixer1
+//---------------------------------------------------------
+
+void MusE::showMixer1(bool on)
+ {
+ if (on && mixer1 == 0) {
+ mixer1 = new AudioMixerApp(this, &(config.mixer1));
+ connect(mixer1, SIGNAL(closed()), SLOT(mixer1Closed()));
+ mixer1->resize(config.mixer1.geometry.size());
+ mixer1->move(config.mixer1.geometry.topLeft());
+ }
+ if (mixer1)
+ mixer1->setShown(on);
+ menuView->setItemChecked(aid1a, on);
+ }
+
+//---------------------------------------------------------
+// showMixer2
+//---------------------------------------------------------
+
+void MusE::showMixer2(bool on)
+ {
+ if (on && mixer2 == 0) {
+ mixer2 = new AudioMixerApp(this, &(config.mixer2));
+ connect(mixer2, SIGNAL(closed()), SLOT(mixer2Closed()));
+ mixer2->resize(config.mixer2.geometry.size());
+ mixer2->move(config.mixer2.geometry.topLeft());
+ }
+ if (mixer2)
+ mixer2->setShown(on);
+ menuView->setItemChecked(aid1b, on);
+ }
//---------------------------------------------------------
// toggleMixer
//---------------------------------------------------------
+/*
void MusE::toggleMixer()
{
showMixer(!menuView->isItemChecked(aid1));
}
+*/
+
+//---------------------------------------------------------
+// toggleMixer1
+//---------------------------------------------------------
+
+void MusE::toggleMixer1()
+ {
+ showMixer1(!menuView->isItemChecked(aid1a));
+ }
+
+//---------------------------------------------------------
+// toggleMixer2
+//---------------------------------------------------------
+
+void MusE::toggleMixer2()
+ {
+ showMixer2(!menuView->isItemChecked(aid1b));
+ }
//---------------------------------------------------------
// mixerClosed
//---------------------------------------------------------
+/*
void MusE::mixerClosed()
{
menuView->setItemChecked(aid1, false);
}
+*/
+
+//---------------------------------------------------------
+// mixer1Closed
+//---------------------------------------------------------
+
+void MusE::mixer1Closed()
+ {
+ //aid1a->setChecked(false);
+ menuView->setItemChecked(aid1a, false);
+ }
+
+//---------------------------------------------------------
+// mixer2Closed
+//---------------------------------------------------------
+
+void MusE::mixer2Closed()
+ {
+ //aid1b->setChecked(false);
+ menuView->setItemChecked(aid1b, false);
+ }
+
+
+//QWidget* MusE::mixerWindow() { return audioMixer; }
+QWidget* MusE::mixer1Window() { return mixer1; }
+QWidget* MusE::mixer2Window() { return mixer2; }
-QWidget* MusE::mixerWindow() { return audioMixer; }
QWidget* MusE::transportWindow() { return transport; }
QWidget* MusE::bigtimeWindow() { return bigtime; }
@@ -3795,8 +3898,12 @@ QWidget* MusE::bigtimeWindow() { return bigtime; }
void MusE::focusInEvent(QFocusEvent* ev)
{
- if (audioMixer)
- audioMixer->raise();
+ //if (audioMixer)
+ // audioMixer->raise();
+ if (mixer1)
+ mixer1->raise();
+ if (mixer2)
+ mixer2->raise();
raise();
QMainWindow::focusInEvent(ev);
}
diff --git a/muse/muse/app.h b/muse/muse/app.h
index ac8bd2aa..6fb5add4 100644
--- a/muse/muse/app.h
+++ b/muse/muse/app.h
@@ -106,7 +106,7 @@ class MusE : public QMainWindow
QPopupMenu* menu_functions, *menuScriptPlugins;
QPopupMenu* select, *master, *midiEdit, *addTrack;
- int aid1, aid2, aid3, autoId;
+ int aid1a, aid1b, aid2, aid3, autoId;
int tr_id, bt_id, mr_id;
int cc_id;
QPopupMenu* follow;
@@ -127,6 +127,8 @@ class MusE : public QMainWindow
MidiInputTransformDialog* midiInputTransform;
ShortcutConfig* shortcutConfig;
Appearance* appearance;
+ AudioMixerApp* mixer1;
+ AudioMixerApp* mixer2;
ToplevelList toplevels;
ClipListEdit* clipListEdit;
@@ -183,7 +185,9 @@ class MusE : public QMainWindow
void toggleTransport();
void toggleMarker();
void toggleBigTime();
- void toggleMixer();
+ //void toggleMixer();
+ void toggleMixer1();
+ void toggleMixer2();
void configMidiPorts();
void configMidiSync();
@@ -247,7 +251,9 @@ class MusE : public QMainWindow
void takeAutomationSnapshot();
void clearAutomation();
void bigtimeClosed();
- void mixerClosed();
+ //void mixerClosed();
+ void mixer1Closed();
+ void mixer2Closed();
void markerClosed();
void execDeliveredScript(int);
@@ -264,7 +270,9 @@ class MusE : public QMainWindow
bool seqRestart();
void loadTemplate();
void showBigtime(bool);
- void showMixer(bool);
+ //void showMixer(bool);
+ void showMixer1(bool);
+ void showMixer2(bool);
void showMarker(bool);
void importMidi(const QString &file);
void setUsedTool(int);
@@ -282,7 +290,9 @@ class MusE : public QMainWindow
bool seqStart();
void setHeartBeat();
void importController(int, MidiPort*, int);
- QWidget* mixerWindow();
+ //QWidget* mixerWindow();
+ QWidget* mixer1Window();
+ QWidget* mixer2Window();
QWidget* transportWindow();
QWidget* bigtimeWindow();
bool importWaveToTrack(QString& name, unsigned tick=0, Track* track=NULL);
diff --git a/muse/muse/audio.cpp b/muse/muse/audio.cpp
index 153b5a2b..dab1be16 100644
--- a/muse/muse/audio.cpp
+++ b/muse/muse/audio.cpp
@@ -227,6 +227,9 @@ void Audio::stop(bool)
bool Audio::sync(int jackState, unsigned frame)
{
+
+// Changed by Tim. p3.3.24
+/*
// Added by Tim. p3.3.20
if(debugMsg)
printf("Audio::sync state %s jackState %s frame %d\n", audioStates[state], audioStates[jackState], frame);
@@ -250,6 +253,39 @@ bool Audio::sync(int jackState, unsigned frame)
// printf("Audio::sync done:%d state %s\n", done, audioStates[state]);
return done;
+*/
+ bool done = true;
+ if (state == LOOP1)
+ state = LOOP2;
+ else {
+ State s = State(jackState);
+ //
+ // STOP -> START_PLAY start rolling
+ // STOP -> STOP seek in stop state
+ // PLAY -> START_PLAY seek in play state
+
+ if (state != START_PLAY) {
+ //Pos p(frame, AL::FRAMES);
+ // seek(p);
+ Pos p(frame, false);
+ seek(p);
+ if (!_freewheel)
+ done = audioPrefetch->seekDone();
+ if (s == START_PLAY)
+ state = START_PLAY;
+ }
+ else {
+ //if (frame != _seqTime.pos.frame()) {
+ if (frame != _pos.frame()) {
+ // seek during seek
+ //seek(Pos(frame, AL::FRAMES));
+ seek(Pos(frame, false));
+ }
+ done = audioPrefetch->seekDone();
+ }
+ }
+ return done;
+
}
//---------------------------------------------------------
@@ -719,10 +755,13 @@ void Audio::processMsg(AudioMsg* msg)
void Audio::seek(const Pos& p)
{
if (_pos == p) {
- printf("seek: already there\n");
- return;
+ if(debugMsg)
+ printf("Audio::seek already there\n");
+ return;
}
+ // p3.3.23
+ //printf("Audio::seek frame:%d\n", p.frame());
_pos = p;
if (!checkAudioDevice()) return;
syncFrame = audioDevice->framePos();
diff --git a/muse/muse/conf.cpp b/muse/muse/conf.cpp
index 13ef712c..efcad4dc 100644
--- a/muse/muse/conf.cpp
+++ b/muse/muse/conf.cpp
@@ -455,6 +455,7 @@ static void readSeqConfiguration(Xml& xml)
void readConfiguration(Xml& xml, bool readOnlySequencer)
{
+ int mixers = 0;
for (;;) {
Xml::Token token = xml.parse();
if (token == Xml::Error || token == Xml::End)
@@ -592,8 +593,15 @@ void readConfiguration(Xml& xml, bool readOnlySequencer)
config.transportVisible = xml.parseInt();
else if (tag == "markerVisible")
config.markerVisible = xml.parseInt();
+
else if (tag == "mixerVisible")
- config.mixerVisible = xml.parseInt();
+ // config.mixerVisible = xml.parseInt(); // Obsolete
+ xml.skip(tag);
+ else if (tag == "mixer1Visible")
+ config.mixer1Visible = xml.parseInt();
+ else if (tag == "mixer2Visible")
+ config.mixer2Visible = xml.parseInt();
+
else if (tag == "showSplashScreen")
config.showSplashScreen = xml.parseInt();
else if (tag == "canvasShowPartType")
@@ -614,8 +622,23 @@ void readConfiguration(Xml& xml, bool readOnlySequencer)
config.geometryPianoroll = readGeometry(xml, tag);
else if (tag == "geometryDrumedit")
config.geometryDrumedit = readGeometry(xml, tag);
+
else if (tag == "geometryMixer")
- config.geometryMixer = readGeometry(xml, tag);
+ // config.geometryMixer = readGeometry(xml, tag); // Obsolete
+ xml.skip(tag);
+ //else if (tag == "mixer1")
+ // config.mixer1.read(xml);
+ //else if (tag == "mixer2")
+ // config.mixer2.read(xml);
+ else if (tag == "Mixer")
+ {
+ if(mixers == 0)
+ config.mixer1.read(xml);
+ else
+ config.mixer2.read(xml);
+ ++mixers;
+ }
+
else if (tag == "bigtimeForegroundcolor")
config.bigTimeForegroundColor = readColor(xml);
else if (tag == "bigtimeBackgroundcolor")
@@ -1075,11 +1098,18 @@ void MusE::writeGlobalConfiguration(int level, Xml& xml) const
xml.qrectTag(level, "geometryBigTime", config.geometryBigTime);
xml.qrectTag(level, "geometryPianoroll", config.geometryPianoroll);
xml.qrectTag(level, "geometryDrumedit", config.geometryDrumedit);
- xml.qrectTag(level, "geometryMixer", config.geometryMixer);
+ //xml.qrectTag(level, "geometryMixer", config.geometryMixer); // Obsolete
xml.intTag(level, "bigtimeVisible", config.bigTimeVisible);
xml.intTag(level, "transportVisible", config.transportVisible);
- xml.intTag(level, "mixerVisible", config.mixerVisible);
+
+ //xml.intTag(level, "mixerVisible", config.mixerVisible); // Obsolete
+ xml.intTag(level, "mixer1Visible", config.mixer1Visible);
+ xml.intTag(level, "mixer2Visible", config.mixer2Visible);
+ //config.mixer1.write(level, xml, "mixer1");
+ //config.mixer2.write(level, xml, "mixer2");
+ config.mixer1.write(level, xml);
+ config.mixer2.write(level, xml);
xml.intTag(level, "showSplashScreen", config.showSplashScreen);
xml.intTag(level, "canvasShowPartType", config.canvasShowPartType);
@@ -1175,15 +1205,24 @@ void MusE::writeConfiguration(int level, Xml& xml) const
xml.intTag(level, "bigtimeVisible", menuView->isItemChecked(bt_id));
xml.intTag(level, "transportVisible", menuView->isItemChecked(tr_id));
xml.intTag(level, "markerVisible", menuView->isItemChecked(mr_id));
- xml.intTag(level, "mixerVisible", menuView->isItemChecked(aid1));
+ //xml.intTag(level, "mixerVisible", menuView->isItemChecked(aid1)); // Obsolete
xml.geometryTag(level, "geometryMain", this);
if (transport)
xml.geometryTag(level, "geometryTransport", transport);
if (bigtime)
xml.geometryTag(level, "geometryBigTime", bigtime);
- if (audioMixer)
- xml.geometryTag(level, "geometryMixer", audioMixer);
+
+ //if (audioMixer)
+ // xml.geometryTag(level, "geometryMixer", audioMixer); // Obsolete
+ xml.intTag(level, "mixer1Visible", menuView->isItemChecked(aid1a));
+ xml.intTag(level, "mixer2Visible", menuView->isItemChecked(aid1b));
+ if (mixer1)
+ //mixer1->write(level, xml, "mixer1");
+ mixer1->write(level, xml);
+ if (mixer2)
+ //mixer2->write(level, xml, "mixer2");
+ mixer2->write(level, xml);
arranger->writeStatus(level, xml);
writeSeqConfiguration(level, xml, true);
@@ -1314,3 +1353,87 @@ void MusE::configGlobalSettings()
}
+//---------------------------------------------------------
+// write
+//---------------------------------------------------------
+
+//void MixerConfig::write(Xml& xml, const char* name)
+void MixerConfig::write(int level, Xml& xml)
+//void MixerConfig::write(int level, Xml& xml, const char* name)
+ {
+ //xml.stag(QString(name));
+ //xml.tag(level++, name.latin1());
+ xml.tag(level++, "Mixer");
+ //xml.tag(level++, name);
+
+ xml.strTag(level, "name", name);
+
+ //xml.tag("geometry", geometry);
+ xml.qrectTag(level, "geometry", geometry);
+
+ xml.intTag(level, "showMidiTracks", showMidiTracks);
+ xml.intTag(level, "showDrumTracks", showDrumTracks);
+ xml.intTag(level, "showInputTracks", showInputTracks);
+ xml.intTag(level, "showOutputTracks", showOutputTracks);
+ xml.intTag(level, "showWaveTracks", showWaveTracks);
+ xml.intTag(level, "showGroupTracks", showGroupTracks);
+ xml.intTag(level, "showAuxTracks", showAuxTracks);
+ xml.intTag(level, "showSyntiTracks", showSyntiTracks);
+
+ //xml.etag(name);
+ //xml.etag(level, name.latin1());
+ xml.etag(level, "Mixer");
+ //xml.etag(level, name);
+ }
+
+//---------------------------------------------------------
+// read
+//---------------------------------------------------------
+
+//void MixerConfig::read(QDomNode node)
+void MixerConfig::read(Xml& xml)
+//void MixerConfig::read(Xml& xml, const QString& name)
+ {
+ for (;;) {
+ Xml::Token token(xml.parse());
+ const QString& tag(xml.s1());
+ switch (token) {
+ case Xml::Error:
+ case Xml::End:
+ return;
+ case Xml::TagStart:
+ if (tag == "name")
+ name = xml.parse1();
+ else if (tag == "geometry")
+ geometry = readGeometry(xml, tag);
+ else if (tag == "showMidiTracks")
+ showMidiTracks = xml.parseInt();
+ else if (tag == "showDrumTracks")
+ showDrumTracks = xml.parseInt();
+ else if (tag == "showInputTracks")
+ showInputTracks = xml.parseInt();
+ else if (tag == "showOutputTracks")
+ showOutputTracks = xml.parseInt();
+ else if (tag == "showWaveTracks")
+ showWaveTracks = xml.parseInt();
+ else if (tag == "showGroupTracks")
+ showGroupTracks = xml.parseInt();
+ else if (tag == "showAuxTracks")
+ showAuxTracks = xml.parseInt();
+ else if (tag == "showSyntiTracks")
+ showSyntiTracks = xml.parseInt();
+ else
+ //xml.unknown(name.latin1());
+ xml.unknown("Mixer");
+ break;
+ case Xml::TagEnd:
+ //if (tag == name)
+ if (tag == "Mixer")
+ return;
+ default:
+ break;
+ }
+ }
+
+ }
+
diff --git a/muse/muse/driver/jack.cpp b/muse/muse/driver/jack.cpp
index 6a2c7e8a..859cab91 100644
--- a/muse/muse/driver/jack.cpp
+++ b/muse/muse/driver/jack.cpp
@@ -168,7 +168,13 @@ static int processSync(jack_transport_state_t state, jack_position_t* pos, void*
// Added by Tim. p3.3.6
//printf("processSync valid:%d frame:%d\n", pos->valid, frame);
- return audio->sync(audioState, frame);
+ // p3.3.23
+ //printf("Jack processSync() before audio->sync frame:%d\n", frame);
+ //return audio->sync(audioState, frame);
+ int rv = audio->sync(audioState, frame);
+ // p3.3.23
+ //printf("Jack processSync() after audio->sync frame:%d\n", frame);
+ return rv;
}
//---------------------------------------------------------
@@ -603,7 +609,7 @@ void JackAudioDevice::registerClient()
// Added by Tim. p3.3.20
// Did not help. Seek during play: Jack keeps switching to STOP state after about 1-2 seconds timeout if sync is holding it up.
// Nothing in MusE seems to be telling it to stop.
- //jack_set_sync_timeout(_client, 5000000); // Change default 2 to 5 second sync timeout because prefetch may be very slow esp. with resampling !
+ jack_set_sync_timeout(_client, 5000000); // Change default 2 to 5 second sync timeout because prefetch may be very slow esp. with resampling !
jack_on_shutdown(_client, processShutdown, 0);
jack_set_buffer_size_callback(_client, bufsize_callback, 0);
diff --git a/muse/muse/event.cpp b/muse/muse/event.cpp
index 16a5c581..5e5398fe 100644
--- a/muse/muse/event.cpp
+++ b/muse/muse/event.cpp
@@ -16,7 +16,7 @@
//#include "globals.h"
// Added by Tim. p3.3.20
-#define USE_SAMPLERATE
+//#define USE_SAMPLERATE
//---------------------------------------------------------
// Event
diff --git a/muse/muse/gconfig.cpp b/muse/muse/gconfig.cpp
index 659273cb..1fed425e 100644
--- a/muse/muse/gconfig.cpp
+++ b/muse/muse/gconfig.cpp
@@ -96,10 +96,24 @@ GlobalConfigValues config = {
QRect(0, 0, 600, 200), // GeometryBigTime;
QRect(0, 0, 400, 300), // GeometryPianoroll;
QRect(0, 0, 400, 300), // GeometryDrumedit;
- QRect(0, 0, 300, 500), // GeometryMixer;
+ //QRect(0, 0, 300, 500), // GeometryMixer; // Obsolete
+ {
+ QString("Mixer 1"),
+ QRect(0, 0, 300, 500), // Mixer1
+ true, true, true, true,
+ true, true, true, true
+ },
+ {
+ QString("Mixer 2"),
+ QRect(200, 200, 300, 500), // Mixer2
+ true, true, true, true,
+ true, true, true, true
+ },
true, // TransportVisible;
false, // BigTimeVisible;
- false, // mixerVisible;
+ false, // mixer1Visible;
+ false, // mixer2Visible;
+
false, // markerVisible;
true, // showSplashScreen
1, // canvasShowPartType 1 - names, 2 events
diff --git a/muse/muse/gconfig.h b/muse/muse/gconfig.h
index 21bdc9d7..94789bd6 100644
--- a/muse/muse/gconfig.h
+++ b/muse/muse/gconfig.h
@@ -17,6 +17,32 @@
#define NUM_PARTCOLORS 17
#define NUM_FONTS 7
+class Xml;
+
+//---------------------------------------------------------
+// MixerConfig
+//---------------------------------------------------------
+
+struct MixerConfig {
+ QString name;
+ QRect geometry;
+ bool showMidiTracks;
+ bool showDrumTracks;
+ bool showInputTracks;
+ bool showOutputTracks;
+ bool showWaveTracks;
+ bool showGroupTracks;
+ bool showAuxTracks;
+ bool showSyntiTracks;
+
+ //void write(Xml&, const char* name);
+ //void write(int level, Xml& xml, const char* name);
+ void write(int level, Xml& xml);
+ //void read(QDomNode);
+ //void read(Xml& xml, const QString& name);
+ void read(Xml& xml);
+ };
+
//---------------------------------------------------------
// GlobalConfigValues
//---------------------------------------------------------
@@ -71,10 +97,14 @@ struct GlobalConfigValues {
QRect geometryBigTime;
QRect geometryPianoroll;
QRect geometryDrumedit;
- QRect geometryMixer;
+// QRect geometryMixer;
+ MixerConfig mixer1;
+ MixerConfig mixer2;
bool transportVisible;
bool bigTimeVisible;
- bool mixerVisible;
+// bool mixerVisible;
+ bool mixer1Visible;
+ bool mixer2Visible;
bool markerVisible;
bool showSplashScreen;
diff --git a/muse/muse/globals.cpp b/muse/muse/globals.cpp
index 200ff453..0bd63dec 100644
--- a/muse/muse/globals.cpp
+++ b/muse/muse/globals.cpp
@@ -157,7 +157,7 @@ QAction* punchoutAction;
QAction* recordAction;
QAction* panicAction;
-AudioMixerApp* audioMixer;
+//AudioMixerApp* audioMixer;
MusE* muse;
int preMeasures = 2;
diff --git a/muse/muse/globals.h b/muse/muse/globals.h
index 4fb2254f..ad3483d8 100644
--- a/muse/muse/globals.h
+++ b/muse/muse/globals.h
@@ -115,7 +115,7 @@ extern QAction* panicAction;
class AudioMixerApp;
class MusE;
-extern AudioMixerApp* audioMixer;
+//extern AudioMixerApp* audioMixer;
extern MusE* muse;
extern int preMeasures;
diff --git a/muse/muse/mixer/amixer.cpp b/muse/muse/mixer/amixer.cpp
index 6f79216a..9393f1c4 100644
--- a/muse/muse/mixer/amixer.cpp
+++ b/muse/muse/mixer/amixer.cpp
@@ -19,10 +19,15 @@
#include "astrip.h"
#include "mstrip.h"
+#include "gconfig.h"
+#include "xml.h"
+
extern void populateAddTrack(QPopupMenu* addTrack);
-typedef std::list<Strip*> StripList;
-static StripList stripList;
+#define __WIDTH_COMPENSATION 4
+
+//typedef std::list<Strip*> StripList;
+//static StripList stripList;
//---------------------------------------------------------
// AudioMixer
@@ -30,12 +35,17 @@ static StripList stripList;
// inputs | synthis | tracks | groups | master
//---------------------------------------------------------
-AudioMixerApp::AudioMixerApp(QWidget* parent)
+//AudioMixerApp::AudioMixerApp(QWidget* parent)
+AudioMixerApp::AudioMixerApp(QWidget* parent, MixerConfig* c)
: QMainWindow(parent, "mixer")
{
+ cfg = c;
oldAuxsSize = 0;
routingDialog = 0;
- setCaption(tr("MusE: Mixer"));
+ //setCaption(tr("MusE: Mixer"));
+ //name = cfg->name;
+ //setCaption(name);
+ setCaption(cfg->name);
QPopupMenu* menuConfig = new QPopupMenu(this);
menuBar()->insertItem(tr("&Create"), menuConfig);
@@ -45,6 +55,64 @@ AudioMixerApp::AudioMixerApp(QWidget* parent)
menuBar()->insertItem(tr("&View"), menuView);
routingId = menuView->insertItem(tr("Routing"), this, SLOT(toggleRouteDialog()));
+ menuView->insertSeparator();
+
+ QActionGroup* actionItems = new QActionGroup(this, "actionItems", false);
+
+ /*
+ showMidiTracksId = new QAction(tr("Show Midi Tracks"), 0, menuView);
+ showDrumTracksId = new QAction(tr("Show Drum Tracks"), 0, menuView);
+ showWaveTracksId = new QAction(tr("Show Wave Tracks"), 0, menuView);
+ */
+ showMidiTracksId = new QAction(tr("Show Midi Tracks"), 0, actionItems);
+ showDrumTracksId = new QAction(tr("Show Drum Tracks"), 0, actionItems);
+ showWaveTracksId = new QAction(tr("Show Wave Tracks"), 0, actionItems);
+ //showMidiTracksId->addTo(menuView);
+ //showDrumTracksId->addTo(menuView);
+ //showWaveTracksId->addTo(menuView);
+
+ //menuView->insertSeparator();
+ actionItems->addSeparator();
+
+ /*
+ showInputTracksId= new QAction(tr("Show Inputs"), 0, menuView);
+ showOutputTracksId = new QAction(tr("Show Outputs"), 0, menuView);
+ showGroupTracksId = new QAction(tr("Show Groups"), 0, menuView);
+ showAuxTracksId = new QAction(tr("Show Auxs"), 0, menuView);
+ showSyntiTracksId = new QAction(tr("Show Synthesizers"), 0, menuView);
+ */
+ showInputTracksId = new QAction(tr("Show Inputs"), 0, actionItems);
+ showOutputTracksId = new QAction(tr("Show Outputs"), 0, actionItems);
+ showGroupTracksId = new QAction(tr("Show Groups"), 0, actionItems);
+ showAuxTracksId = new QAction(tr("Show Auxs"), 0, actionItems);
+ showSyntiTracksId = new QAction(tr("Show Synthesizers"), 0, actionItems);
+ //showInputTracksId->addTo(menuView);
+ //showOutputTracksId->addTo(menuView);
+ //showGroupTracksId->addTo(menuView);
+ //showAuxTracksId->addTo(menuView);
+ //showSyntiTracksId->addTo(menuView);
+
+ showMidiTracksId->setToggleAction(true);
+ showDrumTracksId->setToggleAction(true);
+ showWaveTracksId->setToggleAction(true);
+ showInputTracksId->setToggleAction(true);
+ showOutputTracksId->setToggleAction(true);
+ showGroupTracksId->setToggleAction(true);
+ showAuxTracksId->setToggleAction(true);
+ showSyntiTracksId->setToggleAction(true);
+
+ //connect(menuView, SIGNAL(triggered(QAction*)), SLOT(showTracksChanged(QAction*)));
+ //connect(actionItems, SIGNAL(selected(QAction*)), this, SLOT(showTracksChanged(QAction*)));
+ connect(showMidiTracksId, SIGNAL(toggled(bool)), SLOT(showMidiTracksChanged(bool)));
+ connect(showDrumTracksId, SIGNAL(toggled(bool)), SLOT(showDrumTracksChanged(bool)));
+ connect(showWaveTracksId, SIGNAL(toggled(bool)), SLOT(showWaveTracksChanged(bool)));
+ connect(showInputTracksId, SIGNAL(toggled(bool)), SLOT(showInputTracksChanged(bool)));
+ connect(showOutputTracksId, SIGNAL(toggled(bool)), SLOT(showOutputTracksChanged(bool)));
+ connect(showGroupTracksId, SIGNAL(toggled(bool)), SLOT(showGroupTracksChanged(bool)));
+ connect(showAuxTracksId, SIGNAL(toggled(bool)), SLOT(showAuxTracksChanged(bool)));
+ connect(showSyntiTracksId, SIGNAL(toggled(bool)), SLOT(showSyntiTracksChanged(bool)));
+
+ actionItems->addTo(menuView);
view = new QScrollView(this);
setCentralWidget(view);
central = new QWidget(view);
@@ -113,6 +181,19 @@ void AudioMixerApp::clear()
void AudioMixerApp::updateMixer(UpdateAction action)
{
+ //name = cfg->name;
+ //setCaption(name);
+ setCaption(cfg->name);
+
+ showMidiTracksId->setOn(cfg->showMidiTracks);
+ showDrumTracksId->setOn(cfg->showDrumTracks);
+ showInputTracksId->setOn(cfg->showInputTracks);
+ showOutputTracksId->setOn(cfg->showOutputTracks);
+ showWaveTracksId->setOn(cfg->showWaveTracks);
+ showGroupTracksId->setOn(cfg->showGroupTracks);
+ showAuxTracksId->setOn(cfg->showAuxTracks);
+ showSyntiTracksId->setOn(cfg->showSyntiTracks);
+
int auxsSize = song->auxs()->size();
if ((action == UPDATE_ALL) || (auxsSize != oldAuxsSize)) {
clear();
@@ -137,10 +218,10 @@ void AudioMixerApp::updateMixer(UpdateAction action)
delete *ssi;
stripList.erase(ssi);
}
- setMaximumWidth(STRIP_WIDTH * stripList.size());
+ setMaximumWidth(STRIP_WIDTH * stripList.size() + __WIDTH_COMPENSATION);
// Added by Tim. p3.3.7
if (stripList.size() < 8)
- view->setMinimumWidth(stripList.size() * STRIP_WIDTH);
+ view->setMinimumWidth(stripList.size() * STRIP_WIDTH + __WIDTH_COMPENSATION);
return;
}
@@ -194,12 +275,14 @@ void AudioMixerApp::updateMixer(UpdateAction action)
MidiTrackList* mtl = song->midis();
for (iMidiTrack i = mtl->begin(); i != mtl->end(); ++i)
{
- addStrip(*i, idx++);
+ MidiTrack* mt = *i;
+ if((mt->type() == Track::MIDI && cfg->showMidiTracks) || (mt->type() == Track::DRUM && cfg->showDrumTracks))
+ addStrip(*i, idx++);
}
- setMaximumWidth(STRIP_WIDTH * stripList.size());
+ setMaximumWidth(STRIP_WIDTH * stripList.size() + __WIDTH_COMPENSATION);
if (stripList.size() < 8)
- view->setMinimumWidth(stripList.size() * STRIP_WIDTH);
+ view->setMinimumWidth(stripList.size() * STRIP_WIDTH + __WIDTH_COMPENSATION);
return;
}
@@ -208,26 +291,35 @@ void AudioMixerApp::updateMixer(UpdateAction action)
// generate Input Strips
//---------------------------------------------------
- InputList* itl = song->inputs();
- for (iAudioInput i = itl->begin(); i != itl->end(); ++i)
+ if(cfg->showInputTracks)
+ {
+ InputList* itl = song->inputs();
+ for (iAudioInput i = itl->begin(); i != itl->end(); ++i)
addStrip(*i, idx++);
-
+ }
+
//---------------------------------------------------
// Synthesizer Strips
//---------------------------------------------------
- SynthIList* sl = song->syntis();
- for (iSynthI i = sl->begin(); i != sl->end(); ++i)
+ if(cfg->showSyntiTracks)
+ {
+ SynthIList* sl = song->syntis();
+ for (iSynthI i = sl->begin(); i != sl->end(); ++i)
addStrip(*i, idx++);
-
+ }
+
//---------------------------------------------------
// generate Wave Track Strips
//---------------------------------------------------
- WaveTrackList* wtl = song->waves();
- for (iWaveTrack i = wtl->begin(); i != wtl->end(); ++i)
+ if(cfg->showWaveTracks)
+ {
+ WaveTrackList* wtl = song->waves();
+ for (iWaveTrack i = wtl->begin(); i != wtl->end(); ++i)
addStrip(*i, idx++);
-
+ }
+
//---------------------------------------------------
// generate Midi channel/port Strips
//---------------------------------------------------
@@ -250,36 +342,47 @@ void AudioMixerApp::updateMixer(UpdateAction action)
MidiTrackList* mtl = song->midis();
for (iMidiTrack i = mtl->begin(); i != mtl->end(); ++i)
{
- addStrip(*i, idx++);
+ MidiTrack* mt = *i;
+ if((mt->type() == Track::MIDI && cfg->showMidiTracks) || (mt->type() == Track::DRUM && cfg->showDrumTracks))
+ addStrip(*i, idx++);
}
//---------------------------------------------------
// Groups
//---------------------------------------------------
- GroupList* gtl = song->groups();
- for (iAudioGroup i = gtl->begin(); i != gtl->end(); ++i)
+ if(cfg->showGroupTracks)
+ {
+ GroupList* gtl = song->groups();
+ for (iAudioGroup i = gtl->begin(); i != gtl->end(); ++i)
addStrip(*i, idx++);
-
+ }
+
//---------------------------------------------------
// Aux
//---------------------------------------------------
- AuxList* al = song->auxs();
- for (iAudioAux i = al->begin(); i != al->end(); ++i)
+ if(cfg->showAuxTracks)
+ {
+ AuxList* al = song->auxs();
+ for (iAudioAux i = al->begin(); i != al->end(); ++i)
addStrip(*i, idx++);
-
+ }
+
//---------------------------------------------------
// Master
//---------------------------------------------------
- OutputList* otl = song->outputs();
- for (iAudioOutput i = otl->begin(); i != otl->end(); ++i)
+ if(cfg->showOutputTracks)
+ {
+ OutputList* otl = song->outputs();
+ for (iAudioOutput i = otl->begin(); i != otl->end(); ++i)
addStrip(*i, idx++);
-
- setMaximumWidth(STRIP_WIDTH * idx);
+ }
+
+ setMaximumWidth(STRIP_WIDTH * idx + __WIDTH_COMPENSATION);
if (idx < 8)
- view->setMinimumWidth(idx * STRIP_WIDTH);
+ view->setMinimumWidth(idx * STRIP_WIDTH + __WIDTH_COMPENSATION);
}
//---------------------------------------------------------
@@ -367,3 +470,112 @@ void AudioMixerApp::routingDialogClosed()
menuView->setItemChecked(routingId, false);
}
+//---------------------------------------------------------
+// showTracksChanged
+//---------------------------------------------------------
+
+/*
+void AudioMixerApp::showTracksChanged(QAction* id)
+ {
+ bool val = id->isOn();
+ if (id == showMidiTracksId)
+ cfg->showMidiTracks = val;
+ else if (id == showDrumTracksId)
+ cfg->showDrumTracks = val;
+ else if (id == showInputTracksId)
+ cfg->showInputTracks = val;
+ else if (id == showOutputTracksId)
+ cfg->showOutputTracks = val;
+ else if (id == showWaveTracksId)
+ cfg->showWaveTracks = val;
+ else if (id == showGroupTracksId)
+ cfg->showGroupTracks = val;
+ else if (id == showAuxTracksId)
+ cfg->showAuxTracks = val;
+ else if (id == showSyntiTracksId)
+ cfg->showSyntiTracks = val;
+ updateMixer(UPDATE_ALL);
+ }
+*/
+
+void AudioMixerApp::showMidiTracksChanged(bool v)
+{
+ // p3.2.24
+ printf("AudioMixerApp::showMidiTracksChanged v:%d\n", v);
+ cfg->showMidiTracks = v;
+ updateMixer(UPDATE_ALL);
+}
+
+void AudioMixerApp::showDrumTracksChanged(bool v)
+{
+ cfg->showDrumTracks = v;
+ updateMixer(UPDATE_ALL);
+}
+
+void AudioMixerApp::showWaveTracksChanged(bool v)
+{
+ cfg->showWaveTracks = v;
+ updateMixer(UPDATE_ALL);
+}
+
+void AudioMixerApp::showInputTracksChanged(bool v)
+{
+ cfg->showInputTracks = v;
+ updateMixer(UPDATE_ALL);
+}
+
+void AudioMixerApp::showOutputTracksChanged(bool v)
+{
+ cfg->showOutputTracks = v;
+ updateMixer(UPDATE_ALL);
+}
+
+void AudioMixerApp::showGroupTracksChanged(bool v)
+{
+ cfg->showGroupTracks = v;
+ updateMixer(UPDATE_ALL);
+}
+
+void AudioMixerApp::showAuxTracksChanged(bool v)
+{
+ cfg->showAuxTracks = v;
+ updateMixer(UPDATE_ALL);
+}
+
+void AudioMixerApp::showSyntiTracksChanged(bool v)
+{
+ cfg->showSyntiTracks = v;
+ updateMixer(UPDATE_ALL);
+}
+
+//---------------------------------------------------------
+// write
+//---------------------------------------------------------
+
+//void AudioMixerApp::write(Xml& xml, const char* name)
+void AudioMixerApp::write(int level, Xml& xml)
+//void AudioMixerApp::write(int level, Xml& xml, const char* name)
+ {
+ //xml.stag(QString(name));
+ //xml.tag(level++, name.latin1());
+ xml.tag(level++, "Mixer");
+
+ xml.strTag(level, "name", cfg->name);
+
+ //xml.tag("geometry", geometry());
+ xml.qrectTag(level, "geometry", geometry());
+
+ xml.intTag(level, "showMidiTracks", cfg->showMidiTracks);
+ xml.intTag(level, "showDrumTracks", cfg->showDrumTracks);
+ xml.intTag(level, "showInputTracks", cfg->showInputTracks);
+ xml.intTag(level, "showOutputTracks", cfg->showOutputTracks);
+ xml.intTag(level, "showWaveTracks", cfg->showWaveTracks);
+ xml.intTag(level, "showGroupTracks", cfg->showGroupTracks);
+ xml.intTag(level, "showAuxTracks", cfg->showAuxTracks);
+ xml.intTag(level, "showSyntiTracks", cfg->showSyntiTracks);
+
+ //xml.etag(name);
+ //xml.etag(level, name.latin1());
+ xml.etag(level, "Mixer");
+ }
+
diff --git a/muse/muse/mixer/amixer.h b/muse/muse/mixer/amixer.h
index 173e9b86..36f329f4 100644
--- a/muse/muse/mixer/amixer.h
+++ b/muse/muse/mixer/amixer.h
@@ -37,23 +37,39 @@ class RouteDialog;
class QPopupMenu;
class Strip;
+struct MixerConfig;
+
#define EFX_HEIGHT 16
+typedef std::list<Strip*> StripList;
+
//---------------------------------------------------------
// AudioMixerApp
//---------------------------------------------------------
class AudioMixerApp : public QMainWindow {
+ //QString name;
+ MixerConfig* cfg;
+ StripList stripList;
QScrollView* view;
QWidget* central;
QHBoxLayout* lbox;
- Strip* master;
+ //Strip* master;
QHBoxLayout* layout;
QPopupMenu* menuView;
RouteDialog* routingDialog;
int routingId;
int oldAuxsSize;
+ QAction* showMidiTracksId;
+ QAction* showDrumTracksId;
+ QAction* showInputTracksId;
+ QAction* showOutputTracksId;
+ QAction* showWaveTracksId;
+ QAction* showGroupTracksId;
+ QAction* showAuxTracksId;
+ QAction* showSyntiTracksId;
+
Q_OBJECT
virtual void closeEvent(QCloseEvent*);
@@ -74,9 +90,22 @@ class AudioMixerApp : public QMainWindow {
void configChanged();
void toggleRouteDialog();
void routingDialogClosed();
+ //void showTracksChanged(QAction*);
+ void showMidiTracksChanged(bool);
+ void showDrumTracksChanged(bool);
+ void showWaveTracksChanged(bool);
+ void showInputTracksChanged(bool);
+ void showOutputTracksChanged(bool);
+ void showGroupTracksChanged(bool);
+ void showAuxTracksChanged(bool);
+ void showSyntiTracksChanged(bool);
public:
- AudioMixerApp(QWidget* parent);
+ //AudioMixerApp(QWidget* parent);
+ AudioMixerApp(QWidget* parent, MixerConfig* c);
+ //void write(Xml&, const char* name);
+ //void write(int level, Xml& xml, const char* name);
+ void write(int level, Xml& xml);
void clear();
};
diff --git a/muse/muse/seqmsg.cpp b/muse/muse/seqmsg.cpp
index b4f6dec8..7cd8176e 100644
--- a/muse/muse/seqmsg.cpp
+++ b/muse/muse/seqmsg.cpp
@@ -412,7 +412,11 @@ void Audio::msgSeek(const Pos& pos)
{
if (!checkAudioDevice()) return;
//audioDevice->seekTransport(pos.frame());
+ // p3.3.23
+ //printf("Audio::msgSeek before audioDevice->seekTransport frame:%d\n", pos.frame());
audioDevice->seekTransport(pos);
+ // p3.3.23
+ //printf("Audio::msgSeek after audioDevice->seekTransport frame:%d\n", pos.frame());
}
//---------------------------------------------------------
diff --git a/muse/muse/shortcuts.cpp b/muse/muse/shortcuts.cpp
index e5fbdca6..8b188cba 100644
--- a/muse/muse/shortcuts.cpp
+++ b/muse/muse/shortcuts.cpp
@@ -79,7 +79,9 @@ void initShortCuts()
defShrt(SHRT_GLOBAL_SPLIT, 0, "Structure: Global split", ARRANG_SHRT, "global_split");
defShrt(SHRT_COPY_RANGE, 0, "Structure: Copy range", ARRANG_SHRT, "copy_range");
defShrt(SHRT_CUT_EVENTS, 0, "Structure: Cut events", ARRANG_SHRT, "cut_events");
- defShrt(SHRT_OPEN_MIXER, Qt::Key_F10, "View: Open mixer window", ARRANG_SHRT, "toggle_mixer");
+ //defShrt(SHRT_OPEN_MIXER, Qt::Key_F10, "View: Open mixer window", ARRANG_SHRT, "toggle_mixer");
+ defShrt(SHRT_OPEN_MIXER, Qt::Key_F10, "View: Open mixer #1 window", ARRANG_SHRT, "toggle_mixer");
+ defShrt(SHRT_OPEN_MIXER2, Qt::CTRL + Qt::Key_F10, "View: Open mixer #2 window", ARRANG_SHRT, "toggle_mixer2");
defShrt(SHRT_OPEN_TRANSPORT, Qt::Key_F11, "View: Toggle transport window", ARRANG_SHRT, "toggle_transport");
defShrt(SHRT_OPEN_BIGTIME, Qt::Key_F12, "View: Toggle bigtime window", ARRANG_SHRT, "toggle_bigtime");
defShrt(SHRT_OPEN_MARKER, Qt::Key_F9, "View: Open marker window", ARRANG_SHRT, "marker_window");
diff --git a/muse/muse/shortcuts.h b/muse/muse/shortcuts.h
index 67471418..daa76689 100644
--- a/muse/muse/shortcuts.h
+++ b/muse/muse/shortcuts.h
@@ -108,6 +108,7 @@ enum {
SHRT_OPEN_TRANSPORT, //F11
SHRT_OPEN_BIGTIME, //F12
SHRT_OPEN_MIXER, //Ctrl+*
+ SHRT_OPEN_MIXER2, //Ctrl+*
SHRT_OPEN_MARKER, // F9
SHRT_OPEN_CLIPS, //Default: undefined
diff --git a/muse/muse/song.cpp b/muse/muse/song.cpp
index f8f394eb..6bd5f9b8 100644
--- a/muse/muse/song.cpp
+++ b/muse/muse/song.cpp
@@ -1184,12 +1184,16 @@ void Song::setPos(int idx, const Pos& val, bool sig,
// val.dump(0);
// printf("\n");
+ // p3.3.23
+ //printf("Song::setPos before audio->msgSeek idx:%d isSeek:%d frame:%d\n", idx, isSeek, val.frame());
if (pos[idx] == val)
return;
if (idx == CPOS) {
_vcpos = val;
if (isSeek && !extSyncFlag.value()) {
audio->msgSeek(val);
+ // p3.3.23
+ //printf("Song::setPos after audio->msgSeek idx:%d isSeek:%d frame:%d\n", idx, isSeek, val.frame());
return;
}
}
diff --git a/muse/muse/widgets/genset.cpp b/muse/muse/widgets/genset.cpp
index 19b3025c..7d2741d5 100644
--- a/muse/muse/widgets/genset.cpp
+++ b/muse/muse/widgets/genset.cpp
@@ -67,7 +67,9 @@ GlobalSettingsConfig::GlobalSettingsConfig(QWidget* parent, const char* name)
showTransport->setChecked(config.transportVisible);
showBigtime->setChecked(config.bigTimeVisible);
- showMixer->setChecked(config.mixerVisible);
+ //showMixer->setChecked(config.mixerVisible);
+ showMixer->setChecked(config.mixer1Visible);
+ showMixer2->setChecked(config.mixer2Visible);
arrangerX->setValue(config.geometryMain.x());
arrangerY->setValue(config.geometryMain.y());
@@ -82,12 +84,23 @@ GlobalSettingsConfig::GlobalSettingsConfig(QWidget* parent, const char* name)
bigtimeW->setValue(config.geometryBigTime.width());
bigtimeH->setValue(config.geometryBigTime.height());
- mixerX->setValue(config.geometryMixer.x());
- mixerY->setValue(config.geometryMixer.y());
- mixerW->setValue(config.geometryMixer.width());
- mixerH->setValue(config.geometryMixer.height());
-
- setMixerCurrent->setEnabled(muse->mixerWindow());
+ //mixerX->setValue(config.geometryMixer.x());
+ //mixerY->setValue(config.geometryMixer.y());
+ //mixerW->setValue(config.geometryMixer.width());
+ //mixerH->setValue(config.geometryMixer.height());
+ mixerX->setValue(config.mixer1.geometry.x());
+ mixerY->setValue(config.mixer1.geometry.y());
+ mixerW->setValue(config.mixer1.geometry.width());
+ mixerH->setValue(config.mixer1.geometry.height());
+ mixer2X->setValue(config.mixer2.geometry.x());
+ mixer2Y->setValue(config.mixer2.geometry.y());
+ mixer2W->setValue(config.mixer2.geometry.width());
+ mixer2H->setValue(config.mixer2.geometry.height());
+
+ //setMixerCurrent->setEnabled(muse->mixerWindow());
+ setMixerCurrent->setEnabled(muse->mixer1Window());
+ setMixer2Current->setEnabled(muse->mixer2Window());
+
setBigtimeCurrent->setEnabled(muse->bigtimeWindow());
setTransportCurrent->setEnabled(muse->transportWindow());
@@ -100,6 +113,7 @@ GlobalSettingsConfig::GlobalSettingsConfig(QWidget* parent, const char* name)
connect(okButton, SIGNAL(clicked()), SLOT(ok()));
connect(cancelButton, SIGNAL(clicked()), SLOT(cancel()));
connect(setMixerCurrent, SIGNAL(clicked()), SLOT(mixerCurrent()));
+ connect(setMixer2Current, SIGNAL(clicked()), SLOT(mixer2Current()));
connect(setBigtimeCurrent, SIGNAL(clicked()), SLOT(bigtimeCurrent()));
connect(setArrangerCurrent, SIGNAL(clicked()), SLOT(arrangerCurrent()));
connect(setTransportCurrent, SIGNAL(clicked()), SLOT(transportCurrent()));
@@ -131,7 +145,9 @@ void GlobalSettingsConfig::apply()
config.transportVisible = showTransport->isChecked();
config.bigTimeVisible = showBigtime->isChecked();
- config.mixerVisible = showMixer->isChecked();
+ //config.mixerVisible = showMixer->isChecked();
+ config.mixer1Visible = showMixer->isChecked();
+ config.mixer2Visible = showMixer2->isChecked();
config.geometryMain.setX(arrangerX->value());
config.geometryMain.setY(arrangerY->value());
@@ -148,16 +164,28 @@ void GlobalSettingsConfig::apply()
config.geometryBigTime.setWidth(bigtimeW->value());
config.geometryBigTime.setHeight(bigtimeH->value());
- config.geometryMixer.setX(mixerX->value());
- config.geometryMixer.setY(mixerY->value());
- config.geometryMixer.setWidth(mixerW->value());
- config.geometryMixer.setHeight(mixerH->value());
+ //config.geometryMixer.setX(mixerX->value());
+ //config.geometryMixer.setY(mixerY->value());
+ //config.geometryMixer.setWidth(mixerW->value());
+ //config.geometryMixer.setHeight(mixerH->value());
+ config.mixer1.geometry.setX(mixerX->value());
+ config.mixer1.geometry.setY(mixerY->value());
+ config.mixer1.geometry.setWidth(mixerW->value());
+ config.mixer1.geometry.setHeight(mixerH->value());
+ config.mixer2.geometry.setX(mixer2X->value());
+ config.mixer2.geometry.setY(mixer2Y->value());
+ config.mixer2.geometry.setWidth(mixer2W->value());
+ config.mixer2.geometry.setHeight(mixer2H->value());
config.showSplashScreen = showSplash->isChecked();
config.showDidYouKnow = showDidYouKnow->isChecked();
config.externalWavEditor = externalWavEditorSelect->text();
config.useOldStyleStopShortCut = oldStyleStopCheckBox->isChecked();
- muse->showMixer(config.mixerVisible);
+
+ //muse->showMixer(config.mixerVisible);
+ muse->showMixer1(config.mixer1Visible);
+ muse->showMixer2(config.mixer2Visible);
+
muse->showBigtime(config.bigTimeVisible);
muse->showTransport(config.transportVisible);
QWidget* w = muse->transportWindow();
@@ -165,10 +193,20 @@ void GlobalSettingsConfig::apply()
w->resize(config.geometryTransport.size());
w->move(config.geometryTransport.topLeft());
}
- w = muse->mixerWindow();
+ //w = muse->mixerWindow();
+ //if (w) {
+ // w->resize(config.geometryMixer.size());
+ // w->move(config.geometryMixer.topLeft());
+ // }
+ w = muse->mixer1Window();
if (w) {
- w->resize(config.geometryMixer.size());
- w->move(config.geometryMixer.topLeft());
+ w->resize(config.mixer1.geometry.size());
+ w->move(config.mixer1.geometry.topLeft());
+ }
+ w = muse->mixer2Window();
+ if (w) {
+ w->resize(config.mixer2.geometry.size());
+ w->move(config.mixer2.geometry.topLeft());
}
w = muse->bigtimeWindow();
if (w) {
@@ -208,7 +246,7 @@ void GlobalSettingsConfig::cancel()
void GlobalSettingsConfig::mixerCurrent()
{
- QWidget* w = muse->mixerWindow();
+ QWidget* w = muse->mixer1Window();
if (!w)
return;
QRect r(w->frameGeometry());
@@ -219,6 +257,22 @@ void GlobalSettingsConfig::mixerCurrent()
}
//---------------------------------------------------------
+// mixer2Current
+//---------------------------------------------------------
+
+void GlobalSettingsConfig::mixer2Current()
+ {
+ QWidget* w = muse->mixer2Window();
+ if (!w)
+ return;
+ QRect r(w->frameGeometry());
+ mixer2X->setValue(r.x());
+ mixer2Y->setValue(r.y());
+ mixer2W->setValue(r.width());
+ mixer2H->setValue(r.height());
+ }
+
+//---------------------------------------------------------
// bigtimeCurrent
//---------------------------------------------------------
diff --git a/muse/muse/widgets/genset.h b/muse/muse/widgets/genset.h
index 108855cc..4edd7d40 100644
--- a/muse/muse/widgets/genset.h
+++ b/muse/muse/widgets/genset.h
@@ -23,6 +23,7 @@ class GlobalSettingsConfig : public GlobalSettingsDialogBase {
void ok();
void cancel();
void mixerCurrent();
+ void mixer2Current();
void bigtimeCurrent();
void arrangerCurrent();
void transportCurrent();
diff --git a/muse/muse/widgets/gensetbase.ui b/muse/muse/widgets/gensetbase.ui
index 10a7a74a..845797d0 100644
--- a/muse/muse/widgets/gensetbase.ui
+++ b/muse/muse/widgets/gensetbase.ui
@@ -141,7 +141,7 @@
<string>x-pos</string>
</property>
</widget>
- <widget class="QCheckBox" row="2" column="1" rowspan="2" colspan="1">
+ <widget class="QCheckBox" row="2" column="1" colspan="1">
<property name="name">
<cstring>showBigtime</cstring>
</property>
@@ -149,7 +149,7 @@
<string>show</string>
</property>
</widget>
- <widget class="QSpinBox" row="2" column="2" rowspan="2" colspan="1">
+ <widget class="QSpinBox" row="2" column="2" colspan="1">
<property name="name">
<cstring>bigtimeX</cstring>
</property>
@@ -160,7 +160,7 @@
<string>x-pos</string>
</property>
</widget>
- <widget class="QSpinBox" row="2" column="3" rowspan="2" colspan="1">
+ <widget class="QSpinBox" row="2" column="3" colspan="1">
<property name="name">
<cstring>bigtimeY</cstring>
</property>
@@ -171,7 +171,7 @@
<string>y-pos</string>
</property>
</widget>
- <widget class="QSpinBox" row="2" column="4" rowspan="2" colspan="1">
+ <widget class="QSpinBox" row="2" column="4" colspan="1">
<property name="name">
<cstring>bigtimeW</cstring>
</property>
@@ -182,7 +182,7 @@
<string>width</string>
</property>
</widget>
- <widget class="QSpinBox" row="2" column="5" rowspan="2" colspan="1">
+ <widget class="QSpinBox" row="2" column="5" colspan="1">
<property name="name">
<cstring>bigtimeH</cstring>
</property>
@@ -193,7 +193,7 @@
<string>height</string>
</property>
</widget>
- <widget class="QCheckBox" row="4" column="1">
+ <widget class="QCheckBox" row="3" column="1">
<property name="name">
<cstring>showMixer</cstring>
</property>
@@ -201,7 +201,15 @@
<string>show</string>
</property>
</widget>
- <widget class="QLabel" row="4" column="0">
+ <widget class="QCheckBox" row="4" column="1">
+ <property name="name">
+ <cstring>showMixer2</cstring>
+ </property>
+ <property name="text">
+ <string>show</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="3" column="0">
<property name="name">
<cstring>textLabel4</cstring>
</property>
@@ -214,10 +222,26 @@
</sizepolicy>
</property>
<property name="text">
- <string>Mixer</string>
+ <string>Mixer 1</string>
</property>
</widget>
- <widget class="QLabel" row="3" column="0">
+ <widget class="QLabel" row="4" column="0">
+ <property name="name">
+ <cstring>textLabel4_2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Mixer 2</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
<property name="name">
<cstring>textLabel3</cstring>
</property>
@@ -265,7 +289,7 @@
<string>Transport</string>
</property>
</widget>
- <widget class="QSpinBox" row="4" column="5">
+ <widget class="QSpinBox" row="3" column="5">
<property name="name">
<cstring>mixerH</cstring>
</property>
@@ -276,7 +300,7 @@
<string>height</string>
</property>
</widget>
- <widget class="QSpinBox" row="4" column="4">
+ <widget class="QSpinBox" row="3" column="4">
<property name="name">
<cstring>mixerW</cstring>
</property>
@@ -287,7 +311,7 @@
<string>width</string>
</property>
</widget>
- <widget class="QSpinBox" row="4" column="3">
+ <widget class="QSpinBox" row="3" column="3">
<property name="name">
<cstring>mixerY</cstring>
</property>
@@ -298,7 +322,7 @@
<string>y-pos</string>
</property>
</widget>
- <widget class="QSpinBox" row="4" column="2">
+ <widget class="QSpinBox" row="3" column="2">
<property name="name">
<cstring>mixerX</cstring>
</property>
@@ -309,7 +333,7 @@
<string>x-pos</string>
</property>
</widget>
- <widget class="QPushButton" row="4" column="6">
+ <widget class="QPushButton" row="3" column="6">
<property name="name">
<cstring>setMixerCurrent</cstring>
</property>
@@ -328,7 +352,70 @@
<string>set current values</string>
</property>
</widget>
- <widget class="QPushButton" row="3" column="6">
+ <widget class="QSpinBox" row="4" column="5">
+ <property name="name">
+ <cstring>mixer2H</cstring>
+ </property>
+ <property name="maxValue">
+ <number>9999</number>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>height</string>
+ </property>
+ </widget>
+ <widget class="QSpinBox" row="4" column="4">
+ <property name="name">
+ <cstring>mixer2W</cstring>
+ </property>
+ <property name="maxValue">
+ <number>9999</number>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>width</string>
+ </property>
+ </widget>
+ <widget class="QSpinBox" row="4" column="3">
+ <property name="name">
+ <cstring>mixer2Y</cstring>
+ </property>
+ <property name="maxValue">
+ <number>9999</number>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>y-pos</string>
+ </property>
+ </widget>
+ <widget class="QSpinBox" row="4" column="2">
+ <property name="name">
+ <cstring>mixer2X</cstring>
+ </property>
+ <property name="maxValue">
+ <number>9999</number>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>x-pos</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="4" column="6">
+ <property name="name">
+ <cstring>setMixer2Current</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Cur</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>set current values</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="2" column="6">
<property name="name">
<cstring>setBigtimeCurrent</cstring>
</property>
@@ -366,7 +453,7 @@
<string>set current values</string>
</property>
</widget>
- <widget class="QPushButton" row="1" column="6" rowspan="2" colspan="1">
+ <widget class="QPushButton" row="1" column="6" colspan="1">
<property name="name">
<cstring>setTransportCurrent</cstring>
</property>
diff --git a/muse/muse/widgets/musewidgetsplug.cpp b/muse/muse/widgets/musewidgetsplug.cpp
index f16f9153..df750646 100644
--- a/muse/muse/widgets/musewidgetsplug.cpp
+++ b/muse/muse/widgets/musewidgetsplug.cpp
@@ -123,10 +123,24 @@ GlobalConfigValues config = {
QRect(0, 0, 600, 200), // GeometryBigTime;
QRect(0, 0, 400, 300), // GeometryPianoroll;
QRect(0, 0, 400, 300), // GeometryDrumedit;
- QRect(0, 0, 300, 500), // GeometryMixer;
+ //QRect(0, 0, 300, 500), // GeometryMixer; // Obsolete
+ {
+ QString("Mixer 1"),
+ QRect(0, 0, 300, 500), // Mixer1
+ true, true, true, true,
+ true, true, true, true
+ },
+ {
+ QString("Mixer 2"),
+ QRect(200, 200, 300, 500), // Mixer2
+ true, true, true, true,
+ true, true, true, true
+ },
true, // TransportVisible;
false, // BigTimeVisible;
- false, // mixerVisible;
+ false, // mixer1Visible;
+ false, // mixer2Visible;
+
false, // markerVisible; // This line was missing 2007-01-08 (willyfoobar)
true, // showSplashScreen
1, // canvasShowPartType 1 - names, 2 events