54 bool write (QIODevice &iodevice,
Voice* voice =
nullptr);
55 bool read (QIODevice &iodevice,
Voice* voice =
nullptr);
63 bool insert (
const int key,
64 const QVector<qint32> &L,
const QVector<qint32> &R,
65 const bool release,
const double amplification);
72 static constexpr
int N = 128;
73 const int ctag = 0x78563412;
Wave & getWave(int &key)
Get the wave corresponding to a given key.
Class holding the sampled sound for one key.
static constexpr int N
Maximal number of waves in a scale.
Voice - a set of scales, keeping the acoustic data of an instrument.
Scale - a set of PCM waves with a characteristic intensity and length.
bool read(QIODevice &iodevice, Voice *voice=nullptr)
Read data of a scale from a device.
Scale()
Constructor, creates N=128 empty wave objects.
const int ctag
Tag to recognize a scale in a file.
bool write(QIODevice &iodevice, Voice *voice=nullptr)
Write scale to device.
void printInfo()
Scale::printInfo.
void generateArtificialSound(Voice *voice=nullptr, int samplerate=44100)
Generate a scale of artificial sounds in equal temperament.
bool insert(const int key, const QVector< qint32 > &L, const QVector< qint32 > &R, const bool release, const double amplification)
Insert a newly recorded or generated waveform into the scale. This function checks the parameters and...
bool mCancellationRequested
Cancel loading.
QVector< Wave > mWaves
This is the actual vector of waves.