summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--muse/muse/arranger/canvas.cpp17
-rw-r--r--muse/muse/ctrl/ctrleditor.cpp2
-rw-r--r--muse/muse/event.cpp41
-rw-r--r--muse/muse/event.h1
-rw-r--r--muse/muse/eventbase.h1
-rw-r--r--muse/muse/liste/ctrllistedit.cpp32
-rw-r--r--muse/muse/liste/ctrllistedit.h11
-rw-r--r--muse/muse/liste/listedit.cpp2
-rw-r--r--muse/muse/liste/partlistedit.cpp165
-rw-r--r--muse/muse/liste/partlistedit.h22
-rw-r--r--muse/muse/liste/partlistedit.ui12
-rw-r--r--muse/muse/midiedit/ecanvas.cpp24
-rw-r--r--muse/muse/midiedit/ecanvas.h4
-rw-r--r--muse/muse/midiedit/prcanvas.cpp22
-rw-r--r--muse/muse/midieventbase.cpp26
-rw-r--r--muse/muse/midieventbase.h3
-rw-r--r--muse/muse/muse.cpp44
-rw-r--r--muse/muse/muse.h2
-rw-r--r--muse/muse/muse.qrc1
-rw-r--r--muse/muse/shortcuts.cpp264
20 files changed, 462 insertions, 234 deletions
diff --git a/muse/muse/arranger/canvas.cpp b/muse/muse/arranger/canvas.cpp
index c9764822..e89c6717 100644
--- a/muse/muse/arranger/canvas.cpp
+++ b/muse/muse/arranger/canvas.cpp
@@ -422,16 +422,12 @@ void PartCanvas::contextMenu(const QPoint& pos)
p.fillRect(0, 0, 20, 20, config.partColors[i]);
a->setIcon(QIcon(pm));
}
- a = getAction("delete", this);
- pop->addAction(a);
- a->setData("delete");
- a = getAction("scissor", this);
- pop->addAction(a);
- a = getAction("glue", this);
- pop->addAction(a);
- a = pop->addAction(tr("Declone"));
- a->setData("declone");
+ pop->addAction(getAction("delete", this));
+ pop->addAction(getAction("scissor", this));
+ pop->addAction(getAction("glue", this));
+ a = getAction("declone", this);
a->setEnabled(part->isClone());
+ pop->addAction(a);
if (track->type() == Track::MIDI) {
a = pop->addAction(tr("AutoFill..."));
a->setData("autofill");
@@ -449,8 +445,7 @@ void PartCanvas::contextMenu(const QPoint& pos)
}
a = pop->addAction(*edit_listIcon, tr("miditracker"));
a->setData("miditracker");
- a = pop->addAction(*edit_listIcon, tr("list"));
- a->setData("listedit");
+ pop->addAction(getAction("listedit", this));
}
else {
a = pop->addAction(*waveIcon, tr("wave edit"));
diff --git a/muse/muse/ctrl/ctrleditor.cpp b/muse/muse/ctrl/ctrleditor.cpp
index 89e0fd89..22503060 100644
--- a/muse/muse/ctrl/ctrleditor.cpp
+++ b/muse/muse/ctrl/ctrleditor.cpp
@@ -239,7 +239,7 @@ void CtrlEditor::mousePress(const QPoint& pos, QMouseEvent* me)
int n = a->data().toInt();
if (n == (1 << (TOOLS+1))) {
Pos t(tc()->pix2pos(pos.x()));
- muse->showListEditor(t, track(), ctrl());
+ muse->showListEditor(t, track(), 0, ctrl());
}
else
muse->setTool(n);
diff --git a/muse/muse/event.cpp b/muse/muse/event.cpp
index 2985bb9c..9c485d0a 100644
--- a/muse/muse/event.cpp
+++ b/muse/muse/event.cpp
@@ -75,7 +75,7 @@ Event Event::clone() const
return Event(ev->clone());
}
-Event::Event(EventType t)
+Event::Event(EventType t)
{
if (t == Wave)
ev = new WaveEventBase(t);
@@ -84,36 +84,36 @@ Event::Event(EventType t)
++(ev->refCount);
}
-Event::Event(const Event& e)
+Event::Event(const Event& e)
{
ev = e.ev;
if (ev)
++(ev->refCount);
}
-Event::Event(EventBase* eb)
+Event::Event(EventBase* eb)
{
ev = eb;
++(ev->refCount);
}
-Event::~Event()
+Event::~Event()
{
if (ev && --(ev->refCount) == 0)
delete ev;
}
-bool Event::empty() const
- {
- return ev == 0;
+bool Event::empty() const
+ {
+ return ev == 0;
}
EventType Event::type() const
- {
- return ev ? ev->type() : Note;
+ {
+ return ev ? ev->type() : Note;
}
-void Event::setType(EventType t)
+void Event::setType(EventType t)
{
if (ev && --(ev->refCount) == 0)
delete ev;
@@ -124,7 +124,7 @@ void Event::setType(EventType t)
++(ev->refCount);
}
-Event& Event::operator=(const Event& e)
+Event& Event::operator=(const Event& e)
{
if (ev == e.ev)
return *this;
@@ -195,4 +195,23 @@ Pos Event::end() const { return ev->end(); }
unsigned Event::endTick() const { return ev->end().tick(); }
unsigned Event::endFrame() const { return ev->end().frame(); }
void Event::setPos(const Pos& p) { ev->setPos(p); }
+QString Event::eventTypeName() const { return ev->eventTypeName(); }
+
+
+//---------------------------------------------------------
+// eventTypeName
+//---------------------------------------------------------
+
+QString EventBase::eventTypeName() const
+ {
+ switch(type()) {
+ case Note: return QString("Note");
+ case Controller: return QString("Ctrl");
+ case Sysex: return QString("Sysex");
+ case PAfter: return QString("PAfter");
+ case CAfter: return QString("CAfter");
+ case Meta: return QString("Meta");
+ default: return QString("??");
+ }
+ }
diff --git a/muse/muse/event.h b/muse/muse/event.h
index 522efe5d..d58501a9 100644
--- a/muse/muse/event.h
+++ b/muse/muse/event.h
@@ -48,6 +48,7 @@ class Event {
bool empty() const;
EventType type() const;
+ QString eventTypeName() const;
void setType(EventType t);
Event& operator=(const Event& e);
diff --git a/muse/muse/eventbase.h b/muse/muse/eventbase.h
index 8381952e..763843eb 100644
--- a/muse/muse/eventbase.h
+++ b/muse/muse/eventbase.h
@@ -37,6 +37,7 @@ class EventBase : public AL::PosLen {
public:
EventBase(EventType t);
EventBase(const EventBase& ev);
+ QString eventTypeName() const;
virtual ~EventBase() {}
diff --git a/muse/muse/liste/ctrllistedit.cpp b/muse/muse/liste/ctrllistedit.cpp
index 695fe9a1..ab9e66e3 100644
--- a/muse/muse/liste/ctrllistedit.cpp
+++ b/muse/muse/liste/ctrllistedit.cpp
@@ -50,8 +50,8 @@ CtrlListEditor::CtrlListEditor(ListEdit* e, QWidget* parent)
int zW = fm.width("0");
le.ctrlList->setColumnWidth(TICK_COL, zW * 8);
le.ctrlList->setColumnWidth(TIME_COL, zW * 14);
- MidiTimeDelegate* midiTimeDelegate = new MidiTimeDelegate(this);
- le.ctrlList->setItemDelegate(midiTimeDelegate);
+ CtrlDelegate* ctrlDelegate = new CtrlDelegate(this);
+ le.ctrlList->setItemDelegate(ctrlDelegate);
track = 0;
connect(le.ctrlList, SIGNAL(itemActivated(QTreeWidgetItem*, int)),
@@ -80,10 +80,10 @@ bool EscapeFilter::eventFilter(QObject* obj, QEvent* event)
if (event->type() == QEvent::KeyPress) {
if (((QKeyEvent*)event)->key() == Qt::Key_Escape) {
((CtrlListEditor*)parent())->sendEscape();
- return true;
- }
+ return true;
+ }
}
- return QObject::eventFilter(obj, event);
+ return QObject::eventFilter(obj, event);
}
//---------------------------------------------------------
@@ -96,7 +96,7 @@ void CtrlListEditor::setup(const ListType& lt)
disconnect(track, SIGNAL(controllerChanged(int)), this, SLOT(controllerChanged(int)));
track = lt.track;
connect(track, SIGNAL(controllerChanged(int)), SLOT(controllerChanged(int)));
-
+
c = lt.ctrl;
le.controllerName->setText(c->name());
le.discreteCheckBox->setChecked(c->type() & Ctrl::DISCRETE);
@@ -302,7 +302,7 @@ void CtrlListEditor::insertClicked()
val.i = cur->data(VAL_COL, Qt::DisplayRole).toInt();
else
val.f = cur->data(VAL_COL, Qt::DisplayRole).toDouble();
- }
+ }
song->cmdAddControllerVal(track, c, listEdit->pos(), val);
}
@@ -377,19 +377,19 @@ void CtrlListEditor::defaultValChanged(double v)
}
//---------------------------------------------------------
-// MidiTimeDelegate
+// CtrlDelegate
//---------------------------------------------------------
-MidiTimeDelegate::MidiTimeDelegate(QObject* parent)
+CtrlDelegate::CtrlDelegate(QObject* parent)
: QItemDelegate(parent)
{
}
-
+
//---------------------------------------------------------
// createEditor
//---------------------------------------------------------
-QWidget* MidiTimeDelegate::createEditor(QWidget* pw,
+QWidget* CtrlDelegate::createEditor(QWidget* pw,
const QStyleOptionViewItem& option, const QModelIndex& index) const
{
switch(index.column()) {
@@ -404,14 +404,14 @@ QWidget* MidiTimeDelegate::createEditor(QWidget* pw,
if (c->type() & Ctrl::INT) {
QSpinBox* w = new QSpinBox(pw);
w->setRange(c->minVal().i, c->maxVal().i);
- w->installEventFilter(const_cast<MidiTimeDelegate*>(this));
+ w->installEventFilter(const_cast<CtrlDelegate*>(this));
return w;
}
QDoubleSpinBox* w = new QDoubleSpinBox(pw);
if (c->type() & Ctrl::LOG)
w->setSuffix(tr("dB"));
// w->setRange(c->minVal().f, c->maxVal().f);
- w->installEventFilter(const_cast<MidiTimeDelegate*>(this));
+ w->installEventFilter(const_cast<CtrlDelegate*>(this));
return w;
}
}
@@ -422,7 +422,7 @@ QWidget* MidiTimeDelegate::createEditor(QWidget* pw,
// setEditorData
//---------------------------------------------------------
-void MidiTimeDelegate::setEditorData(QWidget* editor,
+void CtrlDelegate::setEditorData(QWidget* editor,
const QModelIndex& index) const
{
switch(index.column()) {
@@ -460,7 +460,7 @@ printf("type %x\n", c->type());
// setModelData
//---------------------------------------------------------
-void MidiTimeDelegate::setModelData(QWidget* editor, QAbstractItemModel* model,
+void CtrlDelegate::setModelData(QWidget* editor, QAbstractItemModel* model,
const QModelIndex& index) const
{
switch(index.column()) {
@@ -497,7 +497,7 @@ void MidiTimeDelegate::setModelData(QWidget* editor, QAbstractItemModel* model,
// paint
//---------------------------------------------------------
-void MidiTimeDelegate::paint(QPainter* painter,
+void CtrlDelegate::paint(QPainter* painter,
const QStyleOptionViewItem& option, const QModelIndex& index) const
{
QString text;
diff --git a/muse/muse/liste/ctrllistedit.h b/muse/muse/liste/ctrllistedit.h
index 74b0749d..75ed6008 100644
--- a/muse/muse/liste/ctrllistedit.h
+++ b/muse/muse/liste/ctrllistedit.h
@@ -26,10 +26,10 @@
#include "ui_ctrllistedit.h"
//---------------------------------------------------------
-// MidiTimeDelegate
+// CtrlDelegate
//---------------------------------------------------------
-class MidiTimeDelegate : public QItemDelegate {
+class CtrlDelegate : public QItemDelegate {
Q_OBJECT
virtual QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem&,
@@ -37,11 +37,11 @@ class MidiTimeDelegate : public QItemDelegate {
virtual void setEditorData(QWidget* editor, const QModelIndex&) const;
virtual void setModelData(QWidget* editor, QAbstractItemModel*,
const QModelIndex&) const;
- void paint(QPainter*, const QStyleOptionViewItem&,
+ void paint(QPainter*, const QStyleOptionViewItem&,
const QModelIndex&) const;
public:
- MidiTimeDelegate(QObject* parent = 0);
+ CtrlDelegate(QObject* parent = 0);
};
//---------------------------------------------------------
@@ -68,7 +68,6 @@ class CtrlListEditor : public ListWidget {
Ctrl* c;
bool updateListDisabled;
ListEdit* listEdit;
- MidiTimeDelegate* midiTimeDelegate;
void updateList();
@@ -92,6 +91,6 @@ class CtrlListEditor : public ListWidget {
Track* getTrack() const { return track; }
enum { TICK_COL, TIME_COL, VAL_COL };
};
-
+
#endif
diff --git a/muse/muse/liste/listedit.cpp b/muse/muse/liste/listedit.cpp
index 74bd2725..1f6138a8 100644
--- a/muse/muse/liste/listedit.cpp
+++ b/muse/muse/liste/listedit.cpp
@@ -33,7 +33,7 @@
bool ListType::operator==(const ListType& t) const
{
return id == t.id && track == t.track
- && part == t.part && ctrl->id() == t.ctrl->id();
+ && part == t.part && (ctrl ? ctrl->id() == t.ctrl->id() : true);
}
//---------------------------------------------------------
diff --git a/muse/muse/liste/partlistedit.cpp b/muse/muse/liste/partlistedit.cpp
index ca325bf5..2551079f 100644
--- a/muse/muse/liste/partlistedit.cpp
+++ b/muse/muse/liste/partlistedit.cpp
@@ -43,11 +43,22 @@ PartListEditor::PartListEditor(ListEdit* e, QWidget* parent)
int zW = fm.width("0");
le.eventList->setColumnWidth(TICK_COL, zW * 8);
le.eventList->setColumnWidth(TIME_COL, zW * 14);
+ EventDelegate* eventDelegate = new EventDelegate(this);
+ le.eventList->setItemDelegate(eventDelegate);
part = 0;
}
//---------------------------------------------------------
+// getTrack
+//---------------------------------------------------------
+
+Track* PartListEditor::getTrack() const
+ {
+ return part->track();
+ }
+
+//---------------------------------------------------------
// setup
//---------------------------------------------------------
@@ -64,4 +75,158 @@ void PartListEditor::setup(const ListType& lt)
void PartListEditor::updateList()
{
+ EventList* el = part->events();
+ int idx = 0;
+ le.eventList->clear();
+ for (iEvent i = el->begin(); i != el->end(); ++i, ++idx) {
+ Event e = i->second;
+ QTreeWidgetItem* item = new QTreeWidgetItem;
+ item->setData(TICK_COL, Qt::TextAlignmentRole, int(Qt::AlignRight | Qt::AlignVCenter));
+ item->setData(TIME_COL, Qt::TextAlignmentRole, int(Qt::AlignRight | Qt::AlignVCenter));
+ item->setData(TICK_COL, Qt::DisplayRole, e.tick());
+ item->setData(TIME_COL, Qt::DisplayRole, e.tick());
+
+ item->setData(2, Qt::DisplayRole, e.eventTypeName());
+ item->setData(3, Qt::DisplayRole, e.dataA());
+ item->setData(4, Qt::DisplayRole, e.dataB());
+ le.eventList->insertTopLevelItem(idx, item);
+ }
}
+
+//---------------------------------------------------------
+// EventDelegate
+//---------------------------------------------------------
+
+EventDelegate::EventDelegate(QObject* parent)
+ : QItemDelegate(parent)
+ {
+ }
+
+//---------------------------------------------------------
+// createEditor
+//---------------------------------------------------------
+
+QWidget* EventDelegate::createEditor(QWidget* pw,
+ const QStyleOptionViewItem& option, const QModelIndex& index) const
+ {
+ switch(index.column()) {
+ case PartListEditor::TICK_COL:
+ break;
+ case PartListEditor::TIME_COL:
+ return new Awl::PosEdit(pw);
+ case PartListEditor::TYPE_COL:
+ case PartListEditor::A_COL:
+ case PartListEditor::B_COL:
+ break;
+ }
+ return QItemDelegate::createEditor(pw, option, index);
+ }
+
+//---------------------------------------------------------
+// setEditorData
+//---------------------------------------------------------
+
+void EventDelegate::setEditorData(QWidget* editor,
+ const QModelIndex& index) const
+ {
+ switch(index.column()) {
+ case PartListEditor::TICK_COL:
+ break;
+ case PartListEditor::TIME_COL:
+ {
+ Awl::PosEdit* pe = static_cast<Awl::PosEdit*>(editor);
+ pe->setValue(AL::Pos(index.data().toInt()));
+ }
+ return;
+ case PartListEditor::TYPE_COL:
+ case PartListEditor::A_COL:
+ case PartListEditor::B_COL:
+ break;
+ }
+ QItemDelegate::setEditorData(editor, index);
+ }
+
+//---------------------------------------------------------
+// setModelData
+//---------------------------------------------------------
+
+void EventDelegate::setModelData(QWidget* editor, QAbstractItemModel* model,
+ const QModelIndex& index) const
+ {
+ switch(index.column()) {
+ case PartListEditor::TICK_COL:
+ break;
+ case PartListEditor::TIME_COL:
+ {
+ Awl::PosEdit* pe = static_cast<Awl::PosEdit*>(editor);
+ model->setData(index, pe->pos().tick(), Qt::DisplayRole);
+ }
+ return;
+ case PartListEditor::TYPE_COL:
+ case PartListEditor::A_COL:
+ case PartListEditor::B_COL:
+ break;
+ }
+ QItemDelegate::setModelData(editor, model, index);
+ }
+
+//---------------------------------------------------------
+// paint
+//---------------------------------------------------------
+
+void EventDelegate::paint(QPainter* painter,
+ const QStyleOptionViewItem& option, const QModelIndex& index) const
+ {
+ QString text;
+ PartListEditor* ce = static_cast<PartListEditor*>(parent());
+
+ switch(index.column()) {
+ case PartListEditor::TICK_COL:
+ {
+ Track* track = ce->getTrack();
+ AL::Pos pos(index.data().toInt(), track->timeType());
+ text = QString("%1").arg(pos.tick());
+ }
+ break;
+ case PartListEditor::TIME_COL:
+ {
+ Track* track = ce->getTrack();
+ AL::Pos pos(index.data().toInt(), track->timeType());
+ int measure, beat, tick;
+ pos.mbt(&measure, &beat, &tick);
+ text.sprintf("%04d.%02d.%03u", measure+1, beat+1, tick);
+ }
+ break;
+ case PartListEditor::TYPE_COL:
+ case PartListEditor::A_COL:
+ case PartListEditor::B_COL:
+ QItemDelegate::paint(painter, option, index);
+ return;
+ }
+
+ QStyleOptionViewItemV2 opt = setOptions(index, option);
+ const QStyleOptionViewItemV2 *v2 = qstyleoption_cast<const QStyleOptionViewItemV2 *>(&option);
+ opt.features = v2 ? v2->features : QStyleOptionViewItemV2::ViewItemFeatures(QStyleOptionViewItemV2::None);
+
+ painter->save();
+ QVariant value;
+ QRect displayRect;
+ displayRect = option.rect; // textRectangle(painter, d->textLayoutBounds(opt), opt.font, text);
+
+ QRect checkRect;
+ Qt::CheckState checkState = Qt::Unchecked;
+ value = index.data(Qt::CheckStateRole);
+ if (value.isValid()) {
+ checkState = static_cast<Qt::CheckState>(value.toInt());
+ checkRect = check(opt, opt.rect, value);
+ }
+
+ drawBackground(painter, opt, index);
+ drawCheck(painter, opt, checkRect, checkState);
+ drawDisplay(painter, opt, displayRect, text);
+ drawFocus(painter, opt, text.isEmpty() ? QRect() : displayRect);
+ painter->restore();
+ }
+
+
+
diff --git a/muse/muse/liste/partlistedit.h b/muse/muse/liste/partlistedit.h
index fa3d8f5c..0ccbdcf5 100644
--- a/muse/muse/liste/partlistedit.h
+++ b/muse/muse/liste/partlistedit.h
@@ -26,6 +26,25 @@
#include "ui_partlistedit.h"
//---------------------------------------------------------
+// EventDelegate
+//---------------------------------------------------------
+
+class EventDelegate : public QItemDelegate {
+ Q_OBJECT
+
+ virtual QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem&,
+ const QModelIndex& index) const;
+ virtual void setEditorData(QWidget* editor, const QModelIndex&) const;
+ virtual void setModelData(QWidget* editor, QAbstractItemModel*,
+ const QModelIndex&) const;
+ void paint(QPainter*, const QStyleOptionViewItem&,
+ const QModelIndex&) const;
+
+ public:
+ EventDelegate(QObject* parent = 0);
+ };
+
+//---------------------------------------------------------
// PartListEditor
//---------------------------------------------------------
@@ -43,7 +62,8 @@ class PartListEditor : public ListWidget {
public:
PartListEditor(ListEdit*, QWidget* parent = 0);
virtual void setup(const ListType&);
- enum { TICK_COL, TIME_COL };
+ Track* getTrack() const;
+ enum { TICK_COL, TIME_COL, TYPE_COL, A_COL, B_COL};
};
#endif
diff --git a/muse/muse/liste/partlistedit.ui b/muse/muse/liste/partlistedit.ui
index a31f6c9a..022cc305 100644
--- a/muse/muse/liste/partlistedit.ui
+++ b/muse/muse/liste/partlistedit.ui
@@ -92,7 +92,17 @@ p, li { white-space: pre-wrap; }
</column>
<column>
<property name="text" >
- <string>Value</string>
+ <string>Type</string>
+ </property>
+ </column>
+ <column>
+ <property name="text" >
+ <string>Val A</string>
+ </property>
+ </column>
+ <column>
+ <property name="text" >
+ <string>Val B</string>
</property>
</column>
</widget>
diff --git a/muse/muse/midiedit/ecanvas.cpp b/muse/muse/midiedit/ecanvas.cpp
index 965bbaa7..b79e7271 100644
--- a/muse/muse/midiedit/ecanvas.cpp
+++ b/muse/muse/midiedit/ecanvas.cpp
@@ -340,6 +340,8 @@ void EventCanvas::mousePressCanvasA(QMouseEvent* me)
bool shift = keyState & Qt::ShiftModifier;
bool ctrl = keyState & Qt::ControlModifier;
start = p;
+ startPitch = y2pitch(start.y());
+ deltaPitch = 0;
//---------------------------------------------------
// set curItem to item mouse is pointing
@@ -808,7 +810,7 @@ void EventCanvas::deleteItem(const QPoint& p)
void EventCanvas::moveItems(const QPoint& pos, int dir)
{
- int dpitch = y2pitch(pos.y()) - y2pitch(start.y());
+ int dpitch = y2pitch(pos.y()) - startPitch;
Pos sp(pix2pos(start.x()));
Pos cp(pix2pos(pos.x()));
@@ -838,14 +840,16 @@ void EventCanvas::moveItems(const QPoint& pos, int dir)
if (p < *curPart)
p = *curPart;
- if (item->moving != p || dpitch !=0) {
+ if (item->moving != p || dpitch != deltaPitch) {
item->moving = p;
+// printf("move %d-%d\n", item->event.pitch(),item->event.pitch()+dpitch);
if (dir != 1)
- item->my = pitch2y(item->event.pitch() + dpitch)
- + (int)(wpos.y() / _ymag);
+ item->my = pitch2y(item->event.pitch() + dpitch)
+ + (int)(wpos.y() / _ymag);
itemMoved(item);
}
}
+ deltaPitch = dpitch;
widget()->update();
}
@@ -1158,8 +1162,7 @@ void EventCanvas::mousePress(QMouseEvent* me)
noteOff(keyDown);
keyDown = -1;
}
- int y = pos.y() - rCanvasA.y();
- keyDown = y2pitch(y);
+ keyDown = y2pitch(pos.y() - rCanvasA.y());
int velocity = me->x()*127/40;
if (keyDown != -1)
noteOn(keyDown, velocity, shift);
@@ -1203,11 +1206,12 @@ void EventCanvas::mouseMove(QPoint pos)
if (button != Qt::NoButton) {
if (keyDown != -1 && curPitch != -1) {
bool shift = keyState & Qt::ShiftModifier;
- if (curPitch != keyDown)
+ if (curPitch != keyDown) {
noteOff(keyDown);
- keyDown = curPitch;
- int velocity = std::min(pos.x()*127/40, 127);
- noteOn(keyDown, velocity, shift);
+ keyDown = curPitch;
+ int velocity = std::min(pos.x()*127/40, 127);
+ noteOn(keyDown, velocity, shift);
+ }
}
}
}
diff --git a/muse/muse/midiedit/ecanvas.h b/muse/muse/midiedit/ecanvas.h
index aac0483d..f128e5fa 100644
--- a/muse/muse/midiedit/ecanvas.h
+++ b/muse/muse/midiedit/ecanvas.h
@@ -42,7 +42,9 @@ class CtrlEdit;
class EventCanvas : public TimeCanvas {
Q_OBJECT
- int keyDown;
+ int startPitch; // on start dragging events
+ int deltaPitch;
+ int keyDown; // pressed key on piano keypad (or drum instrument list)
int playedPitch;
void noteOn(int pitch, int velocity, bool shift);
diff --git a/muse/muse/midiedit/prcanvas.cpp b/muse/muse/midiedit/prcanvas.cpp
index 17f79bab..0207a070 100644
--- a/muse/muse/midiedit/prcanvas.cpp
+++ b/muse/muse/midiedit/prcanvas.cpp
@@ -203,7 +203,7 @@ void PianoCanvas::moveItem(CItem* item, DragType dtype)
{
Part* part = item->part;
Event event = item->event;
- int npitch = y2pitch((int)((item->my - (int)(wpos.y()/_ymag)
+ int npitch = y2pitch((int)((item->my - (int)(wpos.y()/_ymag)
+ item->bbox.height())*_ymag));
if ((curItem==item) //remove this if want to have all selection playing
&& event.pitch() != npitch && editor->playEvents()) {
@@ -627,20 +627,20 @@ void PianoCanvas::itemReleased()
void PianoCanvas::itemMoved(const CItem* item)
{
- int npitch = y2pitch((int)((item->my - (int)(wpos.y()/_ymag)
+ int npitch = y2pitch((int)((item->my - (int)(wpos.y()/_ymag)
+ item->bbox.height())*_ymag));
npitch += track()->transposition();
if ((curItem==item) //remove this if want to have all selection playing
- && (playedPitch != -1) && (playedPitch != npitch)
- && editor->playEvents()) {
+ && (playedPitch != -1) && (playedPitch != npitch)
+ && editor->playEvents()) {
Event event = item->event;
- // release note:
- MidiEvent ev1(0, 0, 0x90, playedPitch, 0);
- track()->playMidiEvent(&ev1);
- // play note:
- MidiEvent e2(0, 0, 0x90, npitch, event.velo());
- track()->playMidiEvent(&e2);
- playedPitch = npitch;
+ // release note:
+ MidiEvent ev1(0, 0, 0x90, playedPitch, 0);
+ track()->playMidiEvent(&ev1);
+ // play note:
+ MidiEvent e2(0, 0, 0x90, npitch, event.velo());
+ track()->playMidiEvent(&e2);
+ playedPitch = npitch;
}
}
diff --git a/muse/muse/midieventbase.cpp b/muse/muse/midieventbase.cpp
index f37649d8..a84e31b9 100644
--- a/muse/muse/midieventbase.cpp
+++ b/muse/muse/midieventbase.cpp
@@ -62,24 +62,18 @@ bool MidiEventBase::isNoteOff(const Event& e) const
return (e.isNoteOff() && (e.pitch() == a));
}
+//---------------------------------------------------------
+// dump
+//---------------------------------------------------------
+
void MidiEventBase::dump(int n) const
{
EventBase::dump(n);
- char* p;
-
- switch(type()) {
- case Note: p = "Note "; break;
- case Controller: p = "Ctrl "; break;
- case Sysex: p = "Sysex "; break;
- case PAfter: p = "PAfter "; break;
- case CAfter: p = "CAfter "; break;
- case Meta: p = "Meta "; break;
- default: p = "?? "; break;
- }
- for (int i = 0; i < (n+2); ++i)
- putchar(' ');
- printf("<%s> a:0x%x(%d) b:0x%x(%d) c:0x%x(%d)\n",
- p, a, a, b, b, c, c);
+ QString p = eventTypeName();
+ QString s;
+ s.sprintf("%s<%s> a:0x%x(%d) b:0x%x(%d)\n",
+ QString(n+2, ' ').toLocal8Bit().data(), p.toLocal8Bit().data(), a, a, b, b);
+ printf("%s\n", s.toLocal8Bit().data());
}
//---------------------------------------------------------
@@ -110,7 +104,7 @@ void MidiEventBase::write(Xml& xml, const Pos& offset) const
if (b)
s += QString(" b=\"%1\"").arg(b);
if (c)
- s += QString(" c=\"%1\"").arg(c);
+ s += QString(" b=\"%1\"").arg(c);
xml.tagE(s);
}
}
diff --git a/muse/muse/midieventbase.h b/muse/muse/midieventbase.h
index bace6bec..ba812ffa 100644
--- a/muse/muse/midieventbase.h
+++ b/muse/muse/midieventbase.h
@@ -28,7 +28,8 @@
//---------------------------------------------------------
class MidiEventBase : public EventBase {
- int a, b, c; // pitch, velo-on, velo-off
+ int a, b; // pitch, velo-on
+ int c;
EvData edata;
virtual EventBase* clone() const { return new MidiEventBase(*this); }
diff --git a/muse/muse/muse.cpp b/muse/muse/muse.cpp
index 5a17ac40..aa575e86 100644
--- a/muse/muse/muse.cpp
+++ b/muse/muse/muse.cpp
@@ -494,15 +494,15 @@ MusE::MusE()
a = getAction("toggle_metro", this);
connect(a, SIGNAL(triggered()), song, SLOT(toggleClick()));
addAction(a);
-
+
a = getAction("goto_left", this);
connect(a, SIGNAL(triggered()), song, SLOT(gotoLeftMarker()));
addAction(a);
-
+
a = getAction("goto_right", this);
connect(a, SIGNAL(triggered()), song, SLOT(gotoRightMarker()));
addAction(a);
-
+
rewindAction = getAction("rewind", this);
rewindAction->setAutoRepeat(true);
@@ -1119,10 +1119,10 @@ void MusE::loadProject1(const QString& path)
mixer1->clear();
if (mixer2)
mixer2->clear();
-
+
QString name(file.fileName());
QDir pd(QDir::homePath() + "/" + config.projectPath + "/" + path);
-
+
addProject(path); // add to history
bool newProject = false;
@@ -1325,7 +1325,7 @@ bool MusE::saveAs()
QString path = projectDialog.projectPath();
if (path.isEmpty())
return false;
-
+
QDir pd(QDir::homePath() + "/" + config.projectPath + "/" + path);
QString header = tr("MusE: new project");
if (!pd.exists()) {
@@ -1568,18 +1568,22 @@ void MusE::startListEditor()
startListEditor(0);
}
-void MusE::startListEditor(PartList* /*pl*/)
+void MusE::startListEditor(PartList* pl)
{
- if (listEditor == 0)
- listEditor = new ListEdit(this);
- listEditor->show();
+ Part* part = 0;
+ if (pl && !pl->empty()) {
+ part = pl->begin()->second;
+ showListEditor(Pos(), part->track(), part, 0);
+ }
+ else
+ showListEditor(Pos(), 0, 0, 0);
}
-void MusE::showListEditor(const Pos& pos, Track* track, Ctrl* ctrl)
+void MusE::showListEditor(const Pos& pos, Track* track, Part* part, Ctrl* ctrl)
{
if (listEditor == 0)
listEditor = new ListEdit(this);
- listEditor->selectItem(pos, track, 0, ctrl);
+ listEditor->selectItem(pos, track, part, ctrl);
listEditor->show();
}
@@ -1915,7 +1919,7 @@ void MusE::cmd(QAction* a)
else
printf("MusE: %s not supported\n", e.tagName().toLatin1().data());
}
-
+
unsigned cpos = song->cpos();
song->startUndo();
for (iPart ip = pl.begin(); ip != pl.end(); ++ip) {
@@ -2005,7 +2009,7 @@ void MusE::clipboardChanged()
const QMimeData* ms = QApplication::clipboard()->mimeData();
if (ms == 0)
return;
- bool flag = ms->hasFormat("application/muse/part/midi")
+ bool flag = ms->hasFormat("application/muse/part/midi")
|| ms->hasFormat("application/muse/part/audio");
pasteAction->setEnabled(flag);
}
@@ -2979,7 +2983,7 @@ int main(int argc, char* argv[])
s = "The MusE project directory\n%1\ndoes not exists";
s = s.arg(pd.path());
- int rv = QMessageBox::question(0,
+ int rv = QMessageBox::question(0,
title,
s,
"Create",
@@ -2991,7 +2995,7 @@ int main(int argc, char* argv[])
if (!pd.mkpath(pd.path())) {
// TODO: tell user why this has happened
QMessageBox::critical(0,
- title,
+ title,
"Creating project directory failed");
exit(-1);
}
@@ -3008,7 +3012,7 @@ int main(int argc, char* argv[])
s = "The MusE template directory\n%1\ndoes not exists";
s = s.arg(pd.path());
- int rv = QMessageBox::question(0,
+ int rv = QMessageBox::question(0,
title,
s,
"Create",
@@ -3036,7 +3040,7 @@ int main(int argc, char* argv[])
s = "The MusE instruments directory\n%1\ndoes not exists";
s = s.arg(pd.path());
- int rv = QMessageBox::question(0,
+ int rv = QMessageBox::question(0,
title,
s,
"Create",
@@ -3087,7 +3091,7 @@ int main(int argc, char* argv[])
break;
}
// the user did not select/create a project
- rv = QMessageBox::question(0,
+ rv = QMessageBox::question(0,
"MusE: create/select project",
"before MusE starts, you must select a project\n"
"or create a new one",
@@ -3113,4 +3117,4 @@ int main(int argc, char* argv[])
fprintf(stderr, "app end %d\n", n);
return n;
}
-
+
diff --git a/muse/muse/muse.h b/muse/muse/muse.h
index 5c1b5d93..3cdb14c8 100644
--- a/muse/muse/muse.h
+++ b/muse/muse/muse.h
@@ -292,7 +292,7 @@ class MusE : public QMainWindow // , public Ui::MuseBase
QAction* stopAction;
QAction* playAction;
- void showListEditor(const Pos&, Track*, Ctrl*);
+ void showListEditor(const Pos&, Track*, Part*, Ctrl*);
};
//---------------------------------------------------------
diff --git a/muse/muse/muse.qrc b/muse/muse/muse.qrc
index 543fa3dc..e71a2afd 100644
--- a/muse/muse/muse.qrc
+++ b/muse/muse/muse.qrc
@@ -56,6 +56,7 @@
<file>xpm/editpaste.xpm</file>
<file>xpm/edit_drumms.xpm</file>
<file>xpm/edit_mastertrack.xpm</file>
+ <file>xpm/edit_list.xpm</file>
<file>xpm/wave.xpm</file>
</qresource>
diff --git a/muse/muse/shortcuts.cpp b/muse/muse/shortcuts.cpp
index 7bdd0046..40806dc0 100644
--- a/muse/muse/shortcuts.cpp
+++ b/muse/muse/shortcuts.cpp
@@ -29,7 +29,7 @@
//---------------------------------------------------------
// shortcut_category
-// These need to be members of ShortcutConfig, otherwise
+// These need to be members of ShortcutConfig, otherwise
// tr() won't play:
//---------------------------------------------------------
@@ -60,7 +60,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"toggle_loop",
QT_TR_NOOP("Transport: Toggle Loop section"),
- GLOBAL_SHRT,
+ GLOBAL_SHRT,
0, // QKeySequence(Qt::Key_Slash),
Qt::WindowShortcut,
QT_TR_NOOP("Loop"),
@@ -80,14 +80,14 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"play_toggle",
QT_TR_NOOP("Transport: Play, Stop, Rewind"),
- GLOBAL_SHRT,
+ GLOBAL_SHRT,
Qt::Key_Space,
Qt::ApplicationShortcut
),
Shortcut(
"stop",
QT_TR_NOOP("Transport: Stop Playback"),
- GLOBAL_SHRT,
+ GLOBAL_SHRT,
Qt::Key_Insert,
Qt::WindowShortcut,
QT_TR_NOOP("Stop"),
@@ -97,13 +97,13 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"goto_left",
QT_TR_NOOP("Transport: Goto left marker"),
- GLOBAL_SHRT,
- Qt::Key_End
+ GLOBAL_SHRT,
+ Qt::Key_End
),
Shortcut(
"goto_right",
QT_TR_NOOP("Transport: Goto right marker"),
- GLOBAL_SHRT,
+ GLOBAL_SHRT,
Qt::Key_PageDown
),
Shortcut(
@@ -115,7 +115,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"toggle_rec",
QT_TR_NOOP("Transport: Toggle Record"),
- GLOBAL_SHRT,
+ GLOBAL_SHRT,
Qt::Key_Asterisk,
Qt::WindowShortcut,
QT_TR_NOOP("Record"),
@@ -126,7 +126,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"punchin",
QT_TR_NOOP("Transport: Punch In"),
- GLOBAL_SHRT,
+ GLOBAL_SHRT,
0,
Qt::WindowShortcut,
QT_TR_NOOP("Punchin"),
@@ -136,7 +136,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"punchout",
QT_TR_NOOP("Transport: Punch Out"),
- GLOBAL_SHRT,
+ GLOBAL_SHRT,
0,
Qt::WindowShortcut,
QT_TR_NOOP("Punchout"),
@@ -146,7 +146,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"rewind",
QT_TR_NOOP("Transport: Rewind"),
- GLOBAL_SHRT,
+ GLOBAL_SHRT,
0,
Qt::WindowShortcut,
QT_TR_NOOP("rewind"),
@@ -156,7 +156,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"forward",
QT_TR_NOOP("Transport: Forward"),
- GLOBAL_SHRT,
+ GLOBAL_SHRT,
0,
Qt::WindowShortcut,
QT_TR_NOOP("forward"),
@@ -166,7 +166,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"panic",
QT_TR_NOOP("Panic"),
- GLOBAL_SHRT,
+ GLOBAL_SHRT,
0,
Qt::WindowShortcut,
QT_TR_NOOP("Panic"),
@@ -176,7 +176,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"undo",
QT_TR_NOOP("Edit: Undo"),
- INVIS_SHRT,
+ INVIS_SHRT,
Qt::CTRL + Qt::Key_Z,
Qt::WindowShortcut,
QT_TR_NOOP("undo"),
@@ -186,7 +186,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"redo",
QT_TR_NOOP("Edit: Redo"),
- INVIS_SHRT,
+ INVIS_SHRT,
Qt::CTRL + Qt::Key_Y,
Qt::WindowShortcut,
QT_TR_NOOP("redo"),
@@ -196,7 +196,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"cut",
QT_TR_NOOP("Edit: Cut" ),
- INVIS_SHRT,
+ INVIS_SHRT,
Qt::CTRL + Qt::Key_X,
Qt::WindowShortcut,
QT_TR_NOOP("Cut"),
@@ -206,7 +206,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"copy",
QT_TR_NOOP("Edit: Copy"),
- INVIS_SHRT,
+ INVIS_SHRT,
Qt::CTRL + Qt::Key_C,
Qt::WindowShortcut,
QT_TR_NOOP("Copy"),
@@ -216,7 +216,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"paste",
QT_TR_NOOP("Edit: Paste,"),
- INVIS_SHRT,
+ INVIS_SHRT,
Qt::CTRL + Qt::Key_V,
Qt::WindowShortcut,
QT_TR_NOOP("Paste"),
@@ -226,7 +226,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"delete",
QT_TR_NOOP("Edit: Delete" ),
- INVIS_SHRT,
+ INVIS_SHRT,
Qt::Key_Delete,
Qt::WindowShortcut,
QT_TR_NOOP("Delete"),
@@ -236,7 +236,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"open_project",
QT_TR_NOOP("Open"),
- ARRANG_SHRT + DEDIT_SHRT,
+ ARRANG_SHRT + DEDIT_SHRT,
Qt::CTRL + Qt::Key_O,
Qt::WindowShortcut,
QT_TR_NOOP("open project"),
@@ -247,7 +247,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"save_project",
QT_TR_NOOP("Save"),
- ARRANG_SHRT + DEDIT_SHRT,
+ ARRANG_SHRT + DEDIT_SHRT,
Qt::CTRL + Qt::Key_S,
Qt::WindowShortcut,
QT_TR_NOOP("save project"),
@@ -258,7 +258,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"save_project_as",
QT_TR_NOOP("File: Save as"),
- ARRANG_SHRT + DEDIT_SHRT,
+ ARRANG_SHRT + DEDIT_SHRT,
0,
Qt::WindowShortcut,
QT_TR_NOOP("save project as..."),
@@ -268,7 +268,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"save_as_template",
QT_TR_NOOP("File: Save as Template"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
0,
Qt::WindowShortcut,
QT_TR_NOOP("save project as template"),
@@ -279,7 +279,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"open_recent",
QT_TR_NOOP("File: Open recent file"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
Qt::CTRL + Qt::Key_1
),
Shortcut(
@@ -291,19 +291,19 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"export_midi",
QT_TR_NOOP("File: Export midi file"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
0
),
Shortcut(
"import_audio",
QT_TR_NOOP("File: Import audio file"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
0
),
Shortcut(
"quit",
QT_TR_NOOP("File: Quit MusE"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
Qt::CTRL + Qt::Key_Q,
Qt::WindowShortcut,
QT_TR_NOOP("Quit MusE"),
@@ -314,7 +314,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"select_parts_on_track",
QT_TR_NOOP("Edit: Select parts on track"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
Qt::CTRL+ Qt::ALT + Qt::Key_P,
Qt::WindowShortcut,
QT_TR_NOOP("All &Parts on Track"),
@@ -324,7 +324,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"open_pianoroll",
QT_TR_NOOP("Open Pianoroll"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
Qt::CTRL + Qt::Key_E,
Qt::WindowShortcut,
QT_TR_NOOP("Pianoroll"),
@@ -334,7 +334,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"open_miditracker",
QT_TR_NOOP("Open MidiTracker"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
Qt::CTRL + Qt::Key_K,
Qt::WindowShortcut,
QT_TR_NOOP("MidiTracker"),
@@ -344,7 +344,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"open_drumedit",
QT_TR_NOOP("Open drumeditor"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
Qt::CTRL + Qt::Key_D,
Qt::WindowShortcut,
QT_TR_NOOP("Drum Editor"),
@@ -354,7 +354,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"open_waveedit",
QT_TR_NOOP("Open wave editor"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
0,
Qt::WindowShortcut,
QT_TR_NOOP("Wave Editor"),
@@ -362,15 +362,19 @@ Shortcut MuseApplication::sc[] = {
":/xpm/wave.xpm"
),
Shortcut(
- "open_listedit",
+ "listedit",
QT_TR_NOOP("Open listeditor"),
- ARRANG_SHRT,
- Qt::CTRL + Qt::Key_L
+ ARRANG_SHRT,
+ Qt::CTRL + Qt::Key_L,
+ Qt::WindowShortcut,
+ QT_TR_NOOP("Properties"),
+ QT_TR_NOOP("open Properties Editor"),
+ ":/xmp/edit_list.xpm"
),
Shortcut(
"open_master",
QT_TR_NOOP("Open mastertrack editor"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
Qt::CTRL + Qt::Key_M,
Qt::WindowShortcut,
QT_TR_NOOP("Mastertrack (Tempo) Editor"),
@@ -380,73 +384,73 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"add_midi_track",
QT_TR_NOOP("Add midi track"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
Qt::CTRL + Qt::Key_J
),
Shortcut(
"add_drum_track",
QT_TR_NOOP("Add drum track"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
0
),
Shortcut(
"add_wave_track",
QT_TR_NOOP("Add wave track"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
0
),
Shortcut(
"add_audio_output",
QT_TR_NOOP("Add audio output"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
0
),
Shortcut(
"add_audio_group",
QT_TR_NOOP("Add audio group"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
0
),
Shortcut(
"add_audio_input",
QT_TR_NOOP("Add audio input"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
0
),
Shortcut(
"global_cut",
QT_TR_NOOP("Structure: Global cut"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
0
),
Shortcut(
"global_insert",
QT_TR_NOOP("Structure: Global insert"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
0
),
Shortcut(
"global_split",
QT_TR_NOOP("Structure: Global split"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
0
),
Shortcut(
"copy_range",
QT_TR_NOOP("Structure: Copy range"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
0
),
Shortcut(
"cut_events",
QT_TR_NOOP("Structure: Cut events"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
0
),
Shortcut(
"toggle_mixer1",
QT_TR_NOOP("View: Open mixer 1 window"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
Qt::Key_F10,
Qt::ApplicationShortcut,
QT_TR_NOOP("Mixer1"),
@@ -456,7 +460,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"toggle_mixer2",
QT_TR_NOOP("View: Open mixer 2 window"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
0,
Qt::ApplicationShortcut,
QT_TR_NOOP("Mixer2"),
@@ -466,7 +470,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"toggle_transport",
QT_TR_NOOP("View: Toggle transport window"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
Qt::Key_F11,
Qt::ApplicationShortcut,
QT_TR_NOOP("Transport"),
@@ -476,7 +480,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"toggle_bigtime",
QT_TR_NOOP("View: Toggle bigtime window"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
Qt::Key_F12,
Qt::ApplicationShortcut,
QT_TR_NOOP("BigTime"),
@@ -496,151 +500,151 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"follow_jump",
QT_TR_NOOP("Settings: Follow song by page"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
0
),
Shortcut(
"follow_no",
QT_TR_NOOP("Settings: Follow song off"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
0
),
Shortcut(
"follow_continuous",
QT_TR_NOOP("Settings: Follow song continuous"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
0
),
Shortcut(
"configure_shortcuts",
QT_TR_NOOP("Settings: Configure shortcuts"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
0
),
Shortcut(
"configure_metronome",
QT_TR_NOOP("Settings: Configure metronome"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
0
),
Shortcut(
"configure_midi_sync",
QT_TR_NOOP("Settings: Midi sync configuration"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
0
),
Shortcut(
"configure_midi_file",
QT_TR_NOOP("Settings: Midi file export configuration"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
0
),
Shortcut(
"configure_midi_ports",
QT_TR_NOOP("Settings: Midi ports / Soft Synth"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
0
),
Shortcut(
"configure_audio_ports",
QT_TR_NOOP("Settings: Audio subsystem configuration"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
0
),
Shortcut(
"midi_edit_instruments",
QT_TR_NOOP("Midi: Edit midi instruments"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
0
),
Shortcut(
"midi_remote_control",
QT_TR_NOOP("Midi: Midi remote control"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
0
),
Shortcut(
"midi_reset",
QT_TR_NOOP("Midi: Reset midi"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
0
),
Shortcut(
"midi_init",
QT_TR_NOOP("Midi: Init midi"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
0
),
Shortcut(
"midi_local_off",
QT_TR_NOOP("Midi: Midi local off"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
0
),
Shortcut(
"audio_bounce_to_track",
QT_TR_NOOP("Audio: Bounce audio to track"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
0
),
Shortcut(
"audio_bounce_to_file",
QT_TR_NOOP("Audio: Bounce audio to file"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
0
),
Shortcut(
"audio_restart",
QT_TR_NOOP("Audio: Restart audio"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
0
),
Shortcut(
"open_help",
QT_TR_NOOP("Help: Open Manual"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
Qt::Key_F1
),
Shortcut(
"toggle_whatsthis",
QT_TR_NOOP("Help: Toggle whatsthis mode"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
Qt::SHIFT + Qt::Key_F1
),
Shortcut(
"edit_selected_part",
QT_TR_NOOP("Edit: Edit selected part"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
Qt::Key_Return
),
Shortcut(
"sel_part_above",
QT_TR_NOOP("Edit: Select nearest part on track above"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
Qt::Key_Up
),
Shortcut(
"sel_part_above_add",
QT_TR_NOOP("Edit: Add nearest part on track above"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
Qt::SHIFT + Qt::Key_Up
),
Shortcut(
"sel_part_below",
QT_TR_NOOP("Edit: Select nearest part on track below"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
Qt::Key_Down
),
Shortcut(
"sel_part_below_add",
QT_TR_NOOP("Edit: Add nearest part on track below"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
Qt::SHIFT + Qt::Key_Down
),
Shortcut(
"midi_transpose",
QT_TR_NOOP("Midi: Transpose"),
- ARRANG_SHRT + PROLL_SHRT,
+ ARRANG_SHRT + PROLL_SHRT,
0,
Qt::WindowShortcut,
QT_TR_NOOP("Transpose")
@@ -648,7 +652,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"sel_all",
QT_TR_NOOP("Edit: Select all"),
- ARRANG_SHRT + PROLL_SHRT + DEDIT_SHRT,
+ ARRANG_SHRT + PROLL_SHRT + DEDIT_SHRT,
Qt::CTRL + Qt::Key_A,
Qt::WindowShortcut,
QT_TR_NOOP("Select All"),
@@ -658,7 +662,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"sel_none",
QT_TR_NOOP("Edit: Select none"),
- ARRANG_SHRT + PROLL_SHRT + DEDIT_SHRT,
+ ARRANG_SHRT + PROLL_SHRT + DEDIT_SHRT,
Qt::CTRL + Qt::SHIFT + Qt::Key_A,
Qt::WindowShortcut,
QT_TR_NOOP("Deselect All"),
@@ -668,7 +672,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"sel_inv",
QT_TR_NOOP("Edit: Invert selection"),
- ARRANG_SHRT + PROLL_SHRT + DEDIT_SHRT,
+ ARRANG_SHRT + PROLL_SHRT + DEDIT_SHRT,
Qt::CTRL + Qt::Key_I,
Qt::WindowShortcut,
QT_TR_NOOP("Invert Selection"),
@@ -678,7 +682,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"sel_ins_loc",
QT_TR_NOOP("Edit: Select events/parts inside locators"),
- ARRANG_SHRT + PROLL_SHRT + DEDIT_SHRT,
+ ARRANG_SHRT + PROLL_SHRT + DEDIT_SHRT,
0,
Qt::WindowShortcut,
QT_TR_NOOP("Select Inside Loop"),
@@ -688,7 +692,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"sel_out_loc",
QT_TR_NOOP("Edit: Select events/parts outside locators"),
- ARRANG_SHRT + PROLL_SHRT + DEDIT_SHRT,
+ ARRANG_SHRT + PROLL_SHRT + DEDIT_SHRT,
0,
Qt::WindowShortcut,
QT_TR_NOOP("Select Outside Loop"),
@@ -698,13 +702,13 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"sel_left",
QT_TR_NOOP("Edit: Select nearest part/event to the left"),
- ARRANG_SHRT + PROLL_SHRT + DEDIT_SHRT,
+ ARRANG_SHRT + PROLL_SHRT + DEDIT_SHRT,
Qt::Key_Left
),
Shortcut(
"sel_left_add",
QT_TR_NOOP("Edit: Add nearest part/event to the left to selection"),
- PROLL_SHRT + DEDIT_SHRT,
+ PROLL_SHRT + DEDIT_SHRT,
Qt::Key_Left + Qt::SHIFT
),
Shortcut(
@@ -722,25 +726,25 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"loc_to_sel",
QT_TR_NOOP("Edit: Set locators to selection"),
- ARRANG_SHRT + PROLL_SHRT + DEDIT_SHRT,
+ ARRANG_SHRT + PROLL_SHRT + DEDIT_SHRT,
Qt::ALT + Qt::Key_P
),
Shortcut(
"sel_inc_pitch",
QT_TR_NOOP("Edit: Increase pitch"),
- PROLL_SHRT + DEDIT_SHRT,
+ PROLL_SHRT + DEDIT_SHRT,
Qt::CTRL + Qt::Key_Up
),
Shortcut(
"sel_dec_pitch",
QT_TR_NOOP("Edit: Decrease pitch"),
- PROLL_SHRT + DEDIT_SHRT,
+ PROLL_SHRT + DEDIT_SHRT,
Qt::CTRL + Qt::Key_Down
),
Shortcut(
"midi_fixed_len",
QT_TR_NOOP("Edit: Set fixed length on midi events"),
- DEDIT_SHRT,
+ DEDIT_SHRT,
Qt::ALT + Qt::Key_L,
Qt::WindowShortcut,
QT_TR_NOOP("Set fixed length")
@@ -748,7 +752,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"midi_over_quant",
QT_TR_NOOP("Quantize: Over Quantize"),
- PROLL_SHRT,
+ PROLL_SHRT,
0,
Qt::WindowShortcut,
QT_TR_NOOP("Over Quantize")
@@ -756,7 +760,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"midi_quant_noteon",
QT_TR_NOOP("Quantize: Note On Quantize"),
- PROLL_SHRT,
+ PROLL_SHRT,
0,
Qt::WindowShortcut,
QT_TR_NOOP("Note On Quantize")
@@ -780,13 +784,13 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"config_quant",
QT_TR_NOOP("Quantize: Configure quant"),
- PROLL_SHRT,
+ PROLL_SHRT,
Qt::CTRL + Qt::ALT + Qt::Key_Q
),
Shortcut(
"midi_mod_gate_time",
QT_TR_NOOP("Quantize: Modify Gate Time"),
- PROLL_SHRT,
+ PROLL_SHRT,
0,
Qt::WindowShortcut,
QT_TR_NOOP("Modify Gate Time")
@@ -794,7 +798,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"midi_mod_velo",
QT_TR_NOOP("Quantize: Modify Velocity"),
- PROLL_SHRT,
+ PROLL_SHRT,
0,
Qt::WindowShortcut,
QT_TR_NOOP("Modify Velocity")
@@ -802,7 +806,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"midi_crescendo",
QT_TR_NOOP("Edit: Crescendo"),
- PROLL_SHRT,
+ PROLL_SHRT,
0,
Qt::WindowShortcut,
QT_TR_NOOP("Crescendo")
@@ -810,7 +814,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"midi_thin_out",
QT_TR_NOOP("Edit: Thin Out"),
- PROLL_SHRT,
+ PROLL_SHRT,
0,
Qt::WindowShortcut,
QT_TR_NOOP("Thin Out")
@@ -818,7 +822,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"midi_erase_event",
QT_TR_NOOP("Edit: Erase Event"),
- PROLL_SHRT,
+ PROLL_SHRT,
0,
Qt::WindowShortcut,
QT_TR_NOOP("Erase Event")
@@ -826,7 +830,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"midi_note_shift",
QT_TR_NOOP("Edit: Note Shift"),
- PROLL_SHRT,
+ PROLL_SHRT,
0,
Qt::WindowShortcut,
QT_TR_NOOP("Note Shift")
@@ -834,7 +838,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"midi_move_clock",
QT_TR_NOOP("Edit: Move Clock"),
- PROLL_SHRT,
+ PROLL_SHRT,
0,
Qt::WindowShortcut,
QT_TR_NOOP("Move Clock")
@@ -842,7 +846,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"midi_copy_measure",
QT_TR_NOOP("Edit: Copy Measure"),
- PROLL_SHRT,
+ PROLL_SHRT,
0,
Qt::WindowShortcut,
QT_TR_NOOP("Copy Measure")
@@ -858,7 +862,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"midi_delete_measure",
QT_TR_NOOP("Edit: Delete Measure"),
- PROLL_SHRT,
+ PROLL_SHRT,
0,
Qt::WindowShortcut,
QT_TR_NOOP("Delete Measure")
@@ -866,7 +870,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"midi_create_measure",
QT_TR_NOOP("Edit: Create Measure"),
- PROLL_SHRT,
+ PROLL_SHRT,
0,
Qt::WindowShortcut,
QT_TR_NOOP("Create Measure")
@@ -874,13 +878,13 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"change_event_color",
QT_TR_NOOP("Edit: Change event color"),
- PROLL_SHRT,
+ PROLL_SHRT,
Qt::Key_E
),
Shortcut(
"pointer",
QT_TR_NOOP("Tool: Pointer"),
- ARRANG_SHRT + PROLL_SHRT + DEDIT_SHRT,
+ ARRANG_SHRT + PROLL_SHRT + DEDIT_SHRT,
Qt::Key_A,
Qt::WindowShortcut,
QT_TR_NOOP("Pointer"),
@@ -894,7 +898,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"pencil",
QT_TR_NOOP("Tool: Pencil"),
- ARRANG_SHRT + PROLL_SHRT + DEDIT_SHRT,
+ ARRANG_SHRT + PROLL_SHRT + DEDIT_SHRT,
Qt::Key_D,
Qt::WindowShortcut,
QT_TR_NOOP("Pencil"),
@@ -907,7 +911,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"eraser",
QT_TR_NOOP("Tool: Eraser"),
- ARRANG_SHRT + PROLL_SHRT + DEDIT_SHRT,
+ ARRANG_SHRT + PROLL_SHRT + DEDIT_SHRT,
Qt::Key_R,
Qt::WindowShortcut,
QT_TR_NOOP("Eraser"),
@@ -918,7 +922,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"scissor",
QT_TR_NOOP("Tool: Scissor"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
Qt::Key_S,
Qt::WindowShortcut,
QT_TR_NOOP("Scissor"),
@@ -929,7 +933,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"glue",
QT_TR_NOOP("Tool: Glue"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
Qt::Key_G,
Qt::WindowShortcut,
QT_TR_NOOP("Glue"),
@@ -938,9 +942,17 @@ Shortcut MuseApplication::sc[] = {
":/xpm/glue.xpm"
),
Shortcut(
+ "declone",
+ QT_TR_NOOP("Declone"),
+ ARRANG_SHRT,
+ 0,
+ Qt::WindowShortcut,
+ QT_TR_NOOP("Declone")
+ ),
+ Shortcut(
"quantize",
QT_TR_NOOP("Tool: Quantize"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
Qt::Key_G,
Qt::WindowShortcut,
QT_TR_NOOP("Quantize"),
@@ -951,7 +963,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"draw",
QT_TR_NOOP("Tool: Line Draw"),
- PROLL_SHRT + DEDIT_SHRT,
+ PROLL_SHRT + DEDIT_SHRT,
0,
Qt::WindowShortcut,
QT_TR_NOOP("Draw"),
@@ -961,7 +973,7 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"mute_parts",
QT_TR_NOOP("Tool: Mute Parts"),
- ARRANG_SHRT,
+ ARRANG_SHRT,
0,
Qt::WindowShortcut,
QT_TR_NOOP("Mute"),
@@ -973,103 +985,103 @@ Shortcut MuseApplication::sc[] = {
Shortcut(
"curpos_increase",
QT_TR_NOOP("Transport: Increase current position"),
- GLOBAL_SHRT,
+ GLOBAL_SHRT,
Qt::Key_Plus
),
Shortcut(
"curpos_decrease",
QT_TR_NOOP("Transport: Decrease current position"),
- GLOBAL_SHRT,
+ GLOBAL_SHRT,
Qt::Key_Minus
),
Shortcut(
"midi_quant_1",
QT_TR_NOOP("Quantize: Set quantize to 1/1 note"),
- PROLL_SHRT,
+ PROLL_SHRT,
Qt::Key_1
),
Shortcut(
"midi_quant_2",
QT_TR_NOOP("Quantize: Set quantize to 1/2 note"),
- PROLL_SHRT,
+ PROLL_SHRT,
Qt::Key_2
),
Shortcut(
"midi_quant_3",
QT_TR_NOOP("Quantize: Set quantize to 1/4 note"),
- PROLL_SHRT,
+ PROLL_SHRT,
Qt::Key_3
),
Shortcut(
"midi_quant_4",
QT_TR_NOOP("Quantize: Set quantize to 1/8 note"),
- PROLL_SHRT,
+ PROLL_SHRT,
Qt::Key_4
),
Shortcut(
"midi_quant_5",
QT_TR_NOOP("Quantize: Set quantize to 1/16 note"),
- PROLL_SHRT,
+ PROLL_SHRT,
Qt::Key_5
),
Shortcut(
"midi_quant_6",
QT_TR_NOOP("Quantize: Set quantize to 1/32 note"),
- PROLL_SHRT,
+ PROLL_SHRT,
Qt::Key_6
),
Shortcut(
"midi_quant_7",
QT_TR_NOOP("Quantize: Set quantize to 1/64 note"),
- PROLL_SHRT,
+ PROLL_SHRT,
Qt::Key_7
),
Shortcut(
"midi_quant_triol",
QT_TR_NOOP("Quantize: Toggle triol quantization"),
- PROLL_SHRT,
+ PROLL_SHRT,
Qt::Key_T
),
Shortcut(
"midi_quant_punct",
QT_TR_NOOP("Quantize: Toggle punctuation quantization"),
- PROLL_SHRT,
+ PROLL_SHRT,
Qt::Key_Period
),
Shortcut(
"midi_quant_punct2",
QT_TR_NOOP("Quantize: Toggle punctuation quantization (2)"),
- PROLL_SHRT,
+ PROLL_SHRT,
Qt::Key_Comma
),
Shortcut(
"midi_insert_at_loc",
QT_TR_NOOP("Insert"),
- PROLL_SHRT,
+ PROLL_SHRT,
Qt::SHIFT + Qt::Key_Right
),
Shortcut(
"lm_ins_tempo",
QT_TR_NOOP("Insert Tempo"),
- LMEDIT_SHRT,
+ LMEDIT_SHRT,
Qt::CTRL + Qt::Key_T
),
Shortcut(
"lm_ins_sig",
QT_TR_NOOP("Insert Signature"),
- LMEDIT_SHRT,
+ LMEDIT_SHRT,
Qt::CTRL + Qt::Key_R
),
Shortcut(
"lm_edit_beat",
QT_TR_NOOP("Change Event Position"),
- LMEDIT_SHRT,
+ LMEDIT_SHRT,
Qt::CTRL + Qt::SHIFT + Qt::Key_E
),
Shortcut(
"lm_edit_val",
QT_TR_NOOP("Edit Event Value"),
- LMEDIT_SHRT,
+ LMEDIT_SHRT,
Qt::CTRL + Qt::Key_E
),
Shortcut(0, 0, 0, 0 ),