Deluge Firmware
1.3.0
Build date: 2026.09.19
Toggle main menu visibility
Loading...
Searching...
No Matches
voice_unison_part_source.h
1
/*
2
* Copyright © 2014-2023 Synthstrom Audible Limited
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
18
#pragma once
19
20
#include "definitions_cxx.hpp"
21
#include "model/sample/sample.h"
22
#include <gsl/gsl>
23
24
class
TimeStretcher
;
25
class
VoiceSamplePlaybackGuide
;
26
class
Source
;
27
class
Voice
;
28
class
VoiceSample
;
29
class
LivePitchShifter
;
30
class
DxVoice
;
31
32
class
VoiceUnisonPartSource {
33
public
:
34
VoiceUnisonPartSource() =
default
;
35
~VoiceUnisonPartSource();
36
bool
noteOn(
Voice
* voice,
Source
* source,
VoiceSamplePlaybackGuide
* voiceSource, uint32_t samplesLate,
37
uint32_t oscPhase,
bool
resetEverything, SynthMode synthMode, uint8_t velocity);
38
void
unassign(
bool
deletingSong);
39
bool
getPitchAndSpeedParams(
Source
* source,
VoiceSamplePlaybackGuide
* voiceSource, uint32_t* phaseIncrement,
40
uint32_t* timeStretchRatio, uint32_t* noteLengthInSamples);
41
uint32_t getSpeedParamForNoSyncing(
Source
* source, int32_t phaseIncrement, int32_t pitchAdjustNeutralValue);
42
43
uint32_t oscPos;
// FKA phase. No longer used for Sample playback / rate conversion position. Only waves, including
44
// wavetable.
45
uint32_t phaseIncrementStoredValue;
46
int32_t carrierFeedback;
47
bool
active;
48
VoiceSample
* voiceSample =
nullptr
;
49
LivePitchShifter
* livePitchShifter =
nullptr
;
50
gsl::owner<DxVoice*> dxVoice =
nullptr
;
51
};
DxVoice
Definition
dx7note.h:76
LivePitchShifter
Definition
live_pitch_shifter.h:25
Source
Definition
source.h:31
TimeStretcher
Definition
time_stretcher.h:37
VoiceSamplePlaybackGuide
Definition
voice_sample_playback_guide.h:28
VoiceSample
Definition
voice_sample.h:36
Voice
Definition
voice.h:35