Skip to content

File tremolo.h

File List > DaisySP > Source > Effects > tremolo.h

Go to the documentation of this file

Source Code

/*
Copyright (c) 2020 Electrosmith, Corp

Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/

#pragma once
#ifndef DSY_TREMOLO_H
#define DSY_TREMOLO_H

#include <stdint.h>
#ifdef __cplusplus

#include <math.h>
#include "Synthesis/oscillator.h"

namespace daisysp
{
class Tremolo
{
  public:
    Tremolo() {}
    ~Tremolo() {}

    void Init(float sample_rate);

    float Process(float in);

    void SetFreq(float freq);

    void SetWaveform(int waveform);

    void SetDepth(float depth);


  private:
    float      sample_rate_, dc_os_;
    Oscillator osc_;
};
} // namespace daisysp
#endif
#endif