DaisySP
Loading...
Searching...
No Matches
vosim.h
Go to the documentation of this file.
1/*
2Copyright (c) 2020 Electrosmith, Corp, Emilie Gillet
3
4Use of this source code is governed by an MIT-style
5license that can be found in the LICENSE file or at
6https://opensource.org/licenses/MIT.
7*/
8
9#pragma once
10#ifndef DSY_VOSIM_H
11#define DSY_VOSIM_H
12
13#include <stdint.h>
14#ifdef __cplusplus
15
18namespace daisysp
19{
30{
31 public:
34
38 void Init(float sample_rate);
39
42 float Process();
43
47 void SetFreq(float freq);
48
52 void SetForm1Freq(float freq);
53
57 void SetForm2Freq(float freq);
58
62 void SetShape(float shape);
63
64 private:
65 float Sine(float phase);
66
67 float sample_rate_;
68
69 // Oscillator state.
70 float carrier_phase_;
71 float formant_1_phase_;
72 float formant_2_phase_;
73
74 // For interpolation of parameters.
75 float carrier_frequency_;
76 float formant_1_frequency_;
77 float formant_2_frequency_;
78 float carrier_shape_;
79};
80} // namespace daisysp
81#endif
82#endif
Definition delayline.h:29
Vosim Oscillator Module .
Definition vosim.h:30
void SetForm1Freq(float freq)
Definition vosim.cpp:59
void SetShape(float shape)
Definition vosim.cpp:73
float Process()
Definition vosim.cpp:21
void SetForm2Freq(float freq)
Definition vosim.cpp:66
void SetFreq(float freq)
Definition vosim.cpp:53
void Init(float sample_rate)
Definition vosim.cpp:7
FIR Filter implementation, generic and ARM CMSIS DSP based.
Definition adenv.h:16