File indexing completed on 2024-04-28 15:08:06
0001 /* miniSynth - A Simple Software Synthesizer 0002 SPDX-FileCopyrightText: 2015 Ville Räisänen <vsr at vsr.name> 0003 0004 SPDX-License-Identifier: GPL-3.0-or-later 0005 */ 0006 0007 #ifndef LINEARSYNTHESIS_H 0008 #define LINEARSYNTHESIS_H 0009 0010 #include "waveform.h" 0011 #include <QVector> 0012 0013 class LinearSynthesis : public Waveform { 0014 public: 0015 explicit LinearSynthesis(unsigned int mode, unsigned int size=4096); 0016 ~LinearSynthesis(); 0017 0018 qreal evalTimbre(qreal t); 0019 void setTimbre(QVector<int> &litudes, QVector<int> &phases); 0020 0021 private: 0022 int *timbreAmplitudes; 0023 int *timbrePhases; 0024 int numHarmonics; 0025 }; 0026 0027 #endif // LINEARSYNTHESIS_H