summaryrefslogtreecommitdiff
path: root/muse2/muse/functions.h
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2011-05-08 14:08:06 +0000
committerFlorian Jung <flo@windfisch.org>2011-05-08 14:08:06 +0000
commit94583a696436a3bec385223efaea730768720975 (patch)
treecf216cbc526a27582e43b6e39a3c80788cbb7a13 /muse2/muse/functions.h
parent777badc6ba80b5bc244e8e3141b2fd0257271a89 (diff)
made quantize, modify note len and modify velocity functions global
added quantize-dialog and improved the other dialogs
Diffstat (limited to 'muse2/muse/functions.h')
-rw-r--r--muse2/muse/functions.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/muse2/muse/functions.h b/muse2/muse/functions.h
new file mode 100644
index 00000000..a71230a4
--- /dev/null
+++ b/muse2/muse/functions.h
@@ -0,0 +1,40 @@
+//=========================================================
+// 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 <set>
+#include "part.h"
+
+
+extern GateTime* gatetime_dialog;
+extern Velocity* velocity_dialog;
+extern Quantize* quantize_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);
+
+//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);
+
+
+#endif