Deluge Firmware
1.3.0
Build date: 2026.11.28
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 "dsp/oscillators/supersaw.h"
20
#include "storage/wave_table/wave_table.h"
21
namespace
deluge::dsp {
22
23
class
Oscillator
{
24
static
void
maybeStorePhase(
const
OscType& type, uint32_t* startPhase, uint32_t phase,
bool
doPulseWave);
25
static
void
applyAmplitudeVectorToBuffer(int32_t amplitude, int32_t numSamples, int32_t amplitudeIncrement,
26
int32_t* outputBufferPos, int32_t* inputBuferPos);
27
28
public
:
29
static
void
renderOsc(OscType type, int32_t amplitude, int32_t* bufferStart, int32_t* bufferEnd, int32_t numSamples,
30
uint32_t phaseIncrement, uint32_t pulseWidth, uint32_t* startPhase,
bool
applyAmplitude,
31
int32_t amplitudeIncrement,
bool
doOscSync, uint32_t resetterPhase,
32
uint32_t resetterPhaseIncrement, uint32_t retriggerPhase, int32_t waveIndexIncrement,
33
int
sourceWaveIndexLastTime,
WaveTable
* waveTable,
Supersaw::SidePhases
* supersawPhases);
34
};
35
36
}
// namespace deluge::dsp
WaveTable
Definition
wave_table.h:42
deluge::dsp::Oscillator
Definition
oscillator.h:23
deluge::dsp::Supersaw::SidePhases
std::array< uint32_t, kNumSaws - 1 > SidePhases
Phases of the side saws. The centre saw's phase is the regular oscillator phase.
Definition
supersaw.h:33