Deluge Firmware
Loading...
Searching...
No Matches
Macros | Functions | Variables
voice.cpp File Reference
#include <AudioEngine.h>
#include <AudioFileManager.h>
#include <Cluster.h>
#include <sound.h>
#include "voice.h"
#include "definitions.h"
#include "FilterSet.h"
#include "functions.h"
#include "FilterSetConfig.h"
#include "song.h"
#include "TimeStretcher.h"
#include "Sample.h"
#include <string.h>
#include <WaveformRenderer.h>
#include "playbackhandler.h"
#include "WaveTable.h"
#include "GeneralMemoryAllocator.h"
#include "MultisampleRange.h"
#include "storagemanager.h"
#include "SampleCache.h"
#include "VoiceSample.h"
#include "LivePitchShifter.h"
#include <new>
#include "arm_neon.h"
#include "lookuptables.h"
#include "uart.h"
#include "ModelStack.h"
#include "SampleHolderForVoice.h"
#include "renderWave.h"
#include "ParamSet.h"
#include "PatchCableSet.h"
#include "InstrumentClip.h"
#include "FlashStorage.h"
#include "ssi_all_cpus.h"
#include "mtu.h"
#include "uart_all_cpus.h"
Include dependency graph for voice.cpp:

Macros

#define fmVectorLoopComponent(i)
 

Functions

int32_t spareRenderingBuffer[3][SSI_TX_BUFFER_NUM_SAMPLES__attribute__ ((aligned(CACHE_LINE_SIZE)))
 
int32_t doFMNew (uint32_t carrierPhase, uint32_t phaseShift)
 
int32x4_t getSineVector (uint32_t *thisPhase, uint32_t phaseIncrement)
 
int32x4_t doFMVector (uint32x4_t phaseVector, uint32x4_t phaseShift)
 
 CREATE_WAVE_RENDER_FUNCTION_INSTANCE (renderWave, waveRenderingFunctionGeneral)
 
 CREATE_WAVE_RENDER_FUNCTION_INSTANCE (renderPulseWave, waveRenderingFunctionPulse)
 
uint32_t renderCrudeSawWaveWithAmplitude (int32_t *thisSample, int32_t *bufferEnd, uint32_t phaseNowNow, uint32_t phaseIncrementNow, int32_t amplitudeNow, int32_t amplitudeIncrement, int numSamples)
 
uint32_t renderCrudeSawWaveWithoutAmplitude (int32_t *thisSample, int32_t *bufferEnd, uint32_t phaseNowNow, uint32_t phaseIncrementNow, int numSamples)
 
void renderPDWave (const int16_t *table, const int16_t *secondTable, int numBitsInTableSize, int numBitsInSecondTableSize, int32_t amplitude, int32_t *thisSample, int32_t *bufferEnd, int numSamplesRemaining, uint32_t phaseIncrementNow, uint32_t *thisPhase, bool applyAmplitude, bool doOscSync, uint32_t resetterPhase, uint32_t resetterPhaseIncrement, uint32_t resetterHalfPhaseIncrement, uint32_t resetterLower, int32_t resetterDivideByPhaseIncrement, uint32_t pulseWidth, uint32_t phaseToAdd, uint32_t retriggerPhase, uint32_t horizontalOffsetThing, int32_t amplitudeIncrement, int32_t(*waveValueFunction)(const int16_t *, int, uint32_t, uint32_t, uint32_t))
 
void getTableNumber (uint32_t phaseIncrementForCalculations, int *tableNumber, int *tableSize)
 
 __attribute__ ((optimize("unroll-loops"))) void Voice
 

Variables

const PatchableInfo patchableInfoForVoice
 
uint32_t lastSoundOrder = 0
 
const int16_t * sawTables [] = {NULL, NULL, NULL, NULL, NULL, NULL, sawWave215, sawWave153, sawWave109, sawWave76, sawWave53, sawWave39, sawWave27, sawWave19, sawWave13, sawWave9, sawWave7, sawWave5, sawWave3, sawWave1}
 
const int16_t * squareTables [] = {NULL, NULL, NULL, NULL, NULL, NULL, squareWave215, squareWave153, squareWave109, squareWave76, squareWave53, squareWave39, squareWave27, squareWave19, squareWave13, squareWave9, squareWave7, squareWave5, squareWave3, squareWave1}
 
const int16_t * analogSquareTables []
 
const int16_t * analogSawTables []
 

Macro Definition Documentation

◆ fmVectorLoopComponent

#define fmVectorLoopComponent (   i)
Value:
{ \
uint32_t readOffsetNow = (vgetq_lane_u32(finalPhase, i) >> (32 - SINE_TABLE_SIZE_MAGNITUDE)) << 2; \
uint32_t* thisReadAddress = (uint32_t*)((uint32_t)sineWaveDiff + readOffsetNow); \
readValue = vld1q_lane_u32(thisReadAddress, readValue, i); \
}
const int16_t sineWaveDiff[]
#define SINE_TABLE_SIZE_MAGNITUDE
Definition: lookuptables.h:33

Function Documentation

◆ __attribute__() [1/2]

int32_t spareRenderingBuffer[3][SSI_TX_BUFFER_NUM_SAMPLES] __attribute__ ( (aligned(CACHE_LINE_SIZE))  )

◆ __attribute__() [2/2]

__attribute__ ( (optimize("unroll-loops"))  )

◆ CREATE_WAVE_RENDER_FUNCTION_INSTANCE() [1/2]

CREATE_WAVE_RENDER_FUNCTION_INSTANCE ( renderPulseWave  ,
waveRenderingFunctionPulse   
)

◆ CREATE_WAVE_RENDER_FUNCTION_INSTANCE() [2/2]

CREATE_WAVE_RENDER_FUNCTION_INSTANCE ( renderWave  ,
waveRenderingFunctionGeneral   
)

◆ doFMNew()

int32_t doFMNew ( uint32_t  carrierPhase,
uint32_t  phaseShift 
)

◆ doFMVector()

int32x4_t doFMVector ( uint32x4_t  phaseVector,
uint32x4_t  phaseShift 
)
inline

◆ getSineVector()

int32x4_t getSineVector ( uint32_t *  thisPhase,
uint32_t  phaseIncrement 
)
inline

◆ getTableNumber()

void getTableNumber ( uint32_t  phaseIncrementForCalculations,
int *  tableNumber,
int *  tableSize 
)

◆ renderCrudeSawWaveWithAmplitude()

uint32_t renderCrudeSawWaveWithAmplitude ( int32_t *  thisSample,
int32_t *  bufferEnd,
uint32_t  phaseNowNow,
uint32_t  phaseIncrementNow,
int32_t  amplitudeNow,
int32_t  amplitudeIncrement,
int  numSamples 
)

◆ renderCrudeSawWaveWithoutAmplitude()

uint32_t renderCrudeSawWaveWithoutAmplitude ( int32_t *  thisSample,
int32_t *  bufferEnd,
uint32_t  phaseNowNow,
uint32_t  phaseIncrementNow,
int  numSamples 
)

◆ renderPDWave()

void renderPDWave ( const int16_t *  table,
const int16_t *  secondTable,
int  numBitsInTableSize,
int  numBitsInSecondTableSize,
int32_t  amplitude,
int32_t *  thisSample,
int32_t *  bufferEnd,
int  numSamplesRemaining,
uint32_t  phaseIncrementNow,
uint32_t *  thisPhase,
bool  applyAmplitude,
bool  doOscSync,
uint32_t  resetterPhase,
uint32_t  resetterPhaseIncrement,
uint32_t  resetterHalfPhaseIncrement,
uint32_t  resetterLower,
int32_t  resetterDivideByPhaseIncrement,
uint32_t  pulseWidth,
uint32_t  phaseToAdd,
uint32_t  retriggerPhase,
uint32_t  horizontalOffsetThing,
int32_t  amplitudeIncrement,
int32_t(*)(const int16_t *, int, uint32_t, uint32_t, uint32_t)  waveValueFunction 
)

Variable Documentation

◆ analogSawTables

const int16_t* analogSawTables[]
Initial value:
const int16_t mysterySynthASaw_861[]
Definition: lookuptables_mystery_synth_a_saw.cpp:697
const int16_t mysterySynthASaw_215[]
Definition: lookuptables_mystery_synth_a_saw.cpp:157
const int16_t mysterySynthBSaw_3[]
Definition: lookuptables_mystery_synth_b_saw.cpp:61
const int16_t mysterySynthBSaw_1[]
Definition: lookuptables_mystery_synth_b_saw.cpp:22
const int16_t mysterySynthBSaw_5[]
Definition: lookuptables_mystery_synth_b_saw.cpp:100
const int16_t mysterySynthBSaw_76[]
Definition: lookuptables_mystery_synth_b_saw.cpp:924
const int16_t mysterySynthBSaw_109[]
Definition: lookuptables_mystery_synth_b_saw.cpp:1059
const int16_t mysterySynthASaw_431[]
Definition: lookuptables_mystery_synth_a_saw.cpp:427
const int16_t mysterySynthASaw_609[]
Definition: lookuptables_mystery_synth_a_saw.cpp:562
const int16_t mysterySynthBSaw_9[]
Definition: lookuptables_mystery_synth_b_saw.cpp:242
const int16_t mysterySynthBSaw_13[]
Definition: lookuptables_mystery_synth_b_saw.cpp:313
const int16_t mysterySynthASaw_305[]
Definition: lookuptables_mystery_synth_a_saw.cpp:292
const int16_t mysterySynthASaw_153[]
Definition: lookuptables_mystery_synth_a_saw.cpp:22
const int16_t mysterySynthBSaw_53[]
Definition: lookuptables_mystery_synth_b_saw.cpp:789
const int16_t mysterySynthBSaw_27[]
Definition: lookuptables_mystery_synth_b_saw.cpp:519
const int16_t mysterySynthBSaw_7[]
Definition: lookuptables_mystery_synth_b_saw.cpp:171
const int16_t mysterySynthBSaw_39[]
Definition: lookuptables_mystery_synth_b_saw.cpp:654
const int16_t mysterySynthBSaw_19[]
Definition: lookuptables_mystery_synth_b_saw.cpp:384
const int16_t mysterySynthASaw_1722[]
Definition: lookuptables_mystery_synth_a_saw.cpp:1223
const int16_t mysterySynthASaw_1217[]
Definition: lookuptables_mystery_synth_a_saw.cpp:960

◆ analogSquareTables

const int16_t* analogSquareTables[]
Initial value:
const int16_t analogSquare_609[]
Definition: lookuptables_analog_square.cpp:1735
const int16_t analogSquare_27[]
Definition: lookuptables_analog_square.cpp:520
const int16_t analogSquare_3[]
Definition: lookuptables_analog_square.cpp:62
const int16_t analogSquare_153[]
Definition: lookuptables_analog_square.cpp:1195
const int16_t analogSquare_861[]
Definition: lookuptables_analog_square.cpp:1870
const int16_t analogSquare_13[]
Definition: lookuptables_analog_square.cpp:314
const int16_t analogSquare_7[]
Definition: lookuptables_analog_square.cpp:172
const int16_t analogSquare_19[]
Definition: lookuptables_analog_square.cpp:385
const int16_t analogSquare_109[]
Definition: lookuptables_analog_square.cpp:1060
const int16_t analogSquare_305[]
Definition: lookuptables_analog_square.cpp:1465
const int16_t analogSquare_76[]
Definition: lookuptables_analog_square.cpp:925
const int16_t analogSquare_5[]
Definition: lookuptables_analog_square.cpp:101
const int16_t analogSquare_53[]
Definition: lookuptables_analog_square.cpp:790
const int16_t analogSquare_1722[]
Definition: lookuptables_analog_square.cpp:2397
const int16_t analogSquare_1217[]
Definition: lookuptables_analog_square.cpp:2133
const int16_t analogSquare_9[]
Definition: lookuptables_analog_square.cpp:243
const int16_t analogSquare_215[]
Definition: lookuptables_analog_square.cpp:1330
const int16_t analogSquare_1[]
Definition: lookuptables_analog_square.cpp:23
const int16_t analogSquare_431[]
Definition: lookuptables_analog_square.cpp:1600
const int16_t analogSquare_39[]
Definition: lookuptables_analog_square.cpp:655

◆ lastSoundOrder

uint32_t lastSoundOrder = 0

◆ patchableInfoForVoice

const PatchableInfo patchableInfoForVoice
Initial value:
= {
offsetof(Voice, paramFinalValues) - offsetof(Voice, patcher),
offsetof(Voice, sourceValues) - offsetof(Voice, patcher),
0,
}
Definition: voice.h:33
#define FIRST_LOCAL_EXP_PARAM
Definition: definitions.h:428
#define FIRST_GLOBAL_PARAM
Definition: definitions.h:430
#define FIRST_LOCAL_NON_VOLUME_PARAM
Definition: definitions.h:426
#define FIRST_LOCAL_HYBRID_PARAM
Definition: definitions.h:427
#define GLOBALITY_LOCAL
Definition: patcher.h:33

◆ sawTables

const int16_t* sawTables[] = {NULL, NULL, NULL, NULL, NULL, NULL, sawWave215, sawWave153, sawWave109, sawWave76, sawWave53, sawWave39, sawWave27, sawWave19, sawWave13, sawWave9, sawWave7, sawWave5, sawWave3, sawWave1}

◆ squareTables