summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--muse/muse/arranger/arranger.cpp5
-rw-r--r--muse/muse/audio.cpp7
-rw-r--r--muse/muse/audio.h2
-rw-r--r--muse/muse/midiseq.cpp4
-rw-r--r--muse/muse/midiseq.h4
-rw-r--r--muse/muse/muse.cpp29
-rw-r--r--muse/muse/muse.h4
7 files changed, 39 insertions, 16 deletions
diff --git a/muse/muse/arranger/arranger.cpp b/muse/muse/arranger/arranger.cpp
index f81e3591..fe795543 100644
--- a/muse/muse/arranger/arranger.cpp
+++ b/muse/muse/arranger/arranger.cpp
@@ -991,6 +991,10 @@ void Arranger::readStatus(QDomNode node)
else if (tag == "namesize") {
Arranger::trackNameWidth = i;
}
+ else if (tag == "raster") {
+ muse->initRaster(i);
+ canvas->setRaster(i);
+ }
else if (tag == "splitter") {
split->readStatus(node);
QList<int> sizes = split->sizes();
@@ -1029,6 +1033,7 @@ void Arranger::writeStatus(Xml& xml)
xml.doubleTag("vmag", canvas->ymag());
xml.intTag("hpos", canvas->getWPos().x());
xml.intTag("vpos", canvas->getWPos().y());
+ xml.intTag("raster", muse->raster());
split->writeStatus("splitter", xml);
xml.etag("arranger");
}
diff --git a/muse/muse/audio.cpp b/muse/muse/audio.cpp
index c3799897..2190a7d8 100644
--- a/muse/muse/audio.cpp
+++ b/muse/muse/audio.cpp
@@ -75,7 +75,7 @@ const char* seqMsgList[] = {
"MS_STOP",
"MS_SET_RTC",
"SEQM_IDLE",
- "SEQM_SEEK",
+// "SEQM_SEEK",
"SEQM_ADD_CTRL",
"SEQM_REMOVE_CTRL"
};
@@ -638,8 +638,11 @@ void Audio::seek(const Pos& p)
if (state != LOOP2 && !freewheel())
audioPrefetch->msgSeek(_pos.frame());
- midiSeq->msgSeek(); // handle stuck notes and set
+ midiBusy = true;
+ midiSeq->processSeek(); // handle stuck notes and set
// controller for new position
+ midiBusy = false;
+
sendMsgToGui(MSG_SEEK);
}
diff --git a/muse/muse/audio.h b/muse/muse/audio.h
index f92502fc..a18774c6 100644
--- a/muse/muse/audio.h
+++ b/muse/muse/audio.h
@@ -107,7 +107,7 @@ enum {
MS_SET_RTC,
SEQM_IDLE,
- SEQM_SEEK,
+// SEQM_SEEK,
SEQM_ADD_CTRL,
SEQM_REMOVE_CTRL
};
diff --git a/muse/muse/midiseq.cpp b/muse/muse/midiseq.cpp
index 53d71c68..83391629 100644
--- a/muse/muse/midiseq.cpp
+++ b/muse/muse/midiseq.cpp
@@ -64,9 +64,6 @@ void MidiSeq::processMsg(const ThreadMsg* m)
{
AudioMsg* msg = (AudioMsg*)m;
switch (msg->id) {
- case SEQM_SEEK:
- processSeek();
- break;
case MS_START:
processStart();
break;
@@ -554,7 +551,6 @@ void MidiSeq::msgMsg(int id)
Thread::sendMsg(&msg);
}
-void MidiSeq::msgSeek() { msgMsg(SEQM_SEEK); }
void MidiSeq::msgStop() { msgMsg(MS_STOP); }
void MidiSeq::msgStart() { msgMsg(MS_START); }
void MidiSeq::msgSetRtc() { msgMsg(MS_SET_RTC); }
diff --git a/muse/muse/midiseq.h b/muse/muse/midiseq.h
index 98739749..3cadc737 100644
--- a/muse/muse/midiseq.h
+++ b/muse/muse/midiseq.h
@@ -60,7 +60,6 @@ class MidiSeq : public Thread {
bool initRealtimeTimer();
static void midiTick(void* p, void*);
void processTimerTick();
- void processSeek();
void processStart();
void processStop();
void resetDevices();
@@ -84,12 +83,13 @@ class MidiSeq : public Thread {
void mmcInput(int id, int cmd, const AL::Pos&);
void msgMsg(int id);
- void msgSeek();
void msgStart();
void msgStop();
void msgSetRtc();
void msgAddSynthI(SynthI* synth);
void msgRemoveSynthI(SynthI* synth);
+
+ void processSeek();
};
extern MidiSeq* midiSeq;
diff --git a/muse/muse/muse.cpp b/muse/muse/muse.cpp
index dad39210..91884d59 100644
--- a/muse/muse/muse.cpp
+++ b/muse/muse/muse.cpp
@@ -904,13 +904,13 @@ MusE::MusE()
label->setIndent(5);
aToolBar->addWidget(label);
- QComboBox* raster = new QComboBox;
- raster->setFixedHeight(24);
- aToolBar->addWidget(raster);
+ rasterCombo = new QComboBox;
+ rasterCombo->setFixedHeight(24);
+ aToolBar->addWidget(rasterCombo);
for (unsigned i = 0; i < sizeof(rasterTable)/sizeof(*rasterTable); i++)
- raster->addItem(rasterTable[i].label, i);
- raster->setCurrentIndex(1);
- connect(raster, SIGNAL(activated(int)), SLOT(setRaster(int)));
+ rasterCombo->addItem(rasterTable[i].label, i);
+ rasterCombo->setCurrentIndex(1);
+ connect(rasterCombo, SIGNAL(activated(int)), SLOT(setRaster(int)));
// Song len
label = new QLabel(tr("Len"));
@@ -1049,6 +1049,23 @@ void MusE::setRaster(int val)
}
//---------------------------------------------------------
+// initRaster
+//---------------------------------------------------------
+
+void MusE::initRaster(int val)
+ {
+ for (int i = 0; i < sizeof(rasterTable)/sizeof(*rasterTable); ++i) {
+ if (rasterTable[i].val == val) {
+ _raster = val;
+ rasterCombo->setCurrentIndex(i);
+ return;
+ }
+ }
+ _raster = rasterTable[1].val;
+ rasterCombo->setCurrentIndex(1);
+ }
+
+//---------------------------------------------------------
// setHeartBeat
//---------------------------------------------------------
diff --git a/muse/muse/muse.h b/muse/muse/muse.h
index 3b88bcd2..cf8349e6 100644
--- a/muse/muse/muse.h
+++ b/muse/muse/muse.h
@@ -148,6 +148,7 @@ class MusE : public QMainWindow // , public Ui::MuseBase
MidiTransformerDialog* midiTransformerDialog;
QMenu* openRecent;
QSpinBox* globalTempoSpinBox;
+ QComboBox* rasterCombo;
QDialog* projectPropsDialog;
@@ -244,10 +245,10 @@ class MusE : public QMainWindow // , public Ui::MuseBase
void markerClosed();
void mixer1Closed();
void mixer2Closed();
- void setRaster(int);
void syncChanged();
void preferences();
void aboutToShowAddTrack();
+ void setRaster(int);
public slots:
void bounceToFile();
@@ -294,6 +295,7 @@ class MusE : public QMainWindow // , public Ui::MuseBase
int raster() const { return _raster; }
void setupTransportToolbar(QToolBar* tb) const;
void readToplevels(QDomNode);
+ void initRaster(int);
QAction* startAction;
QAction* rewindAction;