Deluge Firmware
1.3.0
Build date: 2026.08.29
Toggle main menu visibility
Loading...
Searching...
No Matches
oscillator.h
1
/*
2
* Copyright © 2017-2023 Synthstrom Audible Limited, 2025 Mark Adams
3
*
4
* This file is part of The Synthstrom Audible Deluge Firmware.
5
*
6
* The Synthstrom Audible Deluge Firmware is free software: you can redistribute it and/or modify it under the
7
* terms of the GNU General Public License as published by the Free Software Foundation,
8
* either version 3 of the License, or (at your option) any later version.
9
*
10
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
11
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
* See the GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License along with this program.
15
* If not, see <https://www.gnu.org/licenses/>.
16
*/
17
#pragma once
18
19
#include "storage/wave_table/wave_table.h"
20
namespace
deluge::dsp {
21
22
class
Oscillator
{
23
static
void
maybeStorePhase(
const
OscType& type, uint32_t* startPhase, uint32_t phase,
bool
doPulseWave);
24
static
void
applyAmplitudeVectorToBuffer(int32_t amplitude, int32_t numSamples, int32_t amplitudeIncrement,
25
int32_t* outputBufferPos, int32_t* inputBuferPos);
26
27
public
:
28
static
void
renderOsc(OscType type, int32_t amplitude, int32_t* bufferStart, int32_t* bufferEnd, int32_t numSamples,
29
uint32_t phaseIncrement, uint32_t pulseWidth, uint32_t* startPhase,
bool
applyAmplitude,
30
int32_t amplitudeIncrement,
bool
doOscSync, uint32_t resetterPhase,
31
uint32_t resetterPhaseIncrement, uint32_t retriggerPhase, int32_t waveIndexIncrement,
32
int
sourceWaveIndexLastTime,
WaveTable
* waveTable);
33
};
34
35
}
// namespace deluge::dsp
WaveTable
Definition
wave_table.h:42
deluge::dsp::Oscillator
Definition
oscillator.h:22