DaisySP
Loading...
Searching...
No Matches
flanger.h
Go to the documentation of this file.
1/*
2Copyright (c) 2020 Electrosmith, Corp
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_FLANGER_H
11#define DSY_FLANGER_H
12#ifdef __cplusplus
13
14#include <stdint.h>
15#include "Utility/delayline.h"
16
19namespace daisysp
20{
27{
28 public:
32 void Init(float sample_rate);
33
37 float Process(float in);
38
42 void SetFeedback(float feedback);
43
47 void SetLfoDepth(float depth);
48
52 void SetLfoFreq(float freq);
53
57 void SetDelay(float delay);
58
62 void SetDelayMs(float ms);
63
64 private:
65 float sample_rate_;
66 static constexpr int32_t kDelayLength = 960; // 20 ms at 48kHz = .02 * 48000
67
68 float feedback_;
69
70 //triangle lfos
71 float lfo_phase_;
72 float lfo_freq_;
73 float lfo_amp_;
74
75 float delay_;
76
78
79 float ProcessLfo();
80};
81} //namespace daisysp
82#endif
83#endif
Definition delayline.h:29
Flanging Audio Effect.
Definition flanger.h:27
float Process(float in)
Definition flanger.cpp:22
void Init(float sample_rate)
Definition flanger.cpp:7
void SetDelayMs(float ms)
Definition flanger.cpp:58
void SetLfoDepth(float depth)
Definition flanger.cpp:39
void SetDelay(float delay)
Definition flanger.cpp:52
void SetLfoFreq(float freq)
Definition flanger.cpp:45
void SetFeedback(float feedback)
Definition flanger.cpp:33
FIR Filter implementation, generic and ARM CMSIS DSP based.
Definition adenv.h:16