Deluge Firmware
|
#include <functions.h>
#include <sound.h>
#include "definitions.h"
#include "numericdriver.h"
#include "fatfs/ff.h"
#include "View.h"
#include "soundeditor.h"
#include "ActionLogger.h"
#include <string.h>
#include "uart.h"
#include "Encoders.h"
#include "QwertyUI.h"
#include "oled.h"
#include "sio_char.h"
#include "mtu_all_cpus.h"
Macros | |
#define | PASTEL_RANGE 230 |
#define | LANCZOS_A 4 |
#define | UnsignedToFloat(u) (((double)((long)(u - 2147483647L - 1))) + 2147483648.0) |
Functions | |
int32_t | getParamRange (int p) |
int32_t | getParamNeutralValue (int p) |
void | functionsInit () |
int32_t | getFinalParameterValueHybrid (int32_t paramNeutralValue, int32_t patchedValue) |
int32_t | getFinalParameterValueVolume (int32_t paramNeutralValue, int32_t patchedValue) |
int32_t | getFinalParameterValueLinear (int32_t paramNeutralValue, int32_t patchedValue) |
int32_t | getFinalParameterValueExp (int32_t paramNeutralValue, int32_t patchedValue) |
int32_t | getFinalParameterValueExpWithDumbEnvelopeHack (int32_t paramNeutralValue, int32_t patchedValue, int p) |
void | addAudio (StereoSample *inputBuffer, StereoSample *outputBuffer, int numSamples) |
int32_t | cableToLinearParamShortcut (int32_t sourceValue) |
int32_t | cableToExpParamShortcut (int32_t sourceValue) |
void | setRefreshTime (int newTime) |
void | changeRefreshTime (int offset) |
void | changeDimmerInterval (int offset) |
void | setDimmerInterval (int newInterval) |
char const * | sourceToString (uint8_t source) |
uint8_t | stringToSource (char const *string) |
bool | paramNeedsLPF (int p, bool fromAutomation) |
char | halfByteToHexChar (uint8_t thisHalfByte) |
char | hexCharToHalfByte (unsigned char hexChar) |
void | intToHex (uint32_t number, char *output, int numChars) |
uint32_t | hexToInt (char const *string) |
uint32_t | hexToIntFixedLength (char const *__restrict__ hexChars, int length) |
int32_t | shiftVolumeByDB (int32_t oldValue, float offset) |
int32_t | interpolateTable (uint32_t input, int numBitsInInput, const uint16_t *table, int numBitsInTableSize) |
uint32_t | interpolateTableInverse (int32_t tableValueBig, int numBitsInLookupOutput, const uint16_t *table, int numBitsInTableSize) |
int32_t | getDecay8 (uint32_t input, uint8_t numBitsInInput) |
int32_t | getDecay4 (uint32_t input, uint8_t numBitsInInput) |
int32_t | getExp (int32_t presetValue, int32_t adjustment) |
int32_t | quickLog (uint32_t input) |
bool | memIsNumericChars (char const *mem, int size) |
bool | stringIsNumericChars (char const *str) |
char const * | getThingName (uint8_t instrumentType) |
void | byteToHex (uint8_t number, char *buffer) |
uint8_t | hexToByte (char const *firstChar) |
int32_t | stringToInt (char const *__restrict__ string) |
int32_t | stringToUIntOrError (char const *__restrict__ mem) |
int32_t | memToUIntOrError (char const *__restrict__ mem, char const *const memEnd) |
void | getInstrumentPresetFilename (char const *filePrefix, int16_t presetNumber, int8_t presetSubslotNumber, char *fileName) |
char const * | oscTypeToString (unsigned int oscType) |
int | stringToOscType (char const *string) |
char const * | lfoTypeToString (int oscType) |
int | stringToLFOType (char const *string) |
char const * | synthModeToString (int synthMode) |
int | stringToSynthMode (char const *string) |
char const * | polyphonyModeToString (int synthMode) |
int | stringToPolyphonyMode (char const *string) |
char const * | fxTypeToString (int fxType) |
int | stringToFXType (char const *string) |
char const * | modFXParamToString (int fxType) |
int | stringToModFXParam (char const *string) |
char const * | filterTypeToString (int fxType) |
int | stringToFilterType (char const *string) |
char const * | arpModeToString (int mode) |
int | stringToArpMode (char const *string) |
char const * | lpfTypeToString (int lpfType) |
int | stringToLPFType (char const *string) |
char const * | inputChannelToString (int inputChannel) |
int | stringToInputChannel (char const *string) |
char const * | sequenceDirectionModeToString (int sequenceDirectionMode) |
int | stringToSequenceDirectionMode (char const *string) |
char const * | getInstrumentFolder (uint8_t instrumentType) |
void | getThingFilename (char const *thingName, int16_t currentSlot, int8_t currentSubSlot, char *buffer) |
bool | isAudioFilename (char const *filename) |
bool | isAiffFilename (char const *filename) |
int32_t | lookupReleaseRate (int32_t input) |
int32_t | getParamFromUserValue (uint8_t p, int8_t userValue) |
int | getLookupIndexFromValue (int32_t value, const int32_t *table, int maxIndex) |
uint32_t | rshift_round (uint32_t value, unsigned int rshift) |
int32_t | rshift_round_signed (int32_t value, unsigned int rshift) |
int32_t | instantTan (int32_t input) |
int32_t | combineHitStrengths (int32_t strength1, int32_t strength2) |
int | random (int upperLimit) |
bool | shouldDoPanning (int32_t panAmount, int32_t *amplitudeL, int32_t *amplitudeR) |
void | hueToRGB (int32_t hue, unsigned char *rgb) |
void | hueToRGBPastel (int32_t hue, unsigned char *rgb) |
uint32_t | getLFOInitialPhaseForNegativeExtreme (uint8_t waveType) |
uint32_t | getLFOInitialPhaseForZero (uint8_t waveType) |
uint32_t | getOscInitialPhaseForZero (uint8_t waveType) |
int32_t | fastPythag (int32_t x, int32_t y) |
int32_t | doLanczos (int32_t *data, int32_t pos, uint32_t posWithinPos, int memoryNumElements) |
int32_t | doLanczosCircular (int32_t *data, int32_t pos, uint32_t posWithinPos, int memoryNumElements) |
int | strcmpspecial (char const *first, char const *second, bool shouldInterpretNoteNames, bool octaveStartsFromA) |
bool | charCaseEqual (char firstChar, char secondChar) |
int | memcasecmp (char const *first, char const *second, int size) |
int | stringToFirmwareVersion (char const *firmwareVersionString) |
int | howMuchMoreMagnitude (unsigned int to, unsigned int from) |
void | noteCodeToString (int noteCode, char *buffer, int *getLengthWithoutDot) |
void | seedRandom () |
double | ConvertFromIeeeExtended (unsigned char *bytes) |
int32_t | divide_round_negative (int32_t dividend, int32_t divisor) |
int | getWhichKernel (int32_t phaseIncrement) |
void | dissectIterationDependence (int probability, int *getDivisor, int *getWhichIterationWithinDivisor) |
int | encodeIterationDependence (int divisor, int iterationWithinDivisor) |
int | getHowManyCharsAreTheSame (char const *a, char const *b) |
void | greyColourOut (const uint8_t *input, uint8_t *output, int32_t greyProportion) |
void | dimColour (uint8_t colour[3]) |
bool | shouldAbortLoading () |
void | getNoteLengthNameFromMagnitude (char *text, int32_t magnitude, bool clarifyPerColumn) |
char const * | getFileNameFromEndOfPath (char const *filePathChars) |
bool | doesFilenameFitPrefixFormat (char const *fileName, char const *filePrefix, int prefixLength) |
int | fresultToDelugeErrorCode (FRESULT result) |
char miscStringBuffer[FILENAME_BUFFER_SIZE] | __attribute__ ((aligned(CACHE_LINE_SIZE))) |
Variables | |
const uint8_t | modButtonX [6] = {0, 0, 1, 1, 2, 3} |
const uint8_t | modButtonY [6] = {1, 0, 0, 1, 1, 1} |
const uint8_t | modLedX [6] = {0, 0, 1, 1, 2, 3} |
const uint8_t | modLedY [6] = {2, 3, 3, 2, 2, 2} |
int32_t | paramRanges [NUM_PARAMS] |
int32_t | paramNeutralValues [NUM_PARAMS] |
int | refreshTime |
int | dimmerInterval = 0 |
const float | dbIntervals [] |
uint32_t | z =362436069 |
uint32_t | w =521288629 |
uint32_t | jcong =380116160 |
const int32_t | pythagTable [257] |
const int16_t | lanczosKernel [257] |
#define LANCZOS_A 4 |
#define PASTEL_RANGE 230 |
#define UnsignedToFloat | ( | u | ) | (((double)((long)(u - 2147483647L - 1))) + 2147483648.0) |
char miscStringBuffer[FILENAME_BUFFER_SIZE] __attribute__ | ( | (aligned(CACHE_LINE_SIZE)) | ) |
void addAudio | ( | StereoSample * | inputBuffer, |
StereoSample * | outputBuffer, | ||
int | numSamples | ||
) |
char const * arpModeToString | ( | int | mode | ) |
void byteToHex | ( | uint8_t | number, |
char * | buffer | ||
) |
int32_t cableToExpParamShortcut | ( | int32_t | sourceValue | ) |
int32_t cableToLinearParamShortcut | ( | int32_t | sourceValue | ) |
void changeDimmerInterval | ( | int | offset | ) |
void changeRefreshTime | ( | int | offset | ) |
bool charCaseEqual | ( | char | firstChar, |
char | secondChar | ||
) |
int32_t combineHitStrengths | ( | int32_t | strength1, |
int32_t | strength2 | ||
) |
double ConvertFromIeeeExtended | ( | unsigned char * | bytes | ) |
void dimColour | ( | uint8_t | colour[3] | ) |
void dissectIterationDependence | ( | int | probability, |
int * | getDivisor, | ||
int * | getWhichIterationWithinDivisor | ||
) |
int32_t divide_round_negative | ( | int32_t | dividend, |
int32_t | divisor | ||
) |
bool doesFilenameFitPrefixFormat | ( | char const * | fileName, |
char const * | filePrefix, | ||
int | prefixLength | ||
) |
int32_t doLanczos | ( | int32_t * | data, |
int32_t | pos, | ||
uint32_t | posWithinPos, | ||
int | memoryNumElements | ||
) |
int32_t doLanczosCircular | ( | int32_t * | data, |
int32_t | pos, | ||
uint32_t | posWithinPos, | ||
int | memoryNumElements | ||
) |
int encodeIterationDependence | ( | int | divisor, |
int | iterationWithinDivisor | ||
) |
int32_t fastPythag | ( | int32_t | x, |
int32_t | y | ||
) |
char const * filterTypeToString | ( | int | fxType | ) |
int fresultToDelugeErrorCode | ( | FRESULT | result | ) |
void functionsInit | ( | ) |
char const * fxTypeToString | ( | int | fxType | ) |
int32_t getDecay4 | ( | uint32_t | input, |
uint8_t | numBitsInInput | ||
) |
int32_t getDecay8 | ( | uint32_t | input, |
uint8_t | numBitsInInput | ||
) |
int32_t getExp | ( | int32_t | presetValue, |
int32_t | adjustment | ||
) |
char const * getFileNameFromEndOfPath | ( | char const * | filePathChars | ) |
int32_t getFinalParameterValueExp | ( | int32_t | paramNeutralValue, |
int32_t | patchedValue | ||
) |
int32_t getFinalParameterValueExpWithDumbEnvelopeHack | ( | int32_t | paramNeutralValue, |
int32_t | patchedValue, | ||
int | p | ||
) |
int32_t getFinalParameterValueHybrid | ( | int32_t | paramNeutralValue, |
int32_t | patchedValue | ||
) |
int32_t getFinalParameterValueLinear | ( | int32_t | paramNeutralValue, |
int32_t | patchedValue | ||
) |
int32_t getFinalParameterValueVolume | ( | int32_t | paramNeutralValue, |
int32_t | patchedValue | ||
) |
int getHowManyCharsAreTheSame | ( | char const * | a, |
char const * | b | ||
) |
char const * getInstrumentFolder | ( | uint8_t | instrumentType | ) |
void getInstrumentPresetFilename | ( | char const * | filePrefix, |
int16_t | presetNumber, | ||
int8_t | presetSubslotNumber, | ||
char * | fileName | ||
) |
uint32_t getLFOInitialPhaseForNegativeExtreme | ( | uint8_t | waveType | ) |
uint32_t getLFOInitialPhaseForZero | ( | uint8_t | waveType | ) |
int getLookupIndexFromValue | ( | int32_t | value, |
const int32_t * | table, | ||
int | maxIndex | ||
) |
void getNoteLengthNameFromMagnitude | ( | char * | text, |
int32_t | magnitude, | ||
bool | clarifyPerColumn | ||
) |
uint32_t getOscInitialPhaseForZero | ( | uint8_t | waveType | ) |
int32_t getParamFromUserValue | ( | uint8_t | p, |
int8_t | userValue | ||
) |
int32_t getParamNeutralValue | ( | int | p | ) |
int32_t getParamRange | ( | int | p | ) |
void getThingFilename | ( | char const * | thingName, |
int16_t | currentSlot, | ||
int8_t | currentSubSlot, | ||
char * | buffer | ||
) |
char const * getThingName | ( | uint8_t | instrumentType | ) |
int getWhichKernel | ( | int32_t | phaseIncrement | ) |
void greyColourOut | ( | const uint8_t * | input, |
uint8_t * | output, | ||
int32_t | greyProportion | ||
) |
char halfByteToHexChar | ( | uint8_t | thisHalfByte | ) |
char hexCharToHalfByte | ( | unsigned char | hexChar | ) |
uint8_t hexToByte | ( | char const * | firstChar | ) |
uint32_t hexToInt | ( | char const * | string | ) |
uint32_t hexToIntFixedLength | ( | char const *__restrict__ | hexChars, |
int | length | ||
) |
int howMuchMoreMagnitude | ( | unsigned int | to, |
unsigned int | from | ||
) |
void hueToRGB | ( | int32_t | hue, |
unsigned char * | rgb | ||
) |
void hueToRGBPastel | ( | int32_t | hue, |
unsigned char * | rgb | ||
) |
char const * inputChannelToString | ( | int | inputChannel | ) |
int32_t instantTan | ( | int32_t | input | ) |
int32_t interpolateTable | ( | uint32_t | input, |
int | numBitsInInput, | ||
const uint16_t * | table, | ||
int | numBitsInTableSize | ||
) |
uint32_t interpolateTableInverse | ( | int32_t | tableValueBig, |
int | numBitsInLookupOutput, | ||
const uint16_t * | table, | ||
int | numBitsInTableSize | ||
) |
void intToHex | ( | uint32_t | number, |
char * | output, | ||
int | numChars | ||
) |
bool isAiffFilename | ( | char const * | filename | ) |
bool isAudioFilename | ( | char const * | filename | ) |
char const * lfoTypeToString | ( | int | oscType | ) |
int32_t lookupReleaseRate | ( | int32_t | input | ) |
char const * lpfTypeToString | ( | int | lpfType | ) |
int memcasecmp | ( | char const * | first, |
char const * | second, | ||
int | size | ||
) |
bool memIsNumericChars | ( | char const * | mem, |
int | size | ||
) |
int32_t memToUIntOrError | ( | char const *__restrict__ | mem, |
char const *const | memEnd | ||
) |
char const * modFXParamToString | ( | int | fxType | ) |
void noteCodeToString | ( | int | noteCode, |
char * | buffer, | ||
int * | getLengthWithoutDot | ||
) |
char const * oscTypeToString | ( | unsigned int | oscType | ) |
bool paramNeedsLPF | ( | int | p, |
bool | fromAutomation | ||
) |
char const * polyphonyModeToString | ( | int | synthMode | ) |
int32_t quickLog | ( | uint32_t | input | ) |
int random | ( | int | upperLimit | ) |
uint32_t rshift_round | ( | uint32_t | value, |
unsigned int | rshift | ||
) |
int32_t rshift_round_signed | ( | int32_t | value, |
unsigned int | rshift | ||
) |
void seedRandom | ( | ) |
char const * sequenceDirectionModeToString | ( | int | sequenceDirectionMode | ) |
void setDimmerInterval | ( | int | newInterval | ) |
void setRefreshTime | ( | int | newTime | ) |
int32_t shiftVolumeByDB | ( | int32_t | oldValue, |
float | offset | ||
) |
bool shouldAbortLoading | ( | ) |
bool shouldDoPanning | ( | int32_t | panAmount, |
int32_t * | amplitudeL, | ||
int32_t * | amplitudeR | ||
) |
char const * sourceToString | ( | uint8_t | source | ) |
int strcmpspecial | ( | char const * | first, |
char const * | second, | ||
bool | shouldInterpretNoteNames, | ||
bool | octaveStartsFromA | ||
) |
bool stringIsNumericChars | ( | char const * | str | ) |
int stringToArpMode | ( | char const * | string | ) |
int stringToFilterType | ( | char const * | string | ) |
int stringToFirmwareVersion | ( | char const * | firmwareVersionString | ) |
int stringToFXType | ( | char const * | string | ) |
int stringToInputChannel | ( | char const * | string | ) |
int32_t stringToInt | ( | char const *__restrict__ | string | ) |
int stringToLFOType | ( | char const * | string | ) |
int stringToLPFType | ( | char const * | string | ) |
int stringToModFXParam | ( | char const * | string | ) |
int stringToOscType | ( | char const * | string | ) |
int stringToPolyphonyMode | ( | char const * | string | ) |
int stringToSequenceDirectionMode | ( | char const * | string | ) |
uint8_t stringToSource | ( | char const * | string | ) |
int stringToSynthMode | ( | char const * | string | ) |
int32_t stringToUIntOrError | ( | char const *__restrict__ | mem | ) |
char const * synthModeToString | ( | int | synthMode | ) |
const float dbIntervals[] |
int dimmerInterval = 0 |
uint32_t jcong =380116160 |
const int16_t lanczosKernel[257] |
const uint8_t modButtonX[6] = {0, 0, 1, 1, 2, 3} |
const uint8_t modButtonY[6] = {1, 0, 0, 1, 1, 1} |
const uint8_t modLedX[6] = {0, 0, 1, 1, 2, 3} |
const uint8_t modLedY[6] = {2, 3, 3, 2, 2, 2} |
int32_t paramNeutralValues[NUM_PARAMS] |
int32_t paramRanges[NUM_PARAMS] |
const int32_t pythagTable[257] |
int refreshTime |
uint32_t w =521288629 |
uint32_t z =362436069 |