summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--muse2/muse/CMakeLists.txt3
-rw-r--r--muse2/muse/app.cpp19
-rw-r--r--muse2/muse/app.h2
-rw-r--r--muse2/muse/arranger/pcanvas.cpp10
-rw-r--r--muse2/muse/arranger/tlist.cpp10
-rw-r--r--muse2/muse/conf.cpp7
-rw-r--r--muse2/muse/ctrl/ctrlcanvas.cpp18
-rw-r--r--muse2/muse/functions.cpp505
-rw-r--r--muse2/muse/functions.h67
-rw-r--r--muse2/muse/globals.cpp2
-rw-r--r--muse2/muse/liste/listedit.cpp2
-rw-r--r--muse2/muse/main.cpp3
-rw-r--r--muse2/muse/master/lmaster.cpp1
-rw-r--r--muse2/muse/master/masteredit.cpp51
-rw-r--r--muse2/muse/master/masteredit.h8
-rw-r--r--muse2/muse/midiedit/CMakeLists.txt2
-rw-r--r--muse2/muse/midiedit/cmd.h23
-rw-r--r--muse2/muse/midiedit/dcanvas.cpp66
-rw-r--r--muse2/muse/midiedit/dcanvas.h3
-rw-r--r--muse2/muse/midiedit/dlist.cpp5
-rw-r--r--muse2/muse/midiedit/drumedit.cpp105
-rw-r--r--muse2/muse/midiedit/drumedit.h17
-rw-r--r--muse2/muse/midiedit/pianoroll.cpp218
-rw-r--r--muse2/muse/midiedit/pianoroll.h35
-rw-r--r--muse2/muse/midiedit/prcanvas.cpp250
-rw-r--r--muse2/muse/midiedit/prcanvas.h7
-rw-r--r--muse2/muse/midiedit/quantconfig.cpp79
-rw-r--r--muse2/muse/midiedit/quantconfig.h32
-rw-r--r--muse2/muse/midiedit/scoreedit.cpp461
-rw-r--r--muse2/muse/midiedit/scoreedit.h40
-rw-r--r--muse2/muse/midieditor.cpp19
-rw-r--r--muse2/muse/midieditor.h7
-rw-r--r--muse2/muse/midifile.cpp2
-rw-r--r--muse2/muse/shortcuts.cpp10
-rw-r--r--muse2/muse/shortcuts.h7
-rw-r--r--muse2/muse/transpose.cpp100
-rw-r--r--muse2/muse/transpose.h26
-rw-r--r--muse2/muse/waveedit/waveedit.cpp39
-rw-r--r--muse2/muse/waveedit/waveedit.h7
-rw-r--r--muse2/muse/widgets/CMakeLists.txt18
-rw-r--r--muse2/muse/widgets/canvas.cpp29
-rw-r--r--muse2/muse/widgets/deloverlaps.cpp79
-rw-r--r--muse2/muse/widgets/deloverlaps.h39
-rw-r--r--muse2/muse/widgets/deloverlapsbase.ui153
-rw-r--r--muse2/muse/widgets/gatetime.cpp69
-rw-r--r--muse2/muse/widgets/gatetime.h21
-rw-r--r--muse2/muse/widgets/gatetimebase.ui13
-rw-r--r--muse2/muse/widgets/move.cpp84
-rw-r--r--muse2/muse/widgets/move.h41
-rw-r--r--muse2/muse/widgets/movebase.ui203
-rw-r--r--muse2/muse/widgets/quantbase.ui308
-rw-r--r--muse2/muse/widgets/quantize.cpp103
-rw-r--r--muse2/muse/widgets/quantize.h45
-rw-r--r--muse2/muse/widgets/remove.cpp78
-rw-r--r--muse2/muse/widgets/remove.h40
-rw-r--r--muse2/muse/widgets/removebase.ui153
-rw-r--r--muse2/muse/widgets/setlen.cpp83
-rw-r--r--muse2/muse/widgets/setlen.h41
-rw-r--r--muse2/muse/widgets/setlenbase.ui197
-rw-r--r--muse2/muse/widgets/tb1.cpp79
-rw-r--r--muse2/muse/widgets/tb1.h8
-rw-r--r--muse2/muse/widgets/transpose.cpp83
-rw-r--r--muse2/muse/widgets/transpose.h41
-rw-r--r--muse2/muse/widgets/transposebase.ui147
-rw-r--r--muse2/muse/widgets/velocity.cpp70
-rw-r--r--muse2/muse/widgets/velocity.h24
-rw-r--r--muse2/muse/widgets/velocitybase.ui14
-rw-r--r--muse2/share/templates/audio.med494
-rw-r--r--muse2/share/templates/default.med332
-rw-r--r--muse2/share/templates/midiGM.med274
-rw-r--r--muse2/share/templates/monorecord.med746
-rw-r--r--muse2/share/templates/synti.med1553
72 files changed, 5481 insertions, 2449 deletions
diff --git a/muse2/muse/CMakeLists.txt b/muse2/muse/CMakeLists.txt
index d89bb007..8705f914 100644
--- a/muse2/muse/CMakeLists.txt
+++ b/muse2/muse/CMakeLists.txt
@@ -62,7 +62,6 @@ QT4_WRAP_CPP ( muse_moc_headers
plugin.h
song.h
transport.h
- transpose.h
value.h
)
@@ -89,6 +88,7 @@ file (GLOB core_source_files
event.cpp
eventlist.cpp
exportmidi.cpp
+ functions.cpp
gconfig.cpp
globals.cpp
help.cpp
@@ -128,7 +128,6 @@ file (GLOB core_source_files
ticksynth.cpp
track.cpp
transport.cpp
- transpose.cpp
undo.cpp
value.cpp
vst.cpp
diff --git a/muse2/muse/app.cpp b/muse2/muse/app.cpp
index c42a1a7c..adac840a 100644
--- a/muse2/muse/app.cpp
+++ b/muse2/muse/app.cpp
@@ -31,7 +31,6 @@
#include "didyouknow.h"
#include "drumedit.h"
#include "filedialog.h"
-#include "gatetime.h"
#include "gconfig.h"
#include "gui.h"
#include "icons.h"
@@ -49,7 +48,6 @@
#include "songinfo.h"
#include "ticksynth.h"
#include "transport.h"
-#include "transpose.h"
#include "waveedit.h"
#include "widgets/projectcreateimpl.h"
#include "widgets/menutitleitem.h"
@@ -1020,7 +1018,6 @@ MusE::MusE(int argc, char** argv) : QMainWindow()
midiEdit = new QMenu(tr("Midi"), this);
midiEdit->setIcon(QIcon(*edit_midiIcon));
- midiTransposeAction = new QAction(QIcon(*midi_transposeIcon), tr("Transpose"), this);
midiTransformerAction = new QAction(QIcon(*midi_transformIcon), tr("Midi &Transform"), this);
editSongInfoAction = new QAction(QIcon(*edit_listIcon), tr("Song Info"), this);
@@ -1169,7 +1166,6 @@ MusE::MusE(int argc, char** argv) : QMainWindow()
connect(masterGraphicAction, SIGNAL(activated()), SLOT(startMasterEditor()));
connect(masterListAction, SIGNAL(activated()), SLOT(startLMasterEditor()));
- connect(midiTransposeAction, SIGNAL(activated()), SLOT(transpose()));
connect(midiTransformerAction, SIGNAL(activated()), SLOT(startMidiTransformer()));
connect(editSongInfoAction, SIGNAL(activated()), SLOT(startSongInfo()));
@@ -1399,7 +1395,6 @@ MusE::MusE(int argc, char** argv) : QMainWindow()
midiEdit->insertItem(tr("Modify Gate Time"), this, SLOT(modifyGateTime()));
midiEdit->insertItem(tr("Modify Velocity"), this, SLOT(modifyVelocity()));
midiEdit->insertItem(tr("Crescendo"), this, SLOT(crescendo()));
- midiEdit->insertItem(tr("Transpose"), this, SLOT(transpose()));
midiEdit->insertItem(tr("Thin Out"), this, SLOT(thinOut()));
midiEdit->insertItem(tr("Erase Event"), this, SLOT(eraseEvent()));
midiEdit->insertItem(tr("Note Shift"), this, SLOT(noteShift()));
@@ -1410,7 +1405,6 @@ MusE::MusE(int argc, char** argv) : QMainWindow()
midiEdit->insertItem(tr("Create Measure"), this, SLOT(createMeasure()));
midiEdit->insertItem(tr("Mix Track"), this, SLOT(mixTrack()));
#endif
- midiEdit->addAction(midiTransposeAction);
midiEdit->addAction(midiTransformerAction);
menuEdit->addAction(editSongInfoAction);
@@ -4179,15 +4173,6 @@ void MusE::selectionChanged()
editCopyAction->setEnabled(flag);
}
-//---------------------------------------------------------
-// transpose
-//---------------------------------------------------------
-
-void MusE::transpose()
- {
- Transpose *w = new Transpose();
- w->show();
- }
//---------------------------------------------------------
// modifyGateTime
@@ -4195,8 +4180,7 @@ void MusE::transpose()
void MusE::modifyGateTime()
{
- GateTime* w = new GateTime(this);
- w->show();
+ printf("not implemented\n");
}
//---------------------------------------------------------
@@ -4841,7 +4825,6 @@ void MusE::updateConfiguration()
masterGraphicAction->setShortcut(shortcuts[SHRT_OPEN_GRAPHIC_MASTER].key);
masterListAction->setShortcut(shortcuts[SHRT_OPEN_LIST_MASTER].key);
- midiTransposeAction->setShortcut(shortcuts[SHRT_TRANSPOSE].key);
midiTransformerAction->setShortcut(shortcuts[SHRT_OPEN_MIDI_TRANSFORM].key);
//editSongInfoAction has no acceleration
diff --git a/muse2/muse/app.h b/muse2/muse/app.h
index e940c1ad..70aac8fc 100644
--- a/muse2/muse/app.h
+++ b/muse2/muse/app.h
@@ -114,7 +114,6 @@ class MusE : public QMainWindow
QAction *trackMidiAction, *trackDrumAction, *trackWaveAction, *trackAOutputAction, *trackAGroupAction;
QAction *trackAInputAction, *trackAAuxAction;
QAction *masterGraphicAction, *masterListAction;
- QAction *midiTransposeAction;
QAction *midiTransformerAction;
QAction *editSongInfoAction;
public:
@@ -295,7 +294,6 @@ class MusE : public QMainWindow
void cmd(int);
void clipboardChanged();
void selectionChanged();
- void transpose();
void modifyGateTime();
void modifyVelocity();
void crescendo();
diff --git a/muse2/muse/arranger/pcanvas.cpp b/muse2/muse/arranger/pcanvas.cpp
index 35de93ee..599e90a0 100644
--- a/muse2/muse/arranger/pcanvas.cpp
+++ b/muse2/muse/arranger/pcanvas.cpp
@@ -231,9 +231,9 @@ void PartCanvas::viewMouseDoubleClickEvent(QMouseEvent* event)
}
QPoint cpos = event->pos();
curItem = items.find(cpos);
- bool shift = event->modifiers() & Qt::ShiftModifier;
+ bool ctrl = event->modifiers() & Qt::ControlModifier;
if (curItem) {
- if (event->button() == Qt::LeftButton && shift) {
+ if (event->button() == Qt::LeftButton && ctrl) {
editPart = (NPart*)curItem;
QRect r = map(curItem->bbox());
if (lineEditor == 0) {
@@ -1002,7 +1002,7 @@ void PartCanvas::itemPopup(CItem* item, int n, const QPoint& pt)
void PartCanvas::mousePress(QMouseEvent* event)
{
- if (event->modifiers() & Qt::ShiftModifier) {
+ if (event->modifiers() & Qt::ControlModifier) {
return;
}
QPoint pt = event->pos();
@@ -1059,7 +1059,7 @@ void PartCanvas::mouseMove(QMouseEvent* event)
x = 0;
if (_tool == AutomationTool)
- processAutomationMovements(event->pos(), event->modifiers() & Qt::ControlModifier);
+ processAutomationMovements(event->pos(), event->modifiers() & Qt::ShiftModifier);
emit timeChanged(AL::sigmap.raster(x, *_raster));
}
@@ -1665,7 +1665,7 @@ void PartCanvas::drawMoving(QPainter& p, const CItem* item, const QRect&)
// pr - part rectangle
//---------------------------------------------------------
-void PartCanvas::drawMidiPart(QPainter& p, const QRect& bb, EventList* events, MidiTrack *mt, MidiPart *pt, const QRect& r, int pTick, int from, int to)
+void PartCanvas::drawMidiPart(QPainter& p, const QRect&, EventList* events, MidiTrack *mt, MidiPart *pt, const QRect& r, int pTick, int from, int to)
{
//printf("x=%d y=%d h=%d w=%d\n",r.x(),r.y(),r.height(),r.width());
diff --git a/muse2/muse/arranger/tlist.cpp b/muse2/muse/arranger/tlist.cpp
index b907b555..2a397a4e 100644
--- a/muse2/muse/arranger/tlist.cpp
+++ b/muse2/muse/arranger/tlist.cpp
@@ -348,7 +348,7 @@ void TList::paint(const QRect& r)
if (cl->isVisible())
countVisible++;
}
- int count = ((AudioTrack*)track)->controller()->size();
+ //int count = ((AudioTrack*)track)->controller()->size(); //commented out by flo: gives a "unused variable" warning
s.sprintf(" %d(%d) visible",countVisible, countAll);
}
@@ -914,7 +914,7 @@ void TList::mousePressEvent(QMouseEvent* ev)
int x = ev->x();
int y = ev->y();
int button = ev->button();
- bool shift = ((QInputEvent*)ev)->modifiers() & Qt::ShiftModifier;
+ bool ctrl = ((QInputEvent*)ev)->modifiers() & Qt::ControlModifier;
Track* t = y2Track(y + ypos);
@@ -1152,7 +1152,7 @@ void TList::mousePressEvent(QMouseEvent* ev)
break;
case COL_MUTE:
// p3.3.29
- if ((button == Qt::RightButton) || (((QInputEvent*)ev)->modifiers() & Qt::ControlModifier))
+ if ((button == Qt::RightButton) || (((QInputEvent*)ev)->modifiers() & Qt::ShiftModifier))
t->setOff(!t->off());
else
{
@@ -1170,7 +1170,7 @@ void TList::mousePressEvent(QMouseEvent* ev)
case COL_NAME:
if (button == Qt::LeftButton) {
- if (!shift) {
+ if (!ctrl) {
song->deselectTracks();
t->setSelected(true);
@@ -1463,7 +1463,7 @@ void TList::wheelEvent(QWheelEvent* ev)
break;
case COL_MUTE:
// p3.3.29
- if (((QInputEvent*)ev)->modifiers() & Qt::ControlModifier)
+ if (((QInputEvent*)ev)->modifiers() & Qt::ShiftModifier)
t->setOff(!t->off());
else
{
diff --git a/muse2/muse/conf.cpp b/muse2/muse/conf.cpp
index 2f391445..e7eef503 100644
--- a/muse2/muse/conf.cpp
+++ b/muse2/muse/conf.cpp
@@ -14,6 +14,7 @@
#include "transport.h"
#include "icons.h"
#include "globals.h"
+#include "functions.h"
#include "drumedit.h"
#include "pianoroll.h"
#include "scoreedit.h"
@@ -891,6 +892,8 @@ void readConfiguration(Xml& xml, bool readOnlySequencer)
MasterEdit::readConfiguration(xml);
else if (tag == "waveedit")
WaveEdit::readConfiguration(xml);
+ else if (tag == "dialogs")
+ read_function_dialog_config(xml);
else if (tag == "shortcuts")
readShortCuts(xml);
else if (tag == "division")
@@ -1360,6 +1363,8 @@ void MusE::writeGlobalConfiguration(int level, Xml& xml) const
ScoreEdit::write_configuration(level, xml);
MasterEdit::writeConfiguration(level, xml);
WaveEdit::writeConfiguration(level, xml);
+
+ write_function_dialog_config(level, xml);
writeShortCuts(level, xml);
xml.etag(level, "configuration");
@@ -1475,6 +1480,8 @@ void MusE::writeConfiguration(int level, Xml& xml) const
ScoreEdit::write_configuration(level, xml);
MasterEdit::writeConfiguration(level, xml);
WaveEdit::writeConfiguration(level, xml);
+
+ write_function_dialog_config(level, xml);
writeMidiTransforms(level, xml);
writeMidiInputTransforms(level, xml);
diff --git a/muse2/muse/ctrl/ctrlcanvas.cpp b/muse2/muse/ctrl/ctrlcanvas.cpp
index 56f19384..70d1ad63 100644
--- a/muse2/muse/ctrl/ctrlcanvas.cpp
+++ b/muse2/muse/ctrl/ctrlcanvas.cpp
@@ -743,7 +743,7 @@ void CtrlCanvas::viewMousePressEvent(QMouseEvent* event)
start = event->pos();
Tool activeTool = tool;
- bool shift = event->modifiers() & Qt::ShiftModifier;
+ bool ctrlKey = event->modifiers() & Qt::ControlModifier;
int xpos = start.x();
int ypos = start.y();
@@ -755,7 +755,7 @@ void CtrlCanvas::viewMousePressEvent(QMouseEvent* event)
{
bool do_redraw = false;
- if (!shift)
+ if (!ctrlKey)
{
deselectAll();
do_redraw = true;
@@ -780,7 +780,7 @@ void CtrlCanvas::viewMousePressEvent(QMouseEvent* event)
break;
if (ev->intersects(_controller, r, tickstep, h))
{
- if (shift && ev->selected())
+ if (ctrlKey && ev->selected())
deselectItem(ev);
else
selectItem(ev);
@@ -797,7 +797,7 @@ void CtrlCanvas::viewMousePressEvent(QMouseEvent* event)
break;
case PencilTool:
- if (shift) {
+ if (ctrlKey) {
if (type != MidiController::Velo) {
drag = DRAG_NEW;
song->startUndo();
@@ -824,7 +824,7 @@ void CtrlCanvas::viewMousePressEvent(QMouseEvent* event)
if (drawLineMode) {
line2x = xpos;
line2y = ypos;
- if (shift)
+ if (ctrlKey)
newValRamp(line1x, line1y, line2x, line2y);
else
changeValRamp(line1x, line1y, line2x, line2y);
@@ -899,7 +899,7 @@ void CtrlCanvas::viewMouseMoveEvent(QMouseEvent* event)
void CtrlCanvas::viewMouseReleaseEvent(QMouseEvent* event)
{
- bool shift = event->modifiers() & Qt::ShiftModifier;
+ bool ctrlKey = event->modifiers() & Qt::ControlModifier;
switch (drag) {
///case DRAG_RESIZE:
@@ -922,7 +922,7 @@ void CtrlCanvas::viewMouseReleaseEvent(QMouseEvent* event)
case DRAG_LASSO:
{
- ///if (!shift)
+ ///if (!ctrlKey)
/// deselectAll();
lasso = lasso.normalized();
int h = height();
@@ -932,9 +932,9 @@ void CtrlCanvas::viewMouseReleaseEvent(QMouseEvent* event)
if((*i)->part() != curPart)
continue;
if ((*i)->intersects(_controller, lasso, tickstep, h)) {
- if (shift && (*i)->selected())
+ if (ctrlKey && (*i)->selected())
{
- //if (!shift) // Shift p4.0.18
+ //if (!ctrlKey) // ctrlKey p4.0.18
{
///deselectItem(*i);
//do_redraw = true;
diff --git a/muse2/muse/functions.cpp b/muse2/muse/functions.cpp
new file mode 100644
index 00000000..e14f32b8
--- /dev/null
+++ b/muse2/muse/functions.cpp
@@ -0,0 +1,505 @@
+//=========================================================
+// MusE
+// Linux Music Editor
+// $Id: functions.cpp,v 1.20.2.19 2011/05/05 20:10 flo93 Exp $
+// (C) Copyright 2011 Florian Jung (flo93@sourceforge.net)
+//=========================================================
+
+#include "functions.h"
+#include "song.h"
+
+#include "event.h"
+#include "audio.h"
+#include "gconfig.h"
+
+#include <iostream>
+
+using namespace std;
+
+GateTime* gatetime_dialog=NULL;
+Velocity* velocity_dialog=NULL;
+Quantize* quantize_dialog=NULL;
+Remove* erase_dialog=NULL;
+DelOverlaps* del_overlaps_dialog=NULL;
+Setlen* set_notelen_dialog=NULL;
+Move* move_notes_dialog=NULL;
+Transpose* transpose_dialog=NULL;
+
+void init_function_dialogs(QWidget* parent)
+{
+ gatetime_dialog = new GateTime(parent);
+ velocity_dialog = new Velocity(parent);
+ quantize_dialog = new Quantize(parent);
+ erase_dialog = new Remove(parent);
+ del_overlaps_dialog = new DelOverlaps(parent);
+ set_notelen_dialog = new Setlen(parent);
+ move_notes_dialog = new Move(parent);
+ transpose_dialog = new Transpose(parent);
+}
+
+set<Part*> partlist_to_set(PartList* pl)
+{
+ set<Part*> result;
+
+ for (PartList::iterator it=pl->begin(); it!=pl->end(); it++)
+ result.insert(it->second);
+
+ return result;
+}
+
+bool is_relevant(const Event& event, const Part* part, int range)
+{
+ unsigned tick;
+
+ if (event.type()!=Note) return false;
+
+ switch (range)
+ {
+ case 0: return true;
+ case 1: return event.selected();
+ case 2: tick=event.tick()+part->tick(); return (tick >= song->lpos()) && (tick < song->rpos());
+ case 3: return is_relevant(event,part,1) && is_relevant(event,part,2);
+ default: cout << "ERROR: ILLEGAL FUNCTION CALL in is_relevant: range is illegal: "<<range<<endl;
+ return false;
+ }
+}
+
+
+map<Event*, Part*> get_events(const set<Part*>& parts, int range)
+{
+ map<Event*, Part*> events;
+
+ for (set<Part*>::iterator part=parts.begin(); part!=parts.end(); part++)
+ for (iEvent event=(*part)->events()->begin(); event!=(*part)->events()->end(); event++)
+ if (is_relevant(event->second, *part, range))
+ events.insert(pair<Event*, Part*>(&event->second, *part));
+
+ return events;
+}
+
+
+bool modify_notelen(const set<Part*>& parts)
+{
+ if (!gatetime_dialog->exec())
+ return false;
+
+ modify_notelen(parts,gatetime_dialog->range,gatetime_dialog->rateVal,gatetime_dialog->offsetVal);
+
+ return true;
+}
+
+bool modify_velocity(const set<Part*>& parts)
+{
+ if (!velocity_dialog->exec())
+ return false;
+
+ modify_velocity(parts,velocity_dialog->range,velocity_dialog->rateVal,velocity_dialog->offsetVal);
+
+ return true;
+}
+
+bool quantize_notes(const set<Part*>& parts)
+{
+ if (!quantize_dialog->exec())
+ return false;
+
+ quantize_notes(parts, quantize_dialog->range, (config.division*4)/(1<<quantize_dialog->raster_power2),
+ quantize_dialog->strength, quantize_dialog->swing, quantize_dialog->threshold);
+
+ return true;
+}
+
+bool erase_notes(const set<Part*>& parts)
+{
+ if (!erase_dialog->exec())
+ return false;
+
+ erase_notes(parts,erase_dialog->range);
+
+ return true;
+}
+
+bool delete_overlaps(const set<Part*>& parts)
+{
+ if (!del_overlaps_dialog->exec())
+ return false;
+
+ delete_overlaps(parts,erase_dialog->range);
+
+ return true;
+}
+
+bool set_notelen(const set<Part*>& parts)
+{
+ if (!set_notelen_dialog->exec())
+ return false;
+
+ set_notelen(parts,set_notelen_dialog->range,set_notelen_dialog->len);
+
+ return true;
+}
+
+bool move_notes(const set<Part*>& parts)
+{
+ if (!move_notes_dialog->exec())
+ return false;
+
+ move_notes(parts,move_notes_dialog->range,move_notes_dialog->amount);
+
+ return true;
+}
+
+bool transpose_notes(const set<Part*>& parts)
+{
+ if (!transpose_dialog->exec())
+ return false;
+
+ transpose_notes(parts,transpose_dialog->range,transpose_dialog->amount);
+
+ return true;
+}
+
+
+
+void modify_velocity(const set<Part*>& parts, int range, int rate, int offset)
+{
+ map<Event*, Part*> events = get_events(parts, range);
+
+ if ( (!events.empty()) && ((rate!=100) || (offset!=0)) )
+ {
+ song->startUndo();
+
+ for (map<Event*, Part*>::iterator it=events.begin(); it!=events.end(); it++)
+ {
+ Event& event=*(it->first);
+ Part* part=it->second;
+
+ int velo = event.velo();
+
+ velo = (velo * rate) / 100;
+ velo += offset;
+
+ if (velo <= 0)
+ velo = 1;
+ else if (velo > 127)
+ velo = 127;
+
+ if (event.velo() != velo)
+ {
+ Event newEvent = event.clone();
+ newEvent.setVelo(velo);
+ // Indicate no undo, and do not do port controller values and clone parts.
+ audio->msgChangeEvent(event, newEvent, part, false, false, false);
+ }
+ }
+
+ song->endUndo(SC_EVENT_MODIFIED);
+ }
+}
+
+void modify_notelen(const set<Part*>& parts, int range, int rate, int offset)
+{
+ map<Event*, Part*> events = get_events(parts, range);
+
+ if ( (!events.empty()) && ((rate!=100) || (offset!=0)) )
+ {
+ song->startUndo();
+
+ for (map<Event*, Part*>::iterator it=events.begin(); it!=events.end(); it++)
+ {
+ Event& event=*(it->first);
+ Part* part=it->second;
+
+ unsigned int len = event.lenTick(); //prevent compiler warning: comparison singed/unsigned
+
+ len = (len * rate) / 100;
+ len += offset;
+
+ if (len <= 0)
+ len = 1;
+
+ if (event.lenTick() != len)
+ {
+ Event newEvent = event.clone();
+ newEvent.setLenTick(len);
+ // Indicate no undo, and do not do port controller values and clone parts.
+ audio->msgChangeEvent(event, newEvent, part, false, false, false);
+ }
+ }
+
+ song->endUndo(SC_EVENT_MODIFIED);
+ }
+}
+
+void set_notelen(const set<Part*>& parts, int range, int len)
+{
+ modify_notelen(parts, range, 0, len);
+}
+
+unsigned quantize_tick(unsigned tick, unsigned raster, int swing)
+{
+ //find out the nearest tick and the distance to it:
+ //this is so complicated because this function supports
+ //swing: if swing is 50, the resulting rhythm is not
+ //"daa daa daa daa" but "daaaa da daaaa da"...
+ int tick_dest1 = AL::sigmap.raster1(tick, raster*2); //round down
+ int tick_dest2 = tick_dest1 + raster + raster*swing/100;
+ int tick_dest3 = tick_dest1 + raster*2;
+
+ int tick_diff1 = tick_dest1 - tick;
+ int tick_diff2 = tick_dest2 - tick;
+ int tick_diff3 = tick_dest3 - tick;
+
+ if ((abs(tick_diff1) <= abs(tick_diff2)) && (abs(tick_diff1) <= abs(tick_diff3))) //tick_dest1 is the nearest tick
+ return tick_dest1;
+ else if ((abs(tick_diff2) <= abs(tick_diff1)) && (abs(tick_diff2) <= abs(tick_diff3))) //tick_dest2 is the nearest tick
+ return tick_dest2;
+ else
+ return tick_dest3;
+}
+
+void quantize_notes(const set<Part*>& parts, int range, int raster, int strength, int swing, int threshold)
+{
+ map<Event*, Part*> events = get_events(parts, range);
+ bool undo_started=false;
+
+ if (!events.empty())
+ {
+ for (map<Event*, Part*>::iterator it=events.begin(); it!=events.end(); it++)
+ {
+ Event& event=*(it->first);
+ Part* part=it->second;
+
+ unsigned begin_tick = event.tick() + part->tick();
+ int begin_diff = quantize_tick(begin_tick, raster, swing) - begin_tick;
+
+ if (abs(begin_diff) > threshold)
+ begin_tick = begin_tick + begin_diff*strength/100;
+
+
+ unsigned len=event.lenTick();
+
+ unsigned end_tick = begin_tick + len;
+ int len_diff = quantize_tick(end_tick, raster, swing) - end_tick;
+
+ if (abs(len_diff) > threshold)
+ len = len + len_diff*strength/100;
+
+ if (len <= 0)
+ len = 1;
+
+
+ if ( (event.lenTick() != len) || (event.tick() + part->tick() != begin_tick) )
+ {
+ if (!undo_started)
+ {
+ song->startUndo();
+ undo_started=true;
+ }
+
+ Event newEvent = event.clone();
+ newEvent.setTick(begin_tick - part->tick());
+ newEvent.setLenTick(len);
+ // Indicate no undo, and do not do port controller values and clone parts.
+ audio->msgChangeEvent(event, newEvent, part, false, false, false);
+ }
+ }
+
+ if (undo_started) song->endUndo(SC_EVENT_MODIFIED);
+ }
+}
+
+void erase_notes(const set<Part*>& parts, int range)
+{
+ map<Event*, Part*> events = get_events(parts, range);
+
+ if (!events.empty())
+ {
+ song->startUndo();
+
+ for (map<Event*, Part*>::iterator it=events.begin(); it!=events.end(); it++)
+ {
+ Event& event=*(it->first);
+ Part* part=it->second;
+
+ audio->msgDeleteEvent(event, part, false, false, false);
+ }
+
+ song->endUndo(SC_EVENT_REMOVED);
+ }
+}
+
+void transpose_notes(const set<Part*>& parts, int range, signed int halftonesteps)
+{
+ map<Event*, Part*> events = get_events(parts, range);
+
+ if ( (!events.empty()) && (halftonesteps!=0) )
+ {
+ song->startUndo();
+
+ for (map<Event*, Part*>::iterator it=events.begin(); it!=events.end(); it++)
+ {
+ Event& event=*(it->first);
+ Part* part=it->second;
+
+ Event newEvent = event.clone();
+ int pitch = event.pitch()+halftonesteps;
+ if (pitch > 127) pitch=127;
+ if (pitch < 0) pitch=0;
+ newEvent.setPitch(pitch);
+ // Indicate no undo, and do not do port controller values and clone parts.
+ audio->msgChangeEvent(event, newEvent, part, false, false, false);
+ }
+
+ song->endUndo(SC_EVENT_MODIFIED);
+ }
+}
+
+void move_notes(const set<Part*>& parts, int range, signed int ticks) //TODO FINDMICH: safety checks
+{
+ map<Event*, Part*> events = get_events(parts, range);
+
+ if ( (!events.empty()) && (ticks!=0) )
+ {
+ song->startUndo();
+
+ for (map<Event*, Part*>::iterator it=events.begin(); it!=events.end(); it++)
+ {
+ Event& event=*(it->first);
+ Part* part=it->second;
+
+ Event newEvent = event.clone();
+ newEvent.setTick(event.tick()+ticks);
+ // Indicate no undo, and do not do port controller values and clone parts.
+ audio->msgChangeEvent(event, newEvent, part, false, false, false);
+ }
+
+ song->endUndo(SC_EVENT_MODIFIED);
+ }
+}
+
+void delete_overlaps(const set<Part*>& parts, int range)
+{
+ map<Event*, Part*> events = get_events(parts, range);
+ bool undo_started=false;
+
+ set<Event*> deleted_events;
+
+ if (!events.empty())
+ {
+ for (map<Event*, Part*>::iterator it1=events.begin(); it1!=events.end(); it1++)
+ {
+ Event& event1=*(it1->first);
+ Part* part1=it1->second;
+
+ // we may NOT optimize by letting it2 start at (it1 +1); this optimisation
+ // is only allowed when events was sorted by time. it is, however, sorted
+ // randomly by pointer.
+ for (map<Event*, Part*>::iterator it2=events.begin(); it2!=events.end(); it2++)
+ {
+ Event& event2=*(it2->first);
+ Part* part2=it2->second;
+
+ if ( (part1->events()==part2->events()) && // part1 and part2 are the same or are duplicates
+ (&event1 != &event2) && // and event1 and event2 aren't the same
+ (deleted_events.find(&event2) == deleted_events.end()) ) //and event2 hasn't been deleted before
+ {
+ if ( (event1.pitch() == event2.pitch()) &&
+ (event1.tick() <= event2.tick()) &&
+ (event1.endTick() > event2.tick()) ) //they overlap
+ {
+ if (undo_started==false)
+ {
+ song->startUndo();
+ undo_started=true;
+ }
+
+ int new_len = event2.tick() - event1.tick();
+
+ if (new_len==0)
+ {
+ audio->msgDeleteEvent(event1, part1, false, false, false);
+ deleted_events.insert(&event1);
+ }
+ else
+ {
+ Event new_event1 = event1.clone();
+ new_event1.setLenTick(new_len);
+
+ audio->msgChangeEvent(event1, new_event1, part1, false, false, false);
+ }
+ }
+ }
+ }
+ }
+
+ if (undo_started) song->endUndo(SC_EVENT_MODIFIED);
+ }
+}
+
+
+
+void read_function_dialog_config(Xml& xml)
+{
+ if (erase_dialog==NULL)
+ {
+ cout << "ERROR: THIS SHOULD NEVER HAPPEN: read_function_dialog_config() called, but\n"
+ " dialogs are still uninitalized (NULL)!"<<endl;
+ return;
+ }
+
+ for (;;)
+ {
+ Xml::Token token = xml.parse();
+ if (token == Xml::Error || token == Xml::End)
+ break;
+
+ const QString& tag = xml.s1();
+ switch (token)
+ {
+ case Xml::TagStart:
+ if (tag == "mod_len")
+ gatetime_dialog->read_configuration(xml);
+ else if (tag == "mod_velo")
+ velocity_dialog->read_configuration(xml);
+ else if (tag == "quantize")
+ quantize_dialog->read_configuration(xml);
+ else if (tag == "erase")
+ erase_dialog->read_configuration(xml);
+ else if (tag == "del_overlaps")
+ del_overlaps_dialog->read_configuration(xml);
+ else if (tag == "setlen")
+ set_notelen_dialog->read_configuration(xml);
+ else if (tag == "move")
+ move_notes_dialog->read_configuration(xml);
+ else if (tag == "transpose")
+ transpose_dialog->read_configuration(xml);
+ else
+ xml.unknown("function_dialogs");
+ break;
+
+ case Xml::TagEnd:
+ if (tag == "dialogs")
+ return;
+
+ default:
+ break;
+ }
+ }
+}
+
+void write_function_dialog_config(int level, Xml& xml)
+{
+ xml.tag(level++, "dialogs");
+
+ gatetime_dialog->write_configuration(level, xml);
+ velocity_dialog->write_configuration(level, xml);
+ quantize_dialog->write_configuration(level, xml);
+ erase_dialog->write_configuration(level, xml);
+ del_overlaps_dialog->write_configuration(level, xml);
+ set_notelen_dialog->write_configuration(level, xml);
+ move_notes_dialog->write_configuration(level, xml);
+ transpose_dialog->write_configuration(level, xml);
+
+ xml.tag(level, "/dialogs");
+}
diff --git a/muse2/muse/functions.h b/muse2/muse/functions.h
new file mode 100644
index 00000000..14797a15
--- /dev/null
+++ b/muse2/muse/functions.h
@@ -0,0 +1,67 @@
+//=========================================================
+// MusE
+// Linux Music Editor
+// $Id: functions.h,v 1.20.2.19 2011/05/05 20:10 flo93 Exp $
+// (C) Copyright 2011 Florian Jung (flo93@sourceforge.net)
+//=========================================================
+
+#ifndef __FUNCTIONS_H__
+#define __FUNCTIONS_H__
+
+#include "velocity.h"
+#include "quantize.h"
+#include "gatetime.h"
+#include "remove.h"
+#include "transpose.h"
+#include "setlen.h"
+#include "move.h"
+#include "deloverlaps.h"
+
+#include <set>
+#include "part.h"
+
+
+extern GateTime* gatetime_dialog;
+extern Velocity* velocity_dialog;
+extern Quantize* quantize_dialog;
+extern Remove* erase_dialog;
+extern DelOverlaps* del_overlaps_dialog;
+extern Setlen* set_notelen_dialog;
+extern Move* move_notes_dialog;
+extern Transpose* transpose_dialog;
+
+void init_function_dialogs(QWidget* parent);
+
+
+std::set<Part*> partlist_to_set(PartList* pl);
+
+//these functions simply do their job, non-interactively
+void modify_velocity(const std::set<Part*>& parts, int range, int rate, int offset=0);
+void modify_notelen(const std::set<Part*>& parts, int range, int rate, int offset=0);
+void quantize_notes(const std::set<Part*>& parts, int range, int raster, int strength=100, int swing=0, int threshold=0);
+void erase_notes(const std::set<Part*>& parts, int range);
+void delete_overlaps(const std::set<Part*>& parts, int range);
+void set_notelen(const std::set<Part*>& parts, int range, int len);
+void move_notes(const std::set<Part*>& parts, int range, signed int ticks);
+void transpose_notes(const std::set<Part*>& parts, int range, signed int halftonesteps);
+
+
+//the below functions automatically open the dialog
+//they return true if you click "ok" and false if "abort"
+bool modify_velocity(const std::set<Part*>& parts);
+bool modify_notelen(const std::set<Part*>& parts);
+bool quantize_notes(const std::set<Part*>& parts);
+bool set_notelen(const std::set<Part*>& parts);
+bool move_notes(const std::set<Part*>& parts);
+bool transpose_notes(const std::set<Part*>& parts);
+bool erase_notes(const std::set<Part*>& parts);
+bool delete_overlaps(const std::set<Part*>& parts);
+
+
+
+//functions for reading and writing default values
+class Xml;
+void read_function_dialog_config(Xml& xml);
+void write_function_dialog_config(int level, Xml& xml);
+
+#endif
diff --git a/muse2/muse/globals.cpp b/muse2/muse/globals.cpp
index 6c0bbbc6..f8ae4454 100644
--- a/muse2/muse/globals.cpp
+++ b/muse2/muse/globals.cpp
@@ -174,10 +174,12 @@ const char* med_file_save_pattern[] = {
*/
const QStringList med_file_pattern =
QT_TRANSLATE_NOOP("@default",
+ QString("all known files (*.med *.med.gz *.med.bz2 *.mid *.midi *.kar);;") +
QString("med Files (*.med *.med.gz *.med.bz2);;") +
QString("Uncompressed med Files (*.med);;") +
QString("gzip compressed med Files (*.med.gz);;") +
QString("bzip2 compressed med Files (*.med.bz2);;") +
+ QString("mid Files (*.mid *.midi *.kar);;") +
QString("All Files (*)")).split(";;");
const QStringList med_file_save_pattern =
QT_TRANSLATE_NOOP("@default",
diff --git a/muse2/muse/liste/listedit.cpp b/muse2/muse/liste/listedit.cpp
index 11e9cfc5..080ee01c 100644
--- a/muse2/muse/liste/listedit.cpp
+++ b/muse2/muse/liste/listedit.cpp
@@ -445,7 +445,7 @@ QString EventListItem::text(int col) const
//---------------------------------------------------------
ListEdit::ListEdit(PartList* pl)
- : MidiEditor(0, 0, pl)
+ : MidiEditor(0, pl)
{
insertItems = new QActionGroup(this);
insertItems->setExclusive(false);
diff --git a/muse2/muse/main.cpp b/muse2/muse/main.cpp
index 53f8961b..192c0bd3 100644
--- a/muse2/muse/main.cpp
+++ b/muse2/muse/main.cpp
@@ -27,6 +27,7 @@
#include "globals.h"
#include "icons.h"
#include "sync.h"
+#include "functions.h"
extern bool initDummyAudio();
extern void initIcons();
@@ -253,6 +254,7 @@ int main(int argc, char* argv[])
QApplication::setColorSpec(QApplication::ManyColor);
MuseApplication app(argc, argv);
+ init_function_dialogs(muse);
initShortCuts();
readConfiguration();
@@ -471,6 +473,7 @@ int main(int argc, char* argv[])
app.setMuse(muse);
muse->setWindowIcon(*museIcon);
+
// Added by Tim. p3.3.22
if (!debugMode) {
if (mlockall(MCL_CURRENT | MCL_FUTURE))
diff --git a/muse2/muse/master/lmaster.cpp b/muse2/muse/master/lmaster.cpp
index 2f921cdc..9083c024 100644
--- a/muse2/muse/master/lmaster.cpp
+++ b/muse2/muse/master/lmaster.cpp
@@ -125,6 +125,7 @@ LMaster::LMaster()
setWindowTitle(tr("MusE: Mastertrack"));
setMinimumHeight(100);
setFixedWidth(400);
+ setFocusPolicy(Qt::StrongFocus);
//---------Pulldown Menu----------------------------
menuEdit = menuBar()->addMenu(tr("&Edit"));
diff --git a/muse2/muse/master/masteredit.cpp b/muse2/muse/master/masteredit.cpp
index 2b91ae90..9053f3a8 100644
--- a/muse2/muse/master/masteredit.cpp
+++ b/muse2/muse/master/masteredit.cpp
@@ -33,6 +33,9 @@
#include <QToolButton>
int MasterEdit::_rasterInit = 0;
+int MasterEdit::_widthInit = 600;
+int MasterEdit::_heightInit = 400;
+QByteArray MasterEdit::_toolbarInit;
//---------------------------------------------------------
// closeEvent
@@ -77,12 +80,12 @@ void MasterEdit::songChanged(int type)
//---------------------------------------------------------
MasterEdit::MasterEdit()
- : MidiEditor(0, _rasterInit, 0)
+ : MidiEditor(_rasterInit, 0)
{
setWindowTitle(tr("MusE: Mastertrack"));
_raster = 0; // measure
setMinimumSize(400, 300);
- resize(500, 350);
+ resize(_widthInit, _heightInit);
//---------Pulldown Menu----------------------------
// QPopupMenu* file = new QPopupMenu(this);
@@ -229,6 +232,9 @@ MasterEdit::MasterEdit()
connect(canvas, SIGNAL(followEvent(int)), hscroll, SLOT(setOffset(int)));
connect(canvas, SIGNAL(timeChanged(unsigned)), SLOT(setTime(unsigned)));
+
+ if (!_toolbarInit.isEmpty())
+ restoreState(_toolbarInit);
}
//---------------------------------------------------------
@@ -317,6 +323,12 @@ void MasterEdit::readConfiguration(Xml& xml)
case Xml::TagStart:
if (tag == "raster")
_rasterInit = xml.parseInt();
+ else if (tag == "width")
+ _widthInit = xml.parseInt();
+ else if (tag == "height")
+ _heightInit = xml.parseInt();
+ else if (tag == "toolbars")
+ _toolbarInit = QByteArray::fromHex(xml.parse1().toAscii());
else
xml.unknown("MasterEdit");
break;
@@ -337,6 +349,9 @@ void MasterEdit::writeConfiguration(int level, Xml& xml)
{
xml.tag(level++, "masteredit");
xml.intTag(level, "raster", _rasterInit);
+ xml.intTag(level, "width", _widthInit);
+ xml.intTag(level, "height", _heightInit);
+ xml.strTag(level, "toolbars", _toolbarInit.toHex().data());
xml.tag(level, "/masteredit");
}
@@ -404,3 +419,35 @@ void MasterEdit::setTempo(int val)
}
}
+
+//---------------------------------------------------------
+// resizeEvent
+//---------------------------------------------------------
+
+void MasterEdit::resizeEvent(QResizeEvent* ev)
+ {
+ QWidget::resizeEvent(ev);
+ storeInitialState();
+ }
+
+//---------------------------------------------------------
+// focusOutEvent
+//---------------------------------------------------------
+
+void MasterEdit::focusOutEvent(QFocusEvent* ev)
+ {
+ QWidget::focusOutEvent(ev);
+ storeInitialState();
+ }
+
+
+//---------------------------------------------------------
+// storeInitialState
+//---------------------------------------------------------
+
+void MasterEdit::storeInitialState()
+ {
+ _widthInit = width();
+ _heightInit = height();
+ _toolbarInit=saveState();
+ }
diff --git a/muse2/muse/master/masteredit.h b/muse2/muse/master/masteredit.h
index af43c7b0..59a5ab05 100644
--- a/muse2/muse/master/masteredit.h
+++ b/muse2/muse/master/masteredit.h
@@ -8,6 +8,9 @@
#ifndef __MASTER_EDIT_H__
#define __MASTER_EDIT_H__
+#include <QByteArray>
+#include <QResizeEvent>
+
#include "midieditor.h"
#include "noteinfo.h"
#include "cobject.h"
@@ -56,9 +59,14 @@ class MasterEdit : public MidiEditor {
QToolButton* enableButton;
static int _rasterInit;
+ static int _widthInit, _heightInit;
+ static QByteArray _toolbarInit;
Q_OBJECT
virtual void closeEvent(QCloseEvent*);
+ virtual void resizeEvent(QResizeEvent*);
+ virtual void focusOutEvent(QFocusEvent*);
+ void storeInitialState();
private slots:
void _setRaster(int);
diff --git a/muse2/muse/midiedit/CMakeLists.txt b/muse2/muse/midiedit/CMakeLists.txt
index 7e973aaa..a52d1844 100644
--- a/muse2/muse/midiedit/CMakeLists.txt
+++ b/muse2/muse/midiedit/CMakeLists.txt
@@ -35,7 +35,6 @@ QT4_WRAP_CPP ( midiedit_mocs
piano.h
pianoroll.h
prcanvas.h
- quantconfig.h
scoreedit.h
)
@@ -58,7 +57,6 @@ file (GLOB midiedit_source_files
piano.cpp
pianoroll.cpp
prcanvas.cpp
- quantconfig.cpp
scoreedit.cpp
)
diff --git a/muse2/muse/midiedit/cmd.h b/muse2/muse/midiedit/cmd.h
index 8339b7ae..b72166b1 100644
--- a/muse2/muse/midiedit/cmd.h
+++ b/muse2/muse/midiedit/cmd.h
@@ -12,17 +12,18 @@
#define CMD_RIGHT 1
#define CMD_INSERT 2
#define CMD_DELETE 3
-#define CMD_1 4
-#define CMD_2 5
-#define CMD_3 6
-#define CMD_4 7
-#define CMD_5 8
-#define CMD_6 9
-#define CMD_7 10
-#define CMD_T 11
-#define CMD_period 12
-#define CMD_LEFT_NOSNAP 13
-#define CMD_RIGHT_NOSNAP 14
+#define CMD_BACKSPACE 4
+#define CMD_1 5
+#define CMD_2 6
+#define CMD_3 7
+#define CMD_4 8
+#define CMD_5 9
+#define CMD_6 10
+#define CMD_7 11
+#define CMD_T 12
+#define CMD_period 13
+#define CMD_LEFT_NOSNAP 14
+#define CMD_RIGHT_NOSNAP 15
#endif
diff --git a/muse2/muse/midiedit/dcanvas.cpp b/muse2/muse/midiedit/dcanvas.cpp
index 1303c189..18463eb0 100644
--- a/muse2/muse/midiedit/dcanvas.cpp
+++ b/muse2/muse/midiedit/dcanvas.cpp
@@ -31,7 +31,6 @@
#include "globals.h"
#include "midiport.h"
#include "audio.h"
-#include "velocity.h"
#include "shortcuts.h"
#include "icons.h"
@@ -608,7 +607,7 @@ void DrumCanvas::drawCanvas(QPainter& p, const QRect& rect)
//---------------------------------------------------------
// drawTopItem
//---------------------------------------------------------
-void DrumCanvas::drawTopItem(QPainter &p, const QRect &r)
+void DrumCanvas::drawTopItem(QPainter& p, const QRect&)
{
// draw cursor
if (_tool == CursorTool) {
@@ -743,20 +742,6 @@ void DrumCanvas::cmd(int cmd)
editor->setCurCanvasPart(newpt);
}
break;
- case CMD_DEL:
- if (selectionSize()) {
- song->startUndo();
- for (iCItem i = items.begin(); i != items.end(); ++i) {
- if (!i->second->isSelected())
- continue;
- Event ev = i->second->event();
- // Indicate no undo, and do not do port controller values and clone parts.
- //audio->msgDeleteEvent(ev, i->second->part(), false);
- audio->msgDeleteEvent(ev, i->second->part(), false, false, false);
- }
- song->endUndo(SC_EVENT_REMOVED);
- }
- return;
case CMD_SAVE:
case CMD_LOAD:
@@ -819,52 +804,6 @@ void DrumCanvas::cmd(int cmd)
song->setPos(0, p, true, true, true); //CDW
}
break;
- case CMD_MODIFY_VELOCITY:
- {
- Velocity w;
- w.setRange(0); //TODO: Make this work! Probably put _to & _toInit in ecanvas instead
- if (!w.exec())
- break;
- int range = w.range(); // all, selected, looped, sel+loop
- int rate = w.rateVal();
- int offset = w.offsetVal();
-
- song->startUndo();
- for (iCItem k = items.begin(); k != items.end(); ++k) {
- DEvent* devent = (DEvent*)(k->second);
- Event event = devent->event();
- if (event.type() != Note)
- continue;
- unsigned tick = event.tick();
- bool selected = k->second->isSelected();
- bool inLoop = (tick >= song->lpos()) && (tick < song->rpos());
-
- if ((range == 0)
- || (range == 1 && selected)
- || (range == 2 && inLoop)
- || (range == 3 && selected && inLoop)) {
- int velo = event.velo();
-
- //velo = rate ? (velo * 100) / rate : 64;
- velo = (velo * rate) / 100;
- velo += offset;
-
- if (velo <= 0)
- velo = 1;
- if (velo > 127)
- velo = 127;
- if (event.velo() != velo) {
- Event newEvent = event.clone();
- newEvent.setVelo(velo);
- // Indicate no undo, and do not do port controller values and clone parts.
- //audio->msgChangeEvent(event, newEvent, devent->part(), false);
- audio->msgChangeEvent(event, newEvent, devent->part(), false, false, false);
- }
- }
- }
- song->endUndo(SC_EVENT_MODIFIED);
- }
- break;
}
updateSelection();
redraw();
@@ -1399,13 +1338,10 @@ void DrumCanvas::keyPress(QKeyEvent* event)
if (_tool == CursorTool) {
int key = event->key();
- ///if (event->state() & Qt::ShiftButton)
if (((QInputEvent*)event)->modifiers() & Qt::ShiftModifier)
key += Qt::SHIFT;
- ///if (event->state() & Qt::AltButton)
if (((QInputEvent*)event)->modifiers() & Qt::AltModifier)
key += Qt::ALT;
- ///if (event->state() & Qt::ControlButton)
if (((QInputEvent*)event)->modifiers() & Qt::ControlModifier)
key+= Qt::CTRL;
diff --git a/muse2/muse/midiedit/dcanvas.h b/muse2/muse/midiedit/dcanvas.h
index 4e05a422..8bd70d89 100644
--- a/muse2/muse/midiedit/dcanvas.h
+++ b/muse2/muse/midiedit/dcanvas.h
@@ -90,7 +90,8 @@ class DrumCanvas : public EventCanvas {
CMD_CUT, CMD_COPY, CMD_PASTE, CMD_SAVE, CMD_LOAD, CMD_RESET,
CMD_SELECT_ALL, CMD_SELECT_NONE, CMD_SELECT_INVERT,
CMD_SELECT_ILOOP, CMD_SELECT_OLOOP, CMD_SELECT_PREV_PART, CMD_SELECT_NEXT_PART,
- CMD_DEL, CMD_FIXED_LEN, CMD_RIGHT, CMD_LEFT, CMD_RIGHT_NOSNAP, CMD_LEFT_NOSNAP, CMD_MODIFY_VELOCITY
+ CMD_DEL, CMD_FIXED_LEN, CMD_RIGHT, CMD_LEFT, CMD_RIGHT_NOSNAP, CMD_LEFT_NOSNAP, CMD_MODIFY_VELOCITY,
+ CMD_QUANTIZE, CMD_ERASE_EVENT, CMD_NOTE_SHIFT, CMD_DELETE_OVERLAPS
};
DrumCanvas(MidiEditor*, QWidget*, int, int,
const char* name = 0);
diff --git a/muse2/muse/midiedit/dlist.cpp b/muse2/muse/midiedit/dlist.cpp
index 3736d6aa..3b8670db 100644
--- a/muse2/muse/midiedit/dlist.cpp
+++ b/muse2/muse/midiedit/dlist.cpp
@@ -220,8 +220,6 @@ void DList::viewMousePressEvent(QMouseEvent* ev)
int x = ev->x();
int y = ev->y();
int button = ev->button();
- ///bool shift = ev->state() & Qt::ShiftButton;
- //bool shift = ev->modifiers() & Qt::ShiftModifier;
unsigned pitch = y / TH;
DrumMap* dm = &drumMap[pitch];
@@ -259,7 +257,6 @@ void DList::viewMousePressEvent(QMouseEvent* ev)
break;
case COL_PORT:
if (button == Qt::RightButton) {
- ///bool changeAll = ev->state() & Qt::ControlButton;
bool changeAll = ev->modifiers() & Qt::ControlModifier;
devicesPopupMenu(dm, mapx(x), mapy(pitch * TH), changeAll);
}
@@ -328,7 +325,6 @@ void DList::viewMousePressEvent(QMouseEvent* ev)
else if (val > 127)
val = 127;
- ///if (ev->state() & Qt::ControlButton) {
if (ev->modifiers() & Qt::ControlModifier) {
audio->msgIdle(true);
// Delete all port controller events.
@@ -724,7 +720,6 @@ void DList::viewMouseReleaseEvent(QMouseEvent* ev)
editor->setFocus();
int x = ev->x();
int y = ev->y();
- ///bool shift = ev->state() & Qt::ShiftButton;
bool shift = ev->modifiers() & Qt::ShiftModifier;
unsigned pitch = y / TH;
diff --git a/muse2/muse/midiedit/drumedit.cpp b/muse2/muse/midiedit/drumedit.cpp
index 5cd4c130..b8d97283 100644
--- a/muse2/muse/midiedit/drumedit.cpp
+++ b/muse2/muse/midiedit/drumedit.cpp
@@ -43,6 +43,7 @@
#include "drummap.h"
#include "audio.h"
#include "gconfig.h"
+#include "functions.h"
/*
static const char* map_file_pattern[] = {
@@ -59,13 +60,12 @@ static const char* map_file_save_pattern[] = {
};
*/
-int DrumEdit::_quantInit = 96;
int DrumEdit::_rasterInit = 96;
int DrumEdit::_widthInit = 600;
int DrumEdit::_heightInit = 400;
int DrumEdit::_dlistWidthInit = 50;
int DrumEdit::_dcanvasWidthInit = 300;
-int DrumEdit::_toInit = 0;
+QByteArray DrumEdit::_toolbarInit;
static const int xscale = -10;
static const int yscale = 1;
@@ -155,12 +155,12 @@ void DrumEdit::closeEvent(QCloseEvent* e)
//---------------------------------------------------------
DrumEdit::DrumEdit(PartList* pl, QWidget* parent, const char* name, unsigned initPos)
- : MidiEditor(_quantInit, _rasterInit, pl, parent, name)
+ : MidiEditor(_rasterInit, pl, parent, name)
{
+ setFocusPolicy(Qt::StrongFocus);
split1w1 = 0;
resize(_widthInit, _heightInit);
selPart = 0;
- _to = _toInit;
QSignalMapper *signalMapper = new QSignalMapper(this);
//---------Pulldown Menu----------------------------
@@ -235,12 +235,24 @@ DrumEdit::DrumEdit(PartList* pl, QWidget* parent, const char* name, unsigned ini
fixedAction = menuFunctions->addAction(tr("Set Fixed Length"));
veloAction = menuFunctions->addAction(tr("Modify Velocity"));
+ quantizeAction = menuFunctions->addAction(tr("Quantize"));
+ QAction* eraseEventAction = menuFunctions->addAction(tr("Erase Event"));
+ QAction* noteShiftAction = menuFunctions->addAction(tr("Note Shift"));
+ QAction* delOverlapsAction = menuFunctions->addAction(tr("Delete Overlaps"));
connect(fixedAction, SIGNAL(triggered()), signalMapper, SLOT(map()));
connect(veloAction, SIGNAL(triggered()), signalMapper, SLOT(map()));
+ connect(quantizeAction, SIGNAL(triggered()), signalMapper, SLOT(map()));
+ connect(eraseEventAction, SIGNAL(triggered()), signalMapper, SLOT(map()));
+ connect(noteShiftAction, SIGNAL(triggered()), signalMapper, SLOT(map()));
+ connect(delOverlapsAction, SIGNAL(triggered()), signalMapper, SLOT(map()));
signalMapper->setMapping(fixedAction, DrumCanvas::CMD_FIXED_LEN);
signalMapper->setMapping(veloAction, DrumCanvas::CMD_MODIFY_VELOCITY);
+ signalMapper->setMapping(quantizeAction, DrumCanvas::CMD_QUANTIZE);
+ signalMapper->setMapping(eraseEventAction, DrumCanvas::CMD_ERASE_EVENT);
+ signalMapper->setMapping(noteShiftAction, DrumCanvas::CMD_NOTE_SHIFT);
+ signalMapper->setMapping(delOverlapsAction, DrumCanvas::CMD_DELETE_OVERLAPS);
QMenu* menuScriptPlugins = menuBar()->addMenu(tr("&Plugins"));
song->populateScriptMenu(menuScriptPlugins, this);
@@ -317,7 +329,7 @@ DrumEdit::DrumEdit(PartList* pl, QWidget* parent, const char* name, unsigned ini
addToolBarBreak();
// don't show pitch value in toolbar
- toolbar = new Toolbar1(this, _rasterInit, _quantInit, false);
+ toolbar = new Toolbar1(this, _rasterInit, false);
addToolBar(toolbar);
addToolBarBreak();
@@ -456,13 +468,15 @@ DrumEdit::DrumEdit(PartList* pl, QWidget* parent, const char* name, unsigned ini
// connect toolbar
connect(canvas, SIGNAL(timeChanged(unsigned)), SLOT(setTime(unsigned)));
connect(time, SIGNAL(timeChanged(unsigned)), SLOT(setTime(unsigned)));
- connect(toolbar, SIGNAL(quantChanged(int)), SLOT(setQuant(int)));
connect(toolbar, SIGNAL(rasterChanged(int)), SLOT(setRaster(int)));
connect(toolbar, SIGNAL(soloChanged(bool)), SLOT(soloChanged(bool)));
connect(info, SIGNAL(valueChanged(NoteInfo::ValType, int)), SLOT(noteinfoChanged(NoteInfo::ValType, int)));
connect(ctrl, SIGNAL(clicked()), SLOT(addCtrl()));
+ if (!_toolbarInit.isEmpty())
+ restoreState(_toolbarInit);
+
QClipboard* cb = QApplication::clipboard();
connect(cb, SIGNAL(dataChanged()), SLOT(clipboardChanged()));
@@ -603,16 +617,6 @@ void DrumEdit::setRaster(int val)
}
//---------------------------------------------------------
-// setQuant
-//---------------------------------------------------------
-
-void DrumEdit::setQuant(int val)
- {
- _quantInit = val;
- MidiEditor::setQuant(val);
- }
-
-//---------------------------------------------------------
// edit currently selected Event
//---------------------------------------------------------
@@ -722,10 +726,8 @@ void DrumEdit::readStatus(Xml& xml)
break;
case Xml::TagEnd:
if (tag == "drumedit") {
- _quantInit = _quant;
_rasterInit = _raster;
toolbar->setRaster(_raster);
- toolbar->setQuant(_quant);
canvas->redrawGrid();
return;
}
@@ -749,9 +751,7 @@ void DrumEdit::readConfiguration(Xml& xml)
case Xml::End:
return;
case Xml::TagStart:
- if (tag == "quant")
- _quantInit = xml.parseInt();
- else if (tag == "raster")
+ if (tag == "raster")
_rasterInit = xml.parseInt();
else if (tag == "width")
_widthInit = xml.parseInt();
@@ -761,9 +761,8 @@ void DrumEdit::readConfiguration(Xml& xml)
_dcanvasWidthInit = xml.parseInt();
else if (tag == "dlistwidth")
_dlistWidthInit = xml.parseInt();
- else if (tag == "to") {
- _toInit = xml.parseInt();
- }
+ else if (tag == "toolbars")
+ _toolbarInit = QByteArray::fromHex(xml.parse1().toAscii());
else
xml.unknown("DrumEdit");
break;
@@ -784,13 +783,12 @@ void DrumEdit::readConfiguration(Xml& xml)
void DrumEdit::writeConfiguration(int level, Xml& xml)
{
xml.tag(level++, "drumedit");
- xml.intTag(level, "quant", _quantInit);
xml.intTag(level, "raster", _rasterInit);
xml.intTag(level, "width", _widthInit);
xml.intTag(level, "height", _heightInit);
xml.intTag(level, "dlistwidth", _dlistWidthInit);
xml.intTag(level, "dcanvaswidth", _dcanvasWidthInit);
- xml.intTag(level, "to", _toInit);
+ xml.strTag(level, "toolbars", _toolbarInit.toHex().data());
xml.tag(level, "/drumedit");
}
@@ -898,18 +896,18 @@ void DrumEdit::reset()
void DrumEdit::cmd(int cmd)
{
switch(cmd) {
- case DrumCanvas::CMD_LOAD:
- load();
- break;
- case DrumCanvas::CMD_SAVE:
- save();
- break;
- case DrumCanvas::CMD_RESET:
- reset();
- break;
- default:
- ((DrumCanvas*)(canvas))->cmd(cmd);
- break;
+ case DrumCanvas::CMD_LOAD: load(); break;
+ case DrumCanvas::CMD_SAVE: save(); break;
+ case DrumCanvas::CMD_RESET: reset(); break;
+ case DrumCanvas::CMD_MODIFY_VELOCITY: modify_velocity(partlist_to_set(parts())); break;
+ case DrumCanvas::CMD_ERASE_EVENT: erase_notes(partlist_to_set(parts())); break;
+ case DrumCanvas::CMD_DEL: erase_notes(partlist_to_set(parts()),1); break; //delete selected events
+ case DrumCanvas::CMD_DELETE_OVERLAPS: delete_overlaps(partlist_to_set(parts())); break;
+ case DrumCanvas::CMD_NOTE_SHIFT: move_notes(partlist_to_set(parts())); break;
+ //case DrumCanvas::CMD_FIXED_LEN: // this must be handled by the drum canvas, due to its
+ // special nature (each drum has its own length)
+
+ default: ((DrumCanvas*)(canvas))->cmd(cmd);
}
}
@@ -1028,12 +1026,31 @@ void DrumEdit::newCanvasWidth(int w)
void DrumEdit::resizeEvent(QResizeEvent* ev)
{
QWidget::resizeEvent(ev);
- _widthInit = ev->size().width();
- _heightInit = ev->size().height();
-
+ storeInitialState();
//TODO: Make the dlist not expand/shrink, but the canvas instead
}
+//---------------------------------------------------------
+// focusOutEvent
+//---------------------------------------------------------
+
+void DrumEdit::focusOutEvent(QFocusEvent* ev)
+ {
+ QWidget::focusOutEvent(ev);
+ storeInitialState();
+ }
+
+//---------------------------------------------------------
+// storeInitialState
+//---------------------------------------------------------
+
+void DrumEdit::storeInitialState()
+ {
+ _widthInit = width();
+ _heightInit = height();
+ _toolbarInit=saveState();
+ }
+
//---------------------------------------------------------
// configChanged
@@ -1229,9 +1246,7 @@ void DrumEdit::keyPressEvent(QKeyEvent* event)
event->ignore();
return;
}
- setQuant(val);
setRaster(val);
- toolbar->setQuant(_quant);
toolbar->setRaster(_raster);
}
@@ -1271,7 +1286,7 @@ void DrumEdit::execDeliveredScript(int id)
{
//QString scriptfile = QString(INSTPREFIX) + SCRIPTSSUFFIX + deliveredScriptNames[id];
QString scriptfile = song->getScriptPath(id, true);
- song->executeScript(scriptfile.toLatin1().constData(), parts(), quant(), true);
+ song->executeScript(scriptfile.toLatin1().constData(), parts(), raster(), true);
}
//---------------------------------------------------------
@@ -1280,7 +1295,7 @@ void DrumEdit::execDeliveredScript(int id)
void DrumEdit::execUserScript(int id)
{
QString scriptfile = song->getScriptPath(id, false);
- song->executeScript(scriptfile.toLatin1().constData(), parts(), quant(), true);
+ song->executeScript(scriptfile.toLatin1().constData(), parts(), raster(), true);
}
void DrumEdit::setStep(QString v)
diff --git a/muse2/muse/midiedit/drumedit.h b/muse2/muse/midiedit/drumedit.h
index 02a1a5cc..242ec963 100644
--- a/muse2/muse/midiedit/drumedit.h
+++ b/muse2/muse/midiedit/drumedit.h
@@ -8,6 +8,8 @@
#ifndef __DRUM_EDIT_H__
#define __DRUM_EDIT_H__
+#include <QByteArray>
+
#include <values.h>
#include "midieditor.h"
#include "noteinfo.h"
@@ -66,15 +68,14 @@ class DrumEdit : public MidiEditor {
QToolBar* tools;
QComboBox *stepLenWidget;
- static int _quantInit, _rasterInit;
+ static int _rasterInit;
static int _widthInit, _heightInit;
static int _dlistWidthInit, _dcanvasWidthInit;
-
- static int _toInit; //Used in function dialog for applying modification to selection
+ static QByteArray _toolbarInit;
QAction *loadAction, *saveAction, *resetAction;
QAction *cutAction, *copyAction, *pasteAction, *deleteAction;
- QAction *fixedAction, *veloAction;
+ QAction *fixedAction, *veloAction, *quantizeAction;
QAction *sallAction, *snoneAction, *invAction, *inAction , *outAction;
QAction *prevAction, *nextAction;
@@ -83,15 +84,17 @@ class DrumEdit : public MidiEditor {
virtual void closeEvent(QCloseEvent*);
QWidget* genToolbar(QWidget* parent);
- virtual void resizeEvent(QResizeEvent*);
virtual void keyPressEvent(QKeyEvent*);
- int _to;//TODO: Make this work
+
+ virtual void resizeEvent(QResizeEvent*);
+ virtual void focusOutEvent(QFocusEvent*);
+ void storeInitialState();
+
void setHeaderToolTips();
void setHeaderWhatsThis();
private slots:
void setRaster(int);
- void setQuant(int);
void noteinfoChanged(NoteInfo::ValType type, int val);
//CtrlEdit* addCtrl();
void removeCtrl(CtrlEdit* ctrl);
diff --git a/muse2/muse/midiedit/pianoroll.cpp b/muse2/muse/midiedit/pianoroll.cpp
index f02b10a6..840bd1c7 100644
--- a/muse2/muse/midiedit/pianoroll.cpp
+++ b/muse2/muse/midiedit/pianoroll.cpp
@@ -44,22 +44,19 @@
#include "gconfig.h"
#include "icons.h"
#include "audio.h"
+#include "functions.h"
+
#include "cmd.h"
-#include "quantconfig.h"
#include "shortcuts.h"
#include "mtrackinfo.h"
-int PianoRoll::_quantInit = 96;
int PianoRoll::_rasterInit = 96;
int PianoRoll::_widthInit = 600;
int PianoRoll::_heightInit = 400;
-int PianoRoll::_quantStrengthInit = 80; // 1 - 100%
-int PianoRoll::_quantLimitInit = 50; // tick value
-bool PianoRoll::_quantLenInit = false;
-int PianoRoll::_toInit = 0;
int PianoRoll::colorModeInit = 0;
+QByteArray PianoRoll::_toolbarInit;
static const int xscale = -10;
static const int yscale = 1;
@@ -72,17 +69,12 @@ static int pianorollTools = PointerTool | PencilTool | RubberTool | DrawTool;
//---------------------------------------------------------
PianoRoll::PianoRoll(PartList* pl, QWidget* parent, const char* name, unsigned initPos)
- : MidiEditor(_quantInit, _rasterInit, pl, parent, name)
+ : MidiEditor(_rasterInit, pl, parent, name)
{
deltaMode = false;
resize(_widthInit, _heightInit);
selPart = 0;
- quantConfig = 0;
_playEvents = false;
- _quantStrength = _quantStrengthInit;
- _quantLimit = _quantLimitInit;
- _quantLen = _quantLenInit;
- _to = _toInit;
colorMode = colorModeInit;
QSignalMapper* mapper = new QSignalMapper(this);
@@ -186,30 +178,11 @@ PianoRoll::PianoRoll(PartList* pl, QWidget* parent, const char* name, unsigned i
menuFunctions->setTearOffEnabled(true);
- funcOverQuantAction = menuFunctions->addAction(tr("Over Quantize"));
- mapper->setMapping(funcOverQuantAction, PianoCanvas::CMD_OVER_QUANTIZE);
- connect(funcOverQuantAction, SIGNAL(triggered()), mapper, SLOT(map()));
-
- funcNoteOnQuantAction = menuFunctions->addAction(tr("Note On Quantize"));
- mapper->setMapping(funcNoteOnQuantAction, PianoCanvas::CMD_ON_QUANTIZE);
- connect(funcNoteOnQuantAction, SIGNAL(triggered()), mapper, SLOT(map()));
-
- funcNoteOnOffQuantAction = menuFunctions->addAction(tr("Note On/Off Quantize"));
- mapper->setMapping(funcNoteOnOffQuantAction, PianoCanvas::CMD_ONOFF_QUANTIZE);
- connect(funcNoteOnOffQuantAction, SIGNAL(triggered()), mapper, SLOT(map()));
-
- funcIterQuantAction = menuFunctions->addAction(tr("Iterative Quantize"));
- mapper->setMapping(funcIterQuantAction, PianoCanvas::CMD_ITERATIVE_QUANTIZE);
- connect(funcIterQuantAction, SIGNAL(triggered()), mapper, SLOT(map()));
-
- menuFunctions->addSeparator();
-
- funcConfigQuantAction = menuFunctions->addAction(tr("Config Quant..."));
- connect(funcConfigQuantAction, SIGNAL(triggered()), this, SLOT(configQuant()));
-
- menuFunctions->addSeparator();
+ funcQuantizeAction = menuFunctions->addAction(tr("Quantize"));
+ mapper->setMapping(funcQuantizeAction, PianoCanvas::CMD_QUANTIZE);
+ connect(funcQuantizeAction, SIGNAL(triggered()), mapper, SLOT(map()));
- funcGateTimeAction = menuFunctions->addAction(tr("Modify Gate Time"));
+ funcGateTimeAction = menuFunctions->addAction(tr("Modify Note Length"));
mapper->setMapping(funcGateTimeAction, PianoCanvas::CMD_MODIFY_GATE_TIME);
connect(funcGateTimeAction, SIGNAL(triggered()), mapper, SLOT(map()));
@@ -217,56 +190,18 @@ PianoRoll::PianoRoll(PartList* pl, QWidget* parent, const char* name, unsigned i
mapper->setMapping(funcModVelAction, PianoCanvas::CMD_MODIFY_VELOCITY);
connect(funcModVelAction, SIGNAL(triggered()), mapper, SLOT(map()));
- funcCrescendoAction = menuFunctions->addAction(tr("Crescendo"));
- mapper->setMapping(funcCrescendoAction, PianoCanvas::CMD_CRESCENDO);
- funcCrescendoAction->setEnabled(false);
- connect(funcCrescendoAction, SIGNAL(triggered()), mapper, SLOT(map()));
-
funcTransposeAction = menuFunctions->addAction(tr("Transpose"));
mapper->setMapping(funcTransposeAction, PianoCanvas::CMD_TRANSPOSE);
- funcTransposeAction->setEnabled(false);
connect(funcTransposeAction, SIGNAL(triggered()), mapper, SLOT(map()));
-
- funcThinOutAction = menuFunctions->addAction(tr("Thin Out"));
- mapper->setMapping(funcThinOutAction, PianoCanvas::CMD_THIN_OUT);
- funcThinOutAction->setEnabled(false);
- connect(funcThinOutAction, SIGNAL(triggered()), mapper, SLOT(map()));
-
+
funcEraseEventAction = menuFunctions->addAction(tr("Erase Event"));
mapper->setMapping(funcEraseEventAction, PianoCanvas::CMD_ERASE_EVENT);
- funcEraseEventAction->setEnabled(false);
connect(funcEraseEventAction, SIGNAL(triggered()), mapper, SLOT(map()));
funcNoteShiftAction = menuFunctions->addAction(tr("Note Shift"));
mapper->setMapping(funcNoteShiftAction, PianoCanvas::CMD_NOTE_SHIFT);
- funcNoteShiftAction->setEnabled(false);
connect(funcNoteShiftAction, SIGNAL(triggered()), mapper, SLOT(map()));
-
- funcMoveClockAction = menuFunctions->addAction(tr("Move Clock"));
- mapper->setMapping(funcMoveClockAction, PianoCanvas::CMD_MOVE_CLOCK);
- funcMoveClockAction->setEnabled(false);
- connect(funcMoveClockAction, SIGNAL(triggered()), mapper, SLOT(map()));
-
- funcCopyMeasureAction = menuFunctions->addAction(tr("Copy Measure"));
- mapper->setMapping(funcCopyMeasureAction, PianoCanvas::CMD_COPY_MEASURE);
- funcCopyMeasureAction->setEnabled(false);
- connect(funcCopyMeasureAction, SIGNAL(triggered()), mapper, SLOT(map()));
-
- funcEraseMeasureAction = menuFunctions->addAction(tr("Erase Measure"));
- mapper->setMapping(funcEraseMeasureAction, PianoCanvas::CMD_ERASE_MEASURE);
- funcEraseMeasureAction->setEnabled(false);
- connect(funcEraseMeasureAction, SIGNAL(triggered()), mapper, SLOT(map()));
-
- funcDelMeasureAction = menuFunctions->addAction(tr("Delete Measure"));
- mapper->setMapping(funcDelMeasureAction, PianoCanvas::CMD_DELETE_MEASURE);
- funcDelMeasureAction->setEnabled(false);
- connect(funcDelMeasureAction, SIGNAL(triggered()), mapper, SLOT(map()));
-
- funcCreateMeasureAction = menuFunctions->addAction(tr("Create Measure"));
- mapper->setMapping(funcCreateMeasureAction, PianoCanvas::CMD_CREATE_MEASURE);
- funcCreateMeasureAction->setEnabled(false);
- connect(funcCreateMeasureAction, SIGNAL(triggered()), mapper, SLOT(map()));
-
+
funcSetFixedLenAction = menuFunctions->addAction(tr("Set Fixed Length"));
mapper->setMapping(funcSetFixedLenAction, PianoCanvas::CMD_FIXED_LEN);
connect(funcSetFixedLenAction, SIGNAL(triggered()), mapper, SLOT(map()));
@@ -318,7 +253,7 @@ PianoRoll::PianoRoll(PartList* pl, QWidget* parent, const char* name, unsigned i
transport->addActions(transportAction->actions());
addToolBarBreak();
- toolbar = new Toolbar1(this, _rasterInit, _quantInit);
+ toolbar = new Toolbar1(this, _rasterInit);
addToolBar(toolbar);
addToolBarBreak();
@@ -518,14 +453,16 @@ PianoRoll::PianoRoll(PartList* pl, QWidget* parent, const char* name, unsigned i
connect(canvas, SIGNAL(timeChanged(unsigned)), SLOT(setTime(unsigned)));
connect(piano, SIGNAL(pitchChanged(int)), toolbar, SLOT(setPitch(int)));
connect(time, SIGNAL(timeChanged(unsigned)), SLOT(setTime(unsigned)));
- connect(toolbar, SIGNAL(quantChanged(int)), SLOT(setQuant(int)));
connect(toolbar, SIGNAL(rasterChanged(int)),SLOT(setRaster(int)));
- connect(toolbar, SIGNAL(toChanged(int)), SLOT(setTo(int)));
connect(toolbar, SIGNAL(soloChanged(bool)), SLOT(soloChanged(bool)));
setFocusPolicy(Qt::StrongFocus);
setEventColorMode(colorMode);
+ if (!_toolbarInit.isEmpty())
+ restoreState(_toolbarInit);
+
+
QClipboard* cb = QApplication::clipboard();
connect(cb, SIGNAL(dataChanged()), SLOT(clipboardChanged()));
@@ -657,7 +594,20 @@ PianoRoll::~PianoRoll()
void PianoRoll::cmd(int cmd)
{
- ((PianoCanvas*)canvas)->cmd(cmd, _quantStrength, _quantLimit, _quantLen, _to);
+ switch (cmd)
+ {
+ case PianoCanvas::CMD_MODIFY_GATE_TIME: modify_notelen(partlist_to_set(parts())); break;
+ case PianoCanvas::CMD_MODIFY_VELOCITY: modify_velocity(partlist_to_set(parts())); break;
+ case PianoCanvas::CMD_QUANTIZE: quantize_notes(partlist_to_set(parts())); break;
+ case PianoCanvas::CMD_TRANSPOSE: transpose_notes(partlist_to_set(parts())); break;
+ case PianoCanvas::CMD_ERASE_EVENT: erase_notes(partlist_to_set(parts())); break;
+ case PianoCanvas::CMD_DEL: erase_notes(partlist_to_set(parts()),1); break;
+ case PianoCanvas::CMD_NOTE_SHIFT: move_notes(partlist_to_set(parts())); break;
+ case PianoCanvas::CMD_FIXED_LEN: set_notelen(partlist_to_set(parts())); break;
+ case PianoCanvas::CMD_DELETE_OVERLAPS: delete_overlaps(partlist_to_set(parts())); break;
+
+ default: ((PianoCanvas*)canvas)->cmd(cmd);
+ }
}
//---------------------------------------------------------
@@ -835,24 +785,16 @@ void PianoRoll::readConfiguration(Xml& xml)
const QString& tag = xml.s1();
switch (token) {
case Xml::TagStart:
- if (tag == "quant")
- _quantInit = xml.parseInt();
- else if (tag == "raster")
+ if (tag == "raster")
_rasterInit = xml.parseInt();
- else if (tag == "quantStrength")
- _quantStrengthInit = xml.parseInt();
- else if (tag == "quantLimit")
- _quantLimitInit = xml.parseInt();
- else if (tag == "quantLen")
- _quantLenInit = xml.parseInt();
- else if (tag == "to")
- _toInit = xml.parseInt();
else if (tag == "colormode")
colorModeInit = xml.parseInt();
else if (tag == "width")
_widthInit = xml.parseInt();
else if (tag == "height")
_heightInit = xml.parseInt();
+ else if (tag == "toolbars")
+ _toolbarInit = QByteArray::fromHex(xml.parse1().toAscii());
else
xml.unknown("PianoRoll");
break;
@@ -872,15 +814,11 @@ void PianoRoll::readConfiguration(Xml& xml)
void PianoRoll::writeConfiguration(int level, Xml& xml)
{
xml.tag(level++, "pianoroll");
- xml.intTag(level, "quant", _quantInit);
xml.intTag(level, "raster", _rasterInit);
- xml.intTag(level, "quantStrength", _quantStrengthInit);
- xml.intTag(level, "quantLimit", _quantLimitInit);
- xml.intTag(level, "quantLen", _quantLenInit);
- xml.intTag(level, "to", _toInit);
xml.intTag(level, "width", _widthInit);
xml.intTag(level, "height", _heightInit);
xml.intTag(level, "colormode", colorModeInit);
+ xml.strTag(level, "toolbars", _toolbarInit.toHex().data());
xml.etag(level, "pianoroll");
}
@@ -908,17 +846,6 @@ void PianoRoll::setRaster(int val)
}
//---------------------------------------------------------
-// setQuant
-//---------------------------------------------------------
-
-void PianoRoll::setQuant(int val)
- {
- _quantInit = val;
- MidiEditor::setQuant(val);
- canvas->setFocus();
- }
-
-//---------------------------------------------------------
// writeStatus
//---------------------------------------------------------
@@ -938,9 +865,6 @@ void PianoRoll::writeStatus(int level, Xml& xml) const
xml.intTag(level, "steprec", canvas->steprec());
xml.intTag(level, "midiin", canvas->midiin());
xml.intTag(level, "tool", int(canvas->tool()));
- xml.intTag(level, "quantStrength", _quantStrength);
- xml.intTag(level, "quantLimit", _quantLimit);
- xml.intTag(level, "quantLen", _quantLen);
xml.intTag(level, "playEvents", _playEvents);
xml.intTag(level, "xpos", hscroll->pos());
xml.intTag(level, "xmag", hscroll->mag());
@@ -987,12 +911,6 @@ void PianoRoll::readStatus(Xml& xml)
splitter->readStatus(xml);
else if (tag == hsplitter->objectName())
hsplitter->readStatus(xml);
- else if (tag == "quantStrength")
- _quantStrength = xml.parseInt();
- else if (tag == "quantLimit")
- _quantLimit = xml.parseInt();
- else if (tag == "quantLen")
- _quantLen = xml.parseInt();
else if (tag == "playEvents") {
_playEvents = xml.parseInt();
canvas->playEvents(_playEvents);
@@ -1011,10 +929,8 @@ void PianoRoll::readStatus(Xml& xml)
break;
case Xml::TagEnd:
if (tag == "pianoroll") {
- _quantInit = _quant;
_rasterInit = _raster;
toolbar->setRaster(_raster);
- toolbar->setQuant(_quant);
canvas->redrawGrid();
return;
}
@@ -1059,13 +975,10 @@ void PianoRoll::keyPressEvent(QKeyEvent* event)
PianoCanvas* pc = (PianoCanvas*)canvas;
int key = event->key();
- //if (event->state() & Qt::ShiftButton)
if (((QInputEvent*)event)->modifiers() & Qt::ShiftModifier)
key += Qt::SHIFT;
- //if (event->state() & Qt::AltButton)
if (((QInputEvent*)event)->modifiers() & Qt::AltModifier)
key += Qt::ALT;
- //if (event->state() & Qt::ControlButton)
if (((QInputEvent*)event)->modifiers() & Qt::ControlModifier)
key+= Qt::CTRL;
@@ -1109,8 +1022,8 @@ void PianoRoll::keyPressEvent(QKeyEvent* event)
pc->pianoCmd(CMD_INSERT);
return;
}
- else if (key == Qt::Key_Delete) {
- pc->pianoCmd(CMD_DELETE);
+ else if (key == Qt::Key_Backspace) {
+ pc->pianoCmd(CMD_BACKSPACE);
return;
}
else if (key == shortcuts[SHRT_ZOOM_IN].key) {
@@ -1196,28 +1109,11 @@ void PianoRoll::keyPressEvent(QKeyEvent* event)
event->ignore();
return;
}
- setQuant(val);
setRaster(val);
- toolbar->setQuant(_quant);
toolbar->setRaster(_raster);
}
//---------------------------------------------------------
-// configQuant
-//---------------------------------------------------------
-
-void PianoRoll::configQuant()
- {
- if (!quantConfig) {
- quantConfig = new QuantConfig(_quantStrength, _quantLimit, _quantLen);
- connect(quantConfig, SIGNAL(setQuantStrength(int)), SLOT(setQuantStrength(int)));
- connect(quantConfig, SIGNAL(setQuantLimit(int)), SLOT(setQuantLimit(int)));
- connect(quantConfig, SIGNAL(setQuantLen(bool)), SLOT(setQuantLen(bool)));
- }
- quantConfig->show();
- }
-
-//---------------------------------------------------------
// setSteprec
//---------------------------------------------------------
@@ -1297,8 +1193,30 @@ void PianoRoll::setSpeaker(bool val)
void PianoRoll::resizeEvent(QResizeEvent* ev)
{
QWidget::resizeEvent(ev);
- _widthInit = ev->size().width();
- _heightInit = ev->size().height();
+ storeInitialState();
+ }
+
+
+//---------------------------------------------------------
+// focusOutEvent
+//---------------------------------------------------------
+
+void PianoRoll::focusOutEvent(QFocusEvent* ev)
+ {
+ QWidget::focusOutEvent(ev);
+ storeInitialState();
+ }
+
+
+//---------------------------------------------------------
+// storeInitialState
+//---------------------------------------------------------
+
+void PianoRoll::storeInitialState()
+ {
+ _widthInit = width();
+ _heightInit = height();
+ _toolbarInit=saveState();
}
@@ -1338,25 +1256,13 @@ void PianoRoll::initShortcuts()
//evColorPitchAction->setShortcut(shortcuts[ ].key);
//evColorVelAction->setShortcut(shortcuts[ ].key);
- funcOverQuantAction->setShortcut(shortcuts[SHRT_OVER_QUANTIZE].key);
- funcNoteOnQuantAction->setShortcut(shortcuts[SHRT_ON_QUANTIZE].key);
- funcNoteOnOffQuantAction->setShortcut(shortcuts[SHRT_ONOFF_QUANTIZE].key);
- funcIterQuantAction->setShortcut(shortcuts[SHRT_ITERATIVE_QUANTIZE].key);
-
- funcConfigQuantAction->setShortcut(shortcuts[SHRT_CONFIG_QUANT].key);
+ funcQuantizeAction->setShortcut(shortcuts[SHRT_QUANTIZE].key);
funcGateTimeAction->setShortcut(shortcuts[SHRT_MODIFY_GATE_TIME].key);
funcModVelAction->setShortcut(shortcuts[SHRT_MODIFY_VELOCITY].key);
- funcCrescendoAction->setShortcut(shortcuts[SHRT_CRESCENDO].key);
funcTransposeAction->setShortcut(shortcuts[SHRT_TRANSPOSE].key);
- funcThinOutAction->setShortcut(shortcuts[SHRT_THIN_OUT].key);
funcEraseEventAction->setShortcut(shortcuts[SHRT_ERASE_EVENT].key);
funcNoteShiftAction->setShortcut(shortcuts[SHRT_NOTE_SHIFT].key);
- funcMoveClockAction->setShortcut(shortcuts[SHRT_MOVE_CLOCK].key);
- funcCopyMeasureAction->setShortcut(shortcuts[SHRT_COPY_MEASURE].key);
- funcEraseMeasureAction->setShortcut(shortcuts[SHRT_ERASE_MEASURE].key);
- funcDelMeasureAction->setShortcut(shortcuts[SHRT_DELETE_MEASURE].key);
- funcCreateMeasureAction->setShortcut(shortcuts[SHRT_CREATE_MEASURE].key);
funcSetFixedLenAction->setShortcut(shortcuts[SHRT_FIXED_LEN].key);
funcDelOverlapsAction->setShortcut(shortcuts[SHRT_DELETE_OVERLAPS].key);
@@ -1369,7 +1275,7 @@ void PianoRoll::execDeliveredScript(int id)
{
//QString scriptfile = QString(INSTPREFIX) + SCRIPTSSUFFIX + deliveredScriptNames[id];
QString scriptfile = song->getScriptPath(id, true);
- song->executeScript(scriptfile.toAscii().data(), parts(), quant(), true);
+ song->executeScript(scriptfile.toAscii().data(), parts(), raster(), true);
}
//---------------------------------------------------------
@@ -1378,7 +1284,7 @@ void PianoRoll::execDeliveredScript(int id)
void PianoRoll::execUserScript(int id)
{
QString scriptfile = song->getScriptPath(id, false);
- song->executeScript(scriptfile.toAscii().data(), parts(), quant(), true);
+ song->executeScript(scriptfile.toAscii().data(), parts(), raster(), true);
}
//---------------------------------------------------------
diff --git a/muse2/muse/midiedit/pianoroll.h b/muse2/muse/midiedit/pianoroll.h
index 2bfa9324..e157db10 100644
--- a/muse2/muse/midiedit/pianoroll.h
+++ b/muse2/muse/midiedit/pianoroll.h
@@ -12,6 +12,7 @@
#include <QResizeEvent>
#include <QLabel>
#include <QKeyEvent>
+#include <QByteArray>
#include <values.h>
#include "noteinfo.h"
@@ -35,7 +36,6 @@ class Splitter;
class PartList;
class Toolbar1;
class Xml;
-class QuantConfig;
class ScrollScale;
class Part;
class SNode;
@@ -81,23 +81,12 @@ class PianoRoll : public MidiEditor {
QAction* evColorPitchAction;
QAction* evColorVelAction;
- QAction* funcOverQuantAction;
- QAction* funcNoteOnQuantAction;
- QAction* funcNoteOnOffQuantAction;
- QAction* funcIterQuantAction;
- QAction* funcConfigQuantAction;
+ QAction* funcQuantizeAction;
QAction* funcGateTimeAction;
QAction* funcModVelAction;
- QAction* funcCrescendoAction;
QAction* funcTransposeAction;
- QAction* funcThinOutAction;
QAction* funcEraseEventAction;
QAction* funcNoteShiftAction;
- QAction* funcMoveClockAction;
- QAction* funcCopyMeasureAction;
- QAction* funcEraseMeasureAction;
- QAction* funcDelMeasureAction;
- QAction* funcCreateMeasureAction;
QAction* funcSetFixedLenAction;
QAction* funcDelOverlapsAction;
@@ -124,20 +113,12 @@ class PianoRoll : public MidiEditor {
int colorMode;
- static int _quantInit, _rasterInit;
+ static int _rasterInit;
static int _widthInit, _heightInit;
+ static QByteArray _toolbarInit;
- static int _quantStrengthInit;
- static int _quantLimitInit;
- static bool _quantLenInit;
- static int _toInit;
static int colorModeInit;
- int _quantStrength;
- int _quantLimit;
- int _to;
- bool _quantLen;
- QuantConfig* quantConfig;
bool _playEvents;
//QScrollBar* infoScroll;
@@ -150,6 +131,8 @@ class PianoRoll : public MidiEditor {
virtual void closeEvent(QCloseEvent*);
virtual void keyPressEvent(QKeyEvent*);
virtual void resizeEvent(QResizeEvent*);
+ virtual void focusOutEvent(QFocusEvent*);
+ void storeInitialState();
private slots:
void setSelection(int, Event&, Part*);
@@ -159,14 +142,8 @@ class PianoRoll : public MidiEditor {
void soloChanged(bool flag);
//void trackInfoScroll(int);
void setRaster(int);
- void setQuant(int);
- void configQuant();
- void setQuantStrength(int val) { _quantStrength = val; }
- void setQuantLimit(int val) { _quantLimit = val; }
- void setQuantLen(bool val) { _quantLen = val; }
void cmd(int);
void setSteprec(bool);
- void setTo(int val) { _to = val; }
void eventColorModeChanged(int);
void clipboardChanged(); // enable/disable "Paste"
void selectionChanged(); // enable/disable "Copy" & "Paste"
diff --git a/muse2/muse/midiedit/prcanvas.cpp b/muse2/muse/midiedit/prcanvas.cpp
index a0ffdcaf..0da18e99 100644
--- a/muse2/muse/midiedit/prcanvas.cpp
+++ b/muse2/muse/midiedit/prcanvas.cpp
@@ -32,8 +32,6 @@
#include "mpevent.h"
#include "globals.h"
#include "cmd.h"
-#include "gatetime.h"
-#include "velocity.h"
#include "song.h"
#include "audio.h"
@@ -82,7 +80,6 @@ PianoCanvas::PianoCanvas(MidiEditor* pr, QWidget* parent, int sx, int sy)
: EventCanvas(pr, parent, sx, sy)
{
colorMode = 0;
- cmdRange = 0; // all Events
playedPitch = -1;
songChanged(SC_TRACK_INSERTED);
@@ -726,7 +723,7 @@ void PianoCanvas::pianoCmd(int cmd)
song->setPos(0, p, true, false, true);
}
return;
- case CMD_DELETE:
+ case CMD_BACKSPACE:
if (pos[0] < start() || pos[0] >= end())
break;
{
@@ -907,10 +904,8 @@ void PianoCanvas::drawCanvas(QPainter& p, const QRect& rect)
// pulldown menu commands
//---------------------------------------------------------
-void PianoCanvas::cmd(int cmd, int quantStrength,
- int quantLimit, bool quantLen, int range)
+void PianoCanvas::cmd(int cmd)
{
- cmdRange = range;
switch (cmd) {
case CMD_CUT:
copy();
@@ -932,32 +927,6 @@ void PianoCanvas::cmd(int cmd, int quantStrength,
case CMD_PASTE:
paste();
break;
- case CMD_DEL:
- if (selectionSize()) {
- song->startUndo();
- for (iCItem i = items.begin(); i != items.end(); ++i) {
- if (!i->second->isSelected())
- continue;
- Event ev = i->second->event();
- // Indicate no undo, and do not do port controller values and clone parts.
- //audio->msgDeleteEvent(ev, i->second->part(), false);
- audio->msgDeleteEvent(ev, i->second->part(), false, false, false);
- }
- song->endUndo(SC_EVENT_REMOVED);
- }
- return;
- case CMD_OVER_QUANTIZE: // over quantize
- quantize(100, 1, quantLen);
- break;
- case CMD_ON_QUANTIZE: // note on quantize
- quantize(50, 1, false);
- break;
- case CMD_ONOFF_QUANTIZE: // note on/off quantize
- quantize(50, 1, true);
- break;
- case CMD_ITERATIVE_QUANTIZE: // Iterative Quantize
- quantize(quantStrength, quantLimit, quantLen);
- break;
case CMD_SELECT_ALL: // select all
for (iCItem k = items.begin(); k != items.end(); ++k) {
if (!k->second->isSelected())
@@ -1032,96 +1001,6 @@ void PianoCanvas::cmd(int cmd, int quantStrength,
editor->setCurCanvasPart(newpt);
}
break;
- case CMD_MODIFY_GATE_TIME:
- {
- GateTime w(this);
- w.setRange(range);
- if (!w.exec())
- break;
- int range = w.range(); // all, selected, looped, sel+loop
- int rate = w.rateVal();
- int offset = w.offsetVal();
-
- song->startUndo();
- for (iCItem k = items.begin(); k != items.end(); ++k) {
- NEvent* nevent =(NEvent*)(k->second);
- Event event = nevent->event();
- if (event.type() != Note)
- continue;
- unsigned tick = event.tick();
- bool selected = k->second->isSelected();
- bool inLoop = (tick >= song->lpos()) && (tick < song->rpos());
-
- if ((range == 0)
- || (range == 1 && selected)
- || (range == 2 && inLoop)
- || (range == 3 && selected && inLoop)) {
- unsigned int len = event.lenTick(); //prevent compiler warning: comparison singed/unsigned
-
- len = rate ? (len * 100) / rate : 1;
- len += offset;
- if (len < 1)
- len = 1;
-
- if (event.lenTick() != len) {
- Event newEvent = event.clone();
- newEvent.setLenTick(len);
- // Indicate no undo, and do not do port controller values and clone parts.
- //audio->msgChangeEvent(event, newEvent, nevent->part(), false);
- audio->msgChangeEvent(event, newEvent, nevent->part(), false, false, false);
- }
- }
- }
- song->endUndo(SC_EVENT_MODIFIED);
- }
- break;
-
- case CMD_MODIFY_VELOCITY:
- {
- Velocity w;
- w.setRange(range);
- if (!w.exec())
- break;
- int range = w.range(); // all, selected, looped, sel+loop
- int rate = w.rateVal();
- int offset = w.offsetVal();
-
- song->startUndo();
- for (iCItem k = items.begin(); k != items.end(); ++k) {
- NEvent* nevent = (NEvent*)(k->second);
- Event event = nevent->event();
- if (event.type() != Note)
- continue;
- unsigned tick = event.tick();
- bool selected = k->second->isSelected();
- bool inLoop = (tick >= song->lpos()) && (tick < song->rpos());
-
- if ((range == 0)
- || (range == 1 && selected)
- || (range == 2 && inLoop)
- || (range == 3 && selected && inLoop)) {
- int velo = event.velo();
-
- //velo = rate ? (velo * 100) / rate : 64;
- velo = (velo * rate) / 100;
- velo += offset;
-
- if (velo <= 0)
- velo = 1;
- if (velo > 127)
- velo = 127;
- if (event.velo() != velo) {
- Event newEvent = event.clone();
- newEvent.setVelo(velo);
- // Indicate no undo, and do not do port controller values and clone parts.
- //audio->msgChangeEvent(event, newEvent, nevent->part(), false);
- audio->msgChangeEvent(event, newEvent, nevent->part(), false, false, false);
- }
- }
- }
- song->endUndo(SC_EVENT_MODIFIED);
- }
- break;
case CMD_FIXED_LEN: //Set notes to the length specified in the drummap
if (!selectionSize())
@@ -1141,76 +1020,6 @@ void PianoCanvas::cmd(int cmd, int quantStrength,
song->endUndo(SC_EVENT_MODIFIED);
break;
- case CMD_DELETE_OVERLAPS:
- if (!selectionSize())
- break;
-
- song->startUndo();
- for (iCItem k = items.begin(); k != items.end(); k++) {
- if (k->second->isSelected() == false)
- continue;
-
- NEvent* e1 = (NEvent*) (k->second); // first note
- NEvent* e2 = NULL; // ptr to next selected note (which will be checked for overlap)
- Event ce1 = e1->event();
- Event ce2;
-
- if (ce1.type() != Note)
- continue;
-
- // Find next selected item on the same pitch
- iCItem l = k; l++;
- for (; l != items.end(); l++) {
- if (l->second->isSelected() == false)
- continue;
-
- e2 = (NEvent*) l->second;
- ce2 = e2->event();
-
- // Same pitch?
- if (ce1.dataA() == ce2.dataA())
- break;
-
- // If the note has the same len and place we treat it as a duplicate note and not a following note
- // The best thing to do would probably be to delete the duplicate note, we just want to avoid
- // matching against the same note
- if ( ce1.tick() + e1->part()->tick() == ce2.tick() + e2->part()->tick()
- && ce1.lenTick() + e1->part()->tick() == ce2.lenTick() + e2->part()->tick())
- {
- e2 = NULL; // this wasn't what we were looking for
- continue;
- }
-
- }
-
- if (e2 == NULL) // None found
- break;
-
- Part* part1 = e1->part();
- Part* part2 = e2->part();
- if (ce2.type() != Note)
- continue;
-
-
- unsigned event1pos = ce1.tick() + part1->tick();
- unsigned event1end = event1pos + ce1.lenTick();
- unsigned event2pos = ce2.tick() + part2->tick();
-
- //printf("event1pos %u event1end %u event2pos %u\n", event1pos, event1end, event2pos);
- if (event1end > event2pos) {
- Event newEvent = ce1.clone();
- unsigned newlen = ce1.lenTick() - (event1end - event2pos);
- //printf("newlen: %u\n", newlen);
- newEvent.setLenTick(newlen);
- // Indicate no undo, and do not do port controller values and clone parts.
- //audio->msgChangeEvent(ce1, newEvent, e1->part(), false);
- audio->msgChangeEvent(ce1, newEvent, e1->part(), false, false, false);
- }
- }
- song->endUndo(SC_EVENT_MODIFIED);
- break;
-
-
case CMD_CRESCENDO:
case CMD_TRANSPOSE:
case CMD_THIN_OUT:
@@ -1231,55 +1040,6 @@ void PianoCanvas::cmd(int cmd, int quantStrength,
}
//---------------------------------------------------------
-// quantize
-//---------------------------------------------------------
-
-void PianoCanvas::quantize(int strength, int limit, bool quantLen)
- {
- song->startUndo();
- for (iCItem k = items.begin(); k != items.end(); ++k) {
- NEvent* nevent = (NEvent*)(k->second);
- Event event = nevent->event();
- Part* part = nevent->part();
- if (event.type() != Note)
- continue;
-
- if ((cmdRange & CMD_RANGE_SELECTED) && !k->second->isSelected())
- continue;
-
- unsigned tick = event.tick() + part->tick();
-
- if ((cmdRange & CMD_RANGE_LOOP)
- && ((tick < song->lpos() || tick >= song->rpos())))
- continue;
-
- unsigned int len = event.lenTick(); //prevent compiler warning: comparison singed/unsigned
- int tick2 = tick + len;
-
- // quant start position
- int diff = AL::sigmap.raster(tick, editor->quant()) - tick;
- if (abs(diff) > limit)
- tick += ((diff * strength) / 100);
-
- // quant len
- diff = AL::sigmap.raster(tick2, editor->quant()) - tick2;
- if (quantLen && (abs(diff) > limit))
- len += ((diff * strength) / 100);
-
- // something changed?
- if (((event.tick() + part->tick()) != tick) || (event.lenTick() != len)) {
- Event newEvent = event.clone();
- newEvent.setTick(tick - part->tick());
- newEvent.setLenTick(len);
- // Indicate no undo, and do not do port controller values and clone parts.
- //audio->msgChangeEvent(event, newEvent, part, false);
- audio->msgChangeEvent(event, newEvent, part, false, false, false);
- }
- }
- song->endUndo(SC_EVENT_MODIFIED);
- }
-
-//---------------------------------------------------------
// midiNote
//---------------------------------------------------------
@@ -1289,7 +1049,11 @@ void PianoCanvas::midiNote(int pitch, int velo)
&& !audio->isPlaying() && velo && pos[0] >= start_tick
&& pos[0] < end_tick
&& !(globalKeyState & Qt::AltModifier)) {
- unsigned int len = editor->quant();//prevent compiler warning: comparison singed/unsigned
+ //len has been changed by flo: set to raster() instead of quant()
+ //reason: the quant-toolbar has been removed; the flexibility you
+ //lose with this can be re-gained by applying a "modify note len"
+ //on the notes you have entered.
+ unsigned int len = editor->raster();//prevent compiler warning: comparison singed/unsigned
unsigned tick = pos[0]; //CDW
unsigned starttick = tick;
if (globalKeyState & Qt::ShiftModifier)
diff --git a/muse2/muse/midiedit/prcanvas.h b/muse2/muse/midiedit/prcanvas.h
index bda22fc3..39506a13 100644
--- a/muse2/muse/midiedit/prcanvas.h
+++ b/muse2/muse/midiedit/prcanvas.h
@@ -37,7 +37,6 @@ class QRect;
//---------------------------------------------------------
class PianoCanvas : public EventCanvas {
- int cmdRange;
int colorMode;
int playedPitch;
@@ -63,7 +62,6 @@ class PianoCanvas : public EventCanvas {
int y2pitch(int) const;
int pitch2y(int) const;
virtual void drawCanvas(QPainter&, const QRect&);
- void quantize(int, int, bool);
void copy();
void paste();
virtual void itemPressed(const CItem*);
@@ -88,8 +86,7 @@ class PianoCanvas : public EventCanvas {
public:
enum {
CMD_CUT, CMD_COPY, CMD_PASTE, CMD_DEL,
- CMD_OVER_QUANTIZE, CMD_ON_QUANTIZE, CMD_ONOFF_QUANTIZE,
- CMD_ITERATIVE_QUANTIZE,
+ CMD_QUANTIZE,
CMD_SELECT_ALL, CMD_SELECT_NONE, CMD_SELECT_INVERT,
CMD_SELECT_ILOOP, CMD_SELECT_OLOOP, CMD_SELECT_PREV_PART, CMD_SELECT_NEXT_PART,
CMD_MODIFY_GATE_TIME, CMD_MODIFY_VELOCITY,
@@ -100,7 +97,7 @@ class PianoCanvas : public EventCanvas {
};
PianoCanvas(MidiEditor*, QWidget*, int, int);
- void cmd(int, int, int, bool, int);
+ void cmd(int cmd);
void setColorMode(int mode) {
colorMode = mode;
redraw();
diff --git a/muse2/muse/midiedit/quantconfig.cpp b/muse2/muse/midiedit/quantconfig.cpp
deleted file mode 100644
index 2f413e6a..00000000
--- a/muse2/muse/midiedit/quantconfig.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-//=========================================================
-// MusE
-// Linux Music Editor
-// $Id: quantconfig.cpp,v 1.2 2004/04/24 14:58:52 wschweer Exp $
-//
-// (C) Copyright 1999/2003 Werner Schweer (ws@seh.de)
-//=========================================================
-
-#include <QCheckBox>
-#include <QGroupBox>
-#include <QLabel>
-#include <QSpinBox>
-#include <QVBoxLayout>
-
-#include "quantconfig.h"
-
-const char* wtStrengthTxt = QT_TRANSLATE_NOOP("@default", "sets amount of quantization:\n"
- "0 - no quantization\n"
- "100 - full quantization");
-const char* wtQLimitTxt = QT_TRANSLATE_NOOP("@default", "don't quantize notes above this tick limit");
-const char* wtQLenTxt = QT_TRANSLATE_NOOP("@default", "quantize also note len as default");
-
-//---------------------------------------------------------
-// QuantConfig
-//---------------------------------------------------------
-
-QuantConfig::QuantConfig(int s, int l, bool lenFlag)
- : QDialog()
- {
- setWindowTitle(tr("MusE: Config Quantize"));
- QVBoxLayout *mainlayout = new QVBoxLayout;
-
- QGridLayout* layout = new QGridLayout;
- QGroupBox* gb = new QGroupBox(tr("Config Quantize"));
-
- QLabel* l1 = new QLabel(tr("Strength"));
- layout->addWidget(l1, 0, 0);
- QSpinBox* sb1 = new QSpinBox;
- sb1->setMinimum(0);
- sb1->setMaximum(100);
- sb1->setSingleStep(1);
- sb1->setSuffix(QString("%"));
- sb1->setValue(s);
- layout->addWidget(sb1, 0, 1);
-
- QLabel* l2 = new QLabel(tr("Don´t Quantize"));
- layout->addWidget(l2, 1, 0);
- QSpinBox* sb2 = new QSpinBox;
- sb2->setMinimum(0);
- sb2->setMaximum(500);
- sb2->setSingleStep(1);
- sb2->setValue(l);
- layout->addWidget(sb2, 1, 1);
-
- QLabel* l3 = new QLabel(tr("Quant Len"));
- layout->addWidget(l3, 2, 0);
- QCheckBox* but = new QCheckBox;
- but->setChecked(lenFlag);
- layout->addWidget(but, 2, 1);
-
- connect(sb1, SIGNAL(valueChanged(int)), SIGNAL(setQuantStrength(int)));
- connect(sb2, SIGNAL(valueChanged(int)), SIGNAL(setQuantLimit(int)));
- connect(but, SIGNAL(toggled(bool)), SIGNAL(setQuantLen(bool)));
-
- gb->setLayout(layout);
- mainlayout->addWidget(gb);
- setLayout(mainlayout);
-
- l1->setWhatsThis(tr(wtStrengthTxt));
- l1->setToolTip(tr(wtStrengthTxt));
- sb1->setWhatsThis(tr(wtStrengthTxt));
- l2->setWhatsThis(tr(wtQLimitTxt));
- l2->setToolTip(tr(wtQLimitTxt));
- sb2->setWhatsThis(tr(wtQLimitTxt));
- l3->setWhatsThis(tr(wtQLenTxt));
- l3->setToolTip(tr(wtQLenTxt));
- but->setWhatsThis(tr(wtQLenTxt));
- }
-
diff --git a/muse2/muse/midiedit/quantconfig.h b/muse2/muse/midiedit/quantconfig.h
deleted file mode 100644
index 4466cdf0..00000000
--- a/muse2/muse/midiedit/quantconfig.h
+++ /dev/null
@@ -1,32 +0,0 @@
-//=========================================================
-// MusE
-// Linux Music Editor
-// $Id: quantconfig.h,v 1.1.1.1 2003/10/27 18:52:23 wschweer Exp $
-//
-// (C) Copyright 1999/2000 Werner Schweer (ws@seh.de)
-//=========================================================
-
-#ifndef __QCONFIG_H__
-#define __QCONFIG_H__
-
-#include <QDialog>
-
-//---------------------------------------------------------
-// QuantConfig
-//---------------------------------------------------------
-
-class QuantConfig : public QDialog {
- Q_OBJECT
-
- signals:
- void setQuantStrength(int);
- void setQuantLimit(int);
- void setQuantLen(bool);
-
- public:
- QuantConfig(int, int, bool);
- };
-
-
-#endif
-
diff --git a/muse2/muse/midiedit/scoreedit.cpp b/muse2/muse/midiedit/scoreedit.cpp
index 31f0f325..67325b75 100644
--- a/muse2/muse/midiedit/scoreedit.cpp
+++ b/muse2/muse/midiedit/scoreedit.cpp
@@ -41,27 +41,23 @@ using namespace std;
#include "app.h"
#include "xml.h"
#include "mtscale.h"
-#include "prcanvas.h"
+#include "al/sig.h"
#include "scoreedit.h"
-#include "scrollscale.h"
-#include "piano.h"
-#include "../ctrl/ctrledit.h"
-#include "splitter.h"
+#include "tools.h"
#include "ttoolbar.h"
#include "tb1.h"
-#include "utils.h"
#include "globals.h"
#include "gconfig.h"
#include "icons.h"
#include "audio.h"
+#include "functions.h"
#include "cmd.h"
-#include "quantconfig.h"
-#include "shortcuts.h"
-
-#include "mtrackinfo.h"
-
#include "sig.h"
+#include "song.h"
+
+//#include "../ctrl/ctrledit.h"
+//#include "shortcuts.h"
string IntToStr(int i);
@@ -109,6 +105,10 @@ QString IntToQStr(int i);
#define STAFF_DISTANCE (10*YLEN)
#define GRANDSTAFF_DISTANCE (8*YLEN)
+#define NOTE_YDIST 20
+//NOTE_YDIST is the number of pixels which are between two notes
+//which exceed their staves' y-boundaries, so that these boundaries
+//must be expanded.
QString create_random_string(int len=8)
{
@@ -141,6 +141,7 @@ QColor* mycolors; // array [NUM_MYCOLORS]
set<QString> ScoreEdit::names;
int ScoreEdit::width_init = 600;
int ScoreEdit::height_init = 400;
+QByteArray ScoreEdit::default_toolbar_state;
//---------------------------------------------------------
@@ -151,6 +152,7 @@ ScoreEdit::ScoreEdit(QWidget* parent, const char* name, unsigned initPos)
: TopWin(parent, name)
{
setAttribute(Qt::WA_DeleteOnClose);
+ setFocusPolicy(Qt::StrongFocus);
resize(width_init, height_init);
@@ -216,6 +218,8 @@ ScoreEdit::ScoreEdit(QWidget* parent, const char* name, unsigned initPos)
transport_toolbar->setObjectName("transport");
transport_toolbar->addActions(transportAction->actions());
+ addToolBarBreak();
+
QToolBar* newnote_toolbar = addToolBar(tr("New note settings"));
newnote_toolbar->setObjectName("New note settings");
newnote_toolbar->addWidget(new QLabel(tr("Note length:"), newnote_toolbar));
@@ -331,12 +335,21 @@ ScoreEdit::ScoreEdit(QWidget* parent, const char* name, unsigned initPos)
QAction* set_name_action = settings_menu->addAction(tr("Set Score &name"), menu_mapper, SLOT(map()));
menu_mapper->setMapping(set_name_action, CMD_SET_NAME);
-
-
+ QMenu* functions_menu = menuBar()->addMenu(tr("&Functions"));
+
+ QAction* func_quantize_action = functions_menu->addAction(tr("&Quantize"), menu_mapper, SLOT(map()));
+ QAction* func_notelen_action = functions_menu->addAction(tr("Change note &length"), menu_mapper, SLOT(map()));
+ QAction* func_velocity_action = functions_menu->addAction(tr("Change note &velocity"), menu_mapper, SLOT(map()));
+ menu_mapper->setMapping(func_quantize_action, CMD_QUANTIZE);
+ menu_mapper->setMapping(func_notelen_action, CMD_NOTELEN);
+ menu_mapper->setMapping(func_velocity_action, CMD_VELOCITY);
+ if (!default_toolbar_state.isEmpty())
+ restoreState(default_toolbar_state);
+
- score_canvas->song_changed(SC_EVENT_INSERTED);
+ score_canvas->fully_recalculate();
score_canvas->goto_tick(initPos,true);
if (name!=NULL)
@@ -345,7 +358,6 @@ ScoreEdit::ScoreEdit(QWidget* parent, const char* name, unsigned initPos)
init_name();
}
-
void ScoreEdit::add_parts(PartList* pl, bool all_in_one)
{
score_canvas->add_staves(pl, all_in_one);
@@ -452,8 +464,21 @@ void ScoreEdit::resizeEvent(QResizeEvent* ev)
{
QWidget::resizeEvent(ev);
- width_init=ev->size().width();
- height_init=ev->size().height();
+ store_initial_state();
+}
+
+void ScoreEdit::focusOutEvent(QFocusEvent* ev)
+{
+ QMainWindow::focusOutEvent(ev);
+
+ store_initial_state();
+}
+
+void ScoreEdit::store_initial_state()
+{
+ width_init=width();
+ height_init=height();
+ default_toolbar_state=saveState();
}
void ScoreEdit::menu_command(int cmd)
@@ -474,16 +499,19 @@ void ScoreEdit::menu_command(int cmd)
}
break;
+ case CMD_QUANTIZE: quantize_notes(score_canvas->get_all_parts()); break;
+ case CMD_VELOCITY: modify_velocity(score_canvas->get_all_parts()); break;
+ case CMD_NOTELEN: modify_notelen(score_canvas->get_all_parts()); break;
+
default:
score_canvas->menu_command(cmd);
}
}
-//---------------------------------------------------------
-// readPart
-//---------------------------------------------------------
-Part* readPart(Xml& xml, QString tag_name="part") //TODO FINDMICH: duplicated from songfile.cpp; only difference: "none" is supported
+//duplicated from songfile.cpp's MusE::readPart(); the only differences:
+//"none" is supported and tag_name is settable
+Part* read_part(Xml& xml, QString tag_name="part")
{
Part* part = 0;
@@ -514,7 +542,7 @@ Part* readPart(Xml& xml, QString tag_name="part") //TODO FINDMICH: duplicated fr
break;
case Xml::TagStart:
- xml.unknown("readPart");
+ xml.unknown("read_part");
break;
case Xml::TagEnd:
@@ -546,7 +574,7 @@ void staff_t::read_status(Xml& xml)
clef = clef_t(xml.parseInt());
else if (tag == "part")
{
- Part* part=readPart(xml);
+ Part* part=read_part(xml);
if (part)
parts.insert(part);
else
@@ -741,7 +769,7 @@ void ScoreEdit::readStatus(Xml& xml)
else if (tag == "topwin")
TopWin::readStatus(xml);
else if (tag == "selectedPart")
- score_canvas->set_selected_part(readPart(xml, "selectedPart"));
+ score_canvas->set_selected_part(read_part(xml, "selectedPart"));
else if (tag == "staff")
{
staff_t staff(score_canvas);
@@ -774,10 +802,12 @@ void ScoreEdit::read_configuration(Xml& xml)
switch (token)
{
case Xml::TagStart:
- if (tag == "width")
+ if (tag == "height")
height_init = xml.parseInt();
- else if (tag == "height")
+ else if (tag == "width")
width_init = xml.parseInt();
+ else if (tag == "toolbars")
+ default_toolbar_state = QByteArray::fromHex(xml.parse1().toAscii());
else
xml.unknown("ScoreEdit");
break;
@@ -798,6 +828,7 @@ void ScoreEdit::write_configuration(int level, Xml& xml)
xml.tag(level++, "scoreedit");
xml.intTag(level, "width", width_init);
xml.intTag(level, "height", height_init);
+ xml.strTag(level, "toolbars", default_toolbar_state.toHex().data());
xml.etag(level, "scoreedit");
}
@@ -853,8 +884,8 @@ void ScoreCanvas::add_staves(PartList* pl, bool all_in_one)
}
cleanup_staves();
+ fully_recalculate();
recalc_staff_pos();
- song_changed(SC_EVENT_INSERTED);
}
@@ -872,9 +903,14 @@ ScoreCanvas::ScoreCanvas(ScoreEdit* pr, QWidget* parent_widget,
x_pos=0;
x_left=0;
y_pos=0;
+ have_lasso=false;
dragging=false;
+ drag_cursor_changed=false;
mouse_erases_notes=false;
mouse_inserts_notes=true;
+
+ undo_started=false;
+ undo_flags=0;
selected_part=NULL;
@@ -986,8 +1022,8 @@ void ScoreCanvas::set_staffmode(list<staff_t>::iterator it, staff_mode_t mode)
cerr << "ERROR: ILLEGAL FUNCTION CALL: invalid mode in set_staffmode" << endl;
}
+ fully_recalculate();
recalc_staff_pos();
- song_changed(SC_EVENT_INSERTED);
}
void ScoreCanvas::remove_staff(list<staff_t>::iterator it)
@@ -1012,8 +1048,8 @@ void ScoreCanvas::remove_staff(list<staff_t>::iterator it)
}
maybe_close_if_empty();
+ fully_recalculate();
recalc_staff_pos();
- song_changed(SC_EVENT_INSERTED);
}
void ScoreCanvas::merge_staves(list<staff_t>::iterator dest, list<staff_t>::iterator src)
@@ -1048,8 +1084,8 @@ void ScoreCanvas::merge_staves(list<staff_t>::iterator dest, list<staff_t>::iter
remove_staff(src);
+ fully_recalculate();
recalc_staff_pos();
- song_changed(SC_EVENT_INSERTED);
}
void ScoreCanvas::move_staff_above(list<staff_t>::iterator dest, list<staff_t>::iterator src)
@@ -1079,8 +1115,8 @@ void ScoreCanvas::move_staff_above(list<staff_t>::iterator dest, list<staff_t>::
staves.splice(dest, staves, src, src_end);
+ fully_recalculate();
recalc_staff_pos();
- song_changed(SC_EVENT_INSERTED);
}
void ScoreCanvas::move_staff_below(list<staff_t>::iterator dest, list<staff_t>::iterator src)
@@ -1097,6 +1133,20 @@ void ScoreCanvas::move_staff_below(list<staff_t>::iterator dest, list<staff_t>::
move_staff_above(dest, src);
}
+set<Part*> ScoreCanvas::get_all_parts()
+{
+ set<Part*> result;
+
+ for (list<staff_t>::iterator it=staves.begin(); it!=staves.end(); it++)
+ result.insert(it->parts.begin(), it->parts.end());
+
+ return result;
+}
+
+void ScoreCanvas::fully_recalculate()
+{
+ song_changed(SC_EVENT_MODIFIED);
+}
void ScoreCanvas::song_changed(int flags)
{
@@ -1108,6 +1158,8 @@ void ScoreCanvas::song_changed(int flags)
for (list<staff_t>::iterator it=staves.begin(); it!=staves.end(); it++)
it->recalculate();
+
+ recalc_staff_pos();
redraw();
emit canvas_width_changed(canvas_width());
@@ -1124,11 +1176,17 @@ void ScoreCanvas::song_changed(int flags)
}
cleanup_staves();
- recalc_staff_pos();
for (list<staff_t>::iterator it=staves.begin(); it!=staves.end(); it++)
it->recalculate();
+ recalc_staff_pos();
+
+ redraw();
+ }
+
+ if (flags & SC_SELECTION)
+ {
redraw();
}
}
@@ -1209,6 +1267,7 @@ void ScoreCanvas::init_pixmaps()
mycolors[i]=config.partColors[i];
mycolors[BLACK_PIXMAP]=Qt::black;
mycolors[HIGHLIGHTED_PIXMAP]=Qt::red;
+ mycolors[SELECTED_PIXMAP]=QColor(255,160,0);
for (int i=0; i<64; i++)
mycolors[i+VELO_PIXMAP_BEGIN]=QColor(i*4,0,0xff);
@@ -1301,15 +1360,15 @@ bool operator< (const note_pos_t& a, const note_pos_t& b)
}
-
+
int flo_quantize(int tick, int quant_ticks)
{
- return int(nearbyint((float)tick / quant_ticks))*quant_ticks;
+ return AL::sigmap.raster(tick, quant_ticks);
}
int flo_quantize_floor(int tick, int quant_ticks)
{
- return int(tick / quant_ticks) * quant_ticks;
+ return AL::sigmap.raster1(tick, quant_ticks);
}
@@ -2419,6 +2478,9 @@ void staff_t::calc_item_pos()
//key signature is properly drawn.
int pos_add=0;
+ max_y_coord=0;
+ min_y_coord=0;
+
for (ScoreItemList::iterator it2=itemlist.begin(); it2!=itemlist.end(); it2++)
{
for (set<FloItem, floComp>::iterator it=it2->second.begin(); it!=it2->second.end();it++)
@@ -2429,6 +2491,9 @@ void staff_t::calc_item_pos()
if (it->type==FloItem::NOTE)
{
+ if (it->y > max_y_coord) max_y_coord=it->y;
+ if (it->y < min_y_coord) min_y_coord=it->y;
+
it->x+=parent->note_x_indent() + it->shift*NOTE_SHIFT;
switch (it->len)
@@ -2502,6 +2567,9 @@ void staff_t::calc_item_pos()
}
}
}
+
+ max_y_coord+= (pix_quarter->height()/2 +NOTE_YDIST/2);
+ min_y_coord-= (pix_quarter->height()/2 +NOTE_YDIST/2);
}
void ScoreCanvas::calc_pos_add_list()
@@ -2684,9 +2752,14 @@ void ScoreCanvas::draw_items(QPainter& p, int y_offset, staff_t& staff, ScoreIte
color_index=VELO_PIXMAP_BEGIN + it->source_event->velo();
break;
}
+
+ if (it->source_event->selected())
+ color_index=SELECTED_PIXMAP;
+
if (audio->isPlaying() && it->is_active)
color_index=HIGHLIGHTED_PIXMAP;
+
draw_pixmap(p,it->x -x_pos+x_left,y_offset + it->y,it->pix[color_index]);
//draw dots
@@ -3007,7 +3080,14 @@ void ScoreCanvas::draw(QPainter& p, const QRect&)
draw_items(p,it->y_draw - y_pos, *it);
p.setClipping(false);
}
-
+
+ if (have_lasso)
+ {
+ p.setPen(Qt::blue);
+ p.setBrush(Qt::NoBrush);
+ p.drawRect(lasso);
+ }
+
if (debugMsg) cout << "drawing done." << endl;
}
@@ -3149,6 +3229,10 @@ int ScoreCanvas::y_to_pitch(int y, int t, clef_t clef)
void ScoreCanvas::mousePressEvent (QMouseEvent* event)
{
+ keystate=((QInputEvent*)event)->modifiers();
+
+ bool ctrl=keystate & Qt::ControlModifier;
+
// den errechneten tick immer ABrunden!
// denn der "bereich" eines schlags geht von schlag_begin bis nächsterschlag_begin-1
// noten werden aber genau in die mitte dieses bereiches gezeichnet
@@ -3158,6 +3242,10 @@ void ScoreCanvas::mousePressEvent (QMouseEvent* event)
int y=event->y() + y_pos - staff_it->y_draw;
int x=event->x()+x_pos-x_left;
int tick=flo_quantize_floor(x_to_tick(x), quant_ticks());
+
+ if (event->button()==Qt::LeftButton)
+ if (!ctrl)
+ deselect_all();
if (staff_it!=staves.end())
{
@@ -3258,83 +3346,100 @@ void ScoreCanvas::mousePressEvent (QMouseEvent* event)
}
else if (event->button()==Qt::LeftButton) //edit?
{
+ set_it->source_event->setSelected(!set_it->source_event->selected());
+ song_changed(SC_SELECTION);
+
setMouseTracking(true);
dragging=true;
- setCursor(Qt::SizeAllCursor);
- song->startUndo();
+ drag_cursor_changed=false;
+ undo_started=false;
+ undo_flags=SC_EVENT_MODIFIED;
}
}
else //we found nothing?
- {
- if ((event->button()==Qt::LeftButton) && (mouse_inserts_notes))
+ if (event->button()==Qt::LeftButton)
{
- Part* curr_part = NULL;
- set<Part*> possible_dests=staff_it->parts_at_tick(tick);
-
- if (!possible_dests.empty())
+ if (mouse_inserts_notes)
{
- if (possible_dests.size()==1)
- curr_part=*possible_dests.begin();
- else
+ Part* curr_part = NULL;
+ set<Part*> possible_dests=staff_it->parts_at_tick(tick);
+
+ if (!possible_dests.empty())
{
- if (possible_dests.find(selected_part)!=possible_dests.end())
- curr_part=selected_part;
+ if (possible_dests.size()==1)
+ curr_part=*possible_dests.begin();
else
- QMessageBox::information(this, tr("Ambiguous part"), tr("There are two or more possible parts you could add the note to, but none matches the selected part. Please select the destination part by clicking on any note belonging to it and try again, or add a new stave containing only the destination part."));
- }
- }
- else
- QMessageBox::information(this, tr("No part"), tr("There are no parts you could add the note to."));
-
- if (curr_part!=NULL)
- {
- signed int relative_tick=(signed) tick - curr_part->tick();
- if (relative_tick<0)
- cerr << "ERROR: THIS SHOULD NEVER HAPPEN: relative_tick is negative!" << endl;
- song->startUndo();
- //stopping undo at the end of this function is unneccessary
- //because we'll begin a drag right after it. finishing
- //this drag will stop undo as well (in mouseReleaseEvent)
-
- Event newevent(Note);
- newevent.setPitch(y_to_pitch(y,tick, staff_it->clef));
- newevent.setVelo(newnote_velo);
- newevent.setVeloOff(newnote_velo_off);
- newevent.setTick(relative_tick);
- newevent.setLenTick((new_len>0)?new_len:last_len);
-
- if (flo_quantize(newevent.lenTick(), quant_ticks()) <= 0)
- {
- newevent.setLenTick(quant_ticks());
- if (debugMsg) cout << "inserted note's length would be invisible after quantisation (too short)." << endl <<
- " setting it to " << newevent.lenTick() << endl;
+ {
+ if (possible_dests.find(selected_part)!=possible_dests.end())
+ curr_part=selected_part;
+ else
+ QMessageBox::information(this, tr("Ambiguous part"), tr("There are two or more possible parts you could add the note to, but none matches the selected part. Please select the destination part by clicking on any note belonging to it and try again, or add a new stave containing only the destination part."));
+ }
}
+ else
+ QMessageBox::information(this, tr("No part"), tr("There are no parts you could add the note to."));
- if (newevent.endTick() > curr_part->lenTick())
+ if (curr_part!=NULL)
{
- if (debugMsg) cout << "clipping inserted note from len="<<newevent.endTick()<<" to len="<<(curr_part->lenTick() - newevent.tick())<<endl;
- newevent.setLenTick(curr_part->lenTick() - newevent.tick());
- }
-
- audio->msgAddEvent(newevent, curr_part, false, false, false);
-
- dragged_event_part=curr_part;
- dragged_event=newevent;
- dragged_event_original_pitch=newevent.pitch();
+ signed int relative_tick=(signed) tick - curr_part->tick();
+ if (relative_tick<0)
+ cerr << "ERROR: THIS SHOULD NEVER HAPPEN: relative_tick is negative!" << endl;
+ song->startUndo();
+ undo_started=true;
+ undo_flags=SC_EVENT_INSERTED | SC_EVENT_MODIFIED;
+ //stopping undo at the end of this function is unneccessary
+ //because we'll begin a drag right after it. finishing
+ //this drag will stop undo as well (in mouseReleaseEvent)
+
+ Event newevent(Note);
+ newevent.setPitch(y_to_pitch(y,tick, staff_it->clef));
+ newevent.setVelo(newnote_velo);
+ newevent.setVeloOff(newnote_velo_off);
+ newevent.setTick(relative_tick);
+ newevent.setLenTick((new_len>0)?new_len:last_len);
+ newevent.setSelected(true);
+
+ if (flo_quantize(newevent.lenTick(), quant_ticks()) <= 0)
+ {
+ newevent.setLenTick(quant_ticks());
+ if (debugMsg) cout << "inserted note's length would be invisible after quantisation (too short)." << endl <<
+ " setting it to " << newevent.lenTick() << endl;
+ }
+
+ if (newevent.endTick() > curr_part->lenTick())
+ {
+ if (debugMsg) cout << "clipping inserted note from len="<<newevent.endTick()<<" to len="<<(curr_part->lenTick() - newevent.tick())<<endl;
+ newevent.setLenTick(curr_part->lenTick() - newevent.tick());
+ }
+
+ audio->msgAddEvent(newevent, curr_part, false, false, false);
+
+ dragged_event_part=curr_part;
+ dragged_event=newevent;
+ dragged_event_original_pitch=newevent.pitch();
- mouse_down_pos=event->pos();
- mouse_operation=NO_OP;
- mouse_x_drag_operation=LENGTH;
+ mouse_down_pos=event->pos();
+ mouse_operation=NO_OP;
+ mouse_x_drag_operation=LENGTH;
- song_changed(SC_EVENT_INSERTED);
+ fully_recalculate();
- setMouseTracking(true);
- dragging=true;
- setCursor(Qt::SizeAllCursor);
- //song->startUndo(); unneccessary because we have started it already above
+ setMouseTracking(true);
+ dragging=true;
+ drag_cursor_changed=true;
+ setCursor(Qt::SizeAllCursor);
+ //song->startUndo(); unneccessary because we have started it already above
+ }
}
- }
- }
+ else // !mouse_inserts_notes. open a lasso
+ {
+ have_lasso=true;
+ lasso_start=event->pos();
+ lasso=QRect(lasso_start, lasso_start);
+
+ setMouseTracking(true);
+ }
+ }
}
}
}
@@ -3356,10 +3461,13 @@ void ScoreCanvas::mouseReleaseEvent (QMouseEvent* event)
}
}
- song->endUndo(SC_EVENT_MODIFIED);
+ if (undo_started)
+ song->endUndo(undo_flags);
+
setMouseTracking(false);
unsetCursor();
dragging=false;
+ drag_cursor_changed=false;
x_scroll_speed=0; x_scroll_pos=0;
}
@@ -3386,6 +3494,19 @@ void ScoreCanvas::mouseReleaseEvent (QMouseEvent* event)
y_scroll_speed=0; y_scroll_pos=0;
}
+
+ if (have_lasso && event->button()==Qt::LeftButton)
+ {
+ set<Event*> already_processed;
+
+ for (list<staff_t>::iterator it=staves.begin(); it!=staves.end(); it++)
+ it->apply_lasso(lasso.translated(x_pos-x_left, y_pos - it->y_draw), already_processed);
+
+ song->update(SC_SELECTION);
+
+ have_lasso=false;
+ redraw();
+ }
}
#define PITCH_DELTA 5
@@ -3402,6 +3523,13 @@ void ScoreCanvas::mouseMoveEvent (QMouseEvent* event)
int tick=flo_quantize_floor(x_to_tick(x), quant_ticks());
+
+ if ((drag_cursor_changed==false) && ((dx!=0) || (dy!=0)))
+ {
+ setCursor(Qt::SizeAllCursor);
+ drag_cursor_changed=true;
+ }
+
if (mouse_operation==NO_OP)
{
if ((abs(dx)>DRAG_INIT_DISTANCE) && (mouse_x_drag_operation!=NO_OP))
@@ -3428,16 +3556,25 @@ void ScoreCanvas::mouseMoveEvent (QMouseEvent* event)
case PITCH:
if (debugMsg) cout << "changing pitch, delta="<<nearbyint((float)dy/PITCH_DELTA)<<endl;
new_pitch=dragged_event_original_pitch - nearbyint((float)dy/PITCH_DELTA);
-
+
+ if (new_pitch < 0) new_pitch=0;
+ if (new_pitch > 127) new_pitch=127;
+
if (dragged_event.pitch()!=new_pitch)
{
+ if (!undo_started)
+ {
+ song->startUndo();
+ undo_started=true;
+ }
+
Event tmp=dragged_event.clone();
tmp.setPitch(new_pitch);
audio->msgChangeEvent(dragged_event, tmp, dragged_event_part, false, false, false);
dragged_event=tmp;
- song_changed(SC_EVENT_INSERTED);
+ fully_recalculate();
}
break;
@@ -3445,6 +3582,12 @@ void ScoreCanvas::mouseMoveEvent (QMouseEvent* event)
case BEGIN:
if (dragged_event.tick()+dragged_event_part->tick() != unsigned(tick))
{
+ if (!undo_started)
+ {
+ song->startUndo();
+ undo_started=true;
+ }
+
Event tmp=dragged_event.clone();
signed relative_tick=tick-signed(dragged_event_part->tick());
@@ -3474,7 +3617,7 @@ void ScoreCanvas::mouseMoveEvent (QMouseEvent* event)
audio->msgChangeEvent(dragged_event, tmp, dragged_event_part, false, false, false);
dragged_event=tmp;
- song_changed(SC_EVENT_INSERTED);
+ fully_recalculate();
}
break;
@@ -3483,6 +3626,12 @@ void ScoreCanvas::mouseMoveEvent (QMouseEvent* event)
tick+=quant_ticks();
if (dragged_event.tick()+dragged_event.lenTick() + dragged_event_part->tick() != unsigned(tick))
{
+ if (!undo_started)
+ {
+ song->startUndo();
+ undo_started=true;
+ }
+
Event tmp=dragged_event.clone();
signed relative_tick=tick-signed(dragged_event_part->tick());
signed new_len=relative_tick-dragged_event.tick();
@@ -3504,7 +3653,7 @@ void ScoreCanvas::mouseMoveEvent (QMouseEvent* event)
audio->msgChangeEvent(dragged_event, tmp, dragged_event_part, false, false, false);
dragged_event=tmp;
- song_changed(SC_EVENT_INSERTED);
+ fully_recalculate();
}
break;
@@ -3555,6 +3704,12 @@ void ScoreCanvas::mouseMoveEvent (QMouseEvent* event)
{
y_scroll_speed=0;
}
+
+ if (have_lasso)
+ {
+ lasso=QRect(lasso_start, event->pos()).normalized();
+ redraw();
+ }
}
void ScoreCanvas::heartbeat_timer_event()
@@ -3685,16 +3840,33 @@ void ScoreCanvas::recalc_staff_pos()
{
case NORMAL:
it->y_draw = it->y_top + STAFF_DISTANCE/2;
+ if (it->min_y_coord < -STAFF_DISTANCE/2)
+ it->y_draw+= (-it->min_y_coord - STAFF_DISTANCE/2);
+
it->y_bottom = it->y_draw + STAFF_DISTANCE/2;
+ if (it->max_y_coord > STAFF_DISTANCE/2)
+ it->y_bottom+= (it->max_y_coord - STAFF_DISTANCE/2);
+
break;
+
case GRAND_TOP:
it->y_draw = it->y_top + STAFF_DISTANCE/2;
+ if (it->min_y_coord < -STAFF_DISTANCE/2)
+ it->y_draw+= (-it->min_y_coord - STAFF_DISTANCE/2);
+
it->y_bottom = it->y_draw + GRANDSTAFF_DISTANCE/2;
+
break;
+
case GRAND_BOTTOM:
it->y_draw = it->y_top + GRANDSTAFF_DISTANCE/2;
+
it->y_bottom = it->y_draw + STAFF_DISTANCE/2;
+ if (it->max_y_coord > STAFF_DISTANCE/2)
+ it->y_bottom+= (it->max_y_coord - STAFF_DISTANCE/2);
+
break;
+
default:
cerr << "ERROR: THIS SHOULD NEVER HAPPEN: invalid staff type!" << endl;
}
@@ -3777,7 +3949,7 @@ void ScoreCanvas::set_quant(int val)
set_pixels_per_whole(pixels_per_whole() * quant_len() / old_len );
- song_changed(SC_EVENT_INSERTED);
+ fully_recalculate();
}
else
{
@@ -3785,7 +3957,7 @@ void ScoreCanvas::set_quant(int val)
}
}
-void ScoreCanvas::set_pixels_per_whole(int val) //FINDMICH passt das?
+void ScoreCanvas::set_pixels_per_whole(int val)
{
if (debugMsg) cout << "setting px per whole to " << val << endl;
@@ -3848,6 +4020,25 @@ void ScoreCanvas::set_newnote_velo_off(int velo)
newnote_velo_off=velo;
}
+void ScoreCanvas::deselect_all()
+{
+ set<Part*> all_parts=get_all_parts();
+
+ for (set<Part*>::iterator part=all_parts.begin(); part!=all_parts.end(); part++)
+ for (iEvent event=(*part)->events()->begin(); event!=(*part)->events()->end(); event++)
+ event->second.setSelected(false);
+
+ song->update(SC_SELECTION);
+}
+
+void ScoreCanvas::keyPressEvent(QKeyEvent* event)
+{
+ if (event->key()==Qt::Key_Delete)
+ {
+ erase_notes(get_all_parts(), 1); // 1 means "all selected"
+ }
+}
+
bool staff_t::cleanup_parts()
{
bool did_something=false;
@@ -3893,6 +4084,22 @@ set<Part*> staff_t::parts_at_tick(unsigned tick)
return result;
}
+void staff_t::apply_lasso(QRect rect, set<Event*>& already_processed)
+{
+ for (ScoreItemList::iterator it=itemlist.begin(); it!=itemlist.end(); it++)
+ for (set<FloItem>::iterator it2=it->second.begin(); it2!=it->second.end(); it2++)
+ if (it2->type==FloItem::NOTE)
+ {
+ if (rect.contains(it2->x, it2->y))
+ if (already_processed.find(it2->source_event)==already_processed.end())
+ {
+ it2->source_event->setSelected(!it2->source_event->selected());
+ already_processed.insert(it2->source_event);
+ }
+ }
+}
+
+
//the following assertions are made:
// pix_quarter.width() == pix_half.width()
@@ -3904,7 +4111,6 @@ set<Part*> staff_t::parts_at_tick(unsigned tick)
-
//hint: recalculating event- and itemlists "from zero"
// could happen in realtime, as it is pretty fast.
// however, this adds unneccessary cpu usage.
@@ -3919,32 +4125,26 @@ set<Part*> staff_t::parts_at_tick(unsigned tick)
* between, for example, when a cis is tied to a des
*
* CURRENT TODO
- * o offer functions like in the pianoroll: quantize etc.
- * o support selections
- * o let the user select the distance between staves, or do this
- * automatically?
+ * o let the user change velocity of already existent notes
*
* IMPORTANT TODO
* o add a select-clef-toolbox for tracks
* o respect the track's clef (has to be implemented first in muse)
* o do partial recalculating; recalculating can take pretty long
* (0,5 sec) when displaying a whole song in scores
- * o save toolbar position also in the global window settings
- * and provide sane defaults
+ * o support edge-scrolling when opening a lasso
*
* less important stuff
* o deal with expanding parts
- * o do all the song_changed(SC_EVENT_INSERTED) properly
* o use bars instead of flags over groups of 8ths / 16ths etc
* o support different keys in different tracks at the same time
* calc_pos_add_list and calc_item_pos will be affected by this
* calc_pos_add_list must be called before calc_item_pos then,
* and calc_item_pos must respect the pos_add_list instead of
* keeping its own pos_add variable (which is only an optimisation)
- * o save more configuration stuff (quant, color, to_init)
+ * o save more configuration stuff (quant, color)
*
* really unimportant nice-to-haves
- * o clean up code (find TODOs)
* o support in-song clef-changes
* o draw measure numbers
* o use timesig_t in all timesig-stuff
@@ -3954,6 +4154,10 @@ set<Part*> staff_t::parts_at_tick(unsigned tick)
*
*
* stuff for the other muse developers
+ * o update translations
+ * o remove ambiguous translation: "offset"="zeitversatz"
+ * this is ambigous in mod. note len and WRONG in mod. velo dialogs
+ *
* o process accurate timesignatures from muse's list (has to be implemented first in muse)
* ( (2+2+3)/4 or (3+2+2)/4 instead of 7/4 )
* o maybe do expanding parts inside the msgChangeEvent or
@@ -3967,35 +4171,6 @@ set<Part*> staff_t::parts_at_tick(unsigned tick)
*/
-/* how to use the score editor with multiple tracks
- * ================================================
- *
- * select parts, right-click, "display in new score window" or "display per-track in new score window"
- * or "display in existing window -> 1,2,3,4" or "display per-track in existing..."
- *
- * ScoreCanvas has a list of note systems, consisting of the following:
- * * all parts included in that view
- * * eventlist, itemlist
- * * used clef, transposing/octave settings
- * * enum { NOT_GROUPED, I_AM_TOP, I_AM_BOTTOM } group_state
- * NOT_GROUPED means "single note system"
- * I_AM_TOP and I_AM_BOTTOM mean that the two systems belong
- * together
- *
- * when redrawing, we iterate through all systems.
- * we add a distance according to group_state
- * then we draw the system. if group_state is I_AM_BOTTOM, we
- * draw our beams longer/higher, and we draw a bracket
- *
- * when clicking around, we first determine which system has been clicked in
- * (the systems have enough space in between, so there won't be notes
- * from sys1 in sys2. if there are, they're ignored for simplicity)
- * then we proceed as usual (adding, removing, changing notes)
- *
- *
- * pos_add_list stays the same for each staff, so we only need one
- */
-
/* R O A D M A P
* =============
*
diff --git a/muse2/muse/midiedit/scoreedit.h b/muse2/muse/midiedit/scoreedit.h
index 111a4f47..91d399e6 100644
--- a/muse2/muse/midiedit/scoreedit.h
+++ b/muse2/muse/midiedit/scoreedit.h
@@ -20,12 +20,12 @@
#include <QSignalMapper>
#include <QAction>
#include <QActionGroup>
+#include <QGridLayout>
+#include <QByteArray>
#include <values.h>
#include "noteinfo.h"
#include "cobject.h"
-#include "midieditor.h"
-#include "tools.h"
#include "event.h"
#include "view.h"
#include "gconfig.h"
@@ -55,9 +55,12 @@ using std::string;
enum {CMD_COLOR_BLACK, CMD_COLOR_VELO, CMD_COLOR_PART,
CMD_SET_NAME,
CMD_NOTELEN_1, CMD_NOTELEN_2, CMD_NOTELEN_4, CMD_NOTELEN_8,
- CMD_NOTELEN_16, CMD_NOTELEN_32, CMD_NOTELEN_LAST };
+ CMD_NOTELEN_16, CMD_NOTELEN_32, CMD_NOTELEN_LAST,
+
+ CMD_QUANTIZE, CMD_VELOCITY, CMD_NOTELEN };
class ScoreCanvas;
+class EditToolBar;
//---------------------------------------------------------
// ScoreEdit
@@ -70,6 +73,9 @@ class ScoreEdit : public TopWin
private:
virtual void closeEvent(QCloseEvent*);
virtual void resizeEvent(QResizeEvent*);
+ virtual void focusOutEvent(QFocusEvent*);
+
+ void store_initial_state();
void init_name();
@@ -106,6 +112,7 @@ class ScoreEdit : public TopWin
static set<QString> names;
static int width_init, height_init;
+ static QByteArray default_toolbar_state;
QString name;
@@ -436,8 +443,9 @@ struct cumulative_t
#define BLACK_PIXMAP (NUM_PARTCOLORS)
#define HIGHLIGHTED_PIXMAP (NUM_PARTCOLORS+1)
-#define NUM_MYCOLORS (NUM_PARTCOLORS+2 + 128)
-#define VELO_PIXMAP_BEGIN (NUM_PARTCOLORS+2)
+#define SELECTED_PIXMAP (NUM_PARTCOLORS+2)
+#define NUM_MYCOLORS (NUM_PARTCOLORS+3 + 128)
+#define VELO_PIXMAP_BEGIN (NUM_PARTCOLORS+3)
struct timesig_t
{
@@ -469,6 +477,9 @@ struct staff_t
int y_draw;
int y_bottom;
+ int min_y_coord;
+ int max_y_coord;
+
staff_type_t type;
clef_t clef;
@@ -479,6 +490,8 @@ struct staff_t
void process_itemlist();
void calc_item_pos();
+ void apply_lasso(QRect rect, set<Event*>& already_processed);
+
void recalculate()
{
create_appropriate_eventlist();
@@ -619,6 +632,7 @@ class ScoreCanvas : public View
int last_len;
int new_len; //when zero or negative, last_len is used
+ Qt::KeyboardModifiers keystate;
QPoint mouse_down_pos;
bool mouse_down;
enum operation_t
@@ -634,11 +648,19 @@ class ScoreCanvas : public View
bool mouse_inserts_notes;
bool dragging;
+ bool drag_cursor_changed;
Part* dragged_event_part;
Event dragged_event;
int dragged_event_original_pitch;
+
+ bool have_lasso;
+ QPoint lasso_start;
+ QRect lasso;
-
+ bool undo_started;
+ int undo_flags;
+
+
enum {COLOR_MODE_BLACK, COLOR_MODE_PART, COLOR_MODE_VELO} coloring_mode;
bool preamble_contains_keysig;
@@ -664,11 +686,14 @@ class ScoreCanvas : public View
void play_changed(bool);
void config_changed();
+
+ void deselect_all();
public slots:
void x_scroll_event(int);
void y_scroll_event(int);
void song_changed(int);
+ void fully_recalculate();
void goto_tick(int,bool);
void pos_changed(int i, unsigned u, bool b);
void heartbeat_timer_event();
@@ -700,6 +725,7 @@ class ScoreCanvas : public View
virtual void mouseMoveEvent (QMouseEvent* event);
virtual void mouseReleaseEvent (QMouseEvent* event);
virtual void resizeEvent(QResizeEvent*);
+ virtual void keyPressEvent(QKeyEvent* event);
public:
ScoreCanvas(ScoreEdit*, QWidget*, int, int);
@@ -725,6 +751,8 @@ class ScoreCanvas : public View
Part* get_selected_part() {return selected_part;}
void set_selected_part(Part* p) {selected_part=p;}
+ set<Part*> get_all_parts();
+
void write_staves(int level, Xml& xml) const;
};
diff --git a/muse2/muse/midieditor.cpp b/muse2/muse/midieditor.cpp
index 7e25972c..f4d21320 100644
--- a/muse2/muse/midieditor.cpp
+++ b/muse2/muse/midieditor.cpp
@@ -23,7 +23,7 @@
// MidiEditor
//---------------------------------------------------------
-MidiEditor::MidiEditor(int q, int r, PartList* pl,
+MidiEditor::MidiEditor(int r, PartList* pl,
QWidget* parent, const char* name) : TopWin(parent, name)
{
setAttribute(Qt::WA_DeleteOnClose);
@@ -31,7 +31,6 @@ MidiEditor::MidiEditor(int q, int r, PartList* pl,
if (_pl)
for (iPart i = _pl->begin(); i != _pl->end(); ++i)
_parts.push_back(i->second->sn());
- _quant = q;
_raster = r;
canvas = 0;
wview = 0;
@@ -81,17 +80,6 @@ MidiEditor::~MidiEditor()
delete _pl;
}
-//---------------------------------------------------------
-// quantVal
-//---------------------------------------------------------
-
-int MidiEditor::quantVal(int v) const
- {
- int val = ((v+_quant/2)/_quant)*_quant;
- if (val == 0)
- val = _quant;
- return val;
- }
//---------------------------------------------------------
// readStatus
@@ -110,9 +98,7 @@ void MidiEditor::readStatus(Xml& xml)
case Xml::End:
return;
case Xml::TagStart:
- if (tag == "quant")
- _quant = xml.parseInt();
- else if (tag == "raster")
+ if (tag == "raster")
_raster = xml.parseInt();
else if (tag == "topwin")
TopWin::readStatus(xml);
@@ -155,7 +141,6 @@ void MidiEditor::writeStatus(int level, Xml& xml) const
{
xml.tag(level++, "midieditor");
TopWin::writeStatus(level, xml);
- xml.intTag(level, "quant", _quant);
xml.intTag(level, "raster", _raster);
xml.tag(level, "/midieditor");
}
diff --git a/muse2/muse/midieditor.h b/muse2/muse/midieditor.h
index c5668abf..78873a6a 100644
--- a/muse2/muse/midieditor.h
+++ b/muse2/muse/midieditor.h
@@ -44,7 +44,7 @@ class MidiEditor : public TopWin {
WaveView* wview;
std::list<CtrlEdit*> ctrlEditList;
- int _quant, _raster;
+ int _raster;
QGridLayout* mainGrid;
QWidget* mainw;
virtual void readStatus(Xml&);
@@ -63,11 +63,10 @@ class MidiEditor : public TopWin {
void curDrumInstrumentChanged(int);
public:
- MidiEditor(int, int, PartList*,
+ MidiEditor(int, PartList*,
QWidget* parent = 0, const char* name = 0);
~MidiEditor();
- int quantVal(int v) const;
///int rasterStep(unsigned tick) const { return sigmap.rasterStep(tick, _raster); }
///unsigned rasterVal(unsigned v) const { return sigmap.raster(v, _raster); }
///unsigned rasterVal1(unsigned v) const { return sigmap.raster1(v, _raster); }
@@ -76,8 +75,6 @@ class MidiEditor : public TopWin {
unsigned rasterVal(unsigned v) const { return AL::sigmap.raster(v, _raster); }
unsigned rasterVal1(unsigned v) const { return AL::sigmap.raster1(v, _raster); }
unsigned rasterVal2(unsigned v) const { return AL::sigmap.raster2(v, _raster); }
- int quant() const { return _quant; }
- void setQuant(int val) { _quant = val; }
int raster() const { return _raster; }
void setRaster(int val) { _raster = val; }
PartList* parts() { return _pl; }
diff --git a/muse2/muse/midifile.cpp b/muse2/muse/midifile.cpp
index 89cf30f6..65cb6d25 100644
--- a/muse2/muse/midifile.cpp
+++ b/muse2/muse/midifile.cpp
@@ -325,7 +325,7 @@ int MidiFile::readEvent(MidiPlayEvent* event, MidiFileTrack* t)
}
if (buffer[len-1] != 0xf7) {
printf("SYSEX endet nicht mit 0xf7!\n");
- // Forstsetzung folgt?
+ // Fortsetzung folgt?
}
else
--len; // don't count 0xf7
diff --git a/muse2/muse/shortcuts.cpp b/muse2/muse/shortcuts.cpp
index cd54b096..86ab0dcd 100644
--- a/muse2/muse/shortcuts.cpp
+++ b/muse2/muse/shortcuts.cpp
@@ -181,13 +181,9 @@ void initShortCuts()
//Pianoroll:
//-----------------------------------------------------------
- defShrt(SHRT_OVER_QUANTIZE, 0, "Quantize: Over Quantize", PROLL_SHRT, "midi_over_quant");
- defShrt(SHRT_ON_QUANTIZE, 0, "Quantize: Note On Quantize", PROLL_SHRT, "midi_quant_noteon");
- defShrt(SHRT_ONOFF_QUANTIZE, 0, "Quantize: Note On/Off Quantize", PROLL_SHRT,"midi_quant_noteoff");
- defShrt(SHRT_ITERATIVE_QUANTIZE,0,"Quantize: Iterative Quantize", PROLL_SHRT,"midi_quant_iterative");
- defShrt(SHRT_CONFIG_QUANT, Qt::CTRL + Qt::ALT + Qt::Key_Q, "Quantize: Configure quant", PROLL_SHRT, "config_quant");
- defShrt(SHRT_MODIFY_GATE_TIME, 0, "Quantize: Modify Gate Time", PROLL_SHRT, "midi_mod_gate_time");
- defShrt(SHRT_MODIFY_VELOCITY, 0, "Quantize: Modify Velocity", PROLL_SHRT, "midi_mod_velo");
+ defShrt(SHRT_QUANTIZE, 0, "Quantize", PROLL_SHRT, "midi_quant");
+ defShrt(SHRT_MODIFY_GATE_TIME, 0, "Modify Note Length", PROLL_SHRT, "midi_mod_gate_time");
+ defShrt(SHRT_MODIFY_VELOCITY, 0, "Modify Velocity", PROLL_SHRT, "midi_mod_velo");
defShrt(SHRT_CRESCENDO, 0, "Edit: Crescendo", PROLL_SHRT, "midi_crescendo");
defShrt(SHRT_THIN_OUT, 0, "Edit: Thin Out", PROLL_SHRT, "midi_thin_out");
defShrt(SHRT_ERASE_EVENT, 0, "Edit: Erase Event", PROLL_SHRT, "midi_erase_event");
diff --git a/muse2/muse/shortcuts.h b/muse2/muse/shortcuts.h
index 1098be49..b72e0207 100644
--- a/muse2/muse/shortcuts.h
+++ b/muse2/muse/shortcuts.h
@@ -22,7 +22,7 @@
#define DEDIT_SHRT 2 // Drumedit shortcut
#define LEDIT_SHRT 4 // Listedit shortcut
#define SCORE_SHRT 8 // Score shortcut
-#define ARRANG_SHRT 16 // Arrenger shortcut
+#define ARRANG_SHRT 16 // Arranger shortcut
#define TRANSP_SHRT 32 // Transport shortcut
#define WAVE_SHRT 64 // Waveedit shortcut
#define GLOBAL_SHRT 128 // Global shortcuts
@@ -246,11 +246,6 @@ enum {
SHRT_SCROLL_RIGHT, // l
SHRT_FIXED_LEN, //Alt+L, currently only drumeditor
SHRT_QUANTIZE, //q
- SHRT_OVER_QUANTIZE, //Default: undefined
- SHRT_ON_QUANTIZE, //Default: undefined
- SHRT_ONOFF_QUANTIZE, //Default: undefined
- SHRT_ITERATIVE_QUANTIZE, //Default: undefined
- SHRT_CONFIG_QUANT, //Default: Ctrl+Alt+Q
SHRT_MODIFY_GATE_TIME, //Default: undefined
SHRT_MODIFY_VELOCITY,
SHRT_CRESCENDO,
diff --git a/muse2/muse/transpose.cpp b/muse2/muse/transpose.cpp
deleted file mode 100644
index 9e99c471..00000000
--- a/muse2/muse/transpose.cpp
+++ /dev/null
@@ -1,100 +0,0 @@
-
-#include <stdio.h>
-
-#include <QDialog>
-
-#include "transpose.h"
-#include "track.h"
-#include "song.h"
-#include "event.h"
-#include "audio.h"
-
-//---------------------------------------------------------
-// Transpose
-//---------------------------------------------------------
-
-Transpose::Transpose(QWidget* parent)
- : QDialog(parent)
- {
- setupUi(this);
- setAttribute(Qt::WA_DeleteOnClose);
- buttonGroup1 = new QButtonGroup(this);
- buttonGroup1->addButton(time_all);
- buttonGroup1->addButton(time_selected);
- buttonGroup2 = new QButtonGroup(this);
- buttonGroup2->addButton(parts_all);
- buttonGroup2->addButton(parts_selected);
-
- if (song->lpos() != song->rpos()) {
- time_selected->setChecked(true);
- }
- else {
-// time_all->setChecked(true);
- ButtonBox1->setEnabled(false);
- }
-// parts_all->setSelected(true);
- }
-
-//---------------------------------------------------------
-// accept
-//---------------------------------------------------------
-
-void Transpose::accept()
- {
- int left = 0, right = 0;
- int dv = delta->value();
-
- TrackList *tracks = song->tracks();
-
- if (time_selected->isChecked()) {
- left = song->lpos();
- right = song->rpos();
- }
- else {
- left = 0;
- right = song->len();
- }
-
- std::vector< EventList* > doneList;
- typedef std::vector< EventList* >::iterator iDoneList;
-
- song->startUndo();
- for (iTrack t = tracks->begin(); t != tracks->end(); ++t) {
-// if (((*t)->type() == Track::MIDI || (*t)->type() == Track::DRUM)
- if (((*t)->type() != Track::MIDI)
- || !(parts_all->isChecked() || (*t)->selected()))
- continue;
-
- PartList *pl = (*t)->parts();
- for (iPart p = pl->begin(); p != pl->end(); ++p) {
- MidiPart *mp = (MidiPart *) p->second;
- EventList* el = mp->events();
-
- // Check if the event list has already been done. Skip repeated clones.
- iDoneList idl;
- for(idl = doneList.begin(); idl != doneList.end(); ++idl)
- if(*idl == el)
- break;
- if(idl != doneList.end())
- break;
- doneList.push_back(el);
-
- for (iEvent i = el->begin(); i != el->end(); ++i) {
- Event oe = i->second;
- int tick = oe.tick();
- if (tick > right)
- break;
- if (tick < left)
- continue;
- Event ne = oe.clone();
- ne.setA(oe.dataA() + dv );
- // Indicate no undo, and do not do port controller values and clone parts.
- //audio->msgChangeEvent(oe, ne, mp, false);
- audio->msgChangeEvent(oe, ne, mp, false, false, false);
- }
- }
- }
- song->endUndo(SC_EVENT_MODIFIED);
- close();
- }
-
diff --git a/muse2/muse/transpose.h b/muse2/muse/transpose.h
deleted file mode 100644
index a5d2a1bb..00000000
--- a/muse2/muse/transpose.h
+++ /dev/null
@@ -1,26 +0,0 @@
-
-#ifndef __TRANSPOSE_H__
-#define __TRANSPOSE_H__
-
-#include "ui_transposebase.h"
-
-class QButtonGroup;
-
-//---------------------------------------------------------
-// transpose widget
-//---------------------------------------------------------
-
-class Transpose : public QDialog, public Ui::TransposeDialogBase {
- Q_OBJECT
-
- QButtonGroup* buttonGroup1;
- QButtonGroup* buttonGroup2;
-
- private slots:
- virtual void accept();
-
- public:
- Transpose(QWidget* parent=0);
- };
-
-#endif
diff --git a/muse2/muse/waveedit/waveedit.cpp b/muse2/muse/waveedit/waveedit.cpp
index ccfb2730..7a5ad815 100644
--- a/muse2/muse/waveedit/waveedit.cpp
+++ b/muse2/muse/waveedit/waveedit.cpp
@@ -42,6 +42,7 @@ extern QColor readColor(Xml& xml);
int WaveEdit::_widthInit = 600;
int WaveEdit::_heightInit = 400;
+QByteArray WaveEdit::_toolbarInit;
//---------------------------------------------------------
// closeEvent
@@ -61,9 +62,10 @@ void WaveEdit::closeEvent(QCloseEvent* e)
//---------------------------------------------------------
WaveEdit::WaveEdit(PartList* pl)
- : MidiEditor(1, 1, pl)
+ : MidiEditor(1, pl)
{
resize(_widthInit, _heightInit);
+ setFocusPolicy(Qt::StrongFocus);
QSignalMapper* mapper = new QSignalMapper(this);
QAction* act;
@@ -170,8 +172,8 @@ WaveEdit::WaveEdit(PartList* pl)
// ToolBar: Solo Cursor1 Cursor2
addToolBarBreak();
- tb1 = addToolBar(tr("Pianoroll tools"));
- tb1->setObjectName("Pianoroll tools");
+ tb1 = addToolBar(tr("WaveEdit tools"));
+ tb1->setObjectName("WaveEdit tools");
//tb1->setLabel(tr("weTools"));
solo = new QToolButton();
@@ -254,6 +256,8 @@ WaveEdit::WaveEdit(PartList* pl)
connect(hscroll, SIGNAL(scaleChanged(int)), SLOT(updateHScrollRange()));
connect(song, SIGNAL(songChanged(int)), SLOT(songChanged1(int)));
+ if (!_toolbarInit.isEmpty())
+ restoreState(_toolbarInit);
initShortcuts();
@@ -359,6 +363,8 @@ void WaveEdit::readConfiguration(Xml& xml)
_widthInit = xml.parseInt();
else if (tag == "height")
_heightInit = xml.parseInt();
+ else if (tag == "toolbars")
+ _toolbarInit = QByteArray::fromHex(xml.parse1().toAscii());
else
xml.unknown("WaveEdit");
break;
@@ -384,6 +390,7 @@ void WaveEdit::writeConfiguration(int level, Xml& xml)
xml.colorTag(level, "bgcolor", config.waveEditBackgroundColor);
xml.intTag(level, "width", _widthInit);
xml.intTag(level, "height", _heightInit);
+ xml.strTag(level, "toolbars", _toolbarInit.toHex().data());
xml.tag(level, "/waveedit");
}
@@ -442,11 +449,33 @@ void WaveEdit::readStatus(Xml& xml)
void WaveEdit::resizeEvent(QResizeEvent* ev)
{
QWidget::resizeEvent(ev);
- _widthInit = ev->size().width();
- _heightInit = ev->size().height();
+ storeInitialState();
}
//---------------------------------------------------------
+// focusOutEvent
+//---------------------------------------------------------
+
+void WaveEdit::focusOutEvent(QFocusEvent* ev)
+ {
+ QWidget::focusOutEvent(ev);
+ storeInitialState();
+ }
+
+
+//---------------------------------------------------------
+// storeInitialState
+//---------------------------------------------------------
+
+void WaveEdit::storeInitialState()
+ {
+ _widthInit = width();
+ _heightInit = height();
+ _toolbarInit=saveState();
+ }
+
+
+//---------------------------------------------------------
// songChanged1
// signal from "song"
//---------------------------------------------------------
diff --git a/muse2/muse/waveedit/waveedit.h b/muse2/muse/waveedit/waveedit.h
index b4000794..e966a635 100644
--- a/muse2/muse/waveedit/waveedit.h
+++ b/muse2/muse/waveedit/waveedit.h
@@ -14,6 +14,8 @@
#include <QResizeEvent>
#include <QKeyEvent>
#include <QCloseEvent>
+#include <QByteArray>
+
#include "midieditor.h"
class QToolButton;
@@ -45,11 +47,14 @@ class WaveEdit : public MidiEditor {
QAction* pasteAction;
static int _widthInit, _heightInit;
+ static QByteArray _toolbarInit;
Q_OBJECT
virtual void closeEvent(QCloseEvent*);
- virtual void resizeEvent(QResizeEvent* ev);
virtual void keyPressEvent(QKeyEvent*);
+ virtual void resizeEvent(QResizeEvent* ev);
+ virtual void focusOutEvent(QFocusEvent*);
+ void storeInitialState();
QMenu* menuFunctions, *select, *menuGain;
diff --git a/muse2/muse/widgets/CMakeLists.txt b/muse2/muse/widgets/CMakeLists.txt
index 9a3f993a..0ca33d5a 100644
--- a/muse2/muse/widgets/CMakeLists.txt
+++ b/muse2/muse/widgets/CMakeLists.txt
@@ -77,6 +77,12 @@ QT4_WRAP_CPP (widget_mocs
ttoolbutton.h
unusedwavefiles.h
velocity.h
+ quantize.h
+ move.h
+ remove.h
+ deloverlaps.h
+ setlen.h
+ transpose.h
verticalmeter.h
view.h
vscale.h
@@ -113,6 +119,12 @@ file (GLOB widgets_ui_files
transposebase.ui
unusedwavefiles.ui
velocitybase.ui
+ quantbase.ui
+ movebase.ui
+ removebase.ui
+ deloverlapsbase.ui
+ transposebase.ui
+ setlenbase.ui
)
QT4_WRAP_UI (widget_ui_headers ${widgets_ui_files})
@@ -180,6 +192,12 @@ file (GLOB widgets_source_files
unusedwavefiles.cpp
utils.cpp
velocity.cpp
+ quantize.cpp
+ move.cpp
+ remove.cpp
+ deloverlaps.cpp
+ setlen.cpp
+ transpose.cpp
verticalmeter.cpp
view.cpp
vscale.cpp
diff --git a/muse2/muse/widgets/canvas.cpp b/muse2/muse/widgets/canvas.cpp
index 07ad1d1f..18de985b 100644
--- a/muse2/muse/widgets/canvas.cpp
+++ b/muse2/muse/widgets/canvas.cpp
@@ -574,11 +574,11 @@ void Canvas::viewMousePressEvent(QMouseEvent* event)
updateSelection();
redraw();
}
- startDrag(curItem, shift);
+ startDrag(curItem, ctrl);
}
else if (event->button() == Qt::RightButton) {
if (curItem) {
- if (shift) {
+ if (ctrl) {
drag = DRAG_RESIZE;
setCursor();
int dx = start.x() - curItem->x();
@@ -622,15 +622,14 @@ void Canvas::viewMousePressEvent(QMouseEvent* event)
// Changed by T356. Alt is default reserved for moving the whole window in KDE. Changed to Shift-Alt.
// Hmm, nope, shift-alt is also reserved sometimes. Must find a way to bypass,
// why make user turn off setting? Left alone for now...
- if (shift && !ctrl)
+ if (ctrl && !shift)
drag = DRAG_COPY_START;
else if (alt) {
drag = DRAG_CLONE_START;
}
- else if (ctrl) { //Select all on the same pitch (e.g. same y-value)
- if (!shift)
+ else if (shift) { //Select all on the same pitch (e.g. same y-value)
+ if (!ctrl)
deselectAll();
- //printf("Yes, ctrl and press\n");
for (iCItem i = items.begin(); i != items.end(); ++i) {
if (i->second->y() == curItem->y() )
selectItem(i->second, true);
@@ -1082,32 +1081,26 @@ void Canvas::viewMouseMoveEvent(QMouseEvent* event)
void Canvas::viewMouseReleaseEvent(QMouseEvent* event)
{
-// printf("release %x %x\n", event->state(), event->button());
-
doScroll = false;
canScrollLeft = true;
canScrollRight = true;
canScrollUp = true;
canScrollDown = true;
- ///if (event->state() & (Qt::LeftButton|Qt::RightButton|Qt::MidButton) & ~(event->button())) {
if (event->buttons() & (Qt::LeftButton|Qt::RightButton|Qt::MidButton) & ~(event->button())) {
- ///printf("ignore %x %x\n", keyState, event->button());
- //printf("viewMouseReleaseEvent ignore buttons:%x mods:%x button:%x\n", (int)event->buttons(), (int)keyState, event->button());
return;
}
QPoint pos = event->pos();
- ///bool shift = event->state() & Qt::ShiftModifier;
- bool shift = ((QInputEvent*)event)->modifiers() & Qt::ShiftModifier;
+ bool ctrl = ((QInputEvent*)event)->modifiers() & Qt::ControlModifier;
bool redrawFlag = false;
switch (drag) {
case DRAG_MOVE_START:
case DRAG_COPY_START:
case DRAG_CLONE_START:
- if (!shift)
+ if (!ctrl)
deselectAll();
- selectItem(curItem, !(shift && curItem->isSelected()));
+ selectItem(curItem, !(ctrl && curItem->isSelected()));
updateSelection();
redrawFlag = true;
itemReleased(curItem, curItem->pos());
@@ -1150,17 +1143,17 @@ void Canvas::viewMouseReleaseEvent(QMouseEvent* event)
break;
case DRAG_LASSO_START:
lasso.setRect(-1, -1, -1, -1);
- if (!shift)
+ if (!ctrl)
deselectAll();
updateSelection();
redrawFlag = true;
break;
case DRAG_LASSO:
- if (!shift)
+ if (!ctrl)
deselectAll();
lasso = lasso.normalized();
- selectLasso(shift);
+ selectLasso(ctrl);
updateSelection();
redrawFlag = true;
break;
diff --git a/muse2/muse/widgets/deloverlaps.cpp b/muse2/muse/widgets/deloverlaps.cpp
new file mode 100644
index 00000000..76103d74
--- /dev/null
+++ b/muse2/muse/widgets/deloverlaps.cpp
@@ -0,0 +1,79 @@
+//=========================================================
+// MusE
+// Linux Music Editor
+// $Id: deloverlaps.cpp,v 1.1.1.1 2011/05/05 18:51:04 flo93 Exp $
+// (C) Copyright 2011 Florian Jung (flo93@sourceforge.net)
+//=========================================================
+
+#include <QButtonGroup>
+#include "deloverlaps.h"
+#include "xml.h"
+
+
+DelOverlaps::DelOverlaps(QWidget* parent)
+ : QDialog(parent)
+{
+ setupUi(this);
+ range_group = new QButtonGroup;
+ range_group->addButton(all_events_button,0);
+ range_group->addButton(selected_events_button,1);
+ range_group->addButton(looped_events_button,2);
+ range_group->addButton(selected_looped_button,3);
+
+ pull_values();
+}
+
+void DelOverlaps::pull_values()
+{
+ range = range_group->checkedId();
+}
+
+void DelOverlaps::accept()
+{
+ pull_values();
+ QDialog::accept();
+}
+
+int DelOverlaps::exec()
+{
+ if ((range < 0) || (range > 3)) range=0;
+
+ range_group->button(range)->setChecked(true);
+
+ return QDialog::exec();
+}
+
+void DelOverlaps::read_configuration(Xml& xml)
+{
+ for (;;)
+ {
+ Xml::Token token = xml.parse();
+ if (token == Xml::Error || token == Xml::End)
+ break;
+
+ const QString& tag = xml.s1();
+ switch (token)
+ {
+ case Xml::TagStart:
+ if (tag == "range")
+ range=xml.parseInt();
+ else
+ xml.unknown("DelOverlaps");
+ break;
+
+ case Xml::TagEnd:
+ if (tag == "del_overlaps")
+ return;
+
+ default:
+ break;
+ }
+ }
+}
+
+void DelOverlaps::write_configuration(int level, Xml& xml)
+{
+ xml.tag(level++, "del_overlaps");
+ xml.intTag(level, "range", range);
+ xml.tag(level, "/del_overlaps");
+}
diff --git a/muse2/muse/widgets/deloverlaps.h b/muse2/muse/widgets/deloverlaps.h
new file mode 100644
index 00000000..813192a6
--- /dev/null
+++ b/muse2/muse/widgets/deloverlaps.h
@@ -0,0 +1,39 @@
+//=========================================================
+// MusE
+// Linux Music Editor
+// $Id: deloverlaps.h,v 1.1.1.1 2011/05/05 18:51:04 flo93 Exp $
+// (C) Copyright 2011 Florian Jung (flo93@sourceforge.net)
+//=========================================================
+
+#ifndef __DELOVERLAPS_H__
+#define __DELOVERLAPS__H__
+
+#include "ui_deloverlapsbase.h"
+
+class QButtonGroup;
+class Xml;
+
+class DelOverlaps : public QDialog, public Ui::DelOverlapsBase
+{
+ private:
+ Q_OBJECT
+ QButtonGroup* range_group;
+
+ protected slots:
+ void accept();
+ void pull_values();
+
+ public:
+ DelOverlaps(QWidget* parent = 0);
+
+ int range;
+
+ void read_configuration(Xml& xml);
+ void write_configuration(int level, Xml& xml);
+
+ public slots:
+ int exec();
+};
+
+#endif
+
diff --git a/muse2/muse/widgets/deloverlapsbase.ui b/muse2/muse/widgets/deloverlapsbase.ui
new file mode 100644
index 00000000..7484bf97
--- /dev/null
+++ b/muse2/muse/widgets/deloverlapsbase.ui
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DelOverlapsBase</class>
+ <widget class="QDialog" name="DelOverlapsBase">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>275</width>
+ <height>195</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>MusE: Delete Overlaps</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <item>
+ <widget class="QGroupBox" name="rangeBox">
+ <property name="title">
+ <string>Range</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <item>
+ <widget class="QRadioButton" name="all_events_button">
+ <property name="text">
+ <string>All Events</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="selected_events_button">
+ <property name="text">
+ <string>Selected Events</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="looped_events_button">
+ <property name="text">
+ <string>Looped Events</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="selected_looped_button">
+ <property name="text">
+ <string>Selected Looped</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <item>
+ <spacer name="Spacer1">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Expanding</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="okButton">
+ <property name="text">
+ <string>OK</string>
+ </property>
+ <property name="autoDefault">
+ <bool>false</bool>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="cancelButton">
+ <property name="text">
+ <string>Cancel</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>okButton</sender>
+ <signal>clicked()</signal>
+ <receiver>DelOverlapsBase</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>cancelButton</sender>
+ <signal>clicked()</signal>
+ <receiver>DelOverlapsBase</receiver>
+ <slot>reject()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/muse2/muse/widgets/gatetime.cpp b/muse2/muse/widgets/gatetime.cpp
index f1804c35..9448ab1c 100644
--- a/muse2/muse/widgets/gatetime.cpp
+++ b/muse2/muse/widgets/gatetime.cpp
@@ -10,6 +10,7 @@
#include "gatetime.h"
+#include "xml.h"
#include "song.h"
//---------------------------------------------------------
@@ -26,6 +27,8 @@ GateTime::GateTime(QWidget* parent)
rangeGroup->addButton(loopButton, 2);
rangeGroup->addButton(sloopButton, 3);
rangeGroup->setExclusive(true);
+
+ pullValues();
}
//---------------------------------------------------------
@@ -34,18 +37,72 @@ GateTime::GateTime(QWidget* parent)
void GateTime::accept()
{
- _range = rangeGroup->checkedId();
- _rateVal = rate->value();
- _offsetVal = offset->value();
+ pullValues();
QDialog::accept();
}
//---------------------------------------------------------
-// setRange
+// pullValues
//---------------------------------------------------------
-void GateTime::setRange(int id)
+void GateTime::pullValues()
{
- rangeGroup->button(id)->setChecked(true);
+ range = rangeGroup->checkedId();
+ rateVal = rate->value();
+ offsetVal = offset->value();
}
+//---------------------------------------------------------
+// exec
+//---------------------------------------------------------
+
+int GateTime::exec()
+ {
+ rangeGroup->button(range)->setChecked(true);
+ rate->setValue(rateVal);
+ offset->setValue(offsetVal);
+
+ return QDialog::exec();
+ }
+
+
+void GateTime::read_configuration(Xml& xml)
+{
+ for (;;)
+ {
+ Xml::Token token = xml.parse();
+ if (token == Xml::Error || token == Xml::End)
+ break;
+
+ const QString& tag = xml.s1();
+ switch (token)
+ {
+ case Xml::TagStart:
+ if (tag == "range")
+ range=xml.parseInt();
+ else if (tag == "rate")
+ rateVal=xml.parseInt();
+ else if (tag == "offset")
+ offsetVal=xml.parseInt();
+ else
+ xml.unknown("ModLen");
+ break;
+
+ case Xml::TagEnd:
+ if (tag == "mod_len")
+ return;
+
+ default:
+ break;
+ }
+ }
+}
+
+void GateTime::write_configuration(int level, Xml& xml)
+{
+ xml.tag(level++, "mod_len");
+ xml.intTag(level, "range", range);
+ xml.intTag(level, "offset", offsetVal);
+ xml.intTag(level, "rate", rateVal);
+ xml.tag(level, "/mod_len");
+}
diff --git a/muse2/muse/widgets/gatetime.h b/muse2/muse/widgets/gatetime.h
index dcb1827c..d2555872 100644
--- a/muse2/muse/widgets/gatetime.h
+++ b/muse2/muse/widgets/gatetime.h
@@ -12,28 +12,35 @@
class QButtonGroup;
class QDialog;
+class Xml;
//---------------------------------------------------------
// GateTime
//---------------------------------------------------------
class GateTime : public QDialog, public Ui::GateTimeBase {
+ private:
Q_OBJECT
- int _range;
- int _rateVal;
- int _offsetVal;
QButtonGroup *rangeGroup;
protected slots:
void accept();
+ void pullValues();
public:
GateTime(QWidget* parent=0);
- void setRange(int id);
- int range() const { return _range; }
- int rateVal() const { return _rateVal; }
- int offsetVal() const { return _offsetVal; }
+
+ int range;
+ int rateVal;
+ int offsetVal;
+
+ void read_configuration(Xml& xml);
+ void write_configuration(int level, Xml& xml);
+
+
+ public slots:
+ int exec();
};
#endif
diff --git a/muse2/muse/widgets/gatetimebase.ui b/muse2/muse/widgets/gatetimebase.ui
index babf5f02..e804de17 100644
--- a/muse2/muse/widgets/gatetimebase.ui
+++ b/muse2/muse/widgets/gatetimebase.ui
@@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
- <string>MusE: Modify Gate Time</string>
+ <string>MusE: Modify Note Length</string>
</property>
<layout class="QVBoxLayout">
<property name="spacing">
@@ -59,7 +59,7 @@
<item>
<widget class="QRadioButton" name="sloopButton">
<property name="text">
- <string>Selected &amp; Looped</string>
+ <string>Selected Looped</string>
</property>
</widget>
</item>
@@ -104,7 +104,7 @@
<string>%</string>
</property>
<property name="maximum">
- <number>200</number>
+ <number>1000</number>
</property>
<property name="value">
<number>100</number>
@@ -124,6 +124,13 @@
</property>
</widget>
</item>
+ <item row="2" column="0" colspan="2">
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>lenNew = (lenOld * rate) + offset</string>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</item>
diff --git a/muse2/muse/widgets/move.cpp b/muse2/muse/widgets/move.cpp
new file mode 100644
index 00000000..2ce6cb05
--- /dev/null
+++ b/muse2/muse/widgets/move.cpp
@@ -0,0 +1,84 @@
+//=========================================================
+// MusE
+// Linux Music Editor
+// $Id: move.cpp,v 1.1.1.1 2011/05/05 18:51:04 flo93 Exp $
+// (C) Copyright 2011 Florian Jung (flo93@sourceforge.net)
+//=========================================================
+
+#include <QButtonGroup>
+#include "move.h"
+#include "xml.h"
+
+Move::Move(QWidget* parent)
+ : QDialog(parent)
+{
+ setupUi(this);
+ range_group = new QButtonGroup;
+ range_group->addButton(all_events_button,0);
+ range_group->addButton(selected_events_button,1);
+ range_group->addButton(looped_events_button,2);
+ range_group->addButton(selected_looped_button,3);
+
+ pull_values();
+}
+
+void Move::pull_values()
+{
+ range = range_group->checkedId();
+ amount = amount_spinbox->value();
+}
+
+void Move::accept()
+{
+ pull_values();
+ QDialog::accept();
+}
+
+int Move::exec()
+{
+ if ((range < 0) || (range > 3)) range=0;
+
+ range_group->button(range)->setChecked(true);
+ amount_spinbox->setValue(amount);
+
+ return QDialog::exec();
+}
+
+
+void Move::read_configuration(Xml& xml)
+{
+ for (;;)
+ {
+ Xml::Token token = xml.parse();
+ if (token == Xml::Error || token == Xml::End)
+ break;
+
+ const QString& tag = xml.s1();
+ switch (token)
+ {
+ case Xml::TagStart:
+ if (tag == "range")
+ range=xml.parseInt();
+ else if (tag == "amount")
+ amount=xml.parseInt();
+ else
+ xml.unknown("Move");
+ break;
+
+ case Xml::TagEnd:
+ if (tag == "move")
+ return;
+
+ default:
+ break;
+ }
+ }
+}
+
+void Move::write_configuration(int level, Xml& xml)
+{
+ xml.tag(level++, "move");
+ xml.intTag(level, "range", range);
+ xml.intTag(level, "amount", amount);
+ xml.tag(level, "/move");
+}
diff --git a/muse2/muse/widgets/move.h b/muse2/muse/widgets/move.h
new file mode 100644
index 00000000..4c90a922
--- /dev/null
+++ b/muse2/muse/widgets/move.h
@@ -0,0 +1,41 @@
+//=========================================================
+// MusE
+// Linux Music Editor
+// $Id: move.h,v 1.1.1.1 2011/05/05 18:51:04 flo93 Exp $
+// (C) Copyright 2011 Florian Jung (flo93@sourceforge.net)
+//=========================================================
+
+#ifndef __MOVE_H__
+#define __MOVE_H__
+
+#include "ui_movebase.h"
+
+class QButtonGroup;
+class Xml;
+
+class Move : public QDialog, public Ui::MoveBase
+{
+ private:
+ Q_OBJECT
+ QButtonGroup* range_group;
+
+ protected slots:
+ void accept();
+ void pull_values();
+
+ public:
+ Move(QWidget* parent = 0);
+
+ int range;
+ int amount;
+
+ void read_configuration(Xml& xml);
+ void write_configuration(int level, Xml& xml);
+
+
+ public slots:
+ int exec();
+};
+
+#endif
+
diff --git a/muse2/muse/widgets/movebase.ui b/muse2/muse/widgets/movebase.ui
new file mode 100644
index 00000000..a8825dd5
--- /dev/null
+++ b/muse2/muse/widgets/movebase.ui
@@ -0,0 +1,203 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MoveBase</class>
+ <widget class="QDialog" name="MoveBase">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>275</width>
+ <height>264</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>MusE: Move Notes</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <item>
+ <widget class="QGroupBox" name="rangeBox">
+ <property name="title">
+ <string>Range</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <item>
+ <widget class="QRadioButton" name="all_events_button">
+ <property name="text">
+ <string>All Events</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="selected_events_button">
+ <property name="text">
+ <string>Selected Events</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="looped_events_button">
+ <property name="text">
+ <string>Looped Events</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="selected_looped_button">
+ <property name="text">
+ <string>Selected Looped</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="groupBox_2">
+ <property name="title">
+ <string>Value</string>
+ </property>
+ <property name="flat">
+ <bool>false</bool>
+ </property>
+ <property name="checkable">
+ <bool>false</bool>
+ </property>
+ <layout class="QGridLayout" name="gridLayout">
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <item row="0" column="0">
+ <widget class="QLabel" name="TextLabel3">
+ <property name="text">
+ <string>Move by</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QSpinBox" name="amount_spinbox">
+ <property name="accelerated">
+ <bool>true</bool>
+ </property>
+ <property name="suffix">
+ <string> ticks</string>
+ </property>
+ <property name="minimum">
+ <number>-9999999</number>
+ </property>
+ <property name="maximum">
+ <number>9999999</number>
+ </property>
+ <property name="singleStep">
+ <number>386</number>
+ </property>
+ <property name="value">
+ <number>0</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <item>
+ <spacer name="Spacer1">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Expanding</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="okButton">
+ <property name="text">
+ <string>OK</string>
+ </property>
+ <property name="autoDefault">
+ <bool>false</bool>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="cancelButton">
+ <property name="text">
+ <string>Cancel</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>okButton</sender>
+ <signal>clicked()</signal>
+ <receiver>MoveBase</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>cancelButton</sender>
+ <signal>clicked()</signal>
+ <receiver>MoveBase</receiver>
+ <slot>reject()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/muse2/muse/widgets/quantbase.ui b/muse2/muse/widgets/quantbase.ui
new file mode 100644
index 00000000..6a88c86f
--- /dev/null
+++ b/muse2/muse/widgets/quantbase.ui
@@ -0,0 +1,308 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>QuantBase</class>
+ <widget class="QDialog" name="QuantBase">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>279</width>
+ <height>486</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>MusE: Quantize</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <item>
+ <widget class="QGroupBox" name="rangeBox">
+ <property name="title">
+ <string>Range</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <item>
+ <widget class="QRadioButton" name="all_events_button">
+ <property name="text">
+ <string>All Events</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="selected_events_button">
+ <property name="text">
+ <string>Selected Events</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="looped_events_button">
+ <property name="text">
+ <string>Looped Events</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="selected_looped_button">
+ <property name="text">
+ <string>Selected Looped</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="groupBox_2">
+ <property name="title">
+ <string>Values</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout">
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <item row="1" column="0">
+ <widget class="QLabel" name="TextLabel3">
+ <property name="text">
+ <string>Strength:</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QSpinBox" name="strength_spinbox">
+ <property name="suffix">
+ <string>%</string>
+ </property>
+ <property name="maximum">
+ <number>100</number>
+ </property>
+ <property name="value">
+ <number>80</number>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="TextLabel4">
+ <property name="text">
+ <string>Threshold (ticks):</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QSpinBox" name="threshold_spinbox">
+ <property name="minimum">
+ <number>0</number>
+ </property>
+ <property name="maximum">
+ <number>10000</number>
+ </property>
+ <property name="singleStep">
+ <number>1</number>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="0">
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Quantize Len</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="1">
+ <widget class="QCheckBox" name="len_checkbox">
+ <property name="text">
+ <string/>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_2">
+ <property name="text">
+ <string>Raster</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QComboBox" name="raster_combobox">
+ <property name="editable">
+ <bool>false</bool>
+ </property>
+ <property name="currentIndex">
+ <number>3</number>
+ </property>
+ <property name="frame">
+ <bool>true</bool>
+ </property>
+ <item>
+ <property name="text">
+ <string>Whole</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Half</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Quarter</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>8th</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>16th</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>32th</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item row="3" column="0">
+ <widget class="QLabel" name="label_3">
+ <property name="text">
+ <string>Swing:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <widget class="QSpinBox" name="swing_spinbox">
+ <property name="minimum">
+ <number>-99</number>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="0" colspan="2">
+ <widget class="QLabel" name="label_4">
+ <property name="text">
+ <string>If the proposed change in tick or length is smaller than threshold, nothing is done.
+If swing=0, this is normal
+If swing is 33, you get a 2:1-rhythm.
+If swing is -33, you get a 1:2-rhythm.</string>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <item>
+ <spacer name="Spacer1">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Expanding</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="ok_button">
+ <property name="text">
+ <string>OK</string>
+ </property>
+ <property name="autoDefault">
+ <bool>false</bool>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="cancel_button">
+ <property name="text">
+ <string>Cancel</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>ok_button</sender>
+ <signal>clicked()</signal>
+ <receiver>QuantBase</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>cancel_button</sender>
+ <signal>clicked()</signal>
+ <receiver>QuantBase</receiver>
+ <slot>reject()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/muse2/muse/widgets/quantize.cpp b/muse2/muse/widgets/quantize.cpp
new file mode 100644
index 00000000..111087c2
--- /dev/null
+++ b/muse2/muse/widgets/quantize.cpp
@@ -0,0 +1,103 @@
+//=========================================================
+// MusE
+// Linux Music Editor
+// $Id: quantize.cpp,v 1.1.1.1 2011/05/05 18:51:04 flo93 Exp $
+// (C) Copyright 2011 Florian Jung (flo93@sourceforge.net)
+//=========================================================
+
+#include <QButtonGroup>
+#include "quantize.h"
+#include "xml.h"
+
+Quantize::Quantize(QWidget* parent)
+ : QDialog(parent)
+{
+ setupUi(this);
+ range_group = new QButtonGroup;
+ range_group->addButton(all_events_button,0);
+ range_group->addButton(selected_events_button,1);
+ range_group->addButton(looped_events_button,2);
+ range_group->addButton(selected_looped_button,3);
+
+ pull_values();
+}
+
+void Quantize::pull_values()
+{
+ range = range_group->checkedId();
+ strength = strength_spinbox->value();
+ threshold = threshold_spinbox->value();
+ raster_power2 = raster_combobox->currentIndex();
+ quant_len = len_checkbox->isChecked();
+ swing = swing_spinbox->value();
+}
+
+void Quantize::accept()
+{
+ pull_values();
+ QDialog::accept();
+}
+
+int Quantize::exec()
+{
+ if ((range < 0) || (range > 3)) range=0;
+
+ range_group->button(range)->setChecked(true);
+ strength_spinbox->setValue(strength);
+ threshold_spinbox->setValue(threshold);
+ raster_combobox->setCurrentIndex(raster_power2);
+ len_checkbox->setChecked(quant_len);
+ swing_spinbox->setValue(swing);
+
+ return QDialog::exec();
+}
+
+void Quantize::read_configuration(Xml& xml)
+{
+ for (;;)
+ {
+ Xml::Token token = xml.parse();
+ if (token == Xml::Error || token == Xml::End)
+ break;
+
+ const QString& tag = xml.s1();
+ switch (token)
+ {
+ case Xml::TagStart:
+ if (tag == "range")
+ range=xml.parseInt();
+ else if (tag == "strength")
+ strength=xml.parseInt();
+ else if (tag == "threshold")
+ threshold=xml.parseInt();
+ else if (tag == "raster")
+ raster_power2=xml.parseInt();
+ else if (tag == "swing")
+ swing=xml.parseInt();
+ else if (tag == "quant_len")
+ quant_len=xml.parseInt();
+ else
+ xml.unknown("Quantize");
+ break;
+
+ case Xml::TagEnd:
+ if (tag == "quantize")
+ return;
+
+ default:
+ break;
+ }
+ }
+}
+
+void Quantize::write_configuration(int level, Xml& xml)
+{
+ xml.tag(level++, "quantize");
+ xml.intTag(level, "range", range);
+ xml.intTag(level, "strength", strength);
+ xml.intTag(level, "threshold", threshold);
+ xml.intTag(level, "raster", raster_power2);
+ xml.intTag(level, "swing", swing);
+ xml.intTag(level, "quant_len", quant_len);
+ xml.tag(level, "/quantize");
+}
diff --git a/muse2/muse/widgets/quantize.h b/muse2/muse/widgets/quantize.h
new file mode 100644
index 00000000..399e2545
--- /dev/null
+++ b/muse2/muse/widgets/quantize.h
@@ -0,0 +1,45 @@
+//=========================================================
+// MusE
+// Linux Music Editor
+// $Id: quantize.h,v 1.1.1.1 2011/05/05 18:51:04 flo93 Exp $
+// (C) Copyright 2011 Florian Jung (flo93@sourceforge.net)
+//=========================================================
+
+#ifndef __QUANTIZE_H__
+#define __QUANTIZE_H__
+
+#include "ui_quantbase.h"
+
+class QButtonGroup;
+class Xml;
+
+class Quantize : public QDialog, public Ui::QuantBase
+{
+ private:
+ Q_OBJECT
+ QButtonGroup* range_group;
+
+ protected slots:
+ void accept();
+ void pull_values();
+
+ public:
+ Quantize(QWidget* parent = 0);
+
+ int range;
+ int strength;
+ int threshold;
+ int raster_power2;
+ int swing;
+ bool quant_len;
+
+ void read_configuration(Xml& xml);
+ void write_configuration(int level, Xml& xml);
+
+
+ public slots:
+ int exec();
+};
+
+#endif
+
diff --git a/muse2/muse/widgets/remove.cpp b/muse2/muse/widgets/remove.cpp
new file mode 100644
index 00000000..5ad272ab
--- /dev/null
+++ b/muse2/muse/widgets/remove.cpp
@@ -0,0 +1,78 @@
+//=========================================================
+// MusE
+// Linux Music Editor
+// $Id: remove.cpp,v 1.1.1.1 2011/05/05 18:51:04 flo93 Exp $
+// (C) Copyright 2011 Florian Jung (flo93@sourceforge.net)
+//=========================================================
+
+#include <QButtonGroup>
+#include "remove.h"
+#include "xml.h"
+
+Remove::Remove(QWidget* parent)
+ : QDialog(parent)
+{
+ setupUi(this);
+ range_group = new QButtonGroup;
+ range_group->addButton(all_events_button,0);
+ range_group->addButton(selected_events_button,1);
+ range_group->addButton(looped_events_button,2);
+ range_group->addButton(selected_looped_button,3);
+
+ pull_values();
+}
+
+void Remove::pull_values()
+{
+ range = range_group->checkedId();
+}
+
+void Remove::accept()
+{
+ pull_values();
+ QDialog::accept();
+}
+
+int Remove::exec()
+{
+ if ((range < 0) || (range > 3)) range=0;
+
+ range_group->button(range)->setChecked(true);
+
+ return QDialog::exec();
+}
+
+void Remove::read_configuration(Xml& xml)
+{
+ for (;;)
+ {
+ Xml::Token token = xml.parse();
+ if (token == Xml::Error || token == Xml::End)
+ break;
+
+ const QString& tag = xml.s1();
+ switch (token)
+ {
+ case Xml::TagStart:
+ if (tag == "range")
+ range=xml.parseInt();
+ else
+ xml.unknown("Erase");
+ break;
+
+ case Xml::TagEnd:
+ if (tag == "erase")
+ return;
+
+ default:
+ break;
+ }
+ }
+}
+
+void Remove::write_configuration(int level, Xml& xml)
+{
+ xml.tag(level++, "erase");
+ xml.intTag(level, "range", range);
+ xml.tag(level, "/erase");
+}
diff --git a/muse2/muse/widgets/remove.h b/muse2/muse/widgets/remove.h
new file mode 100644
index 00000000..5615ed42
--- /dev/null
+++ b/muse2/muse/widgets/remove.h
@@ -0,0 +1,40 @@
+//=========================================================
+// MusE
+// Linux Music Editor
+// $Id: remove.h,v 1.1.1.1 2011/05/05 18:51:04 flo93 Exp $
+// (C) Copyright 2011 Florian Jung (flo93@sourceforge.net)
+//=========================================================
+
+#ifndef __REMOVE_H__
+#define __REMOVE_H__
+
+#include "ui_removebase.h"
+
+class QButtonGroup;
+class Xml;
+
+class Remove : public QDialog, public Ui::RemoveBase
+{
+ private:
+ Q_OBJECT
+ QButtonGroup* range_group;
+
+ protected slots:
+ void accept();
+ void pull_values();
+
+ public:
+ Remove(QWidget* parent = 0);
+
+ int range;
+
+ void read_configuration(Xml& xml);
+ void write_configuration(int level, Xml& xml);
+
+
+ public slots:
+ int exec();
+};
+
+#endif
+
diff --git a/muse2/muse/widgets/removebase.ui b/muse2/muse/widgets/removebase.ui
new file mode 100644
index 00000000..3381795c
--- /dev/null
+++ b/muse2/muse/widgets/removebase.ui
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>RemoveBase</class>
+ <widget class="QDialog" name="RemoveBase">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>275</width>
+ <height>195</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>MusE: Erase Notes</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <item>
+ <widget class="QGroupBox" name="rangeBox">
+ <property name="title">
+ <string>Range</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <item>
+ <widget class="QRadioButton" name="all_events_button">
+ <property name="text">
+ <string>All Events</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="selected_events_button">
+ <property name="text">
+ <string>Selected Events</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="looped_events_button">
+ <property name="text">
+ <string>Looped Events</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="selected_looped_button">
+ <property name="text">
+ <string>Selected Looped</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <item>
+ <spacer name="Spacer1">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Expanding</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="okButton">
+ <property name="text">
+ <string>OK</string>
+ </property>
+ <property name="autoDefault">
+ <bool>false</bool>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="cancelButton">
+ <property name="text">
+ <string>Cancel</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>okButton</sender>
+ <signal>clicked()</signal>
+ <receiver>RemoveBase</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>cancelButton</sender>
+ <signal>clicked()</signal>
+ <receiver>RemoveBase</receiver>
+ <slot>reject()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/muse2/muse/widgets/setlen.cpp b/muse2/muse/widgets/setlen.cpp
new file mode 100644
index 00000000..024cdd35
--- /dev/null
+++ b/muse2/muse/widgets/setlen.cpp
@@ -0,0 +1,83 @@
+//=========================================================
+// MusE
+// Linux Music Editor
+// $Id: setlen.cpp,v 1.1.1.1 2011/05/05 18:51:04 flo93 Exp $
+// (C) Copyright 2011 Florian Jung (flo93@sourceforge.net)
+//=========================================================
+
+#include <QButtonGroup>
+#include "setlen.h"
+#include "xml.h"
+
+Setlen::Setlen(QWidget* parent)
+ : QDialog(parent)
+{
+ setupUi(this);
+ range_group = new QButtonGroup;
+ range_group->addButton(all_events_button,0);
+ range_group->addButton(selected_events_button,1);
+ range_group->addButton(looped_events_button,2);
+ range_group->addButton(selected_looped_button,3);
+
+ pull_values();
+}
+
+void Setlen::pull_values()
+{
+ range = range_group->checkedId();
+ len = len_spinbox->value();
+}
+
+void Setlen::accept()
+{
+ pull_values();
+ QDialog::accept();
+}
+
+int Setlen::exec()
+{
+ if ((range < 0) || (range > 3)) range=0;
+
+ range_group->button(range)->setChecked(true);
+ len_spinbox->setValue(len);
+
+ return QDialog::exec();
+}
+
+void Setlen::read_configuration(Xml& xml)
+{
+ for (;;)
+ {
+ Xml::Token token = xml.parse();
+ if (token == Xml::Error || token == Xml::End)
+ break;
+
+ const QString& tag = xml.s1();
+ switch (token)
+ {
+ case Xml::TagStart:
+ if (tag == "range")
+ range=xml.parseInt();
+ else if (tag == "len")
+ len=xml.parseInt();
+ else
+ xml.unknown("SetLen");
+ break;
+
+ case Xml::TagEnd:
+ if (tag == "setlen")
+ return;
+
+ default:
+ break;
+ }
+ }
+}
+
+void Setlen::write_configuration(int level, Xml& xml)
+{
+ xml.tag(level++, "setlen");
+ xml.intTag(level, "range", range);
+ xml.intTag(level, "len", len);
+ xml.tag(level, "/setlen");
+}
diff --git a/muse2/muse/widgets/setlen.h b/muse2/muse/widgets/setlen.h
new file mode 100644
index 00000000..ad66a38b
--- /dev/null
+++ b/muse2/muse/widgets/setlen.h
@@ -0,0 +1,41 @@
+//=========================================================
+// MusE
+// Linux Music Editor
+// $Id: setlen.h,v 1.1.1.1 2011/05/05 18:51:04 flo93 Exp $
+// (C) Copyright 2011 Florian Jung (flo93@sourceforge.net)
+//=========================================================
+
+#ifndef __SETLEN_H__
+#define __SETLEN_H__
+
+#include "ui_setlenbase.h"
+
+class QButtonGroup;
+class Xml;
+
+class Setlen : public QDialog, public Ui::SetlenBase
+{
+ private:
+ Q_OBJECT
+ QButtonGroup* range_group;
+
+ protected slots:
+ void accept();
+ void pull_values();
+
+ public:
+ Setlen(QWidget* parent = 0);
+
+ int range;
+ int len;
+
+ void read_configuration(Xml& xml);
+ void write_configuration(int level, Xml& xml);
+
+
+ public slots:
+ int exec();
+};
+
+#endif
+
diff --git a/muse2/muse/widgets/setlenbase.ui b/muse2/muse/widgets/setlenbase.ui
new file mode 100644
index 00000000..7d929716
--- /dev/null
+++ b/muse2/muse/widgets/setlenbase.ui
@@ -0,0 +1,197 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>SetlenBase</class>
+ <widget class="QDialog" name="SetlenBase">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>275</width>
+ <height>264</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>MusE: Set Note Length</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <item>
+ <widget class="QGroupBox" name="rangeBox">
+ <property name="title">
+ <string>Range</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <item>
+ <widget class="QRadioButton" name="all_events_button">
+ <property name="text">
+ <string>All Events</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="selected_events_button">
+ <property name="text">
+ <string>Selected Events</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="looped_events_button">
+ <property name="text">
+ <string>Looped Events</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="selected_looped_button">
+ <property name="text">
+ <string>Selected Looped</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="groupBox_2">
+ <property name="title">
+ <string>Value</string>
+ </property>
+ <property name="flat">
+ <bool>false</bool>
+ </property>
+ <property name="checkable">
+ <bool>false</bool>
+ </property>
+ <layout class="QGridLayout" name="gridLayout">
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <item row="0" column="0">
+ <widget class="QLabel" name="TextLabel3">
+ <property name="text">
+ <string>New length</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QSpinBox" name="len_spinbox">
+ <property name="suffix">
+ <string> ticks</string>
+ </property>
+ <property name="minimum">
+ <number>1</number>
+ </property>
+ <property name="maximum">
+ <number>10000</number>
+ </property>
+ <property name="value">
+ <number>1</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <item>
+ <spacer name="Spacer1">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Expanding</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="okButton">
+ <property name="text">
+ <string>OK</string>
+ </property>
+ <property name="autoDefault">
+ <bool>false</bool>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="cancelButton">
+ <property name="text">
+ <string>Cancel</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>okButton</sender>
+ <signal>clicked()</signal>
+ <receiver>SetlenBase</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>cancelButton</sender>
+ <signal>clicked()</signal>
+ <receiver>SetlenBase</receiver>
+ <slot>reject()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/muse2/muse/widgets/tb1.cpp b/muse2/muse/widgets/tb1.cpp
index 917e6ae2..bd8e94a2 100644
--- a/muse2/muse/widgets/tb1.cpp
+++ b/muse2/muse/widgets/tb1.cpp
@@ -33,27 +33,16 @@ static const char* rasterStrings[] = {
QT_TRANSLATE_NOOP("@default", "Off"), "4pp", "7pp", "64.", "32.", "16.", "8.", "4.", "2.", "1."
};
-static int quantTable[] = {
- 1, 16, 32, 64, 128, 256, 512, 1024,
- 1, 24, 48, 96, 192, 384, 768, 1536,
- 1, 36, 72, 144, 288, 576, 1152, 2304
- };
-
-static const char* quantStrings[] = {
- QT_TRANSLATE_NOOP("@default", "Off"), "64T", "32T", "16T", "8T", "4T", "2T", "1T",
- QT_TRANSLATE_NOOP("@default", "Off"), "64", "32", "16", "8", "4", "2", "1",
- QT_TRANSLATE_NOOP("@default", "Off"), "64.", "32.", "16.", "8.", "4.", "2.", "1."
- };
//---------------------------------------------------------
// genToolbar
-// solo time pitch raster quant
+// solo time pitch raster
//---------------------------------------------------------
-Toolbar1::Toolbar1(QWidget* parent, int r, int q, bool sp)
- : QToolBar(QString("Quant'n'Snap-tools"), parent)
+Toolbar1::Toolbar1(QWidget* parent, int r, bool sp)
+ : QToolBar(QString("Pos/Snap/Solo-tools"), parent)
{
- setObjectName("Quant'n'Snap-tools");
+ setObjectName("Pos/Snap/Solo-tools");
pitch = 0;
showPitch = sp;
// ORCAN - FIXME: Check this:
@@ -85,66 +74,34 @@ Toolbar1::Toolbar1(QWidget* parent, int r, int q, bool sp)
}
//---------------------------------------------------
- // Raster, Quant.
+ // Raster
//---------------------------------------------------
raster = new LabelCombo(tr("Snap"), 0);
- quant = new LabelCombo(tr("Quantize"), 0);
rlist = new QTableWidget(10, 3);
- qlist = new QTableWidget(8, 3);
rlist->verticalHeader()->setDefaultSectionSize(22);
rlist->horizontalHeader()->setDefaultSectionSize(32);
rlist->setSelectionMode(QAbstractItemView::SingleSelection);
rlist->verticalHeader()->hide();
rlist->horizontalHeader()->hide();
- qlist->verticalHeader()->setDefaultSectionSize(22);
- qlist->horizontalHeader()->setDefaultSectionSize(32);
- qlist->setSelectionMode(QAbstractItemView::SingleSelection);
- qlist->verticalHeader()->hide();
- qlist->horizontalHeader()->hide();
rlist->setMinimumWidth(96);
- qlist->setMinimumWidth(96);
raster->setView(rlist);
- quant->setView(qlist);
for (int j = 0; j < 3; j++)
for (int i = 0; i < 10; i++)
rlist->setItem(i, j, new QTableWidgetItem(tr(rasterStrings[i + j * 10])));
- for (int j = 0; j < 3; j++)
- for (int i = 0; i < 8; i++)
- qlist->setItem(i, j, new QTableWidgetItem(tr(quantStrings[i + j * 8])));
setRaster(r);
- setQuant(q);
addWidget(raster);
- addWidget(quant);
// FIXME: Not working right.
raster->setFixedHeight(38);
- quant->setFixedHeight(38);
- //---------------------------------------------------
- // To Menu
- //---------------------------------------------------
-
- addWidget(new QLabel(tr("To")));
- QComboBox* toList = new QComboBox;
- toList->setFixedHeight(22);
- toList->insertItem(0, tr("All Events"));
- toList->insertItem(CMD_RANGE_LOOP, tr("Looped Ev."));
- toList->insertItem(CMD_RANGE_SELECTED, tr("Selected Ev."));
- toList->insertItem(CMD_RANGE_LOOP | CMD_RANGE_SELECTED, tr("Looped+Sel."));
- addWidget(toList);
-
connect(raster, SIGNAL(activated(int)), SLOT(_rasterChanged(int)));
- connect(quant, SIGNAL(activated(int)), SLOT(_quantChanged(int)));
- //connect(rlist, SIGNAL(cellClicked(int,int)), SLOT(_rasterChanged(int, int)));
- //connect(qlist, SIGNAL(cellClicked(int,int)), SLOT(_quantChanged(int,int)));
- connect(toList, SIGNAL(activated(int)), SIGNAL(toChanged(int)));
connect(solo, SIGNAL(toggled(bool)), SIGNAL(soloChanged(bool)));
pos->setEnabled(false);
}
@@ -160,16 +117,6 @@ void Toolbar1::_rasterChanged(int /*i*/)
//emit rasterChanged(rasterTable[r + c * 10]);
}
-//---------------------------------------------------------
-// quantChanged
-//---------------------------------------------------------
-
-void Toolbar1::_quantChanged(int /*i*/)
-//void Toolbar1::_quantChanged(int r, int c)
- {
- emit quantChanged(quantTable[qlist->currentRow() + qlist->currentColumn() * 8]);
- //emit quantChanged(quantTable[r + c * 8]);
- }
//---------------------------------------------------------
// setPitch
@@ -226,22 +173,6 @@ void Toolbar1::setRaster(int val)
}
//---------------------------------------------------------
-// setQuant
-//---------------------------------------------------------
-
-void Toolbar1::setQuant(int val)
- {
- for (unsigned i = 0; i < sizeof(quantTable)/sizeof(*quantTable); i++) {
- if (val == quantTable[i]) {
- quant->setCurrentIndex(i);
- return;
- }
- }
- printf("setQuant(%d) not defined\n", val);
- quant->setCurrentIndex(0);
- }
-
-//---------------------------------------------------------
// setSolo
//---------------------------------------------------------
diff --git a/muse2/muse/widgets/tb1.h b/muse2/muse/widgets/tb1.h
index fbed13b1..ff31593f 100644
--- a/muse2/muse/widgets/tb1.h
+++ b/muse2/muse/widgets/tb1.h
@@ -26,8 +26,6 @@ class Toolbar1 : public QToolBar {
QToolButton* solo;
PosLabel* pos;
PitchLabel* pitch;
- LabelCombo* quant;
- QTableWidget* qlist;
LabelCombo* raster;
QTableWidget* rlist;
bool showPitch;
@@ -35,25 +33,21 @@ class Toolbar1 : public QToolBar {
private slots:
void _rasterChanged(int);
- void _quantChanged(int);
public slots:
void setTime(unsigned);
void setPitch(int);
void setInt(int);
void setRaster(int);
- void setQuant(int);
signals:
void rasterChanged(int);
- void quantChanged(int);
void soloChanged(bool);
- void toChanged(int);
public:
//Toolbar1(QMainWindow* parent = 0, int r=96,
Toolbar1(QWidget* parent, int r=96,
- int q=96, bool showPitch=true);
+ bool showPitch=true);
void setSolo(bool val);
void setPitchMode(bool flag);
};
diff --git a/muse2/muse/widgets/transpose.cpp b/muse2/muse/widgets/transpose.cpp
new file mode 100644
index 00000000..b10c1249
--- /dev/null
+++ b/muse2/muse/widgets/transpose.cpp
@@ -0,0 +1,83 @@
+//=========================================================
+// MusE
+// Linux Music Editor
+// $Id: transpose.cpp,v 1.1.1.1 2011/05/05 18:51:04 flo93 Exp $
+// (C) Copyright 2011 Florian Jung (flo93@sourceforge.net)
+//=========================================================
+
+#include <QButtonGroup>
+#include "transpose.h"
+#include "xml.h"
+
+Transpose::Transpose(QWidget* parent)
+ : QDialog(parent)
+{
+ setupUi(this);
+ range_group = new QButtonGroup;
+ range_group->addButton(all_events_button,0);
+ range_group->addButton(selected_events_button,1);
+ range_group->addButton(looped_events_button,2);
+ range_group->addButton(selected_looped_button,3);
+
+ pull_values();
+}
+
+void Transpose::pull_values()
+{
+ range = range_group->checkedId();
+ amount = amount_spinbox->value();
+}
+
+void Transpose::accept()
+{
+ pull_values();
+ QDialog::accept();
+}
+
+int Transpose::exec()
+{
+ if ((range < 0) || (range > 3)) range=0;
+
+ range_group->button(range)->setChecked(true);
+ amount_spinbox->setValue(amount);
+
+ return QDialog::exec();
+}
+
+void Transpose::read_configuration(Xml& xml)
+{
+ for (;;)
+ {
+ Xml::Token token = xml.parse();
+ if (token == Xml::Error || token == Xml::End)
+ break;
+
+ const QString& tag = xml.s1();
+ switch (token)
+ {
+ case Xml::TagStart:
+ if (tag == "range")
+ range=xml.parseInt();
+ else if (tag == "amount")
+ amount=xml.parseInt();
+ else
+ xml.unknown("Transpose");
+ break;
+
+ case Xml::TagEnd:
+ if (tag == "transpose")
+ return;
+
+ default:
+ break;
+ }
+ }
+}
+
+void Transpose::write_configuration(int level, Xml& xml)
+{
+ xml.tag(level++, "transpose");
+ xml.intTag(level, "range", range);
+ xml.intTag(level, "amount", amount);
+ xml.tag(level, "/transpose");
+}
diff --git a/muse2/muse/widgets/transpose.h b/muse2/muse/widgets/transpose.h
new file mode 100644
index 00000000..97dd443e
--- /dev/null
+++ b/muse2/muse/widgets/transpose.h
@@ -0,0 +1,41 @@
+//=========================================================
+// MusE
+// Linux Music Editor
+// $Id: transpose.h,v 1.1.1.1 2011/05/05 18:51:04 flo93 Exp $
+// (C) Copyright 2011 Florian Jung (flo93@sourceforge.net)
+//=========================================================
+
+#ifndef __TRANSPOSE_H__
+#define __TRANSPOSE_H__
+
+#include "ui_transposebase.h"
+
+class QButtonGroup;
+class Xml;
+
+class Transpose : public QDialog, public Ui::TransposeBase
+{
+ private:
+ Q_OBJECT
+ QButtonGroup* range_group;
+
+ protected slots:
+ void accept();
+ void pull_values();
+
+ public:
+ Transpose(QWidget* parent = 0);
+
+ int range;
+ int amount;
+
+ void read_configuration(Xml& xml);
+ void write_configuration(int level, Xml& xml);
+
+
+ public slots:
+ int exec();
+};
+
+#endif
+
diff --git a/muse2/muse/widgets/transposebase.ui b/muse2/muse/widgets/transposebase.ui
index 63ac74a6..c26f2ef9 100644
--- a/muse2/muse/widgets/transposebase.ui
+++ b/muse2/muse/widgets/transposebase.ui
@@ -1,19 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
- <class>TransposeDialogBase</class>
- <widget class="QDialog" name="TransposeDialogBase">
+ <class>TransposeBase</class>
+ <widget class="QDialog" name="TransposeBase">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
- <width>289</width>
- <height>340</height>
+ <width>275</width>
+ <height>264</height>
</rect>
</property>
<property name="windowTitle">
- <string>MusE: Midi Transpose</string>
+ <string>MusE: Transpose</string>
</property>
- <layout class="QVBoxLayout">
+ <layout class="QVBoxLayout" name="verticalLayout_2">
<property name="spacing">
<number>6</number>
</property>
@@ -21,11 +21,11 @@
<number>11</number>
</property>
<item>
- <widget class="QGroupBox" name="GroupBox1">
+ <widget class="QGroupBox" name="rangeBox">
<property name="title">
- <string>Value</string>
+ <string>Range</string>
</property>
- <layout class="QVBoxLayout">
+ <layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>6</number>
</property>
@@ -33,63 +33,16 @@
<number>11</number>
</property>
<item>
- <layout class="QHBoxLayout">
- <property name="spacing">
- <number>6</number>
- </property>
- <property name="margin">
- <number>0</number>
+ <widget class="QRadioButton" name="all_events_button">
+ <property name="text">
+ <string>All Events</string>
</property>
- <item>
- <widget class="QSpinBox" name="delta">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimum">
- <number>-99</number>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="TextLabel1">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>halftones</string>
- </property>
- <property name="wordWrap">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- </layout>
+ </widget>
</item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="ButtonBox1">
- <property name="title">
- <string>Time</string>
- </property>
- <layout class="QVBoxLayout">
- <property name="spacing">
- <number>6</number>
- </property>
- <property name="margin">
- <number>11</number>
- </property>
<item>
- <widget class="QRadioButton" name="time_all">
+ <widget class="QRadioButton" name="selected_events_button">
<property name="text">
- <string>all</string>
+ <string>Selected Events</string>
</property>
<property name="checked">
<bool>true</bool>
@@ -97,9 +50,16 @@
</widget>
</item>
<item>
- <widget class="QRadioButton" name="time_selected">
+ <widget class="QRadioButton" name="looped_events_button">
+ <property name="text">
+ <string>Looped Events</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="selected_looped_button">
<property name="text">
- <string>between markers</string>
+ <string>Selected Looped</string>
</property>
</widget>
</item>
@@ -107,34 +67,52 @@
</widget>
</item>
<item>
- <widget class="QGroupBox" name="ButtonBox2">
+ <widget class="QGroupBox" name="groupBox_2">
<property name="title">
- <string>Parts</string>
+ <string>Value</string>
</property>
- <layout class="QVBoxLayout">
- <property name="spacing">
- <number>6</number>
- </property>
+ <property name="flat">
+ <bool>false</bool>
+ </property>
+ <property name="checkable">
+ <bool>false</bool>
+ </property>
+ <layout class="QGridLayout" name="gridLayout">
<property name="margin">
<number>11</number>
</property>
- <item>
- <widget class="QRadioButton" name="parts_all">
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <item row="0" column="0">
+ <widget class="QLabel" name="TextLabel3">
<property name="text">
- <string>all</string>
+ <string>Halftone-steps</string>
</property>
- <property name="checked">
- <bool>true</bool>
+ <property name="wordWrap">
+ <bool>false</bool>
</property>
</widget>
</item>
- <item>
- <widget class="QRadioButton" name="parts_selected">
- <property name="windowTitle">
+ <item row="0" column="1">
+ <widget class="QSpinBox" name="amount_spinbox">
+ <property name="accelerated">
+ <bool>true</bool>
+ </property>
+ <property name="suffix">
<string/>
</property>
- <property name="text">
- <string>all in selected tracks</string>
+ <property name="minimum">
+ <number>-127</number>
+ </property>
+ <property name="maximum">
+ <number>127</number>
+ </property>
+ <property name="singleStep">
+ <number>1</number>
+ </property>
+ <property name="value">
+ <number>0</number>
</property>
</widget>
</item>
@@ -142,13 +120,10 @@
</widget>
</item>
<item>
- <layout class="QHBoxLayout">
+ <layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>6</number>
</property>
- <property name="margin">
- <number>0</number>
- </property>
<item>
<spacer name="Spacer1">
<property name="orientation">
@@ -195,7 +170,7 @@
<connection>
<sender>okButton</sender>
<signal>clicked()</signal>
- <receiver>TransposeDialogBase</receiver>
+ <receiver>TransposeBase</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
@@ -211,7 +186,7 @@
<connection>
<sender>cancelButton</sender>
<signal>clicked()</signal>
- <receiver>TransposeDialogBase</receiver>
+ <receiver>TransposeBase</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
diff --git a/muse2/muse/widgets/velocity.cpp b/muse2/muse/widgets/velocity.cpp
index 309beb4d..ec625489 100644
--- a/muse2/muse/widgets/velocity.cpp
+++ b/muse2/muse/widgets/velocity.cpp
@@ -7,12 +7,13 @@
#include <QButtonGroup>
#include "velocity.h"
+#include "xml.h"
//---------------------------------------------------------
// Velocity
//---------------------------------------------------------
-Velocity::Velocity(QDialog* parent)
+Velocity::Velocity(QWidget* parent)
: QDialog(parent)
{
setupUi(this);
@@ -21,6 +22,8 @@ Velocity::Velocity(QDialog* parent)
rangeGroup->addButton(selectedEvents,1);
rangeGroup->addButton(loopedEvents,2);
rangeGroup->addButton(selectedLooped,3);
+
+ pullValues();
}
//---------------------------------------------------------
@@ -29,18 +32,71 @@ Velocity::Velocity(QDialog* parent)
void Velocity::accept()
{
- _range = rangeGroup->checkedId();
- _rateVal = rate->value();
- _offsetVal = offset->value();
+ pullValues();
QDialog::accept();
}
//---------------------------------------------------------
-// setRange
+// pullValues
//---------------------------------------------------------
-void Velocity::setRange(int id)
+void Velocity::pullValues()
{
- rangeGroup->button(id)->setChecked(true);
+ range = rangeGroup->checkedId();
+ rateVal = rate->value();
+ offsetVal = offset->value();
}
+//---------------------------------------------------------
+// exec
+//---------------------------------------------------------
+
+int Velocity::exec()
+ {
+ rangeGroup->button(range)->setChecked(true);
+ rate->setValue(rateVal);
+ offset->setValue(offsetVal);
+
+ return QDialog::exec();
+ }
+
+void Velocity::read_configuration(Xml& xml)
+{
+ for (;;)
+ {
+ Xml::Token token = xml.parse();
+ if (token == Xml::Error || token == Xml::End)
+ break;
+
+ const QString& tag = xml.s1();
+ switch (token)
+ {
+ case Xml::TagStart:
+ if (tag == "range")
+ range=xml.parseInt();
+ else if (tag == "rate")
+ rateVal=xml.parseInt();
+ else if (tag == "offset")
+ offsetVal=xml.parseInt();
+ else
+ xml.unknown("ModVelo");
+ break;
+
+ case Xml::TagEnd:
+ if (tag == "mod_velo")
+ return;
+
+ default:
+ break;
+ }
+ }
+}
+
+void Velocity::write_configuration(int level, Xml& xml)
+{
+ xml.tag(level++, "mod_velo");
+ xml.intTag(level, "range", range);
+ xml.intTag(level, "offset", offsetVal);
+ xml.intTag(level, "rate", rateVal);
+ xml.tag(level, "/mod_velo");
+}
diff --git a/muse2/muse/widgets/velocity.h b/muse2/muse/widgets/velocity.h
index cf5b2779..cbea4e22 100644
--- a/muse2/muse/widgets/velocity.h
+++ b/muse2/muse/widgets/velocity.h
@@ -11,28 +11,34 @@
#include "ui_velocitybase.h"
class QButtonGroup;
+class Xml;
//---------------------------------------------------------
// Velocity
//---------------------------------------------------------
class Velocity : public QDialog, public Ui::VelocityBase {
- int _range;
- int _rateVal;
- int _offsetVal;
-
+ private:
Q_OBJECT
QButtonGroup* rangeGroup;
protected slots:
void accept();
+ void pullValues();
public:
- Velocity(QDialog* parent = 0);
- void setRange(int id);
- int range() const { return _range; }
- int rateVal() const { return _rateVal; }
- int offsetVal() const { return _offsetVal; }
+ Velocity(QWidget* parent = 0);
+
+ int range;
+ int rateVal;
+ int offsetVal;
+
+ void read_configuration(Xml& xml);
+ void write_configuration(int level, Xml& xml);
+
+
+ public slots:
+ int exec();
};
#endif
diff --git a/muse2/muse/widgets/velocitybase.ui b/muse2/muse/widgets/velocitybase.ui
index 1e386e11..40fe625f 100644
--- a/muse2/muse/widgets/velocitybase.ui
+++ b/muse2/muse/widgets/velocitybase.ui
@@ -59,7 +59,7 @@
<item>
<widget class="QRadioButton" name="selectedLooped">
<property name="text">
- <string>Selected &amp; Looped</string>
+ <string>Selected Looped</string>
</property>
</widget>
</item>
@@ -114,7 +114,7 @@
<item row="1" column="1">
<widget class="QSpinBox" name="offset">
<property name="minimum">
- <number>1</number>
+ <number>-127</number>
</property>
<property name="maximum">
<number>127</number>
@@ -122,6 +122,16 @@
<property name="singleStep">
<number>1</number>
</property>
+ <property name="value">
+ <number>0</number>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0" colspan="2">
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>veloNew = (veloOld * rate) + offset</string>
+ </property>
</widget>
</item>
</layout>
diff --git a/muse2/share/templates/audio.med b/muse2/share/templates/audio.med
index 9b8e1d93..14cd9c47 100644
--- a/muse2/share/templates/audio.med
+++ b/muse2/share/templates/audio.med
@@ -9,27 +9,31 @@
<midiFilterCtrl2>0</midiFilterCtrl2>
<midiFilterCtrl3>0</midiFilterCtrl3>
<midiFilterCtrl4>0</midiFilterCtrl4>
- <txDeviceId>127</txDeviceId>
- <rxDeviceId>127</rxDeviceId>
- <txSyncPort>1</txSyncPort>
- <rxSyncPort>-1</rxSyncPort>
+ <waveTracksVisible>1</waveTracksVisible>
+ <auxTracksVisible>1</auxTracksVisible>
+ <groupTracksVisible>1</groupTracksVisible>
+ <midiTracksVisible>1</midiTracksVisible>
+ <inputTracksVisible>1</inputTracksVisible>
+ <outputTracksVisible>1</outputTracksVisible>
+ <synthTracksVisible>1</synthTracksVisible>
<mtctype>1</mtctype>
<mtcoffset>00:00:00:00:00</mtcoffset>
+ <sendClockDelay>1</sendClockDelay>
+ <useJackTransport>1</useJackTransport>
+ <jackTransportMaster>1</jackTransportMaster>
<extSync>0</extSync>
- <genMTCSync>0</genMTCSync>
- <genMCSync>0</genMCSync>
- <genMMC>0</genMMC>
- <acceptMTC>0</acceptMTC>
- <acceptMMC>1</acceptMMC>
- <acceptMC>1</acceptMC>
<bigtimeVisible>0</bigtimeVisible>
<transportVisible>0</transportVisible>
- <mixerVisible>0</mixerVisible>
+ <markerVisible>0</markerVisible>
+ <geometryMain x="0" y="0" w="878" h="468"></geometryMain>
+ <geometryTransport x="0" y="0" w="100" h="30"></geometryTransport>
+ <mixer1Visible>0</mixer1Visible>
+ <mixer2Visible>0</mixer2Visible>
<arranger>
<info>1</info>
- <split>298 764 </split>
+ <split>298 298 </split>
<list>
- <header> 7 6 5 4 3 2 1 0 </header>
+ <header> 7 6 5 4 3 2 1 0 8 </header>
</list>
<xpos>0</xpos>
<xmag>266</xmag>
@@ -44,50 +48,323 @@
<beatvelo>70</beatvelo>
<channel>9</channel>
<port>0</port>
- <precountEnable>1</precountEnable>
- <fromMastertrack>1</fromMastertrack>
+ <precountEnable>0</precountEnable>
+ <fromMastertrack>0</fromMastertrack>
<signatureZ>4</signatureZ>
<signatureN>4</signatureN>
<prerecord>0</prerecord>
<preroll>0</preroll>
<midiClickEnable>1</midiClickEnable>
<audioClickEnable>0</audioClickEnable>
+ <audioClickVolume>0.5</audioClickVolume>
</metronom>
<rcEnable>0</rcEnable>
<rcStop>28</rcStop>
<rcRecord>31</rcRecord>
<rcGotoLeft>33</rcGotoLeft>
<rcPlay>29</rcPlay>
+ <midiport idx="0">
+ <defaultOutChans>1</defaultOutChans>
+ <channel idx="0">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="1">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="2">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="3">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="4">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="5">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="6">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="7">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="8">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="9">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="10">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="11">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="12">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="13">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="14">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="15">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ </midiport>
</sequencer>
<drumedit>
- <quant>96</quant>
<raster>96</raster>
- <width>600</width>
- <height>400</height>
- <dlistwidth>50</dlistwidth>
- <dcanvaswidth>300</dcanvaswidth>
+ <width>883</width>
+ <height>465</height>
+ <dlistwidth>126</dlistwidth>
+ <dcanvaswidth>753</dcanvaswidth>
+ <toolbars>000000ff00000000fd00000000000003730000015c00000004000000040000000800000008fc00000004000000020000000400000014004400720075006d00200074006f006f006c00730100000000000000d1000000000000000000000014004500640069007400200054006f006f006c007301000000d1000000c8000000000000000000000012007400720061006e00730070006f0072007401000001990000018400000000000000000000000a00700061006e00690063010000031dffffffff00000000000000000000000200000000000000020000000100000012004e006f0074006500200049006e0066006f0100000000ffffffff000000000000000000000002000000020000000c0063007500720073006f00720100000000ffffffff0000000000000000000000260050006f0073002f0053006e00610070002f0053006f006c006f002d0074006f006f006c00730100000083ffffffff0000000000000000</toolbars>
</drumedit>
<pianoroll>
- <quant>96</quant>
<raster>96</raster>
- <quantStrength>80</quantStrength>
- <quantLimit>50</quantLimit>
- <quantLen>0</quantLen>
- <to>0</to>
- <width>600</width>
- <height>400</height>
+ <width>879</width>
+ <height>467</height>
<colormode>0</colormode>
+ <toolbars>000000ff00000000fd000000000000036f0000017800000004000000040000000800000008fc00000006000000020000000000000002000000000000000200000000000000020000000000000002000000030000001e005000690061006e006f0072006f006c006c00200074006f006f006c00730100000000ffffffff000000000000000000000014004500640069007400200054006f006f006c00730100000091ffffffff000000000000000000000012004e006f0074006500200049006e0066006f0100000103ffffffff00000000000000000000000200000003000000260050006f0073002f0053006e00610070002f0053006f006c006f002d0074006f006f006c007301000000000000024c000000000000000000000012007400720061006e00730070006f00720074010000024c000000fc00000000000000000000000a00700061006e006900630100000348ffffffff0000000000000000</toolbars>
</pianoroll>
+ <scoreedit>
+ <width>880</width>
+ <height>466</height>
+ <toolbars>000000ff00000000fd00000000000003700000018500000004000000040000000800000008fc0000000200000002000000030000001e0055006e0064006f002f005200650064006f00200074006f006f006c00730100000000ffffffff000000000000000000000014004500640069007400200054006f006f006c00730100000040ffffffff000000000000000000000022004e006500770020006e006f00740065002000730065007400740069006e006700730100000099ffffffff000000000000000000000002000000030000002a005100750061006e007400690073006100740069006f006e002000730065007400740069006e0067007301000000000000024a000000000000000000000012007400720061006e00730070006f00720074010000024a000000fc00000000000000000000000a00700061006e0069006301000003460000011f0000000000000000</toolbars>
+ </scoreedit>
<masteredit>
<raster>0</raster>
+ <width>875</width>
+ <height>464</height>
+ <toolbars>000000ff00000000fd000000000000036b000001a400000004000000040000000800000008fc000000010000000200000004ffffffff0100000000ffffffff000000000000000000000014004500640069007400200054006f006f006c00730100000040ffffffff0000000000000000ffffffff0100000099ffffffff0000000000000000ffffffff01000000faffffffff0000000000000000</toolbars>
</masteredit>
<waveedit>
- <bgcolor r="0" g="0" b="0"></bgcolor>
- <width>600</width>
- <height>400</height>
+ <bgcolor r="200" g="200" b="200"></bgcolor>
+ <width>883</width>
+ <height>466</height>
+ <toolbars>000000ff00000000fd0000000000000373000001a100000004000000040000000800000008fc0000000200000002000000030000001e00570061007600650020006500640069007400200074006f006f006c00730100000000ffffffff00000000000000000000001c0057006100760065004500640069007400200074006f006f006c007301000000400000023b000000000000000000000012007400720061006e00730070006f00720074010000027b0000003900000000000000000000000200000000</toolbars>
</waveedit>
+ <dialogs>
+ <mod_len>
+ <range>1</range>
+ <offset>0</offset>
+ <rate>100</rate>
+ </mod_len>
+ <mod_velo>
+ <range>1</range>
+ <offset>0</offset>
+ <rate>100</rate>
+ </mod_velo>
+ <quantize>
+ <range>1</range>
+ <strength>90</strength>
+ <threshold>0</threshold>
+ <raster>3</raster>
+ <swing>0</swing>
+ <quant_len>1</quant_len>
+ </quantize>
+ <erase>
+ <range>1</range>
+ </erase>
+ <del_overlaps>
+ <range>1</range>
+ </del_overlaps>
+ <setlen>
+ <range>1</range>
+ <len>384</len>
+ </setlen>
+ <move>
+ <range>1</range>
+ <amount>0</amount>
+ </move>
+ <transpose>
+ <range>1</range>
+ <amount>0</amount>
+ </transpose>
+ </dialogs>
</configuration>
<song>
+ <info></info>
+ <showinfo>1</showinfo>
<automation>0</automation>
<cpos>0</cpos>
<rpos>0</rpos>
@@ -105,6 +382,7 @@
<quantize>0</quantize>
<len>0</len>
<follow>1</follow>
+ <sampleRate>44100</sampleRate>
<wavetrack>
<name>Track 1</name>
<record>0</record>
@@ -115,16 +393,18 @@
<height>20</height>
<locked>0</locked>
<selected>1</selected>
- <mute>0</mute>
- <solo>0</solo>
<prefader>0</prefader>
- <off>0</off>
+ <sendMetronome>0</sendMetronome>
<automation>1</automation>
- <auxSend idx=0>0</auxSend>
- <auxSend idx=1>0</auxSend>
- <controller id="0" cur="0">
+ <auxSend idx="0">0</auxSend>
+ <auxSend idx="1">0</auxSend>
+ <controller id="0" cur="0" color="#ff0000" visible="0">
+ 0 0,
</controller>
- <controller id="1" cur="0">
+ <controller id="1" cur="0" color="#ff0000" visible="0">
+ 0 0,
+ </controller>
+ <controller id="2" cur="0" color="#0000ff" visible="0">
</controller>
</wavetrack>
<wavetrack>
@@ -136,16 +416,18 @@
<channels>1</channels>
<height>20</height>
<locked>1</locked>
- <mute>0</mute>
- <solo>0</solo>
<prefader>0</prefader>
- <off>0</off>
+ <sendMetronome>0</sendMetronome>
<automation>1</automation>
- <auxSend idx=0>0</auxSend>
- <auxSend idx=1>0</auxSend>
- <controller id="0" cur="0">
+ <auxSend idx="0">0</auxSend>
+ <auxSend idx="1">0</auxSend>
+ <controller id="0" cur="0" color="#ff0000" visible="0">
+ 0 0,
+ </controller>
+ <controller id="1" cur="0" color="#ff0000" visible="0">
+ 0 0,
</controller>
- <controller id="1" cur="0">
+ <controller id="2" cur="0" color="#0000ff" visible="0">
</controller>
</wavetrack>
<wavetrack>
@@ -157,16 +439,18 @@
<channels>1</channels>
<height>20</height>
<locked>0</locked>
- <mute>0</mute>
- <solo>0</solo>
<prefader>0</prefader>
- <off>0</off>
+ <sendMetronome>0</sendMetronome>
<automation>1</automation>
- <auxSend idx=0>0</auxSend>
- <auxSend idx=1>0</auxSend>
- <controller id="0" cur="0">
+ <auxSend idx="0">0</auxSend>
+ <auxSend idx="1">0</auxSend>
+ <controller id="0" cur="0" color="#ff0000" visible="0">
+ 0 0,
</controller>
- <controller id="1" cur="0">
+ <controller id="1" cur="0" color="#ff0000" visible="0">
+ 0 0,
+ </controller>
+ <controller id="2" cur="0" color="#0000ff" visible="0">
</controller>
</wavetrack>
<wavetrack>
@@ -178,16 +462,18 @@
<channels>1</channels>
<height>20</height>
<locked>0</locked>
- <mute>0</mute>
- <solo>0</solo>
<prefader>0</prefader>
- <off>0</off>
+ <sendMetronome>0</sendMetronome>
<automation>1</automation>
- <auxSend idx=0>0</auxSend>
- <auxSend idx=1>0</auxSend>
- <controller id="0" cur="0">
+ <auxSend idx="0">0</auxSend>
+ <auxSend idx="1">0</auxSend>
+ <controller id="0" cur="0" color="#ff0000" visible="0">
+ 0 0,
+ </controller>
+ <controller id="1" cur="0" color="#ff0000" visible="0">
+ 0 0,
</controller>
- <controller id="1" cur="0">
+ <controller id="2" cur="0" color="#0000ff" visible="0">
</controller>
</wavetrack>
<AudioGroup>
@@ -199,16 +485,18 @@
<channels>1</channels>
<height>20</height>
<locked>1</locked>
- <mute>0</mute>
- <solo>0</solo>
<prefader>0</prefader>
- <off>0</off>
+ <sendMetronome>0</sendMetronome>
<automation>1</automation>
- <auxSend idx=0>0</auxSend>
- <auxSend idx=1>0</auxSend>
- <controller id="0" cur="0">
+ <auxSend idx="0">0</auxSend>
+ <auxSend idx="1">0</auxSend>
+ <controller id="0" cur="0" color="#ff0000" visible="0">
+ 0 0,
</controller>
- <controller id="1" cur="0">
+ <controller id="1" cur="0" color="#ff0000" visible="0">
+ 0 0,
+ </controller>
+ <controller id="2" cur="0" color="#0000ff" visible="0">
</controller>
</AudioGroup>
<AudioGroup>
@@ -220,16 +508,18 @@
<channels>1</channels>
<height>20</height>
<locked>0</locked>
- <mute>0</mute>
- <solo>0</solo>
<prefader>0</prefader>
- <off>0</off>
+ <sendMetronome>0</sendMetronome>
<automation>1</automation>
- <auxSend idx=0>0</auxSend>
- <auxSend idx=1>0</auxSend>
- <controller id="0" cur="0">
+ <auxSend idx="0">0</auxSend>
+ <auxSend idx="1">0</auxSend>
+ <controller id="0" cur="0" color="#ff0000" visible="0">
+ 0 0,
+ </controller>
+ <controller id="1" cur="0" color="#ff0000" visible="0">
+ 0 0,
</controller>
- <controller id="1" cur="0">
+ <controller id="2" cur="0" color="#0000ff" visible="0">
</controller>
</AudioGroup>
<AudioAux>
@@ -241,14 +531,16 @@
<channels>2</channels>
<height>20</height>
<locked>1</locked>
- <mute>0</mute>
- <solo>0</solo>
<prefader>0</prefader>
- <off>0</off>
+ <sendMetronome>0</sendMetronome>
<automation>1</automation>
- <controller id="0" cur="0">
+ <controller id="0" cur="0" color="#ff0000" visible="0">
+ 0 0,
+ </controller>
+ <controller id="1" cur="0" color="#ff0000" visible="0">
+ 0 0,
</controller>
- <controller id="1" cur="0">
+ <controller id="2" cur="0" color="#0000ff" visible="0">
</controller>
</AudioAux>
<AudioAux>
@@ -260,14 +552,16 @@
<channels>2</channels>
<height>20</height>
<locked>1</locked>
- <mute>0</mute>
- <solo>0</solo>
<prefader>0</prefader>
- <off>0</off>
+ <sendMetronome>0</sendMetronome>
<automation>1</automation>
- <controller id="0" cur="0">
+ <controller id="0" cur="0" color="#ff0000" visible="0">
+ 0 0,
</controller>
- <controller id="1" cur="0">
+ <controller id="1" cur="0" color="#ff0000" visible="0">
+ 0 0,
+ </controller>
+ <controller id="2" cur="0" color="#0000ff" visible="0">
</controller>
</AudioAux>
<AudioInput>
@@ -279,16 +573,18 @@
<channels>2</channels>
<height>20</height>
<locked>1</locked>
- <mute>1</mute>
- <solo>0</solo>
<prefader>0</prefader>
- <off>0</off>
+ <sendMetronome>0</sendMetronome>
<automation>1</automation>
- <auxSend idx=0>0</auxSend>
- <auxSend idx=1>0</auxSend>
- <controller id="0" cur="0">
+ <auxSend idx="0">0</auxSend>
+ <auxSend idx="1">0</auxSend>
+ <controller id="0" cur="0" color="#ff0000" visible="0">
+ 0 0,
+ </controller>
+ <controller id="1" cur="0" color="#ff0000" visible="0">
+ 0 0,
</controller>
- <controller id="1" cur="0">
+ <controller id="2" cur="0" color="#0000ff" visible="0">
</controller>
</AudioInput>
<AudioOutput>
@@ -300,14 +596,16 @@
<channels>2</channels>
<height>20</height>
<locked>1</locked>
- <mute>0</mute>
- <solo>0</solo>
<prefader>0</prefader>
- <off>0</off>
+ <sendMetronome>0</sendMetronome>
<automation>1</automation>
- <controller id="0" cur="0">
+ <controller id="0" cur="0" color="#ff0000" visible="0">
+ 0 0,
</controller>
- <controller id="1" cur="0">
+ <controller id="1" cur="0" color="#ff0000" visible="0">
+ 0 0,
+ </controller>
+ <controller id="2" cur="0" color="#0000ff" visible="0">
</controller>
</AudioOutput>
<tempolist fix="500000">
@@ -323,7 +621,15 @@
<denom>4</denom>
</sig>
</siglist>
+ <keylist fix="1">
+ <key at="21474837">
+ <tick>0</tick>
+ <val>1</val>
+ </key>
+ </keylist>
<drummap>
</drummap>
</song>
+ <toplevels>
+ </toplevels>
</muse>
diff --git a/muse2/share/templates/default.med b/muse2/share/templates/default.med
index c0270b3a..8772f759 100644
--- a/muse2/share/templates/default.med
+++ b/muse2/share/templates/default.med
@@ -9,6 +9,13 @@
<midiFilterCtrl2>0</midiFilterCtrl2>
<midiFilterCtrl3>0</midiFilterCtrl3>
<midiFilterCtrl4>0</midiFilterCtrl4>
+ <waveTracksVisible>1</waveTracksVisible>
+ <auxTracksVisible>1</auxTracksVisible>
+ <groupTracksVisible>1</groupTracksVisible>
+ <midiTracksVisible>1</midiTracksVisible>
+ <inputTracksVisible>1</inputTracksVisible>
+ <outputTracksVisible>1</outputTracksVisible>
+ <synthTracksVisible>1</synthTracksVisible>
<mtctype>1</mtctype>
<mtcoffset>00:00:00:00:00</mtcoffset>
<sendClockDelay>1</sendClockDelay>
@@ -18,11 +25,13 @@
<bigtimeVisible>0</bigtimeVisible>
<transportVisible>0</transportVisible>
<markerVisible>0</markerVisible>
+ <geometryMain x="0" y="0" w="878" h="468"></geometryMain>
+ <geometryTransport x="0" y="0" w="100" h="30"></geometryTransport>
<mixer1Visible>0</mixer1Visible>
<mixer2Visible>0</mixer2Visible>
<arranger>
<info>1</info>
- <split>418 751 </split>
+ <split>418 456 </split>
<list>
<header> 8 7 6 5 4 3 2 1 0 </header>
</list>
@@ -54,38 +63,308 @@
<rcRecord>31</rcRecord>
<rcGotoLeft>33</rcGotoLeft>
<rcPlay>29</rcPlay>
+ <midiport idx="0">
+ <defaultOutChans>1</defaultOutChans>
+ <channel idx="0">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="1">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="2">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="3">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="4">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="5">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="6">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="7">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="8">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="9">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="10">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="11">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="12">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="13">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="14">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="15">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ </midiport>
</sequencer>
<drumedit>
- <quant>96</quant>
<raster>96</raster>
- <width>600</width>
- <height>400</height>
- <dlistwidth>50</dlistwidth>
- <dcanvaswidth>300</dcanvaswidth>
- <to>0</to>
+ <width>883</width>
+ <height>465</height>
+ <dlistwidth>126</dlistwidth>
+ <dcanvaswidth>753</dcanvaswidth>
+ <toolbars>000000ff00000000fd00000000000003730000015c00000004000000040000000800000008fc00000004000000020000000400000014004400720075006d00200074006f006f006c00730100000000000000d1000000000000000000000014004500640069007400200054006f006f006c007301000000d1000000c8000000000000000000000012007400720061006e00730070006f0072007401000001990000018400000000000000000000000a00700061006e00690063010000031dffffffff00000000000000000000000200000000000000020000000100000012004e006f0074006500200049006e0066006f0100000000ffffffff000000000000000000000002000000020000000c0063007500720073006f00720100000000ffffffff0000000000000000000000260050006f0073002f0053006e00610070002f0053006f006c006f002d0074006f006f006c00730100000083ffffffff0000000000000000</toolbars>
</drumedit>
<pianoroll>
- <quant>96</quant>
<raster>96</raster>
- <quantStrength>80</quantStrength>
- <quantLimit>50</quantLimit>
- <quantLen>0</quantLen>
- <to>0</to>
- <width>600</width>
- <height>400</height>
+ <width>879</width>
+ <height>467</height>
<colormode>0</colormode>
+ <toolbars>000000ff00000000fd000000000000036f0000017800000004000000040000000800000008fc00000006000000020000000000000002000000000000000200000000000000020000000000000002000000030000001e005000690061006e006f0072006f006c006c00200074006f006f006c00730100000000ffffffff000000000000000000000014004500640069007400200054006f006f006c00730100000091ffffffff000000000000000000000012004e006f0074006500200049006e0066006f0100000103ffffffff00000000000000000000000200000003000000260050006f0073002f0053006e00610070002f0053006f006c006f002d0074006f006f006c007301000000000000024c000000000000000000000012007400720061006e00730070006f00720074010000024c000000fc00000000000000000000000a00700061006e006900630100000348ffffffff0000000000000000</toolbars>
</pianoroll>
+ <scoreedit>
+ <width>880</width>
+ <height>466</height>
+ <toolbars>000000ff00000000fd00000000000003700000018500000004000000040000000800000008fc0000000200000002000000030000001e0055006e0064006f002f005200650064006f00200074006f006f006c00730100000000ffffffff000000000000000000000014004500640069007400200054006f006f006c00730100000040ffffffff000000000000000000000022004e006500770020006e006f00740065002000730065007400740069006e006700730100000099ffffffff000000000000000000000002000000030000002a005100750061006e007400690073006100740069006f006e002000730065007400740069006e0067007301000000000000024a000000000000000000000012007400720061006e00730070006f00720074010000024a000000fc00000000000000000000000a00700061006e0069006301000003460000011f0000000000000000</toolbars>
+ </scoreedit>
<masteredit>
<raster>0</raster>
+ <width>875</width>
+ <height>464</height>
+ <toolbars>000000ff00000000fd000000000000036b000001a400000004000000040000000800000008fc000000010000000200000004ffffffff0100000000ffffffff000000000000000000000014004500640069007400200054006f006f006c00730100000040ffffffff0000000000000000ffffffff0100000099ffffffff0000000000000000ffffffff01000000faffffffff0000000000000000</toolbars>
</masteredit>
<waveedit>
<bgcolor r="200" g="200" b="200"></bgcolor>
- <width>600</width>
- <height>400</height>
+ <width>883</width>
+ <height>466</height>
+ <toolbars>000000ff00000000fd0000000000000373000001a100000004000000040000000800000008fc0000000200000002000000030000001e00570061007600650020006500640069007400200074006f006f006c00730100000000ffffffff00000000000000000000001c0057006100760065004500640069007400200074006f006f006c007301000000400000023b000000000000000000000012007400720061006e00730070006f00720074010000027b0000003900000000000000000000000200000000</toolbars>
</waveedit>
+ <dialogs>
+ <mod_len>
+ <range>1</range>
+ <offset>0</offset>
+ <rate>100</rate>
+ </mod_len>
+ <mod_velo>
+ <range>1</range>
+ <offset>0</offset>
+ <rate>100</rate>
+ </mod_velo>
+ <quantize>
+ <range>1</range>
+ <strength>90</strength>
+ <threshold>0</threshold>
+ <raster>3</raster>
+ <swing>0</swing>
+ <quant_len>1</quant_len>
+ </quantize>
+ <erase>
+ <range>1</range>
+ </erase>
+ <del_overlaps>
+ <range>1</range>
+ </del_overlaps>
+ <setlen>
+ <range>1</range>
+ <len>384</len>
+ </setlen>
+ <move>
+ <range>1</range>
+ <amount>0</amount>
+ </move>
+ <transpose>
+ <range>1</range>
+ <amount>0</amount>
+ </transpose>
+ </dialogs>
</configuration>
<song>
<info></info>
+ <showinfo>1</showinfo>
<automation>1</automation>
<cpos>0</cpos>
<rpos>0</rpos>
@@ -103,6 +382,7 @@
<quantize>0</quantize>
<len>0</len>
<follow>1</follow>
+ <sampleRate>44100</sampleRate>
<AudioOutput>
<name>Out 1</name>
<record>0</record>
@@ -116,24 +396,16 @@
<prefader>0</prefader>
<sendMetronome>0</sendMetronome>
<automation>0</automation>
- <controller id="0" cur="1">
+ <controller id="0" cur="1" color="#ff0000" visible="0">
0 1,
</controller>
- <controller id="1" cur="0">
+ <controller id="1" cur="0" color="#ff0000" visible="0">
0 0,
</controller>
- <controller id="2" cur="0">
+ <controller id="2" cur="0" color="#ff0000" visible="0">
0 0,
</controller>
</AudioOutput>
- <Route channel="0">
- <source name="Out 1"/>
- <dest type="1" name="system:playback_1"/>
- </Route>
- <Route channel="1">
- <source name="Out 1"/>
- <dest type="1" name="system:playback_2"/>
- </Route>
<tempolist fix="500000">
<tempo at="21474837">
<tick>0</tick>
@@ -147,6 +419,12 @@
<denom>4</denom>
</sig>
</siglist>
+ <keylist fix="1">
+ <key at="21474837">
+ <tick>0</tick>
+ <val>1</val>
+ </key>
+ </keylist>
<drummap>
</drummap>
</song>
diff --git a/muse2/share/templates/midiGM.med b/muse2/share/templates/midiGM.med
index 1314effb..bbc04498 100644
--- a/muse2/share/templates/midiGM.med
+++ b/muse2/share/templates/midiGM.med
@@ -9,27 +9,31 @@
<midiFilterCtrl2>0</midiFilterCtrl2>
<midiFilterCtrl3>0</midiFilterCtrl3>
<midiFilterCtrl4>0</midiFilterCtrl4>
- <txDeviceId>127</txDeviceId>
- <rxDeviceId>127</rxDeviceId>
- <txSyncPort>1</txSyncPort>
- <rxSyncPort>-1</rxSyncPort>
+ <waveTracksVisible>1</waveTracksVisible>
+ <auxTracksVisible>1</auxTracksVisible>
+ <groupTracksVisible>1</groupTracksVisible>
+ <midiTracksVisible>1</midiTracksVisible>
+ <inputTracksVisible>1</inputTracksVisible>
+ <outputTracksVisible>1</outputTracksVisible>
+ <synthTracksVisible>1</synthTracksVisible>
<mtctype>1</mtctype>
<mtcoffset>00:00:00:00:00</mtcoffset>
+ <sendClockDelay>1</sendClockDelay>
+ <useJackTransport>1</useJackTransport>
+ <jackTransportMaster>1</jackTransportMaster>
<extSync>0</extSync>
- <genMTCSync>0</genMTCSync>
- <genMCSync>0</genMCSync>
- <genMMC>0</genMMC>
- <acceptMTC>0</acceptMTC>
- <acceptMMC>1</acceptMMC>
- <acceptMC>1</acceptMC>
<bigtimeVisible>0</bigtimeVisible>
<transportVisible>0</transportVisible>
- <mixerVisible>0</mixerVisible>
+ <markerVisible>0</markerVisible>
+ <geometryMain x="0" y="0" w="878" h="468"></geometryMain>
+ <geometryTransport x="0" y="0" w="100" h="30"></geometryTransport>
+ <mixer1Visible>0</mixer1Visible>
+ <mixer2Visible>0</mixer2Visible>
<arranger>
<info>1</info>
- <split>298 764 </split>
+ <split>298 298 </split>
<list>
- <header> 7 6 5 4 3 2 1 0 </header>
+ <header> 7 6 5 4 3 2 1 0 8 </header>
</list>
<xpos>0</xpos>
<xmag>266</xmag>
@@ -44,14 +48,15 @@
<beatvelo>70</beatvelo>
<channel>9</channel>
<port>0</port>
- <precountEnable>1</precountEnable>
- <fromMastertrack>1</fromMastertrack>
+ <precountEnable>0</precountEnable>
+ <fromMastertrack>0</fromMastertrack>
<signatureZ>4</signatureZ>
<signatureN>4</signatureN>
<prerecord>0</prerecord>
<preroll>0</preroll>
<midiClickEnable>1</midiClickEnable>
<audioClickEnable>0</audioClickEnable>
+ <audioClickVolume>0.5</audioClickVolume>
</metronom>
<rcEnable>0</rcEnable>
<rcStop>28</rcStop>
@@ -59,7 +64,7 @@
<rcGotoLeft>33</rcGotoLeft>
<rcPlay>29</rcPlay>
<midiport idx="0">
- <instrument>GM</instrument>
+ <defaultOutChans>1</defaultOutChans>
<channel idx="0">
<controller id="7">
<val>0</val>
@@ -67,6 +72,12 @@
<controller id="10">
<val>0</val>
</controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
<controller id="262145">
<val>0</val>
</controller>
@@ -78,6 +89,12 @@
<controller id="10">
<val>0</val>
</controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
<controller id="262145">
<val>0</val>
</controller>
@@ -89,6 +106,12 @@
<controller id="10">
<val>0</val>
</controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
<controller id="262145">
<val>0</val>
</controller>
@@ -100,6 +123,12 @@
<controller id="10">
<val>0</val>
</controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
<controller id="262145">
<val>0</val>
</controller>
@@ -111,6 +140,12 @@
<controller id="10">
<val>0</val>
</controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
<controller id="262145">
<val>0</val>
</controller>
@@ -122,6 +157,12 @@
<controller id="10">
<val>0</val>
</controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
<controller id="262145">
<val>0</val>
</controller>
@@ -133,6 +174,12 @@
<controller id="10">
<val>0</val>
</controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
<controller id="262145">
<val>0</val>
</controller>
@@ -144,6 +191,12 @@
<controller id="10">
<val>0</val>
</controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
<controller id="262145">
<val>0</val>
</controller>
@@ -155,6 +208,12 @@
<controller id="10">
<val>0</val>
</controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
<controller id="262145">
<val>0</val>
</controller>
@@ -166,6 +225,12 @@
<controller id="10">
<val>0</val>
</controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
<controller id="262145">
<val>0</val>
</controller>
@@ -177,6 +242,12 @@
<controller id="10">
<val>0</val>
</controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
<controller id="262145">
<val>0</val>
</controller>
@@ -188,6 +259,12 @@
<controller id="10">
<val>0</val>
</controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
<controller id="262145">
<val>0</val>
</controller>
@@ -199,6 +276,12 @@
<controller id="10">
<val>0</val>
</controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
<controller id="262145">
<val>0</val>
</controller>
@@ -210,6 +293,12 @@
<controller id="10">
<val>0</val>
</controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
<controller id="262145">
<val>0</val>
</controller>
@@ -221,6 +310,12 @@
<controller id="10">
<val>0</val>
</controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
<controller id="262145">
<val>0</val>
</controller>
@@ -232,6 +327,12 @@
<controller id="10">
<val>0</val>
</controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
<controller id="262145">
<val>0</val>
</controller>
@@ -239,34 +340,79 @@
</midiport>
</sequencer>
<drumedit>
- <quant>96</quant>
<raster>96</raster>
- <width>600</width>
- <height>400</height>
- <dlistwidth>50</dlistwidth>
- <dcanvaswidth>300</dcanvaswidth>
+ <width>883</width>
+ <height>465</height>
+ <dlistwidth>126</dlistwidth>
+ <dcanvaswidth>753</dcanvaswidth>
+ <toolbars>000000ff00000000fd00000000000003730000015c00000004000000040000000800000008fc00000004000000020000000400000014004400720075006d00200074006f006f006c00730100000000000000d1000000000000000000000014004500640069007400200054006f006f006c007301000000d1000000c8000000000000000000000012007400720061006e00730070006f0072007401000001990000018400000000000000000000000a00700061006e00690063010000031dffffffff00000000000000000000000200000000000000020000000100000012004e006f0074006500200049006e0066006f0100000000ffffffff000000000000000000000002000000020000000c0063007500720073006f00720100000000ffffffff0000000000000000000000260050006f0073002f0053006e00610070002f0053006f006c006f002d0074006f006f006c00730100000083ffffffff0000000000000000</toolbars>
</drumedit>
<pianoroll>
- <quant>96</quant>
<raster>96</raster>
- <quantStrength>80</quantStrength>
- <quantLimit>50</quantLimit>
- <quantLen>0</quantLen>
- <to>0</to>
- <width>600</width>
- <height>400</height>
+ <width>879</width>
+ <height>467</height>
<colormode>0</colormode>
+ <toolbars>000000ff00000000fd000000000000036f0000017800000004000000040000000800000008fc00000006000000020000000000000002000000000000000200000000000000020000000000000002000000030000001e005000690061006e006f0072006f006c006c00200074006f006f006c00730100000000ffffffff000000000000000000000014004500640069007400200054006f006f006c00730100000091ffffffff000000000000000000000012004e006f0074006500200049006e0066006f0100000103ffffffff00000000000000000000000200000003000000260050006f0073002f0053006e00610070002f0053006f006c006f002d0074006f006f006c007301000000000000024c000000000000000000000012007400720061006e00730070006f00720074010000024c000000fc00000000000000000000000a00700061006e006900630100000348ffffffff0000000000000000</toolbars>
</pianoroll>
+ <scoreedit>
+ <width>880</width>
+ <height>466</height>
+ <toolbars>000000ff00000000fd00000000000003700000018500000004000000040000000800000008fc0000000200000002000000030000001e0055006e0064006f002f005200650064006f00200074006f006f006c00730100000000ffffffff000000000000000000000014004500640069007400200054006f006f006c00730100000040ffffffff000000000000000000000022004e006500770020006e006f00740065002000730065007400740069006e006700730100000099ffffffff000000000000000000000002000000030000002a005100750061006e007400690073006100740069006f006e002000730065007400740069006e0067007301000000000000024a000000000000000000000012007400720061006e00730070006f00720074010000024a000000fc00000000000000000000000a00700061006e0069006301000003460000011f0000000000000000</toolbars>
+ </scoreedit>
<masteredit>
<raster>0</raster>
+ <width>875</width>
+ <height>464</height>
+ <toolbars>000000ff00000000fd000000000000036b000001a400000004000000040000000800000008fc000000010000000200000004ffffffff0100000000ffffffff000000000000000000000014004500640069007400200054006f006f006c00730100000040ffffffff0000000000000000ffffffff0100000099ffffffff0000000000000000ffffffff01000000faffffffff0000000000000000</toolbars>
</masteredit>
<waveedit>
- <bgcolor r="0" g="0" b="0"></bgcolor>
- <width>600</width>
- <height>400</height>
+ <bgcolor r="200" g="200" b="200"></bgcolor>
+ <width>883</width>
+ <height>466</height>
+ <toolbars>000000ff00000000fd0000000000000373000001a100000004000000040000000800000008fc0000000200000002000000030000001e00570061007600650020006500640069007400200074006f006f006c00730100000000ffffffff00000000000000000000001c0057006100760065004500640069007400200074006f006f006c007301000000400000023b000000000000000000000012007400720061006e00730070006f00720074010000027b0000003900000000000000000000000200000000</toolbars>
</waveedit>
+ <dialogs>
+ <mod_len>
+ <range>1</range>
+ <offset>0</offset>
+ <rate>100</rate>
+ </mod_len>
+ <mod_velo>
+ <range>1</range>
+ <offset>0</offset>
+ <rate>100</rate>
+ </mod_velo>
+ <quantize>
+ <range>1</range>
+ <strength>90</strength>
+ <threshold>0</threshold>
+ <raster>3</raster>
+ <swing>0</swing>
+ <quant_len>1</quant_len>
+ </quantize>
+ <erase>
+ <range>1</range>
+ </erase>
+ <del_overlaps>
+ <range>1</range>
+ </del_overlaps>
+ <setlen>
+ <range>1</range>
+ <len>384</len>
+ </setlen>
+ <move>
+ <range>1</range>
+ <amount>0</amount>
+ </move>
+ <transpose>
+ <range>1</range>
+ <amount>0</amount>
+ </transpose>
+ </dialogs>
</configuration>
<song>
+ <info></info>
+ <showinfo>1</showinfo>
<automation>0</automation>
<cpos>0</cpos>
<rpos>0</rpos>
@@ -282,8 +428,9 @@
<cycle>0</cycle>
<click>0</click>
<quantize>0</quantize>
- <len>0</len>
+ <len>6144</len>
<follow>1</follow>
+ <sampleRate>44100</sampleRate>
<miditrack>
<name>Track 1</name>
<record>0</record>
@@ -296,9 +443,8 @@
<selected>1</selected>
<device>0</device>
<channel>0</channel>
- <inportMap>65535</inportMap>
- <inchannelMap>65535</inchannelMap>
<locked>0</locked>
+ <echo>1</echo>
<transposition>0</transposition>
<velocity>0</velocity>
<delay>0</delay>
@@ -317,9 +463,8 @@
<locked>0</locked>
<device>0</device>
<channel>0</channel>
- <inportMap>65535</inportMap>
- <inchannelMap>65535</inchannelMap>
<locked>0</locked>
+ <echo>1</echo>
<transposition>0</transposition>
<velocity>0</velocity>
<delay>0</delay>
@@ -338,9 +483,8 @@
<locked>0</locked>
<device>0</device>
<channel>0</channel>
- <inportMap>65535</inportMap>
- <inchannelMap>65535</inchannelMap>
<locked>0</locked>
+ <echo>1</echo>
<transposition>0</transposition>
<velocity>0</velocity>
<delay>0</delay>
@@ -359,9 +503,8 @@
<locked>0</locked>
<device>0</device>
<channel>0</channel>
- <inportMap>65535</inportMap>
- <inchannelMap>65535</inchannelMap>
<locked>0</locked>
+ <echo>1</echo>
<transposition>0</transposition>
<velocity>0</velocity>
<delay>0</delay>
@@ -380,9 +523,8 @@
<locked>0</locked>
<device>0</device>
<channel>9</channel>
- <inportMap>65535</inportMap>
- <inchannelMap>65535</inchannelMap>
<locked>0</locked>
+ <echo>1</echo>
<transposition>0</transposition>
<velocity>0</velocity>
<delay>0</delay>
@@ -390,6 +532,46 @@
<compression>100</compression>
<automation>1</automation>
</drumtrack>
+ <Route channelMask="65535">
+ <source mport="0"/>
+ <dest name="Track 1"/>
+ </Route>
+ <Route channelMask="65535">
+ <source mport="0"/>
+ <dest name="Track 1"/>
+ </Route>
+ <Route channelMask="65535">
+ <source mport="0"/>
+ <dest name="Track 2"/>
+ </Route>
+ <Route channelMask="65535">
+ <source mport="0"/>
+ <dest name="Track 2"/>
+ </Route>
+ <Route channelMask="65535">
+ <source mport="0"/>
+ <dest name="Track 3"/>
+ </Route>
+ <Route channelMask="65535">
+ <source mport="0"/>
+ <dest name="Track 3"/>
+ </Route>
+ <Route channelMask="65535">
+ <source mport="0"/>
+ <dest name="Track 4"/>
+ </Route>
+ <Route channelMask="65535">
+ <source mport="0"/>
+ <dest name="Track 4"/>
+ </Route>
+ <Route channelMask="65535">
+ <source mport="0"/>
+ <dest name="Track 5"/>
+ </Route>
+ <Route channelMask="65535">
+ <source mport="0"/>
+ <dest name="Track 5"/>
+ </Route>
<tempolist fix="500000">
<tempo at="21474837">
<tick>0</tick>
@@ -403,7 +585,15 @@
<denom>4</denom>
</sig>
</siglist>
+ <keylist fix="1">
+ <key at="21474837">
+ <tick>0</tick>
+ <val>1</val>
+ </key>
+ </keylist>
<drummap>
</drummap>
</song>
+ <toplevels>
+ </toplevels>
</muse>
diff --git a/muse2/share/templates/monorecord.med b/muse2/share/templates/monorecord.med
index 8ba68625..fc8b324c 100644
--- a/muse2/share/templates/monorecord.med
+++ b/muse2/share/templates/monorecord.med
@@ -1,322 +1,370 @@
<?xml version="1.0"?>
<muse version="2.0">
<configuration>
- <midiInputDevice>0</midiInputDevice>
- <midiInputChannel>0</midiInputChannel>
- <midiRecordType>0</midiRecordType>
- <midiThruType>0</midiThruType>
- <midiFilterCtrl1>0</midiFilterCtrl1>
- <midiFilterCtrl2>0</midiFilterCtrl2>
- <midiFilterCtrl3>0</midiFilterCtrl3>
- <midiFilterCtrl4>0</midiFilterCtrl4>
- <txDeviceId>127</txDeviceId>
- <rxDeviceId>127</rxDeviceId>
- <txSyncPort>1</txSyncPort>
- <rxSyncPort>-1</rxSyncPort>
- <mtctype>1</mtctype>
- <mtcoffset>00:00:00:00:00</mtcoffset>
- <extSync>0</extSync>
- <genMTCSync>0</genMTCSync>
- <genMCSync>0</genMCSync>
- <genMMC>0</genMMC>
- <acceptMTC>0</acceptMTC>
- <acceptMMC>1</acceptMMC>
- <acceptMC>1</acceptMC>
- <transport visible=1>
- </transport>
- <bigtimeVisible>0</bigtimeVisible>
- <arranger>
- <info>0</info>
- <split>298 296 </split>
- <list>
- <header> 7 6 5 4 3 2 1 0 </header>
- </list>
- <xpos>0</xpos>
- <xmag>266</xmag>
- <ypos>0</ypos>
- </arranger>
- <sequencer>
- <metronom>
- <premeasures>2</premeasures>
- <measurepitch>63</measurepitch>
- <measurevelo>127</measurevelo>
- <beatpitch>63</beatpitch>
- <beatvelo>70</beatvelo>
- <channel>9</channel>
- <port>0</port>
- <precountEnable>1</precountEnable>
- <fromMastertrack>1</fromMastertrack>
- <signatureZ>4</signatureZ>
- <signatureN>4</signatureN>
- <prerecord>0</prerecord>
- <preroll>0</preroll>
- <midiClickEnable>1</midiClickEnable>
- <audioClickEnable>0</audioClickEnable>
- </metronom>
- <rcEnable>0</rcEnable>
- <rcStop>28</rcStop>
- <rcRecord>31</rcRecord>
- <rcGotoLeft>33</rcGotoLeft>
- <rcPlay>29</rcPlay>
- <midiport idx="0">
- <instrument>GM</instrument>
- <name>TASCAM US-X2Y Port 0</name>
- <record>1</record>
- <channel idx="0">
- <controller>1</controller>
- <controller>7</controller>
- <controller>10</controller>
- <controller>11</controller>
- <controller>64</controller>
- <controller>91</controller>
- <controller>93</controller>
- <controller>120</controller>
- <controller>121</controller>
- <controller>123</controller>
- <controller>262144</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="1">
- <controller>1</controller>
- <controller>7</controller>
- <controller>10</controller>
- <controller>11</controller>
- <controller>64</controller>
- <controller>91</controller>
- <controller>93</controller>
- <controller>120</controller>
- <controller>121</controller>
- <controller>123</controller>
- <controller>262144</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="2">
- <controller>1</controller>
- <controller>7</controller>
- <controller>10</controller>
- <controller>11</controller>
- <controller>64</controller>
- <controller>91</controller>
- <controller>93</controller>
- <controller>120</controller>
- <controller>121</controller>
- <controller>123</controller>
- <controller>262144</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="3">
- <controller>1</controller>
- <controller>7</controller>
- <controller>10</controller>
- <controller>11</controller>
- <controller>64</controller>
- <controller>91</controller>
- <controller>93</controller>
- <controller>120</controller>
- <controller>121</controller>
- <controller>123</controller>
- <controller>262144</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="4">
- <controller>1</controller>
- <controller>7</controller>
- <controller>10</controller>
- <controller>11</controller>
- <controller>64</controller>
- <controller>91</controller>
- <controller>93</controller>
- <controller>120</controller>
- <controller>121</controller>
- <controller>123</controller>
- <controller>262144</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="5">
- <controller>1</controller>
- <controller>7</controller>
- <controller>10</controller>
- <controller>11</controller>
- <controller>64</controller>
- <controller>91</controller>
- <controller>93</controller>
- <controller>120</controller>
- <controller>121</controller>
- <controller>123</controller>
- <controller>262144</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="6">
- <controller>1</controller>
- <controller>7</controller>
- <controller>10</controller>
- <controller>11</controller>
- <controller>64</controller>
- <controller>91</controller>
- <controller>93</controller>
- <controller>120</controller>
- <controller>121</controller>
- <controller>123</controller>
- <controller>262144</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="7">
- <controller>1</controller>
- <controller>7</controller>
- <controller>10</controller>
- <controller>11</controller>
- <controller>64</controller>
- <controller>91</controller>
- <controller>93</controller>
- <controller>120</controller>
- <controller>121</controller>
- <controller>123</controller>
- <controller>262144</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="8">
- <controller>1</controller>
- <controller>7</controller>
- <controller>10</controller>
- <controller>11</controller>
- <controller>64</controller>
- <controller>91</controller>
- <controller>93</controller>
- <controller>120</controller>
- <controller>121</controller>
- <controller>123</controller>
- <controller>262144</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="9">
- <controller>1</controller>
- <controller>7</controller>
- <controller>10</controller>
- <controller>11</controller>
- <controller>64</controller>
- <controller>91</controller>
- <controller>93</controller>
- <controller>120</controller>
- <controller>121</controller>
- <controller>123</controller>
- <controller>262144</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="10">
- <controller>1</controller>
- <controller>7</controller>
- <controller>10</controller>
- <controller>11</controller>
- <controller>64</controller>
- <controller>91</controller>
- <controller>93</controller>
- <controller>120</controller>
- <controller>121</controller>
- <controller>123</controller>
- <controller>262144</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="11">
- <controller>1</controller>
- <controller>7</controller>
- <controller>10</controller>
- <controller>11</controller>
- <controller>64</controller>
- <controller>91</controller>
- <controller>93</controller>
- <controller>120</controller>
- <controller>121</controller>
- <controller>123</controller>
- <controller>262144</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="12">
- <controller>1</controller>
- <controller>7</controller>
- <controller>10</controller>
- <controller>11</controller>
- <controller>64</controller>
- <controller>91</controller>
- <controller>93</controller>
- <controller>120</controller>
- <controller>121</controller>
- <controller>123</controller>
- <controller>262144</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="13">
- <controller>1</controller>
- <controller>7</controller>
- <controller>10</controller>
- <controller>11</controller>
- <controller>64</controller>
- <controller>91</controller>
- <controller>93</controller>
- <controller>120</controller>
- <controller>121</controller>
- <controller>123</controller>
- <controller>262144</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="14">
- <controller>1</controller>
- <controller>7</controller>
- <controller>10</controller>
- <controller>11</controller>
- <controller>64</controller>
- <controller>91</controller>
- <controller>93</controller>
- <controller>120</controller>
- <controller>121</controller>
- <controller>123</controller>
- <controller>262144</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="15">
- <controller>1</controller>
- <controller>7</controller>
- <controller>10</controller>
- <controller>11</controller>
- <controller>64</controller>
- <controller>91</controller>
- <controller>93</controller>
- <controller>120</controller>
- <controller>121</controller>
- <controller>123</controller>
- <controller>262144</controller>
- <controller>262145</controller>
- </channel>
- </midiport>
- </sequencer>
- <drumedit>
- <quant>96</quant>
- <raster>96</raster>
- <width>600</width>
- <height>400</height>
- <dlistwidth>50</dlistwidth>
- <dcanvaswidth>300</dcanvaswidth>
- </drumedit>
- <pianoroll>
- <quant>96</quant>
- <raster>96</raster>
- <quantStrength>80</quantStrength>
- <quantLimit>50</quantLimit>
- <quantLen>0</quantLen>
- <to>0</to>
- <width>600</width>
- <height>400</height>
- <colormode>0</colormode>
- </pianoroll>
- <masteredit>
- <raster>0</raster>
- </masteredit>
- <waveedit>
- <bgcolor r="0" g="0" b="0"></bgcolor>
- <width>600</width>
- <height>400</height>
- </waveedit>
- </configuration>
+ <midiInputDevice>0</midiInputDevice>
+ <midiInputChannel>0</midiInputChannel>
+ <midiRecordType>0</midiRecordType>
+ <midiThruType>0</midiThruType>
+ <midiFilterCtrl1>0</midiFilterCtrl1>
+ <midiFilterCtrl2>0</midiFilterCtrl2>
+ <midiFilterCtrl3>0</midiFilterCtrl3>
+ <midiFilterCtrl4>0</midiFilterCtrl4>
+ <waveTracksVisible>1</waveTracksVisible>
+ <auxTracksVisible>1</auxTracksVisible>
+ <groupTracksVisible>1</groupTracksVisible>
+ <midiTracksVisible>1</midiTracksVisible>
+ <inputTracksVisible>1</inputTracksVisible>
+ <outputTracksVisible>1</outputTracksVisible>
+ <synthTracksVisible>1</synthTracksVisible>
+ <mtctype>1</mtctype>
+ <mtcoffset>00:00:00:00:00</mtcoffset>
+ <sendClockDelay>1</sendClockDelay>
+ <useJackTransport>1</useJackTransport>
+ <jackTransportMaster>1</jackTransportMaster>
+ <extSync>0</extSync>
+ <bigtimeVisible>0</bigtimeVisible>
+ <transportVisible>0</transportVisible>
+ <markerVisible>0</markerVisible>
+ <geometryMain x="0" y="0" w="878" h="468"></geometryMain>
+ <geometryTransport x="0" y="0" w="100" h="30"></geometryTransport>
+ <mixer1Visible>0</mixer1Visible>
+ <mixer2Visible>0</mixer2Visible>
+ <arranger>
+ <info>0</info>
+ <split>298 298 </split>
+ <list>
+ <header> 7 6 5 4 3 2 1 0 8 </header>
+ </list>
+ <xpos>0</xpos>
+ <xmag>266</xmag>
+ <ypos>0</ypos>
+ </arranger>
+ <sequencer>
+ <metronom>
+ <premeasures>2</premeasures>
+ <measurepitch>63</measurepitch>
+ <measurevelo>127</measurevelo>
+ <beatpitch>63</beatpitch>
+ <beatvelo>70</beatvelo>
+ <channel>9</channel>
+ <port>0</port>
+ <precountEnable>0</precountEnable>
+ <fromMastertrack>0</fromMastertrack>
+ <signatureZ>4</signatureZ>
+ <signatureN>4</signatureN>
+ <prerecord>0</prerecord>
+ <preroll>0</preroll>
+ <midiClickEnable>1</midiClickEnable>
+ <audioClickEnable>0</audioClickEnable>
+ <audioClickVolume>0.5</audioClickVolume>
+ </metronom>
+ <rcEnable>0</rcEnable>
+ <rcStop>28</rcStop>
+ <rcRecord>31</rcRecord>
+ <rcGotoLeft>33</rcGotoLeft>
+ <rcPlay>29</rcPlay>
+ <midiport idx="0">
+ <defaultOutChans>1</defaultOutChans>
+ <channel idx="0">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="1">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="2">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="3">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="4">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="5">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="6">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="7">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="8">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="9">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="10">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="11">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="12">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="13">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="14">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="15">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ </midiport>
+ </sequencer>
+ <drumedit>
+ <raster>96</raster>
+ <width>883</width>
+ <height>465</height>
+ <dlistwidth>126</dlistwidth>
+ <dcanvaswidth>753</dcanvaswidth>
+ <toolbars>000000ff00000000fd00000000000003730000015c00000004000000040000000800000008fc00000004000000020000000400000014004400720075006d00200074006f006f006c00730100000000000000d1000000000000000000000014004500640069007400200054006f006f006c007301000000d1000000c8000000000000000000000012007400720061006e00730070006f0072007401000001990000018400000000000000000000000a00700061006e00690063010000031dffffffff00000000000000000000000200000000000000020000000100000012004e006f0074006500200049006e0066006f0100000000ffffffff000000000000000000000002000000020000000c0063007500720073006f00720100000000ffffffff0000000000000000000000260050006f0073002f0053006e00610070002f0053006f006c006f002d0074006f006f006c00730100000083ffffffff0000000000000000</toolbars>
+ </drumedit>
+ <pianoroll>
+ <raster>96</raster>
+ <width>879</width>
+ <height>467</height>
+ <colormode>0</colormode>
+ <toolbars>000000ff00000000fd000000000000036f0000017800000004000000040000000800000008fc00000006000000020000000000000002000000000000000200000000000000020000000000000002000000030000001e005000690061006e006f0072006f006c006c00200074006f006f006c00730100000000ffffffff000000000000000000000014004500640069007400200054006f006f006c00730100000091ffffffff000000000000000000000012004e006f0074006500200049006e0066006f0100000103ffffffff00000000000000000000000200000003000000260050006f0073002f0053006e00610070002f0053006f006c006f002d0074006f006f006c007301000000000000024c000000000000000000000012007400720061006e00730070006f00720074010000024c000000fc00000000000000000000000a00700061006e006900630100000348ffffffff0000000000000000</toolbars>
+ </pianoroll>
+ <scoreedit>
+ <width>880</width>
+ <height>466</height>
+ <toolbars>000000ff00000000fd00000000000003700000018500000004000000040000000800000008fc0000000200000002000000030000001e0055006e0064006f002f005200650064006f00200074006f006f006c00730100000000ffffffff000000000000000000000014004500640069007400200054006f006f006c00730100000040ffffffff000000000000000000000022004e006500770020006e006f00740065002000730065007400740069006e006700730100000099ffffffff000000000000000000000002000000030000002a005100750061006e007400690073006100740069006f006e002000730065007400740069006e0067007301000000000000024a000000000000000000000012007400720061006e00730070006f00720074010000024a000000fc00000000000000000000000a00700061006e0069006301000003460000011f0000000000000000</toolbars>
+ </scoreedit>
+ <masteredit>
+ <raster>0</raster>
+ <width>875</width>
+ <height>464</height>
+ <toolbars>000000ff00000000fd000000000000036b000001a400000004000000040000000800000008fc000000010000000200000004ffffffff0100000000ffffffff000000000000000000000014004500640069007400200054006f006f006c00730100000040ffffffff0000000000000000ffffffff0100000099ffffffff0000000000000000ffffffff01000000faffffffff0000000000000000</toolbars>
+ </masteredit>
+ <waveedit>
+ <bgcolor r="200" g="200" b="200"></bgcolor>
+ <width>883</width>
+ <height>466</height>
+ <toolbars>000000ff00000000fd0000000000000373000001a100000004000000040000000800000008fc0000000200000002000000030000001e00570061007600650020006500640069007400200074006f006f006c00730100000000ffffffff00000000000000000000001c0057006100760065004500640069007400200074006f006f006c007301000000400000023b000000000000000000000012007400720061006e00730070006f00720074010000027b0000003900000000000000000000000200000000</toolbars>
+ </waveedit>
+ <dialogs>
+ <mod_len>
+ <range>1</range>
+ <offset>0</offset>
+ <rate>100</rate>
+ </mod_len>
+ <mod_velo>
+ <range>1</range>
+ <offset>0</offset>
+ <rate>100</rate>
+ </mod_velo>
+ <quantize>
+ <range>1</range>
+ <strength>90</strength>
+ <threshold>0</threshold>
+ <raster>3</raster>
+ <swing>0</swing>
+ <quant_len>1</quant_len>
+ </quantize>
+ <erase>
+ <range>1</range>
+ </erase>
+ <del_overlaps>
+ <range>1</range>
+ </del_overlaps>
+ <setlen>
+ <range>1</range>
+ <len>384</len>
+ </setlen>
+ <move>
+ <range>1</range>
+ <amount>0</amount>
+ </move>
+ <transpose>
+ <range>1</range>
+ <amount>0</amount>
+ </transpose>
+ </dialogs>
+ </configuration>
<song>
+ <info></info>
+ <showinfo>1</showinfo>
<automation>0</automation>
<cpos>0</cpos>
<rpos>0</rpos>
@@ -334,6 +382,7 @@
<quantize>0</quantize>
<len>0</len>
<follow>1</follow>
+ <sampleRate>44100</sampleRate>
<wavetrack>
<name>Track 1</name>
<record>1</record>
@@ -343,15 +392,16 @@
<channels>1</channels>
<height>20</height>
<locked>0</locked>
- <mute>0</mute>
- <solo>0</solo>
<prefader>0</prefader>
- <off>0</off>
- <auxSend idx=0>0.000000</auxSend>
- <auxSend idx=1>0.000000</auxSend>
- <controller id="0" cur="1.021645">
+ <sendMetronome>0</sendMetronome>
+ <automation>0</automation>
+ <controller id="0" cur="1.02164" color="#ff0000" visible="0">
+ 0 1.02164,
+ </controller>
+ <controller id="1" cur="0" color="#ff0000" visible="0">
+ 0 0,
</controller>
- <controller id="1" cur="0.000000">
+ <controller id="2" cur="0" color="#0000ff" visible="0">
</controller>
</wavetrack>
<AudioInput>
@@ -364,15 +414,16 @@
<height>20</height>
<locked>1</locked>
<selected>1</selected>
- <mute>0</mute>
- <solo>0</solo>
<prefader>0</prefader>
- <off>0</off>
- <auxSend idx=0>0.000000</auxSend>
- <auxSend idx=1>0.000000</auxSend>
- <controller id="0" cur="1.021645">
+ <sendMetronome>0</sendMetronome>
+ <automation>0</automation>
+ <controller id="0" cur="1.02164" color="#ff0000" visible="0">
+ 0 1.02164,
+ </controller>
+ <controller id="1" cur="0" color="#ff0000" visible="0">
+ 0 0,
</controller>
- <controller id="1" cur="0.000000">
+ <controller id="2" cur="0" color="#0000ff" visible="0">
</controller>
</AudioInput>
<AudioOutput>
@@ -384,26 +435,25 @@
<channels>1</channels>
<height>20</height>
<locked>1</locked>
- <mute>0</mute>
- <solo>0</solo>
<prefader>0</prefader>
- <off>0</off>
- <controller id="0" cur="1.301517">
+ <sendMetronome>0</sendMetronome>
+ <automation>0</automation>
+ <controller id="0" cur="1.30152" color="#ff0000" visible="0">
+ 0 1.30152,
+ </controller>
+ <controller id="1" cur="0" color="#ff0000" visible="0">
+ 0 0,
</controller>
- <controller id="1" cur="0.000000">
+ <controller id="2" cur="0" color="#0000ff" visible="0">
</controller>
</AudioOutput>
<Route>
- <srcNode>alsa_pcm:capture_1</srcNode>
- <dstNode>1:Input 1</dstNode>
+ <source name="Input 1"/>
+ <dest name="Out 1"/>
</Route>
<Route>
- <srcNode>Input 1</srcNode>
- <dstNode>Out 1</dstNode>
- </Route>
- <Route>
- <srcNode>Input 1</srcNode>
- <dstNode>Track 1</dstNode>
+ <source name="Input 1"/>
+ <dest name="Track 1"/>
</Route>
<tempolist fix="500000">
<tempo at="21474837">
@@ -418,15 +468,15 @@
<denom>4</denom>
</sig>
</siglist>
+ <keylist fix="1">
+ <key at="21474837">
+ <tick>0</tick>
+ <val>1</val>
+ </key>
+ </keylist>
<drummap>
</drummap>
</song>
<toplevels>
- <audiomixer>
- <topwin>
- <geometry x="1216" y="30" w="180" h="503">
- </geometry>
- </topwin>
- </audiomixer>
</toplevels>
</muse>
diff --git a/muse2/share/templates/synti.med b/muse2/share/templates/synti.med
index b5ad8908..1a14a9ce 100644
--- a/muse2/share/templates/synti.med
+++ b/muse2/share/templates/synti.med
@@ -1,577 +1,773 @@
<?xml version="1.0"?>
<muse version="2.0">
<configuration>
- <midiInputDevice>0</midiInputDevice>
- <midiInputChannel>0</midiInputChannel>
- <midiRecordType>0</midiRecordType>
- <midiThruType>0</midiThruType>
- <midiFilterCtrl1>0</midiFilterCtrl1>
- <midiFilterCtrl2>0</midiFilterCtrl2>
- <midiFilterCtrl3>0</midiFilterCtrl3>
- <midiFilterCtrl4>0</midiFilterCtrl4>
- <txDeviceId>127</txDeviceId>
- <rxDeviceId>127</rxDeviceId>
- <txSyncPort>1</txSyncPort>
- <rxSyncPort>-1</rxSyncPort>
- <mtctype>1</mtctype>
- <mtcoffset>00:00:00:00:00</mtcoffset>
- <extSync>0</extSync>
- <genMTCSync>0</genMTCSync>
- <genMCSync>0</genMCSync>
- <genMMC>0</genMMC>
- <acceptMTC>0</acceptMTC>
- <acceptMMC>1</acceptMMC>
- <acceptMC>1</acceptMC>
- <transport visible=0>
- </transport>
- <bigtimeVisible>0</bigtimeVisible>
- <arranger>
- <info>0</info>
- <split>298 296 </split>
- <list>
- <header> 7 6 5 4 3 2 1 0 </header>
- </list>
- <xpos>0</xpos>
- <xmag>266</xmag>
- <ypos>0</ypos>
- </arranger>
- <sequencer>
- <metronom>
- <premeasures>2</premeasures>
- <measurepitch>63</measurepitch>
- <measurevelo>127</measurevelo>
- <beatpitch>63</beatpitch>
- <beatvelo>70</beatvelo>
- <channel>9</channel>
- <port>0</port>
- <precountEnable>1</precountEnable>
- <fromMastertrack>1</fromMastertrack>
- <signatureZ>4</signatureZ>
- <signatureN>4</signatureN>
- <prerecord>0</prerecord>
- <preroll>0</preroll>
- <midiClickEnable>1</midiClickEnable>
- <audioClickEnable>0</audioClickEnable>
- </metronom>
- <rcEnable>0</rcEnable>
- <rcStop>28</rcStop>
- <rcRecord>31</rcRecord>
- <rcGotoLeft>33</rcGotoLeft>
- <rcPlay>29</rcPlay>
- <midiport idx="0">
- <instrument>organ-1</instrument>
- <name>organ-1</name>
- <record>0</record>
- <channel idx="0">
- <controller>1</controller>
- <controller>7</controller>
- <controller>10</controller>
- <controller>11</controller>
- <controller>64</controller>
- <controller>91</controller>
- <controller>93</controller>
- <controller>120</controller>
- <controller>121</controller>
- <controller>123</controller>
- <controller>262144</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="1">
- <controller>1</controller>
- <controller>7</controller>
- <controller>10</controller>
- <controller>11</controller>
- <controller>64</controller>
- <controller>91</controller>
- <controller>93</controller>
- <controller>120</controller>
- <controller>121</controller>
- <controller>123</controller>
- <controller>262144</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="2">
- <controller>1</controller>
- <controller>7</controller>
- <controller>10</controller>
- <controller>11</controller>
- <controller>64</controller>
- <controller>91</controller>
- <controller>93</controller>
- <controller>120</controller>
- <controller>121</controller>
- <controller>123</controller>
- <controller>262144</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="3">
- <controller>1</controller>
- <controller>7</controller>
- <controller>10</controller>
- <controller>11</controller>
- <controller>64</controller>
- <controller>91</controller>
- <controller>93</controller>
- <controller>120</controller>
- <controller>121</controller>
- <controller>123</controller>
- <controller>262144</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="4">
- <controller>1</controller>
- <controller>7</controller>
- <controller>10</controller>
- <controller>11</controller>
- <controller>64</controller>
- <controller>91</controller>
- <controller>93</controller>
- <controller>120</controller>
- <controller>121</controller>
- <controller>123</controller>
- <controller>262144</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="5">
- <controller>1</controller>
- <controller>7</controller>
- <controller>10</controller>
- <controller>11</controller>
- <controller>64</controller>
- <controller>91</controller>
- <controller>93</controller>
- <controller>120</controller>
- <controller>121</controller>
- <controller>123</controller>
- <controller>262144</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="6">
- <controller>1</controller>
- <controller>7</controller>
- <controller>10</controller>
- <controller>11</controller>
- <controller>64</controller>
- <controller>91</controller>
- <controller>93</controller>
- <controller>120</controller>
- <controller>121</controller>
- <controller>123</controller>
- <controller>262144</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="7">
- <controller>1</controller>
- <controller>7</controller>
- <controller>10</controller>
- <controller>11</controller>
- <controller>64</controller>
- <controller>91</controller>
- <controller>93</controller>
- <controller>120</controller>
- <controller>121</controller>
- <controller>123</controller>
- <controller>262144</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="8">
- <controller>1</controller>
- <controller>7</controller>
- <controller>10</controller>
- <controller>11</controller>
- <controller>64</controller>
- <controller>91</controller>
- <controller>93</controller>
- <controller>120</controller>
- <controller>121</controller>
- <controller>123</controller>
- <controller>262144</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="9">
- <controller>1</controller>
- <controller>7</controller>
- <controller>10</controller>
- <controller>11</controller>
- <controller>64</controller>
- <controller>91</controller>
- <controller>93</controller>
- <controller>120</controller>
- <controller>121</controller>
- <controller>123</controller>
- <controller>262144</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="10">
- <controller>1</controller>
- <controller>7</controller>
- <controller>10</controller>
- <controller>11</controller>
- <controller>64</controller>
- <controller>91</controller>
- <controller>93</controller>
- <controller>120</controller>
- <controller>121</controller>
- <controller>123</controller>
- <controller>262144</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="11">
- <controller>1</controller>
- <controller>7</controller>
- <controller>10</controller>
- <controller>11</controller>
- <controller>64</controller>
- <controller>91</controller>
- <controller>93</controller>
- <controller>120</controller>
- <controller>121</controller>
- <controller>123</controller>
- <controller>262144</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="12">
- <controller>1</controller>
- <controller>7</controller>
- <controller>10</controller>
- <controller>11</controller>
- <controller>64</controller>
- <controller>91</controller>
- <controller>93</controller>
- <controller>120</controller>
- <controller>121</controller>
- <controller>123</controller>
- <controller>262144</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="13">
- <controller>1</controller>
- <controller>7</controller>
- <controller>10</controller>
- <controller>11</controller>
- <controller>64</controller>
- <controller>91</controller>
- <controller>93</controller>
- <controller>120</controller>
- <controller>121</controller>
- <controller>123</controller>
- <controller>262144</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="14">
- <controller>1</controller>
- <controller>7</controller>
- <controller>10</controller>
- <controller>11</controller>
- <controller>64</controller>
- <controller>91</controller>
- <controller>93</controller>
- <controller>120</controller>
- <controller>121</controller>
- <controller>123</controller>
- <controller>262144</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="15">
- <controller>1</controller>
- <controller>7</controller>
- <controller>10</controller>
- <controller>11</controller>
- <controller>64</controller>
- <controller>91</controller>
- <controller>93</controller>
- <controller>120</controller>
- <controller>121</controller>
- <controller>123</controller>
- <controller>262144</controller>
- <controller>262145</controller>
- </channel>
- </midiport>
- <midiport idx="1">
- <instrument>fluid-1</instrument>
- <name>fluid-1</name>
- <record>0</record>
- <channel idx="0">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="1">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="2">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="3">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="4">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="5">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="6">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="7">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="8">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="9">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="10">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="11">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="12">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="13">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="14">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="15">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- </midiport>
- <midiport idx="2">
- <instrument>s1-1</instrument>
- <name>s1-1</name>
- <record>0</record>
- <channel idx="0">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="1">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="2">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="3">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="4">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="5">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="6">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="7">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="8">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="9">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="10">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="11">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="12">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="13">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="14">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="15">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- </midiport>
- <midiport idx="3">
- <instrument>vam-1</instrument>
- <name>vam-1</name>
- <record>0</record>
- <channel idx="0">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="1">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="2">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="3">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="4">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="5">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="6">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="7">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="8">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="9">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="10">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="11">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="12">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="13">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="14">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- <channel idx="15">
- <controller>7</controller>
- <controller>10</controller>
- <controller>262145</controller>
- </channel>
- </midiport>
- </sequencer>
- <drumedit>
- <quant>96</quant>
- <raster>96</raster>
- <width>600</width>
- <height>400</height>
- <dlistwidth>50</dlistwidth>
- <dcanvaswidth>300</dcanvaswidth>
- </drumedit>
- <pianoroll>
- <quant>96</quant>
- <raster>96</raster>
- <quantStrength>80</quantStrength>
- <quantLimit>50</quantLimit>
- <quantLen>0</quantLen>
- <to>0</to>
- <width>600</width>
- <height>400</height>
- <colormode>0</colormode>
- </pianoroll>
- <masteredit>
- <raster>0</raster>
- </masteredit>
- <waveedit>
- <bgcolor r="169" g="181" b="223"></bgcolor>
- <width>600</width>
- <height>400</height>
- </waveedit>
- </configuration>
+ <midiInputDevice>0</midiInputDevice>
+ <midiInputChannel>0</midiInputChannel>
+ <midiRecordType>0</midiRecordType>
+ <midiThruType>0</midiThruType>
+ <midiFilterCtrl1>0</midiFilterCtrl1>
+ <midiFilterCtrl2>0</midiFilterCtrl2>
+ <midiFilterCtrl3>0</midiFilterCtrl3>
+ <midiFilterCtrl4>0</midiFilterCtrl4>
+ <waveTracksVisible>1</waveTracksVisible>
+ <auxTracksVisible>1</auxTracksVisible>
+ <groupTracksVisible>1</groupTracksVisible>
+ <midiTracksVisible>1</midiTracksVisible>
+ <inputTracksVisible>1</inputTracksVisible>
+ <outputTracksVisible>1</outputTracksVisible>
+ <synthTracksVisible>1</synthTracksVisible>
+ <mtctype>1</mtctype>
+ <mtcoffset>00:00:00:00:00</mtcoffset>
+ <sendClockDelay>1</sendClockDelay>
+ <useJackTransport>1</useJackTransport>
+ <jackTransportMaster>1</jackTransportMaster>
+ <extSync>0</extSync>
+ <bigtimeVisible>0</bigtimeVisible>
+ <transportVisible>0</transportVisible>
+ <markerVisible>0</markerVisible>
+ <geometryMain x="0" y="0" w="878" h="468"></geometryMain>
+ <geometryTransport x="0" y="0" w="100" h="30"></geometryTransport>
+ <mixer1Visible>0</mixer1Visible>
+ <mixer2Visible>0</mixer2Visible>
+ <arranger>
+ <info>0</info>
+ <split>298 298 </split>
+ <list>
+ <header> 7 6 5 4 3 2 1 0 8 </header>
+ </list>
+ <xpos>0</xpos>
+ <xmag>266</xmag>
+ <ypos>0</ypos>
+ </arranger>
+ <sequencer>
+ <metronom>
+ <premeasures>2</premeasures>
+ <measurepitch>63</measurepitch>
+ <measurevelo>127</measurevelo>
+ <beatpitch>63</beatpitch>
+ <beatvelo>70</beatvelo>
+ <channel>9</channel>
+ <port>0</port>
+ <precountEnable>0</precountEnable>
+ <fromMastertrack>0</fromMastertrack>
+ <signatureZ>4</signatureZ>
+ <signatureN>4</signatureN>
+ <prerecord>0</prerecord>
+ <preroll>0</preroll>
+ <midiClickEnable>1</midiClickEnable>
+ <audioClickEnable>0</audioClickEnable>
+ <audioClickVolume>0.5</audioClickVolume>
+ </metronom>
+ <rcEnable>0</rcEnable>
+ <rcStop>28</rcStop>
+ <rcRecord>31</rcRecord>
+ <rcGotoLeft>33</rcGotoLeft>
+ <rcPlay>29</rcPlay>
+ <midiport idx="0">
+ <defaultOutChans>1</defaultOutChans>
+ <instrument>organ-1</instrument>
+ <name>organ-1</name>
+ <type>2</type>
+ <openFlags>1</openFlags>
+ <channel idx="0">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="1">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="2">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="3">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="4">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="5">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="6">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="7">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="8">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="9">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="10">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="11">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="12">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="13">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="14">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="15">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="91">
+ </controller>
+ <controller id="93">
+ </controller>
+ <controller id="262144">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ </midiport>
+ <midiport idx="1">
+ <instrument>fluid-1</instrument>
+ <name>fluid-1</name>
+ <type>2</type>
+ <openFlags>1</openFlags>
+ <channel idx="0">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="1">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="2">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="3">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="4">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="5">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="6">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="7">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="8">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="9">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="10">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="11">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="12">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="13">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="14">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="15">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ </midiport>
+ <midiport idx="2">
+ <instrument>General Midi</instrument>
+ <channel idx="0">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="1">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="2">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="3">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="4">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="5">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="6">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="7">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="8">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="9">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="10">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="11">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="12">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="13">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="14">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="15">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ </midiport>
+ <midiport idx="3">
+ <instrument>vam-1</instrument>
+ <name>vam-1</name>
+ <type>2</type>
+ <openFlags>1</openFlags>
+ <channel idx="0">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="1">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="2">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="3">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="4">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="5">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="6">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="7">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="8">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="9">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="10">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="11">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="12">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="13">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="14">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ <channel idx="15">
+ <controller id="7">
+ </controller>
+ <controller id="10">
+ </controller>
+ <controller id="262145">
+ </controller>
+ </channel>
+ </midiport>
+ </sequencer>
+ <drumedit>
+ <raster>96</raster>
+ <width>883</width>
+ <height>465</height>
+ <dlistwidth>126</dlistwidth>
+ <dcanvaswidth>753</dcanvaswidth>
+ <toolbars>000000ff00000000fd00000000000003730000015c00000004000000040000000800000008fc00000004000000020000000400000014004400720075006d00200074006f006f006c00730100000000000000d1000000000000000000000014004500640069007400200054006f006f006c007301000000d1000000c8000000000000000000000012007400720061006e00730070006f0072007401000001990000018400000000000000000000000a00700061006e00690063010000031dffffffff00000000000000000000000200000000000000020000000100000012004e006f0074006500200049006e0066006f0100000000ffffffff000000000000000000000002000000020000000c0063007500720073006f00720100000000ffffffff0000000000000000000000260050006f0073002f0053006e00610070002f0053006f006c006f002d0074006f006f006c00730100000083ffffffff0000000000000000</toolbars>
+ </drumedit>
+ <pianoroll>
+ <raster>96</raster>
+ <width>879</width>
+ <height>467</height>
+ <colormode>0</colormode>
+ <toolbars>000000ff00000000fd000000000000036f0000017800000004000000040000000800000008fc00000006000000020000000000000002000000000000000200000000000000020000000000000002000000030000001e005000690061006e006f0072006f006c006c00200074006f006f006c00730100000000ffffffff000000000000000000000014004500640069007400200054006f006f006c00730100000091ffffffff000000000000000000000012004e006f0074006500200049006e0066006f0100000103ffffffff00000000000000000000000200000003000000260050006f0073002f0053006e00610070002f0053006f006c006f002d0074006f006f006c007301000000000000024c000000000000000000000012007400720061006e00730070006f00720074010000024c000000fc00000000000000000000000a00700061006e006900630100000348ffffffff0000000000000000</toolbars>
+ </pianoroll>
+ <scoreedit>
+ <width>880</width>
+ <height>466</height>
+ <toolbars>000000ff00000000fd00000000000003700000018500000004000000040000000800000008fc0000000200000002000000030000001e0055006e0064006f002f005200650064006f00200074006f006f006c00730100000000ffffffff000000000000000000000014004500640069007400200054006f006f006c00730100000040ffffffff000000000000000000000022004e006500770020006e006f00740065002000730065007400740069006e006700730100000099ffffffff000000000000000000000002000000030000002a005100750061006e007400690073006100740069006f006e002000730065007400740069006e0067007301000000000000024a000000000000000000000012007400720061006e00730070006f00720074010000024a000000fc00000000000000000000000a00700061006e0069006301000003460000011f0000000000000000</toolbars>
+ </scoreedit>
+ <masteredit>
+ <raster>0</raster>
+ <width>875</width>
+ <height>464</height>
+ <toolbars>000000ff00000000fd000000000000036b000001a400000004000000040000000800000008fc000000010000000200000004ffffffff0100000000ffffffff000000000000000000000014004500640069007400200054006f006f006c00730100000040ffffffff0000000000000000ffffffff0100000099ffffffff0000000000000000ffffffff01000000faffffffff0000000000000000</toolbars>
+ </masteredit>
+ <waveedit>
+ <bgcolor r="200" g="200" b="200"></bgcolor>
+ <width>883</width>
+ <height>466</height>
+ <toolbars>000000ff00000000fd0000000000000373000001a100000004000000040000000800000008fc0000000200000002000000030000001e00570061007600650020006500640069007400200074006f006f006c00730100000000ffffffff00000000000000000000001c0057006100760065004500640069007400200074006f006f006c007301000000400000023b000000000000000000000012007400720061006e00730070006f00720074010000027b0000003900000000000000000000000200000000</toolbars>
+ </waveedit>
+ <dialogs>
+ <mod_len>
+ <range>1</range>
+ <offset>0</offset>
+ <rate>100</rate>
+ </mod_len>
+ <mod_velo>
+ <range>1</range>
+ <offset>0</offset>
+ <rate>100</rate>
+ </mod_velo>
+ <quantize>
+ <range>1</range>
+ <strength>90</strength>
+ <threshold>0</threshold>
+ <raster>3</raster>
+ <swing>0</swing>
+ <quant_len>1</quant_len>
+ </quantize>
+ <erase>
+ <range>1</range>
+ </erase>
+ <del_overlaps>
+ <range>1</range>
+ </del_overlaps>
+ <setlen>
+ <range>1</range>
+ <len>384</len>
+ </setlen>
+ <move>
+ <range>1</range>
+ <amount>0</amount>
+ </move>
+ <transpose>
+ <range>1</range>
+ <amount>0</amount>
+ </transpose>
+ </dialogs>
+ </configuration>
<song>
+ <info></info>
+ <showinfo>1</showinfo>
<automation>0</automation>
<cpos>12288</cpos>
<rpos>0</rpos>
@@ -589,6 +785,7 @@
<quantize>0</quantize>
<len>18432</len>
<follow>1</follow>
+ <sampleRate>44100</sampleRate>
<miditrack>
<name>Track 1</name>
<record>0</record>
@@ -600,15 +797,14 @@
<locked>0</locked>
<device>0</device>
<channel>0</channel>
- <inportMap>65535</inportMap>
- <inchannelMap>65535</inchannelMap>
<locked>0</locked>
+ <echo>1</echo>
<transposition>0</transposition>
<velocity>0</velocity>
<delay>0</delay>
<len>100</len>
<compression>100</compression>
- <midiThru>1</midiThru>
+ <automation>1</automation>
<part>
<name>Track 1</name>
<poslen tick="0" len="18432" />
@@ -626,13 +822,16 @@
<height>20</height>
<locked>0</locked>
<selected>1</selected>
- <mute>0</mute>
- <solo>0</solo>
<prefader>0</prefader>
- <off>0</off>
- <controller id="0" cur="1.021645">
+ <sendMetronome>0</sendMetronome>
+ <automation>0</automation>
+ <controller id="0" cur="1.02164" color="#ff0000" visible="0">
+ 0 1.02164,
</controller>
- <controller id="1" cur="0.000000">
+ <controller id="1" cur="0" color="#ff0000" visible="0">
+ 0 0,
+ </controller>
+ <controller id="2" cur="0" color="#0000ff" visible="0">
</controller>
</AudioOutput>
<SynthI>
@@ -643,24 +842,23 @@
<off>1</off>
<channels>2</channels>
<height>20</height>
- <locked>124</locked>
- <mute>0</mute>
- <solo>0</solo>
+ <locked>1</locked>
<prefader>0</prefader>
- <off>1</off>
- <controller id="0" cur="1.410912">
+ <sendMetronome>0</sendMetronome>
+ <automation>0</automation>
+ <controller id="0" cur="1.41091" color="#ff0000" visible="0">
+ 0 1.41091,
+ </controller>
+ <controller id="1" cur="0" color="#ff0000" visible="0">
+ 0 0,
</controller>
- <controller id="1" cur="0.000000">
+ <controller id="2" cur="0" color="#0000ff" visible="0">
</controller>
<class>fluid</class>
+ <label>fluid</label>
<port>1</port>
- <guiVisible>0</guiVisible>
- <midistate>
- <event type="2" datalen="30">
- 7c 00 01 2f 68 6f 6d 65 2f 77 73 2f 73 66 6f 6e
- 74 2f 46 6c 75 69 64 52 33 2e 53 46 32 00
- </event>
- </midistate>
+ <nativeGuiVisible>0</nativeGuiVisible>
+ <curProgram bankH="0" bankL="0" prog="0"/>
</SynthI>
<SynthI>
<name>organ-1</name>
@@ -671,53 +869,34 @@
<channels>1</channels>
<height>20</height>
<locked>0</locked>
- <mute>0</mute>
- <solo>0</solo>
<prefader>0</prefader>
- <off>0</off>
- <controller id="0" cur="1.021645">
+ <sendMetronome>0</sendMetronome>
+ <automation>0</automation>
+ <controller id="0" cur="1.02164" color="#ff0000" visible="0">
+ 0 1.02164,
+ </controller>
+ <controller id="1" cur="-0.04" color="#ff0000" visible="0">
+ 0 -0.04,
</controller>
- <controller id="1" cur="-0.040000">
+ <controller id="2" cur="0" color="#0000ff" visible="0">
</controller>
<class>organ</class>
+ <label>Organ</label>
<port>0</port>
- <guiVisible>0</guiVisible>
+ <nativeGuiVisible>0</nativeGuiVisible>
+ <nativeGeometry x="6" y="339" w="452" h="324"></nativeGeometry>
+ <curProgram bankH="0" bankL="0" prog="0"/>
<midistate>
- <event type="2" datalen="136">
- 00 00 03 00 ff 3f 00 00 01 00 03 00 ff 3f 00 00
- 02 00 03 00 ff 3f 00 00 03 00 03 00 ff 3f 00 00
- 04 00 03 00 ff 3f 00 00 05 00 03 00 ff 3f 00 00
- 06 00 03 00 a2 00 00 00 07 00 03 00 00 00 00 00
- 08 00 03 00 ff 3f 00 00 09 00 03 00 fe 1f 00 00
- 0a 00 03 00 a2 00 00 00 0b 00 03 00 00 00 00 00
- 0c 00 03 00 ff 3f 00 00 0d 00 03 00 fe 1f 00 00
- 0e 00 03 00 01 00 00 00 0f 00 03 00 01 00 00 00
- 10 00 03 00 01 00 00 00
+ <event type="2" datalen="72">
+ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+ 00 00 00 00 00 00 00 00 14 00 00 00 14 00 00 00
+ 00 00 00 00 14 00 00 00 0a 00 00 00 0a 00 00 00
+ 00 00 00 00 0a 00 00 00 01 00 00 00 01 00 00 00
+ 01 00 00 00 00 00 00 00
</event>
</midistate>
</SynthI>
<SynthI>
- <name>s1-1</name>
- <record>0</record>
- <mute>0</mute>
- <solo>0</solo>
- <off>1</off>
- <channels>1</channels>
- <height>20</height>
- <locked>11</locked>
- <mute>0</mute>
- <solo>0</solo>
- <prefader>0</prefader>
- <off>1</off>
- <controller id="0" cur="0.000000">
- </controller>
- <controller id="1" cur="0.000000">
- </controller>
- <class>s1</class>
- <port>2</port>
- <guiVisible>0</guiVisible>
- </SynthI>
- <SynthI>
<name>vam-1</name>
<record>0</record>
<mute>0</mute>
@@ -726,41 +905,79 @@
<channels>1</channels>
<height>20</height>
<locked>0</locked>
- <mute>0</mute>
- <solo>0</solo>
<prefader>0</prefader>
- <off>1</off>
- <controller id="0" cur="0.000000">
+ <sendMetronome>0</sendMetronome>
+ <automation>0</automation>
+ <controller id="0" cur="0" color="#ff0000" visible="0">
+ 0 0,
+ </controller>
+ <controller id="1" cur="0" color="#ff0000" visible="0">
+ 0 0,
</controller>
- <controller id="1" cur="0.000000">
+ <controller id="2" cur="0" color="#0000ff" visible="0">
</controller>
<class>vam</class>
+ <label>vam</label>
<port>3</port>
- <guiVisible>0</guiVisible>
+ <nativeGuiVisible>0</nativeGuiVisible>
+ <nativeGeometry x="270" y="179" w="688" h="498"></nativeGeometry>
+ <curProgram bankH="0" bankL="0" prog="0"/>
+ <midistate>
+ <event type="2" datalen="128">
+ 00 20 00 00 00 20 00 00 01 00 00 00 01 00 00 00
+ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+ fe 3e 00 00 fe 3e 00 00 00 00 00 00 00 00 00 00
+ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+ 00 00 00 00 00 00 00 00 00 00 00 00 ff 3f 00 00
+ 00 00 00 00 00 00 00 00 00 00 00 00 7a 3a 00 00
+ 00 20 00 00 00 20 00 00 00 00 00 00 00 00 00 00
+ </event>
+ </midistate>
</SynthI>
- <Route>
- <srcNode>1:Out 1</srcNode>
- <dstNode>alsa_pcm:playback_1</dstNode>
+ <Route channel="0" channels="2">
+ <source name="fluid-1"/>
+ <dest name="Out 1"/>
+ </Route>
+ <Route channel="0" channels="1">
+ <source name="organ-1"/>
+ <dest name="Out 1"/>
+ </Route>
+ <Route channel="0" channels="1">
+ <source name="vam-1"/>
+ <dest name="Out 1"/>
+ </Route>
+ <Route channelMask="65535">
+ <source mport="0"/>
+ <dest name="Track 1"/>
</Route>
- <Route>
- <srcNode>2:Out 1</srcNode>
- <dstNode>alsa_pcm:playback_2</dstNode>
+ <Route channelMask="65535">
+ <source mport="0"/>
+ <dest name="Track 1"/>
</Route>
- <Route>
- <srcNode>fluid-1</srcNode>
- <dstNode>Out 1</dstNode>
+ <Route channelMask="65535">
+ <source mport="1"/>
+ <dest name="Track 1"/>
</Route>
- <Route>
- <srcNode>organ-1</srcNode>
- <dstNode>Out 1</dstNode>
+ <Route channelMask="65535">
+ <source mport="1"/>
+ <dest name="Track 1"/>
</Route>
- <Route>
- <srcNode>s1-1</srcNode>
- <dstNode>Out 1</dstNode>
+ <Route channelMask="65535">
+ <source mport="2"/>
+ <dest name="Track 1"/>
</Route>
- <Route>
- <srcNode>vam-1</srcNode>
- <dstNode>Out 1</dstNode>
+ <Route channelMask="65535">
+ <source mport="2"/>
+ <dest name="Track 1"/>
+ </Route>
+ <Route channelMask="65535">
+ <source mport="3"/>
+ <dest name="Track 1"/>
+ </Route>
+ <Route channelMask="65535">
+ <source mport="3"/>
+ <dest name="Track 1"/>
</Route>
<tempolist fix="500000">
<tempo at="21474837">
@@ -775,35 +992,15 @@
<denom>4</denom>
</sig>
</siglist>
+ <keylist fix="1">
+ <key at="21474837">
+ <tick>0</tick>
+ <val>1</val>
+ </key>
+ </keylist>
<drummap>
</drummap>
</song>
<toplevels>
- <audiomixer>
- <topwin>
- </geometry>
- </topwin>
- </audiomixer>
- <part>0:0</part>
- <pianoroll>
- <midieditor>
- <topwin>
- </topwin>
- <quant>96</quant>
- <raster>96</raster>
- </midieditor>
- <splitter>255 </splitter>
- <steprec>0</steprec>
- <midiin>0</midiin>
- <tool>1</tool>
- <quantStrength>80</quantStrength>
- <quantLimit>50</quantLimit>
- <quantLen>0</quantLen>
- <playEvents>0</playEvents>
- <xpos>0</xpos>
- <xmag>346</xmag>
- <ypos>390</ypos>
- <ymag>286</ymag>
- </pianoroll>
</toplevels>
</muse>