diff options
author | Florian Jung <flo@windfisch.org> | 2011-06-03 14:24:08 +0000 |
---|---|---|
committer | Florian Jung <flo@windfisch.org> | 2011-06-03 14:24:08 +0000 |
commit | db164b62e3892bd17d1a2eabca76bde3b67072df (patch) | |
tree | ab71ac4b4f05ab94c008d75ef7052bef5af6cc74 /muse2/muse/functions.h | |
parent | def4fdb391f5207ebbe61881416f39f3d896cc5d (diff) | |
parent | 9187899632c14d64b3fae6477b7f941240f912a6 (diff) |
merged with trunk and adapted new functions
Diffstat (limited to 'muse2/muse/functions.h')
-rw-r--r-- | muse2/muse/functions.h | 39 |
1 files changed, 29 insertions, 10 deletions
diff --git a/muse2/muse/functions.h b/muse2/muse/functions.h index 2b6dc711..bc2bb8f4 100644 --- a/muse2/muse/functions.h +++ b/muse2/muse/functions.h @@ -17,10 +17,13 @@ #include "widgets/function_dialogs/setlen.h" #include "widgets/function_dialogs/move.h" #include "widgets/function_dialogs/deloverlaps.h" +#include "widgets/function_dialogs/legato.h" #include <set> #include "part.h" +class QString; +class QMimeData; extern GateTime* gatetime_dialog; extern Velocity* velocity_dialog; @@ -31,24 +34,27 @@ extern Setlen* set_notelen_dialog; extern Move* move_notes_dialog; extern Transpose* transpose_dialog; extern Crescendo* crescendo_dialog; +extern Legato* legato_dialog; void init_function_dialogs(QWidget* parent); std::set<Part*> partlist_to_set(PartList* pl); +std::set<Part*> part_to_set(Part* p); std::map<Event*, Part*> get_events(const std::set<Part*>& parts, int range); //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_off_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); -void crescendo(const std::set<Part*>& parts, int range, int start_val, int end_val, bool absolute); +bool modify_velocity(const std::set<Part*>& parts, int range, int rate, int offset=0); +bool modify_off_velocity(const std::set<Part*>& parts, int range, int rate, int offset=0); +bool modify_notelen(const std::set<Part*>& parts, int range, int rate, int offset=0); +bool quantize_notes(const std::set<Part*>& parts, int range, int raster, bool len=false, int strength=100, int swing=0, int threshold=0); +bool erase_notes(const std::set<Part*>& parts, int range, int velo_threshold=0, bool velo_thres_used=false, int len_threshold=0, bool len_thres_used=false); +bool delete_overlaps(const std::set<Part*>& parts, int range); +bool set_notelen(const std::set<Part*>& parts, int range, int len); +bool move_notes(const std::set<Part*>& parts, int range, signed int ticks); +bool transpose_notes(const std::set<Part*>& parts, int range, signed int halftonesteps); +bool crescendo(const std::set<Part*>& parts, int range, int start_val, int end_val, bool absolute); +bool legato(const std::set<Part*>& parts, int range, int min_len=1, bool dont_shorten=false); //the below functions automatically open the dialog @@ -62,8 +68,21 @@ bool transpose_notes(const std::set<Part*>& parts); bool crescendo(const std::set<Part*>& parts); bool erase_notes(const std::set<Part*>& parts); bool delete_overlaps(const std::set<Part*>& parts); +bool legato(const std::set<Part*>& parts); +//functions for copy'n'paste +void copy_notes(const std::set<Part*>& parts, int range); +void paste_notes(Part* dest_part); +QMimeData* selected_events_to_mime(const std::set<Part*>& parts, int range); +void paste_at(Part* dest_part, const QString& pt, int pos); + +//functions for selections +void select_all(const std::set<Part*>& parts); +void select_none(const std::set<Part*>& parts); +void select_invert(const std::set<Part*>& parts); +void select_in_loop(const std::set<Part*>& parts); +void select_not_in_loop(const std::set<Part*>& parts); //functions for reading and writing default values class Xml; |