summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--muse2/ChangeLog11
-rw-r--r--muse2/muse/app.cpp2
-rw-r--r--muse2/muse/midiedit/dcanvas.cpp141
-rw-r--r--muse2/muse/midiedit/dcanvas.h6
-rw-r--r--muse2/muse/midiedit/drumedit.cpp50
-rw-r--r--muse2/muse/midiedit/drumedit.h3
-rw-r--r--muse2/muse/midiedit/ecanvas.cpp5
-rw-r--r--muse2/muse/shortcuts.cpp17
-rw-r--r--muse2/muse/shortcuts.h4
-rw-r--r--muse2/muse/widgets/shortcutcapturedialog.cpp4
10 files changed, 213 insertions, 30 deletions
diff --git a/muse2/ChangeLog b/muse2/ChangeLog
index da73fa3b..a0e1cf3c 100644
--- a/muse2/ChangeLog
+++ b/muse2/ChangeLog
@@ -1,3 +1,14 @@
+12.03.2011:
+ - Cursor mode in drum editor should be usable now (rj)
+ Changes:
+ * delete current event with delete
+ * change edit step size on toolbar and using 0 and 9
+ Try setting step size to 16 with snap 16, place cursor on the first beat for kickdrum
+ hold down 'b' to add all kickdrums.
+ Now move to snare at position 8 hold down 'b' again.
+ A basic beat should now be entered kick/snare/kick/snare
+ * auto scrolling of view when event is outside view
+ * move current event as with standard event operations
10.03.2011:
- Added: Say hello to 'CURSOR MODE' in drum editor (rj)
the idea is to edit drums more like a mod tracker, doing all from the keyboard.
diff --git a/muse2/muse/app.cpp b/muse2/muse/app.cpp
index 0b4a91bd..b0fda65f 100644
--- a/muse2/muse/app.cpp
+++ b/muse2/muse/app.cpp
@@ -1451,7 +1451,7 @@ MusE::MusE(int argc, char** argv) : QMainWindow()
// popup Settings
//-------------------------------------------------------------
- menuSettings = menuBar()->addMenu(tr("S&ettings"));
+ menuSettings = menuBar()->addMenu(tr("Se&ttings"));
menuSettings->addAction(settingsGlobalAction);
menuSettings->addAction(settingsShortcutsAction);
menuSettings->addMenu(follow);
diff --git a/muse2/muse/midiedit/dcanvas.cpp b/muse2/muse/midiedit/dcanvas.cpp
index c17ea065..1303c189 100644
--- a/muse2/muse/midiedit/dcanvas.cpp
+++ b/muse2/muse/midiedit/dcanvas.cpp
@@ -87,6 +87,7 @@ DrumCanvas::DrumCanvas(MidiEditor* pr, QWidget* parent, int sx,
{
setVirt(false);
cursorPos= QPoint(0,0);
+ _stepSize=1;
songChanged(SC_TRACK_INSERTED);
}
@@ -413,8 +414,11 @@ void DrumCanvas::resizeItem(CItem* item, bool)
//---------------------------------------------------------
// newItem
//---------------------------------------------------------
+void DrumCanvas::newItem(CItem* item, bool noSnap) {
+ newItem(item, noSnap,false);
+}
-void DrumCanvas::newItem(CItem* item, bool noSnap)
+void DrumCanvas::newItem(CItem* item, bool noSnap, bool replace)
{
DEvent* nevent = (DEvent*) item;
Event event = nevent->event();
@@ -444,8 +448,12 @@ void DrumCanvas::newItem(CItem* item, bool noSnap)
// Indicate do undo, and do not do port controller values and clone parts.
//audio->msgDeleteEvent(ev, nevent->part());
audio->msgDeleteEvent(ev, nevent->part(), true, false, false);
- return;
- }
+ if (replace)
+ break;
+ else
+ return;
+
+ }
}
// Added by T356.
@@ -454,7 +462,6 @@ void DrumCanvas::newItem(CItem* item, bool noSnap)
int modified=SC_EVENT_MODIFIED;
int diff = event.endTick()-part->lenTick();
if (diff > 0) {// too short part? extend it
- //printf("extend Part!\n");
Part* newPart = part->clone();
newPart->setLenTick(newPart->lenTick()+diff);
// Indicate no undo, and do port controller values but not clone parts.
@@ -468,7 +475,6 @@ void DrumCanvas::newItem(CItem* item, bool noSnap)
audio->msgAddEvent(event, part, false, false, false);
song->endUndo(modified);
- //audio->msgAddEvent(event, nevent->part());
}
//---------------------------------------------------------
@@ -608,7 +614,7 @@ void DrumCanvas::drawTopItem(QPainter &p, const QRect &r)
if (_tool == CursorTool) {
p.setPen(Qt::black);
- int y = TH * cursorPos.y();
+ int y = mapy(TH * cursorPos.y());
p.drawPixmap(mapx(cursorPos.x())-TH/2,y,TH,TH, *cursorIcon);
// need to figure out a coordinate system for the cursor, complicated stuff.
@@ -1362,9 +1368,36 @@ void DrumCanvas::curPartChanged()
editor->setWindowTitle(getCaption());
}
+//---------------------------------------------------------
+// getNextStep - gets next tick in the chosen direction
+// when raster and stepSize are taken into account
+//---------------------------------------------------------
+int DrumCanvas::getNextStep(unsigned int pos, int basicStep, int stepSize)
+{
+ int newPos = pos;
+ for (int i =0; i<stepSize;i++) {
+ if (basicStep > 0) { // moving right
+ newPos = AL::sigmap.raster2(newPos + basicStep, editor->rasterStep(newPos)); // Nudge by +1, then snap up with raster2.
+ if (unsigned(newPos) > curPart->endTick()- editor->rasterStep(curPart->endTick()))
+ newPos = curPart->tick();
+ }
+ else { // moving left
+ newPos = AL::sigmap.raster1(newPos + basicStep, editor->rasterStep(newPos)); // Nudge by -1, then snap up with raster1.
+ if (unsigned(newPos) < curPart->tick() ) {
+ newPos = AL::sigmap.raster1(curPart->endTick()-1, editor->rasterStep(curPart->endTick()));
+ }
+ }
+ }
+ return newPos;
+}
+
+//---------------------------------------------------------
+// keyPress
+//---------------------------------------------------------
void DrumCanvas::keyPress(QKeyEvent* event)
{
if (_tool == CursorTool) {
+
int key = event->key();
///if (event->state() & Qt::ShiftButton)
if (((QInputEvent*)event)->modifiers() & Qt::ShiftModifier)
@@ -1376,44 +1409,63 @@ void DrumCanvas::keyPress(QKeyEvent* event)
if (((QInputEvent*)event)->modifiers() & Qt::ControlModifier)
key+= Qt::CTRL;
- int curpos = cursorPos.x();
// Select items by key (PianoRoll & DrumEditor)
if (key == shortcuts[SHRT_SEL_RIGHT].key) {
- int newPos = AL::sigmap.raster2(curpos + 1, editor->rasterStep(curpos)); // Nudge by +1, then snap up with raster2.
- cursorPos.setX(newPos);
+ cursorPos.setX(getNextStep(cursorPos.x(),1));
+
+ selectCursorEvent(getEventAtCursorPos());
+ if (mapx(cursorPos.x()) < 0 || mapx(cursorPos.x()) > width())
+ emit followEvent(cursorPos.x());
update();
return;
}
else if (key == shortcuts[SHRT_SEL_LEFT].key) {
- int newPos = AL::sigmap.raster1(curpos-1, editor->rasterStep(curpos));
- cursorPos.setX(newPos);
- if (cursorPos.x() < 0 )
- cursorPos.setX(0);
+ cursorPos.setX(getNextStep(cursorPos.x(),-1));
+
+ selectCursorEvent(getEventAtCursorPos());
+ if (mapx(cursorPos.x()) < 0 || mapx(cursorPos.x()) > width())
+ emit followEvent(cursorPos.x());
update();
return;
}
else if (key == shortcuts[SHRT_ADDNOTE_1].key) {
- newItem(newItem(cursorPos.x(), cursorPos.y(), drumMap[cursorPos.y()].lv1),false);
+ newItem(newItem(cursorPos.x(), cursorPos.y(), drumMap[cursorPos.y()].lv1),false,true);
keyPressed(cursorPos.y(), drumMap[cursorPos.y()].lv1);
keyReleased(cursorPos.y(), false);
+ cursorPos.setX(getNextStep(cursorPos.x(),1, _stepSize));
+ selectCursorEvent(getEventAtCursorPos());
+ if (mapx(cursorPos.x()) < 0 || mapx(cursorPos.x()) > width())
+ emit followEvent(cursorPos.x());
return;
}
else if (key == shortcuts[SHRT_ADDNOTE_2].key) {
- newItem(newItem(cursorPos.x(), cursorPos.y(), drumMap[cursorPos.y()].lv2),false);
+ newItem(newItem(cursorPos.x(), cursorPos.y(), drumMap[cursorPos.y()].lv2),false,true);
keyPressed(cursorPos.y(), drumMap[cursorPos.y()].lv2);
keyReleased(cursorPos.y(), false);
+ cursorPos.setX(getNextStep(cursorPos.x(),1, _stepSize));
+ selectCursorEvent(getEventAtCursorPos());
+ if (mapx(cursorPos.x()) < 0 || mapx(cursorPos.x()) > width())
+ emit followEvent(cursorPos.x());
return;
}
else if (key == shortcuts[SHRT_ADDNOTE_3].key) {
- newItem(newItem(cursorPos.x(), cursorPos.y(), drumMap[cursorPos.y()].lv3),false);
+ newItem(newItem(cursorPos.x(), cursorPos.y(), drumMap[cursorPos.y()].lv3),false,true);
keyPressed(cursorPos.y(), drumMap[cursorPos.y()].lv3);
keyReleased(cursorPos.y(), false);
+ cursorPos.setX(getNextStep(cursorPos.x(),1, _stepSize));
+ selectCursorEvent(getEventAtCursorPos());
+ if (mapx(cursorPos.x()) < 0 || mapx(cursorPos.x()) > width())
+ emit followEvent(cursorPos.x());
return;
}
else if (key == shortcuts[SHRT_ADDNOTE_4].key) {
- newItem(newItem(cursorPos.x(), cursorPos.y(), drumMap[cursorPos.y()].lv4),false);
+ newItem(newItem(cursorPos.x(), cursorPos.y(), drumMap[cursorPos.y()].lv4),false,true);
keyPressed(cursorPos.y(), drumMap[cursorPos.y()].lv4);
keyReleased(cursorPos.y(), false);
+ cursorPos.setX(getNextStep(cursorPos.x(),1, _stepSize));
+ selectCursorEvent(getEventAtCursorPos());
+ if (mapx(cursorPos.x()) < 0 || mapx(cursorPos.x()) > width())
+ emit followEvent(cursorPos.x());
return;
}
}
@@ -1421,15 +1473,68 @@ void DrumCanvas::keyPress(QKeyEvent* event)
}
+//---------------------------------------------------------
+// setTool2
+//---------------------------------------------------------
void DrumCanvas::setTool2(int)
{
- if (cursorPos.x() < curPart->tick())
+ if (_tool == CursorTool)
+ deselectAll();
+ if (unsigned(cursorPos.x()) < curPart->tick())
cursorPos.setX(curPart->tick());
update();
}
+//---------------------------------------------------------
+// setCurDrumInstrument
+//---------------------------------------------------------
void DrumCanvas::setCurDrumInstrument(int i)
{
cursorPos.setY(i);
update();
}
+//---------------------------------------------------------
+// setStep
+//---------------------------------------------------------
+void DrumCanvas::setStep(int v)
+{
+ _stepSize=v;
+}
+
+//---------------------------------------------------------
+// getEventAtCursorPos
+//---------------------------------------------------------
+Event *DrumCanvas::getEventAtCursorPos()
+{
+ if (_tool != CursorTool)
+ return 0;
+ EventList* el = curPart->events();
+ iEvent lower = el->lower_bound(cursorPos.x()-curPart->tick());
+ iEvent upper = el->upper_bound(cursorPos.x()-curPart->tick());
+ for (iEvent i = lower; i != upper; ++i) {
+ Event &ev = i->second;
+ if(!ev.isNote())
+ continue;
+ if (ev.pitch() == cursorPos.y()) {
+ return &ev;
+ }
+ }
+ return 0;
+}
+//---------------------------------------------------------
+// selectCursorEvent
+//---------------------------------------------------------
+void DrumCanvas::selectCursorEvent(Event *ev)
+{
+ for (iCItem i = items.begin(); i != items.end(); ++i)
+ {
+ Event e = i->second->event();
+
+ if (ev && ev->tick() == e.tick() && ev->pitch() == e.pitch() && e.isNote())
+ i->second->setSelected(true);
+ else
+ i->second->setSelected(false);
+
+ }
+ updateSelection();
+}
diff --git a/muse2/muse/midiedit/dcanvas.h b/muse2/muse/midiedit/dcanvas.h
index d1b20b87..4e05a422 100644
--- a/muse2/muse/midiedit/dcanvas.h
+++ b/muse2/muse/midiedit/dcanvas.h
@@ -43,6 +43,7 @@ class DrumCanvas : public EventCanvas {
// Cursor tool position
QPoint cursorPos;
+ int _stepSize;
Q_OBJECT
virtual void drawCanvas(QPainter&, const QRect&);
@@ -56,6 +57,7 @@ class DrumCanvas : public EventCanvas {
virtual CItem* newItem(const QPoint&, int);
virtual void resizeItem(CItem*, bool);
virtual void newItem(CItem*, bool);
+ virtual void newItem(CItem*, bool, bool replace );
virtual bool deleteItem(CItem*);
CItem* newItem(int tick, int instrument, int velocity);
@@ -70,6 +72,7 @@ class DrumCanvas : public EventCanvas {
virtual void addItem(Part*, Event&);
virtual void resizeEvent(QResizeEvent*);
virtual void curPartChanged();
+ int getNextStep(unsigned int pos, int basicStep, int stepSize=1);
signals:
void newWidth(int);
@@ -80,6 +83,7 @@ class DrumCanvas : public EventCanvas {
void keyReleased(int, bool);
void setTool2(int);
void setCurDrumInstrument(int);
+ virtual void setStep(int);
public:
enum {
@@ -93,6 +97,8 @@ class DrumCanvas : public EventCanvas {
void cmd(int);
virtual void modifySelected(NoteInfo::ValType type, int delta);
virtual void keyPress(QKeyEvent* event);
+ Event *getEventAtCursorPos();
+ void selectCursorEvent(Event *ev);
};
#endif
diff --git a/muse2/muse/midiedit/drumedit.cpp b/muse2/muse/midiedit/drumedit.cpp
index 06e7bc34..ddd9a43c 100644
--- a/muse2/muse/midiedit/drumedit.cpp
+++ b/muse2/muse/midiedit/drumedit.cpp
@@ -21,6 +21,8 @@
#include <QToolButton>
#include <QWhatsThis>
#include <QSettings>
+#include <QComboBox>
+#include <QLabel>
#include "drumedit.h"
#include "mtscale.h"
@@ -281,11 +283,31 @@ DrumEdit::DrumEdit(PartList* pl, QWidget* parent, const char* name, unsigned ini
midiin->setIcon(*midiinIcon);
midiin->setCheckable(true);
tools->addWidget(midiin);
+
tools2 = new EditToolBar(this, drumeditTools);
addToolBar(tools2);
- QToolBar* panicToolbar = addToolBar(tr("panic"));
+ QToolBar* cursorToolbar = addToolBar(tr("cursor tools"));
+ cursorToolbar->setObjectName("cursor");
+ QLabel *stepStr = new QLabel("Cursor step:");
+ cursorToolbar->addWidget(stepStr);
+ stepLenWidget = new QComboBox();
+ stepLenWidget->setToolTip(tr("Set step size for cursor edit"));
+ stepLenWidget->addItem("1");
+ stepLenWidget->addItem("2");
+ stepLenWidget->addItem("3");
+ stepLenWidget->addItem("4");
+ stepLenWidget->addItem("5");
+ stepLenWidget->addItem("6");
+ stepLenWidget->addItem("7");
+ stepLenWidget->addItem("8");
+ stepLenWidget->addItem("16");
+ stepLenWidget->setCurrentIndex(0);
+ connect(stepLenWidget, SIGNAL(currentIndexChanged(QString)), SLOT(setStep(QString)));
+ cursorToolbar->addWidget(stepLenWidget);
+
+ QToolBar* panicToolbar = addToolBar(tr("panic"));
panicToolbar->setObjectName("panic");
panicToolbar->addAction(panicAction);
@@ -1052,18 +1074,34 @@ void DrumEdit::keyPressEvent(QKeyEvent* event)
close();
return;
}
+ else if (key == shortcuts[SHRT_CURSOR_STEP_DOWN].key) {
+ int newIndex=stepLenWidget->currentIndex()-1;
+ if (newIndex<0)
+ newIndex=0;
+ stepLenWidget->setCurrentIndex(newIndex);
+ return;
+ }
+ else if (key == shortcuts[SHRT_CURSOR_STEP_UP].key) {
+ int newIndex=stepLenWidget->currentIndex()+1;
+ if (newIndex > stepLenWidget->count()-1)
+ newIndex=stepLenWidget->count()-1;
+ stepLenWidget->setCurrentIndex(newIndex);
+ return;
+ }
else if (key == Qt::Key_F2) {
dlist->lineEdit(dlist->getSelectedInstrument(),(int)DList::COL_NAME);
return;
}
- else if (key == Qt::Key_Up) {
+ else if (key == shortcuts[SHRT_INSTRUMENT_STEP_UP].key) {
dlist->setCurDrumInstrument(dlist->getSelectedInstrument()-1);
dlist->redraw();
+ ((DrumCanvas*)canvas)->selectCursorEvent(((DrumCanvas*)canvas)->getEventAtCursorPos());
return;
}
- else if (key == Qt::Key_Down) {
+ else if (key == shortcuts[SHRT_INSTRUMENT_STEP_DOWN].key) {
dlist->setCurDrumInstrument(dlist->getSelectedInstrument()+1);
dlist->redraw();
+ ((DrumCanvas*)canvas)->selectCursorEvent(((DrumCanvas*)canvas)->getEventAtCursorPos());
return;
}
@@ -1241,3 +1279,9 @@ void DrumEdit::execUserScript(int id)
song->executeScript(scriptfile.toLatin1().constData(), parts(), quant(), true);
}
+void DrumEdit::setStep(QString v)
+{
+ ((DrumCanvas*)canvas)->setStep(v.toInt());
+ stepLenWidget->setFocusPolicy(Qt::NoFocus);
+ canvas->setFocus();
+}
diff --git a/muse2/muse/midiedit/drumedit.h b/muse2/muse/midiedit/drumedit.h
index 5d2df9f6..02a1a5cc 100644
--- a/muse2/muse/midiedit/drumedit.h
+++ b/muse2/muse/midiedit/drumedit.h
@@ -24,6 +24,7 @@ class QKeyEvent;
class QResizeEvent;
class QToolButton;
class QWidget;
+class QComboBox;
class MidiPart;
class DrumCanvas;
@@ -63,6 +64,7 @@ class DrumEdit : public MidiEditor {
DList* dlist;
Header* header;
QToolBar* tools;
+ QComboBox *stepLenWidget;
static int _quantInit, _rasterInit;
static int _widthInit, _heightInit;
@@ -104,6 +106,7 @@ class DrumEdit : public MidiEditor {
void newCanvasWidth(int);
void configChanged();
void songChanged1(int);
+ void setStep(QString);
public slots:
void setSelection(int, Event&, Part*);
diff --git a/muse2/muse/midiedit/ecanvas.cpp b/muse2/muse/midiedit/ecanvas.cpp
index c8ee91ef..388fb962 100644
--- a/muse2/muse/midiedit/ecanvas.cpp
+++ b/muse2/muse/midiedit/ecanvas.cpp
@@ -325,6 +325,9 @@ void EventCanvas::keyPress(QKeyEvent* event)
updateSelection();
}
}
+ //if (rightmost && mapx(rightmost->event().tick()) > width()) for some reason this doesn't this doesnt move the event in view
+ // emit followEvent(rightmost->x());
+
}
//Select items by key: (PianoRoll & DrumEditor)
else if (key == shortcuts[SHRT_SEL_LEFT].key || key == shortcuts[SHRT_SEL_LEFT_ADD].key) {
@@ -347,6 +350,8 @@ void EventCanvas::keyPress(QKeyEvent* event)
updateSelection();
}
}
+ //if (leftmost && mapx(leftmost->event().tick())< 0 ) for some reason this doesn't this doesnt move the event in view
+ // emit followEvent(leftmost->x());
}
}
else if (key == shortcuts[SHRT_INC_PITCH].key) {
diff --git a/muse2/muse/shortcuts.cpp b/muse2/muse/shortcuts.cpp
index 5e387c46..9cbc3726 100644
--- a/muse2/muse/shortcuts.cpp
+++ b/muse2/muse/shortcuts.cpp
@@ -156,9 +156,9 @@ void initShortCuts()
defShrt(SHRT_SELECT_OLOOP, 0, "Edit: Select events/parts outside locators", ARRANG_SHRT + PROLL_SHRT + DEDIT_SHRT, "sel_out_loc");
defShrt(SHRT_SELECT_PREV_PART, Qt::ALT + Qt::Key_Left, "Edit: Select previous part", ARRANG_SHRT + PROLL_SHRT + DEDIT_SHRT, "sel_prv_prt");
defShrt(SHRT_SELECT_NEXT_PART, Qt::ALT + Qt::Key_Right, "Edit: Select next part", ARRANG_SHRT + PROLL_SHRT + DEDIT_SHRT, "sel_nxt_prt");
- defShrt(SHRT_SEL_LEFT, Qt::Key_Left, "Edit: Select nearest part/event to the left", ARRANG_SHRT + PROLL_SHRT + DEDIT_SHRT, "sel_left");
+ defShrt(SHRT_SEL_LEFT, Qt::Key_Left, "Edit: Select nearest part/event to the left or move cursor", ARRANG_SHRT + PROLL_SHRT + DEDIT_SHRT, "sel_left");
defShrt(SHRT_SEL_LEFT_ADD, Qt::Key_Left + Qt::SHIFT, "Edit: Add nearest part/event to the left to selection", PROLL_SHRT + DEDIT_SHRT, "sel_left_add");
- defShrt(SHRT_SEL_RIGHT, Qt::Key_Right, "Edit: Select nearest part/event to the right", ARRANG_SHRT + PROLL_SHRT + DEDIT_SHRT,"sel_right");
+ defShrt(SHRT_SEL_RIGHT, Qt::Key_Right, "Edit: Select nearest part/event to the right or move cursor", ARRANG_SHRT + PROLL_SHRT + DEDIT_SHRT,"sel_right");
defShrt(SHRT_SEL_RIGHT_ADD, Qt::Key_Right + Qt::SHIFT, "Edit: Add nearest part/event to the right to selection", PROLL_SHRT + DEDIT_SHRT,"sel_right_add");
defShrt(SHRT_LOCATORS_TO_SELECTION, Qt::ALT + Qt::Key_P, "Edit: Set locators to selection", ARRANG_SHRT + PROLL_SHRT + DEDIT_SHRT, "loc_to_sel");
defShrt(SHRT_INC_PITCH, Qt::CTRL + Qt::Key_Up, "Edit: Increase pitch", PROLL_SHRT + DEDIT_SHRT, "sel_inc_pitch");
@@ -211,10 +211,15 @@ void initShortCuts()
// drum editor
defShrt(SHRT_TOOL_CURSOR, Qt::Key_U, "Tool: Cursor", DEDIT_SHRT, "cursor_tool");
- defShrt(SHRT_ADDNOTE_1, Qt::Key_V, "Add note:: 1", DEDIT_SHRT, "add note velocity 1");
- defShrt(SHRT_ADDNOTE_2, Qt::Key_B, "Add note:: 2", DEDIT_SHRT, "add note velocity 2");
- defShrt(SHRT_ADDNOTE_3, Qt::Key_N, "Add note:: 3", DEDIT_SHRT, "add note velocity 3");
- defShrt(SHRT_ADDNOTE_4, Qt::Key_M, "Add note:: 4", DEDIT_SHRT, "add note velocity 4");
+ defShrt(SHRT_ADDNOTE_1, Qt::Key_V, "Add note velocity 1", DEDIT_SHRT, "add_note_velocity_1");
+ defShrt(SHRT_ADDNOTE_2, Qt::Key_B, "Add note velocity 2", DEDIT_SHRT, "add_note_velocity_2");
+ defShrt(SHRT_ADDNOTE_3, Qt::Key_N, "Add note velocity 3", DEDIT_SHRT, "add_note_velocity_3");
+ defShrt(SHRT_ADDNOTE_4, Qt::Key_M, "Add note velocity 4", DEDIT_SHRT, "add_note_velocity_4");
+
+ defShrt(SHRT_CURSOR_STEP_UP, Qt::Key_0, "Cursor step size: larger", DEDIT_SHRT, "cursor_step_up");
+ defShrt(SHRT_CURSOR_STEP_DOWN, Qt::Key_9, "Cursor step size: smaller", DEDIT_SHRT, "cursor_step_down");
+ defShrt(SHRT_INSTRUMENT_STEP_UP, Qt::Key_Up, "Instrument/Cursor up", DEDIT_SHRT, "instrument_up");
+ defShrt(SHRT_INSTRUMENT_STEP_DOWN, Qt::Key_Down, "Instrument/Cursor down", DEDIT_SHRT, "instrument_down");
// arranger
defShrt(SHRT_TOOL_SCISSORS, Qt::Key_S, "Tool: Scissor", ARRANG_SHRT, "scissor_tool");
diff --git a/muse2/muse/shortcuts.h b/muse2/muse/shortcuts.h
index 340bf2fb..6878d177 100644
--- a/muse2/muse/shortcuts.h
+++ b/muse2/muse/shortcuts.h
@@ -292,6 +292,10 @@ enum {
SHRT_ADDNOTE_2,
SHRT_ADDNOTE_3,
SHRT_ADDNOTE_4,
+ SHRT_CURSOR_STEP_UP,
+ SHRT_CURSOR_STEP_DOWN,
+ SHRT_INSTRUMENT_STEP_DOWN,
+ SHRT_INSTRUMENT_STEP_UP,
// arranger
SHRT_TOOL_SCISSORS,
diff --git a/muse2/muse/widgets/shortcutcapturedialog.cpp b/muse2/muse/widgets/shortcutcapturedialog.cpp
index 8ca70a05..1c06eece 100644
--- a/muse2/muse/widgets/shortcutcapturedialog.cpp
+++ b/muse2/muse/widgets/shortcutcapturedialog.cpp
@@ -50,8 +50,8 @@ void ShortcutCaptureDialog::keyPressEvent(QKeyEvent* e)
temp_key = e->key();
QChar keychar(temp_key);
- bool ispunct = keychar.isPunct();
- bool issymbol = keychar.isSymbol();
+ //bool ispunct = keychar.isPunct();
+ //bool issymbol = keychar.isSymbol();
//printf("Key:%x, alt:%d, ctrl:%d shift:%d ispunct:%d issymbol:%d text:%s\n",
// e->key(), alt, ctrl, shift, ispunct, issymbol, e->text().toLatin1().constData());