Deluge Firmware
|
#include "r_typedefs.h"
#include "lookuptables.h"
#include <string.h>
#include "ff.h"
#include "definitions.h"
#include "cfunctions.h"
Go to the source code of this file.
Macros | |
#define | znew (z=36969*(z&65535)+(z>>16)) |
#define | wnew (w=18000*(w&65535)+(w>>16)) |
#define | MWC (int32_t)((znew<<16)+wnew) |
#define | CONG (jcong=69069*jcong+1234567) |
Functions | |
UI * | getCurrentUI () |
void | functionsInit () |
bool | memIsNumericChars (char const *mem, int size) |
bool | stringIsNumericChars (char const *str) |
char const * | getThingName (uint8_t instrumentType) |
char | halfByteToHexChar (uint8_t thisHalfByte) |
void | intToHex (uint32_t number, char *output, int numChars=8) |
uint32_t | hexToInt (char const *string) |
uint32_t | hexToIntFixedLength (char const *__restrict__ hexChars, int length) |
void | byteToHex (uint8_t number, char *buffer) |
uint8_t | hexToByte (char const *firstChar) |
int32_t | signed_saturate_operand_unknown (int32_t val, int bits) |
int32_t | lshiftAndSaturate (int32_t val, uint8_t lshift) |
int32_t | lshiftAndSaturateUnknown (int32_t val, uint8_t lshift) |
int32_t | stringToInt (char const *string) |
int32_t | stringToUIntOrError (char const *mem) |
int32_t | memToUIntOrError (char const *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) |
int32_t | getExp (int32_t presetValue, int32_t adjustment) |
void | renderRingmodSample (int32_t *__restrict__ thisSample, int32_t amplitude, int32_t waveValueA, int32_t waveValueB) |
bool | isAudioFilename (char const *filename) |
bool | isAiffFilename (char const *filename) |
char const * | getFileNameFromEndOfPath (char const *filePathChars) |
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) |
int32_t | cableToLinearParamShortcut (int32_t sourceValue) |
int32_t | cableToExpParamShortcut (int32_t sourceValue) |
int32_t | getFinalParameterValueVolume (int32_t paramNeutralValue, int32_t patchedValue) |
int32_t | getFinalParameterValueLinear (int32_t paramNeutralValue, int32_t patchedValue) |
int32_t | getFinalParameterValueHybrid (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) |
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) |
int32_t | shiftVolumeByDB (int32_t oldValue, float offset) |
int32_t | quickLog (uint32_t input) |
int32_t | interpolateTableSigned (uint32_t input, int numBitsInInput, const int16_t *table, int numBitsInTableSize=8) |
int32_t | interpolateTable (uint32_t input, int numBitsInInput, const uint16_t *table, int numBitsInTableSize=8) |
uint32_t | interpolateTableInverse (int32_t tableValueBig, int numBitsInLookupOutput, const uint16_t *table, int numBitsInTableSize=8) |
int32_t | interpolateTableSigned2d (uint32_t inputX, uint32_t inputY, int numBitsInInputX, int numBitsInInputY, const int16_t *table, int numBitsInTableSizeX, int numBitsInTableSizeY) |
int32_t | getTanH (int32_t input, unsigned int saturationAmount) |
int32_t | getTanHUnknown (int32_t input, unsigned int saturationAmount) |
int32_t | getTanHAntialiased (int32_t input, uint32_t *lastWorkingValue, unsigned int saturationAmount) |
int32_t | getSine (uint32_t phase, uint8_t numBitsInInput=32) |
int32_t | getSquare (uint32_t phase, uint32_t phaseWidth=2147483648u) |
int32_t | getSquareSmall (uint32_t phase, uint32_t phaseWidth=2147483648u) |
int32_t | getTriangleSmall (uint32_t phase) |
int32_t | getTriangle (uint32_t phase) |
int32_t | getDecay8 (uint32_t input, uint8_t numBitsInInput) |
int32_t | getDecay4 (uint32_t input, uint8_t numBitsInInput) |
uint8_t | getRandom255 () |
int32_t | getNoise () |
void | seedRandom () |
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) |
int | strcmpspecial (char const *first, char const *second, bool shouldInterpretNoteNames=false, bool octaveStartsFromA=false) |
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 | stringToFirmwareVersion (char const *firmwareVersionString) |
void | drawSquare (uint8_t squareColour[], int intensity, uint8_t square[], uint8_t *occupancyMask, int occupancyFromWhichColourCame) |
void | drawSolidSquare (uint8_t squareColour[], uint8_t square[], uint8_t *occupancyMask) |
void | getTailColour (uint8_t rgb[], uint8_t fromRgb[]) |
void | getBlurColour (uint8_t rgb[], uint8_t fromRgb[]) |
int | increaseMagnitude (int number, int magnitude) |
int | increaseMagnitudeAndSaturate (int32_t number, int magnitude) |
int | howMuchMoreMagnitude (unsigned int to, unsigned int from) |
void | noteCodeToString (int noteCode, char *buffer, int *getLengthWithoutDot=NULL) |
double | ConvertFromIeeeExtended (unsigned char *bytes) |
int32_t | divide_round_negative (int32_t dividend, int32_t divisor) |
void | dissectIterationDependence (int probability, int *getDivisor, int *getWhichIterationWithinDivisor) |
int | encodeIterationDependence (int divisor, int iterationWithinDivisor) |
uint32_t | swapEndianness32 (uint32_t input) |
uint32_t | swapEndianness2x16 (uint32_t input) |
int32_t | clz (uint32_t input) |
int32_t | getMagnitudeOld (uint32_t input) |
int32_t | getMagnitude (uint32_t input) |
bool | isPowerOfTwo (uint32_t input) |
int | getWhichKernel (int32_t phaseIncrement) |
int | memcasecmp (char const *first, char const *second, int size) |
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 | charCaseEqual (char firstChar, char secondChar) |
bool | shouldAbortLoading () |
void | getNoteLengthNameFromMagnitude (char *text, int32_t magnitude, bool clarifyPerColumn=false) |
bool | doesFilenameFitPrefixFormat (char const *fileName, char const *filePrefix, int prefixLength) |
int | fresultToDelugeErrorCode (FRESULT result) |
void | writeInt16 (char **address, uint16_t number) |
void | writeInt32 (char **address, uint32_t number) |
Variables | |
const uint8_t | modButtonX [] |
const uint8_t | modButtonY [] |
const uint8_t | modLedX [] |
const uint8_t | modLedY [] |
uint8_t | subModeToReturnTo |
int32_t | paramRanges [] |
int32_t | paramNeutralValues [] |
static int32_t | unused |
uint32_t | z |
uint32_t | w |
uint32_t | jcong |
char | miscStringBuffer [] |
char | shortStringBuffer [] |
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 | ||
) |
|
inline |
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 | ||
) |
|
inline |
|
inline |
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 | ) |
|
inline |
UI * getCurrentUI | ( | ) |
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 | ||
) |
|
inline |
|
inline |
|
inline |
void getNoteLengthNameFromMagnitude | ( | char * | text, |
int32_t | magnitude, | ||
bool | clarifyPerColumn = false |
||
) |
uint32_t getOscInitialPhaseForZero | ( | uint8_t | waveType | ) |
int32_t getParamFromUserValue | ( | uint8_t | p, |
int8_t | userValue | ||
) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void getThingFilename | ( | char const * | thingName, |
int16_t | currentSlot, | ||
int8_t | currentSubSlot, | ||
char * | buffer | ||
) |
char const * getThingName | ( | uint8_t | instrumentType | ) |
|
inline |
|
inline |
int getWhichKernel | ( | int32_t | phaseIncrement | ) |
void greyColourOut | ( | const uint8_t * | input, |
uint8_t * | output, | ||
int32_t | greyProportion | ||
) |
char halfByteToHexChar | ( | uint8_t | thisHalfByte | ) |
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 | ||
) |
|
inline |
|
inline |
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 = 8 |
||
) |
uint32_t interpolateTableInverse | ( | int32_t | tableValueBig, |
int | numBitsInLookupOutput, | ||
const uint16_t * | table, | ||
int | numBitsInTableSize = 8 |
||
) |
|
inline |
|
inline |
void intToHex | ( | uint32_t | number, |
char * | output, | ||
int | numChars = 8 |
||
) |
bool isAiffFilename | ( | char const * | filename | ) |
bool isAudioFilename | ( | char const * | filename | ) |
|
inline |
char const * lfoTypeToString | ( | int | oscType | ) |
int32_t lookupReleaseRate | ( | int32_t | input | ) |
char const * lpfTypeToString | ( | int | lpfType | ) |
|
inline |
|
inline |
int memcasecmp | ( | char const * | first, |
char const * | second, | ||
int | size | ||
) |
bool memIsNumericChars | ( | char const * | mem, |
int | size | ||
) |
int32_t memToUIntOrError | ( | char const * | mem, |
char const *const | memEnd | ||
) |
char const * modFXParamToString | ( | int | fxType | ) |
void noteCodeToString | ( | int | noteCode, |
char * | buffer, | ||
int * | getLengthWithoutDot = NULL |
||
) |
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 | ) |
|
inline |
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 | ||
) |
|
inline |
char const * sourceToString | ( | uint8_t | source | ) |
int strcmpspecial | ( | char const * | first, |
char const * | second, | ||
bool | shouldInterpretNoteNames = false , |
||
bool | octaveStartsFromA = false |
||
) |
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 * | 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 * | mem | ) |
|
inline |
|
inline |
char const * synthModeToString | ( | int | synthMode | ) |
|
inline |
|
inline |
uint32_t jcong |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
static int32_t unused |
uint32_t w |
|
extern |