diff audioio/AudioGenerator.h @ 239:4d1501b27075 integration_library

Merge from branch "sonification"
author mathieub <mathieu.barthet@eecs.qmul.ac.uk>
date Mon, 25 Jul 2011 17:57:59 +0100
parents 1fcee2a1c03e
children
line wrap: on
line diff
--- a/audioio/AudioGenerator.h	Wed Jun 29 09:57:36 2011 +0100
+++ b/audioio/AudioGenerator.h	Mon Jul 25 17:57:59 2011 +0100
@@ -28,6 +28,7 @@
 
 #include <set>
 #include <map>
+#include <vector>
 
 class AudioGenerator : public QObject
 {
@@ -101,6 +102,14 @@
     bool m_soloing;
     std::set<Model *> m_soloModelSet;
 
+    struct Note {
+        int pitch;
+        size_t frame;
+        size_t duration; // 0 -> "anything" (short example note)
+        int velocity;
+    };
+    typedef std::vector<Note> Notes;
+
     struct NoteOff {
 
 	int pitch;
@@ -128,16 +137,16 @@
     static void initialiseSampleDir();
     static void setSampleDir(RealTimePluginInstance *plugin);
 
+    virtual Notes getNotesFromModel
+    (Model *model, size_t startFrame, size_t frameCount, 
+     size_t latency);
+
     virtual size_t mixDenseTimeValueModel
     (DenseTimeValueModel *model, size_t startFrame, size_t frameCount,
      float **buffer, float gain, float pan, size_t fadeIn, size_t fadeOut);
 
-    virtual size_t mixSparseOneDimensionalModel
-    (SparseOneDimensionalModel *model, size_t startFrame, size_t frameCount,
-     float **buffer, float gain, float pan, size_t fadeIn, size_t fadeOut);
-
-    virtual size_t mixNoteModel
-    (NoteModel *model, size_t startFrame, size_t frameCount,
+    virtual size_t mixSparseModel
+    (Model *model, size_t startFrame, size_t frameCount,
      float **buffer, float gain, float pan, size_t fadeIn, size_t fadeOut);
 
     static const size_t m_pluginBlockSize;