# HG changeset patch # User Chris Cannam # Date 1389178812 0 # Node ID faee60602049197000dc56f8bccec93c9772f113 # Parent 86fb9160d122528be9896690cf46a7d1aefef913 Comments diff -r 86fb9160d122 -r faee60602049 audioio/ClipMixer.h --- a/audioio/ClipMixer.h Wed Jan 08 09:58:48 2014 +0000 +++ b/audioio/ClipMixer.h Wed Jan 08 11:00:12 2014 +0000 @@ -13,15 +13,17 @@ COPYING included with this distribution for more information. */ -#ifndef _CLIP_MIXER_H_ -#define _CLIP_MIXER_H_ +#ifndef CLIP_MIXER_H +#define CLIP_MIXER_H #include #include /** * Mix in synthetic notes produced by resampling a prerecorded - * clip. That is, this is a sampler. + * clip. (i.e. this is an implementation of a digital sampler in the + * musician's sense.) This can mix any number of notes of arbitrary + * frequency, so long as they all use the same sample clip. */ class ClipMixer @@ -31,14 +33,15 @@ ~ClipMixer(); void setChannelCount(int channels); - + + /** + * Load a sample clip from a wav file. This can only happen once: + * construct a new ClipMixer if you want a different clip. + */ bool loadClipData(QString clipFilePath, float clipF0); void reset(); // discarding any playing notes - //!!! what can we find in common with the NoteData type and - //!!! AudioGenerator's NoteOff? - struct NoteStart { int frameOffset; // within current processing block float frequency; // Hz