Mercurial > hg > svapp
diff audioio/AudioGenerator.h @ 234:a98f1638c5ec sonification
Refactor mixNoteModel and mixSparseOneDimensionalModel into a single mixSparseModel -- attempting to clear the decks a bit for asynchronous example-note playing
author | Chris Cannam |
---|---|
date | Fri, 24 Jun 2011 15:39:00 +0100 |
parents | e81c1ea227ee |
children | 1fcee2a1c03e |
line wrap: on
line diff
--- a/audioio/AudioGenerator.h Tue Jun 14 15:27:12 2011 +0100 +++ b/audioio/AudioGenerator.h Fri Jun 24 15:39:00 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,15 @@ static void initialiseSampleDir(); static void setSampleDir(RealTimePluginInstance *plugin); + virtual Notes getNotesFromModel + (Model *model, size_t startFrame, size_t frameCount); + 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;