начал работу над envelope

This commit is contained in:
2026-11-12 22:37:00 +06:00
parent e4c2134e5b
commit a92de417b5
4 changed files with 110 additions and 6 deletions
+8 -6
View File
@@ -6,7 +6,6 @@
#include <cmath>
class Synth {
// методы
public:
Synth(){
frequency = 440;
@@ -16,19 +15,22 @@ class Synth {
};
double generate();
void generate_buffer(double* array, int size);
void set_frequency(double value);
void set_amplitude(double value);
// поля
const double get_amplitude();
const double get_phase();
private:
// частота звука в Герцах
/* 1. частота звука в Герцах
2. громкость звука, от 0 до 1
3. частота дискретизации
4. фаза. от 0 до 2 пи*/
double frequency;
// громкость звука, от 0 до 1
double amplitude;
// частота дискретизации
uint32_t sample_rate;
// фаза. от 0 до 2 пи
double phase;
};