56 bool read (QIODevice &iodevice);
57 bool write (QIODevice &iodevice);
59 bool insert (
const QVector<qint32> &L,
const QVector<qint32> &R,
60 const bool release,
const double amplitude);
quint32 mRepetitionIndex
Index from where on the sample is repeated.
Wave()
Constructor, resetting member variables.
QVector< double > mEnvelope
Amplitude envelope.
Class holding the sampled sound for one key.
const int maxNumberOfFrames
Maximal number of frames.
const QVector< qint16 > * getSustainSample()
QVector< qint16 > mSustainSample
Sound sample when key is pressed.
const int envelopeWidth
Frames per envelope point.
int mReleaseShift
PCM amplitedes shifted # bits to the left.
quint32 getRepetitionIndex()
double getEnvelope(int index)
void printInfo(int keynumber=0)
Debugging function: Write a short summary of the wave data to qDebug()
void automaticCyclicMorphing()
Function defined externally (Importer)
bool insert(const QVector< qint32 > &L, const QVector< qint32 > &R, const bool release, const double amplitude)
void computeEnvelope(int samplerate)
Determine the envelope of the sustain wave.
QVector< qint16 > mReleaseSample
Sound sample when key is releasek.
const QVector< qint16 > * getReleaseSample()
bool read(QIODevice &iodevice)
Read a wave from disk.
bool write(QIODevice &iodevice)
Write a PCM wave to disk (QIODevice)
void computeTriangularWave(double frequency, int samplerate, double stereo)
Compute a synthetic triangular wave.
double mRepetitionFactor
Amplitude decrease factor upon repetition.
int mSustainShift
PCM amplitudes shifted # bits to the left.
double getRepetitionFactor()