From 1756fc2e41cc95cb200921147527009e7db9f94e Mon Sep 17 00:00:00 2001 From: Leonard Ritter Date: Thu, 11 Feb 2010 10:00:01 +0100 Subject: [PATCH] cheatsheet, shortcuts --- cheatsheet.txt | 82 +++++++++++++++++++++++++++++++++++++++++++++++++ jacker.glade | 20 +++--------- main.cpp | 9 +++++- measure.cpp | 2 +- patternview.hpp | 2 +- 5 files changed, 97 insertions(+), 18 deletions(-) create mode 100644 cheatsheet.txt diff --git a/cheatsheet.txt b/cheatsheet.txt new file mode 100644 index 0000000..ae3cfe8 --- /dev/null +++ b/cheatsheet.txt @@ -0,0 +1,82 @@ + + +Jacker Mouse & Keyboard Commands +================================ + +Global +------ + +F3: Go to song view. +F4: Go to pattern view. + +F5: Play Song from current position. + * Play Song from beginning of loop, if enabled. +F8: Pause Song. + * Jump to beginning of loop, if enabled. + ** Jump to beginning of song. + +Pattern +------- + + -- Navigation -- + + Up/Down: Move cursor to previous/next row. + Left/Right: Move cursor to previous/next column. + Home: Move cursor to first parameter. + * Move cursor to first channel. + ** Move cursor to first row. + End: Move cursor to last parameter. + * Move cursor to last channel. + ** Move cursor to last row. +Page Up/Down: Move cursor to previous/next bar. + + -- Selection -- + + Shift+Up/Down: Expand selection across rows. +Shift+Left/Right: Expand selection across columns. + Click+Drag: Expand selection across pattern. + + -- Editing -- + + 0-9,A-F: Set values in value columns. +ZSXDCVGBHNJM: Set notes in note columns (Octave +0). +Q2W3ER5T6Y7U: Set notes in note columns (Octave +1). + I9O0P: Set notes in note columns (Octave +2). + . : Wipe value at cursor. + Insert: Move all values below cursor down + by one row in current channel. + Del: Move all values below cursor up + by one row in current channel. + Alt+Insert: Move all values below cursor down + by one row in all channels. + Alt+Del: Move all values below cursor up + by one row in all channels. + + Ctrl+X: Delete events in selection. + + +Song +---- + + -- Measure -- + + Click: Set song position. + Ctrl+Click: Set beginning of loop. + Alt+Click: Set end of loop. + Click+Drag: Move loop beginning/end handles. + + -- Selection -- + + Ctrl+Click: Add pattern to selection, + remove pattern from selection. + Click+Drag: Box select. + + -- Editing -- + + Click+Drag: Move selected pattern(s) at cursor + Resize pattern(s) at cursor. +Shift+Click+Drag: Move copy of pattern(s) at cursor. + Ctrl+Shift + +Click+Drag: Move pattern link(s) at cursor. + Double-Click: Edit pattern at cursor. + Delete: Remove selected tracks. diff --git a/jacker.glade b/jacker.glade index 12eaa7a..c1f5138 100644 --- a/jacker.glade +++ b/jacker.glade @@ -1,7 +1,7 @@ - + Jacker center @@ -128,20 +128,18 @@ True - Song True + True show_tracks_action - image2 - False + True - Pattern True + True show_pattern_action - image1 - False + True @@ -691,12 +689,4 @@ Tracks Tracks - - True - gtk-missing-image - - - True - gtk-missing-image - diff --git a/main.cpp b/main.cpp index e6f09db..49d5df7 100644 --- a/main.cpp +++ b/main.cpp @@ -111,7 +111,11 @@ public: init_player(); if (!player) return; - player->play(); + if (!player->is_playing()) { + player->play(); + } else if (model.enable_loop) { + player->seek(model.loop.get_begin()); + } } void on_stop_action() { @@ -119,6 +123,9 @@ public: return; if (player->is_playing()) { player->stop(); + } else if (model.enable_loop && + (player->get_position() > model.loop.get_begin())) { + player->seek(model.loop.get_begin()); } else { player->seek(0); } diff --git a/measure.cpp b/measure.cpp index 34ef0d8..f8c9aa9 100644 --- a/measure.cpp +++ b/measure.cpp @@ -121,7 +121,7 @@ bool MeasureView::on_expose_event(GdkEventExpose* event) { } // loop - if (/*(orientation == OrientationHorizontal) &&*/ model->enable_loop) { + if ((orientation == OrientationHorizontal) && model->enable_loop) { int lc1 = int(((model->loop.get_begin()-value)*scale)+0.5); int lc2 = int(((model->loop.get_end()-value)*scale)+0.5); diff --git a/patternview.hpp b/patternview.hpp index 53210fe..c6e6d58 100644 --- a/patternview.hpp +++ b/patternview.hpp @@ -210,7 +210,7 @@ public: const Glib::RefPtr& builder); void set_model(class Model &model); - void set_pattern(class Pattern *pattern); + void set_song_event(Song::iterator event); Pattern *get_pattern() const; virtual void on_realize();