Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
829ee15a2d | ||
|
|
f01d3213c0 | ||
|
|
5cf2212fc0 | ||
|
|
10c023cc3c | ||
|
|
faef8f3673 | ||
|
|
5a0106a9a4 | ||
|
|
bf2ef0ab16 | ||
|
|
c75b9dd48a | ||
|
|
519990978d | ||
|
|
692b39cc18 | ||
|
|
83422c624a | ||
|
|
44a43828f1 |
No files matched your search
@@ -28,11 +28,14 @@
|
||||
"${workspaceFolder}/Appli/TouchGFX/App",
|
||||
"${workspaceFolder}/Drivers/CMSIS/Include",
|
||||
"${workspaceFolder}/Drivers/CMSIS/Device/ST/STM32H7RSxx/Include",
|
||||
"${workspaceFolder}/Drivers/CMSIS/DSP/Include",
|
||||
"${workspaceFolder}/Drivers/CMSIS/DSP/PrivateInclude",
|
||||
"${workspaceFolder}/Drivers/STM32H7RSxx_HAL_Driver/Inc",
|
||||
"${workspaceFolder}/Drivers/CMSIS/RTOS2/Include",
|
||||
"${workspaceFolder}/Drivers/STM32H7RSxx_BSP/STM32H7S78-DK",
|
||||
"${workspaceFolder}/Drivers/STM32H7RSxx_BSP/Components/wm8904",
|
||||
"${workspaceFolder}/Appli/Core/Inc",
|
||||
"${workspaceFolder}/Appli/Core/Src",
|
||||
"${workspaceFolder}/Appli/Middlewares/ST/touchgfx_components/gpu2d/TouchGFXNema/include",
|
||||
"${workspaceFolder}/Appli/Middlewares/ST/touchgfx_components/gpu2d/NemaGFX/include",
|
||||
"${workspaceFolder}/Middlewares/Third_Party/FreeRTOS/Source/include",
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
|
||||
{
|
||||
"name": "Debug Boot",
|
||||
"type": "cortex-debug",
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"cortex-debug.variableUseNaturalFormat": true
|
||||
}
|
||||
@@ -5,18 +5,35 @@
|
||||
"label": "Build (Boot + Appli)",
|
||||
"type": "shell",
|
||||
"command": "/usr/local/opt/make/libexec/gnubin/make",
|
||||
"args": ["-j8"],
|
||||
"options": { "cwd": "${workspaceFolder}/gcc" },
|
||||
"group": { "kind": "build", "isDefault": true },
|
||||
"problemMatcher": ["$gcc"],
|
||||
"presentation": { "reveal": "always", "panel": "shared", "clear": true }
|
||||
"args": [
|
||||
"-j8"
|
||||
],
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}/gcc"
|
||||
},
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"problemMatcher": [
|
||||
"$gcc"
|
||||
],
|
||||
"presentation": {
|
||||
"reveal": "always",
|
||||
"panel": "shared",
|
||||
"clear": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "Clean",
|
||||
"type": "shell",
|
||||
"command": "/usr/local/opt/make/libexec/gnubin/make",
|
||||
"args": ["clean"],
|
||||
"options": { "cwd": "${workspaceFolder}/gcc" },
|
||||
"args": [
|
||||
"clean"
|
||||
],
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}/gcc"
|
||||
},
|
||||
"group": "build",
|
||||
"problemMatcher": []
|
||||
},
|
||||
@@ -25,9 +42,12 @@
|
||||
"type": "shell",
|
||||
"command": "/Applications/STMicroelectronics/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.macos64_2.2.500.202603051304/tools/bin/STM32_Programmer_CLI",
|
||||
"args": [
|
||||
"-c", "port=SWD",
|
||||
"-el", "${workspaceFolder}/gcc/MX66UW1G45G_STM32H7S78-DK.stldr",
|
||||
"-w", "${workspaceFolder}/Boot/TouchGFX/build/bin/target.hex",
|
||||
"-c",
|
||||
"port=SWD",
|
||||
"-el",
|
||||
"${workspaceFolder}/gcc/MX66UW1G45G_STM32H7S78-DK.stldr",
|
||||
"-w",
|
||||
"${workspaceFolder}/Boot/TouchGFX/build/bin/target.hex",
|
||||
"-v",
|
||||
"-rst"
|
||||
],
|
||||
@@ -39,9 +59,12 @@
|
||||
"type": "shell",
|
||||
"command": "/Applications/STMicroelectronics/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.macos64_2.2.500.202603051304/tools/bin/STM32_Programmer_CLI",
|
||||
"args": [
|
||||
"-c", "port=SWD",
|
||||
"-el", "${workspaceFolder}/gcc/MX66UW1G45G_STM32H7S78-DK.stldr",
|
||||
"-w", "${workspaceFolder}/Appli/TouchGFX/build/bin/target.hex",
|
||||
"-c",
|
||||
"port=SWD",
|
||||
"-el",
|
||||
"${workspaceFolder}/gcc/MX66UW1G45G_STM32H7S78-DK.stldr",
|
||||
"-w",
|
||||
"${workspaceFolder}/Appli/TouchGFX/build/bin/target.hex",
|
||||
"-v",
|
||||
"-rst"
|
||||
],
|
||||
@@ -51,7 +74,10 @@
|
||||
{
|
||||
"label": "Flash All (Boot + Appli)",
|
||||
"dependsOrder": "sequence",
|
||||
"dependsOn": ["Flash Boot", "Flash Appli"],
|
||||
"dependsOn": [
|
||||
"Flash Boot",
|
||||
"Flash Appli"
|
||||
],
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
@@ -59,12 +85,17 @@
|
||||
"type": "shell",
|
||||
"command": "/Applications/STMicroelectronics/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.stlink-gdb-server.macos64_2.2.500.202604010938/tools/bin/ST-LINK_gdbserver",
|
||||
"args": [
|
||||
"-p", "61234",
|
||||
"-l", "1",
|
||||
"-p",
|
||||
"61234",
|
||||
"-l",
|
||||
"1",
|
||||
"-d",
|
||||
"-cp", "/Applications/STMicroelectronics/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.macos64_2.2.500.202603051304/tools/bin",
|
||||
"-el", "${workspaceFolder}/gcc/MX66UW1G45G_STM32H7S78-DK.stldr",
|
||||
"-m", "1",
|
||||
"-cp",
|
||||
"/Applications/STMicroelectronics/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.macos64_2.2.500.202603051304/tools/bin",
|
||||
"-el",
|
||||
"${workspaceFolder}/gcc/MX66UW1G45G_STM32H7S78-DK.stldr",
|
||||
"-m",
|
||||
"1",
|
||||
"-k"
|
||||
],
|
||||
"isBackground": true,
|
||||
@@ -78,14 +109,19 @@
|
||||
"endsPattern": "Waiting for debugger connection|Error in initializing ST-LINK device"
|
||||
}
|
||||
},
|
||||
"presentation": { "reveal": "always", "panel": "dedicated" }
|
||||
"presentation": {
|
||||
"reveal": "always",
|
||||
"panel": "dedicated"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "Stop ST-LINK GDB Server",
|
||||
"type": "shell",
|
||||
"command": "pkill -f ST-LINK_gdbserver || true",
|
||||
"problemMatcher": [],
|
||||
"presentation": { "reveal": "silent" }
|
||||
"presentation": {
|
||||
"reveal": "silent"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
#ifndef AUDIO_ANALYSIS_H
|
||||
#define AUDIO_ANALYSIS_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* FFT calculee sur 2048 points : le spectre d'un signal reel est symetrique, donc
|
||||
* seule la moitie (0 a Fe/2) est utile -> exactement 1024 points affichables,
|
||||
* correspondant a la capacite du widget Graph cote IHM. */
|
||||
#define AUDIO_ANALYSIS_SAMPLE_RATE_HZ 48000U
|
||||
#define AUDIO_ANALYSIS_FFT_SIZE 2048U
|
||||
#define AUDIO_ANALYSIS_NUM_BINS (AUDIO_ANALYSIS_FFT_SIZE / 2U) /* 1024 : 0 a Fe/2 */
|
||||
|
||||
/* A appeler une fois au demarrage, comme AudioEffects_Init(). */
|
||||
void AudioAnalysis_Init(void);
|
||||
|
||||
/* A appeler depuis le chemin audio temps reel (ex: push_to_fifo), un echantillon
|
||||
* a la fois. Ne fait rien (cout quasi nul) tant que l'analyse n'est pas activee. */
|
||||
void AudioAnalysis_PushSample(float sample);
|
||||
|
||||
/* A appeler depuis la tache IHM (jamais depuis le contexte audio) : si un bloc de
|
||||
* AUDIO_ANALYSIS_FFT_SIZE echantillons est pret, calcule son spectre (fenetrage +
|
||||
* FFT + magnitude en dB). Retourne true si un nouveau spectre vient d'etre calcule. */
|
||||
bool AudioAnalysis_Update(void);
|
||||
|
||||
/* Spectre courant, AUDIO_ANALYSIS_NUM_BINS valeurs en dB (echelle approximative,
|
||||
* pour affichage uniquement), du bin 0 (continu) au bin NUM_BINS-1 (~Fe/2). Le
|
||||
* pas entre deux bins vaut AUDIO_ANALYSIS_SAMPLE_RATE_HZ / AUDIO_ANALYSIS_FFT_SIZE
|
||||
* (23.4375 Hz ici). Valide apres un AudioAnalysis_Update() ayant retourne true ;
|
||||
* inchange sinon (dernier spectre calcule). */
|
||||
const float *AudioAnalysis_GetMagnitudesDb(void);
|
||||
|
||||
/* Frequence (en Hz) du bin de plus forte magnitude dans le dernier spectre calcule
|
||||
* (frequence dominante / pic). Valide dans les memes conditions que
|
||||
* AudioAnalysis_GetMagnitudesDb(). */
|
||||
float AudioAnalysis_GetPeakFrequencyHz(void);
|
||||
|
||||
/* Active/desactive la capture et le calcul (pilote par le toggle de l'ecran Oscillo). */
|
||||
void AudioAnalysis_SetEnabled(bool enabled);
|
||||
bool AudioAnalysis_IsEnabled(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* AUDIO_ANALYSIS_H */
|
||||
@@ -0,0 +1,39 @@
|
||||
#ifndef AUDIO_EFFECTS_H
|
||||
#define AUDIO_EFFECTS_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "fx_octaver.h"
|
||||
#include "fx_equalizer.h"
|
||||
#include "fx_overdrive.h"
|
||||
#include "fx_saturation.h"
|
||||
#include "fx_echo.h"
|
||||
#include "fx_reverb.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Structure regroupant les parametres de tous les effets. Modifiable directement
|
||||
* (ex: depuis l'IHM) via AudioEffects_GetParams(). L'ordre de traitement fixe est :
|
||||
* octaveur -> egaliseur -> overdrive -> saturation -> echo -> reverberation. */
|
||||
typedef struct
|
||||
{
|
||||
bool audio_on_off;
|
||||
float master_volume; /* volume general en sortie de chaine, 0.0 a 1.0 */
|
||||
FxOctaverParams octaver;
|
||||
FxEqualizerParams equalizer;
|
||||
FxOverdriveParams overdrive;
|
||||
FxSaturationParams saturation;
|
||||
FxEchoParams echo;
|
||||
FxReverbParams reverb;
|
||||
} AudioEffectsParams;
|
||||
|
||||
void AudioEffects_Init(void);
|
||||
float AudioEffects_Process(float input);
|
||||
AudioEffectsParams *AudioEffects_GetParams(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* AUDIO_EFFECTS_H */
|
||||
@@ -0,0 +1,36 @@
|
||||
#ifndef FX_ECHO_H
|
||||
#define FX_ECHO_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define FX_ECHO_SAMPLE_RATE 48000U
|
||||
#define FX_ECHO_MAX_DELAY_MS 1000U
|
||||
#define FX_ECHO_BUFFER_SIZE (FX_ECHO_SAMPLE_RATE * FX_ECHO_MAX_DELAY_MS / 1000U)
|
||||
|
||||
typedef struct
|
||||
{
|
||||
bool enabled;
|
||||
float delay_ms; /* 0 a FX_ECHO_MAX_DELAY_MS */
|
||||
float feedback; /* 0.0 a <1.0 */
|
||||
float mix; /* 0.0 (sec) a 1.0 (100% repetitions) */
|
||||
} FxEchoParams;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int16_t buffer[FX_ECHO_BUFFER_SIZE];
|
||||
uint32_t write_idx;
|
||||
} FxEchoState;
|
||||
|
||||
void FxEcho_Init(FxEchoState *state, FxEchoParams *params);
|
||||
float FxEcho_Process(FxEchoState *state, const FxEchoParams *params, float input);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FX_ECHO_H */
|
||||
@@ -0,0 +1,52 @@
|
||||
#ifndef FX_EQUALIZER_H
|
||||
#define FX_EQUALIZER_H
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define FX_EQ_NUM_BANDS 10U
|
||||
|
||||
typedef struct
|
||||
{
|
||||
float freq_hz; /* frequence centrale de la bande */
|
||||
float gain_db; /* -24.0 a +24.0 dB */
|
||||
float q; /* facteur de qualite, typiquement 0.5 a 5.0 */
|
||||
} FxEqBand;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
bool enabled;
|
||||
FxEqBand bands[FX_EQ_NUM_BANDS];
|
||||
} FxEqualizerParams;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* coefficients biquad mis en cache, recalcules seulement si les parametres changent */
|
||||
float b0, b1, b2, a1, a2;
|
||||
/* dernieres valeurs de parametres utilisees pour calculer les coefficients ci-dessus */
|
||||
float last_freq_hz;
|
||||
float last_gain_db;
|
||||
float last_q;
|
||||
} FxEqBandState;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
FxEqBandState band_state[FX_EQ_NUM_BANDS];
|
||||
/* etat du filtre (direct form 1), par bande */
|
||||
float x1[FX_EQ_NUM_BANDS];
|
||||
float x2[FX_EQ_NUM_BANDS];
|
||||
float y1[FX_EQ_NUM_BANDS];
|
||||
float y2[FX_EQ_NUM_BANDS];
|
||||
} FxEqualizerState;
|
||||
|
||||
void FxEqualizer_Init(FxEqualizerState *state, FxEqualizerParams *params);
|
||||
float FxEqualizer_Process(FxEqualizerState *state, const FxEqualizerParams *params, float input);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FX_EQUALIZER_H */
|
||||
@@ -0,0 +1,48 @@
|
||||
#ifndef FX_OCTAVER_H
|
||||
#define FX_OCTAVER_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define FX_OCTAVER_BUFFER_SIZE 4096U /* buffer circulaire (puissance de 2) */
|
||||
#define FX_OCTAVER_GRAIN_SIZE 2048U /* taille de grain, en echantillons (~43ms a 48kHz) :
|
||||
* doit largement couvrir la periode des notes les plus
|
||||
* graves jouees (ex. do2 ~65Hz, periode ~734 echantillons
|
||||
* a 48kHz) pour limiter les artefacts de phase entre les
|
||||
* deux grains en fondu croise. */
|
||||
#define FX_OCTAVER_NUM_VOICES 4U /* -2oct, -1oct, +1oct, +2oct (la voie seche est geree a part) */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
bool enabled;
|
||||
float level_down2; /* niveau voix -2 octaves, 0.0 a 1.0 */
|
||||
float level_down1; /* niveau voix -1 octave, 0.0 a 1.0 */
|
||||
float level_dry; /* niveau voix originale, 0.0 a 1.0 */
|
||||
float level_up1; /* niveau voix +1 octave, 0.0 a 1.0 */
|
||||
float level_up2; /* niveau voix +2 octaves, 0.0 a 1.0 */
|
||||
} FxOctaverParams;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
float delay[2]; /* decalage courant (en echantillons) des deux grains en fondu croise */
|
||||
} FxOctaverVoiceState;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
float buffer[FX_OCTAVER_BUFFER_SIZE];
|
||||
uint32_t write_idx;
|
||||
FxOctaverVoiceState voices[FX_OCTAVER_NUM_VOICES];
|
||||
} FxOctaverState;
|
||||
|
||||
void FxOctaver_Init(FxOctaverState *state, FxOctaverParams *params);
|
||||
float FxOctaver_Process(FxOctaverState *state, const FxOctaverParams *params, float input);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FX_OCTAVER_H */
|
||||
@@ -0,0 +1,30 @@
|
||||
#ifndef FX_OVERDRIVE_H
|
||||
#define FX_OVERDRIVE_H
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
bool enabled;
|
||||
float drive; /* 0.0 a 1.0 : quantite de distorsion */
|
||||
float tone; /* 0.0 (sombre) a 1.0 (brillant) : filtre passe-bas post-distorsion */
|
||||
float level; /* gain de compensation en sortie */
|
||||
} FxOverdriveParams;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
float tone_lp_state;
|
||||
} FxOverdriveState;
|
||||
|
||||
void FxOverdrive_Init(FxOverdriveState *state, FxOverdriveParams *params);
|
||||
float FxOverdrive_Process(FxOverdriveState *state, const FxOverdriveParams *params, float input);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FX_OVERDRIVE_H */
|
||||
@@ -0,0 +1,50 @@
|
||||
#ifndef FX_REVERB_H
|
||||
#define FX_REVERB_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define FX_REVERB_NUM_COMBS 8U
|
||||
#define FX_REVERB_NUM_ALLPASS 4U
|
||||
|
||||
typedef struct
|
||||
{
|
||||
bool enabled;
|
||||
float room_size; /* 0.0 a 1.0 */
|
||||
float damping; /* 0.0 (brillant) a 1.0 (etouffe) */
|
||||
float mix; /* 0.0 (sec) a 1.0 (100% reverbere) */
|
||||
} FxReverbParams;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
float *buffer;
|
||||
uint32_t size;
|
||||
uint32_t idx;
|
||||
float filter_store;
|
||||
} FxCombState;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
float *buffer;
|
||||
uint32_t size;
|
||||
uint32_t idx;
|
||||
} FxAllpassState;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
FxCombState combs[FX_REVERB_NUM_COMBS];
|
||||
FxAllpassState allpass[FX_REVERB_NUM_ALLPASS];
|
||||
} FxReverbState;
|
||||
|
||||
void FxReverb_Init(FxReverbState *state, FxReverbParams *params);
|
||||
float FxReverb_Process(FxReverbState *state, const FxReverbParams *params, float input);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FX_REVERB_H */
|
||||
@@ -0,0 +1,30 @@
|
||||
#ifndef FX_SATURATION_H
|
||||
#define FX_SATURATION_H
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
bool enabled;
|
||||
float drive; /* 0.0 (aucun effet) a 1.0 (saturation maximale) */
|
||||
float level; /* gain de compensation en sortie, typiquement 0.0 - 1.0 */
|
||||
} FxSaturationParams;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
float dc_block_x1;
|
||||
float dc_block_y1;
|
||||
} FxSaturationState;
|
||||
|
||||
void FxSaturation_Init(FxSaturationState *state, FxSaturationParams *params);
|
||||
float FxSaturation_Process(FxSaturationState *state, const FxSaturationParams *params, float input);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FX_SATURATION_H */
|
||||
@@ -0,0 +1,155 @@
|
||||
#include "audio_analysis.h"
|
||||
#include "arm_math.h"
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
|
||||
#define FFT_SIZE AUDIO_ANALYSIS_FFT_SIZE
|
||||
#define NUM_BINS AUDIO_ANALYSIS_NUM_BINS
|
||||
|
||||
/* --- Capture en double buffer (ping-pong), ecrite depuis le chemin audio temps
|
||||
* reel, lue depuis la tache IHM. Un seul ecrivain, un seul lecteur : pas de verrou
|
||||
* necessaire, meme principe que la FIFO audio principale. --- */
|
||||
static float g_capture_buf[2][FFT_SIZE];
|
||||
static uint32_t g_capture_fill_idx = 0;
|
||||
static uint8_t g_capture_write_buf = 0;
|
||||
static volatile uint8_t g_capture_ready_buf = 0xFFU; /* 0xFF = aucun buffer complet en attente */
|
||||
|
||||
static bool g_analysis_enabled = false;
|
||||
|
||||
/* --- Fenetre precalculee (a l'init uniquement, jamais recalculee en boucle) --- */
|
||||
static float g_hann_window[FFT_SIZE];
|
||||
|
||||
/* --- FFT reelle CMSIS-DSP : instance initialisee une fois, buffers de travail --- */
|
||||
static arm_rfft_fast_instance_f32 g_rfft_instance;
|
||||
static float g_fft_work[FFT_SIZE]; /* echantillons fenetres ; ecrase (scratch) par arm_rfft_fast_f32 */
|
||||
static float g_fft_out[FFT_SIZE]; /* spectre complexe empaquete, format CMSIS (voir plus bas) */
|
||||
|
||||
static float g_magnitudes_db[NUM_BINS]; /* seule la moitie 0..Fe/2 est conservee */
|
||||
static float g_peak_freq_hz = 0.0f;
|
||||
|
||||
static void AudioAnalysis_BuildTables(void)
|
||||
{
|
||||
for (uint32_t i = 0; i < FFT_SIZE; i++)
|
||||
{
|
||||
/* Fenetre de Hann : reduit les fuites spectrales dues a la troncature du bloc. */
|
||||
g_hann_window[i] = 0.5f - 0.5f * cosf(2.0f * (float)M_PI * (float)i / (float)(FFT_SIZE - 1U));
|
||||
}
|
||||
}
|
||||
|
||||
void AudioAnalysis_Init(void)
|
||||
{
|
||||
memset(g_capture_buf, 0, sizeof(g_capture_buf));
|
||||
g_capture_fill_idx = 0;
|
||||
g_capture_write_buf = 0;
|
||||
g_capture_ready_buf = 0xFFU;
|
||||
g_analysis_enabled = false;
|
||||
|
||||
memset(g_magnitudes_db, 0, sizeof(g_magnitudes_db));
|
||||
|
||||
AudioAnalysis_BuildTables();
|
||||
arm_rfft_fast_init_f32(&g_rfft_instance, FFT_SIZE);
|
||||
}
|
||||
|
||||
void AudioAnalysis_PushSample(float sample)
|
||||
{
|
||||
if (!g_analysis_enabled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
g_capture_buf[g_capture_write_buf][g_capture_fill_idx] = sample;
|
||||
g_capture_fill_idx++;
|
||||
|
||||
if (g_capture_fill_idx >= FFT_SIZE)
|
||||
{
|
||||
g_capture_fill_idx = 0;
|
||||
g_capture_ready_buf = g_capture_write_buf;
|
||||
g_capture_write_buf = 1U - g_capture_write_buf;
|
||||
}
|
||||
}
|
||||
|
||||
bool AudioAnalysis_Update(void)
|
||||
{
|
||||
if (!g_analysis_enabled)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
uint8_t ready = g_capture_ready_buf;
|
||||
if (ready == 0xFFU)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
g_capture_ready_buf = 0xFFU;
|
||||
|
||||
for (uint32_t i = 0; i < FFT_SIZE; i++)
|
||||
{
|
||||
g_fft_work[i] = g_capture_buf[ready][i] * g_hann_window[i];
|
||||
}
|
||||
|
||||
/* arm_rfft_fast_f32 (forward, ifftFlag=0) empaquete le spectre d'un signal reel
|
||||
* en NUM_BINS paires {re,im}, sauf la premiere qui contient les deux seules
|
||||
* valeurs reelles (DC et Nyquist) : g_fft_out[0]=X[0] (DC), g_fft_out[1]=X[N/2]
|
||||
* (Nyquist, non utilise ici). Pour k=1..NUM_BINS-1 : re=g_fft_out[2k], im=g_fft_out[2k+1]. */
|
||||
arm_rfft_fast_f32(&g_rfft_instance, g_fft_work, g_fft_out, 0);
|
||||
|
||||
/* Magnitude normalisee (une sinusoide plein-echelle donne ~0dB) puis convertie
|
||||
* en dB, avec un plancher pour eviter log(0). Destine a un affichage visuel,
|
||||
* pas a une mesure calibree. Seule la moitie 0..Fe/2 du spectre est conservee :
|
||||
* le spectre d'un signal reel est symetrique, la seconde moitie n'apporte rien. */
|
||||
/* Recherche du pic en meme temps que le calcul des magnitudes. Le bin 0 (continu,
|
||||
* 0Hz) est ignore : une composante DC ne doit pas etre rapportee comme "frequence
|
||||
* dominante". */
|
||||
uint32_t peak_bin = 1U;
|
||||
float peak_mag = 0.0f;
|
||||
|
||||
for (uint32_t i = 0; i < NUM_BINS; i++)
|
||||
{
|
||||
float re = (i == 0U) ? g_fft_out[0] : g_fft_out[2U * i];
|
||||
float im = (i == 0U) ? 0.0f : g_fft_out[2U * i + 1U];
|
||||
float mag = sqrtf(re * re + im * im) / ((float)FFT_SIZE / 4.0f);
|
||||
|
||||
if (i >= 1U && mag > peak_mag)
|
||||
{
|
||||
peak_mag = mag;
|
||||
peak_bin = i;
|
||||
}
|
||||
|
||||
if (mag < 1.0e-6f)
|
||||
{
|
||||
mag = 1.0e-6f;
|
||||
}
|
||||
g_magnitudes_db[i] = 20.0f * log10f(mag);
|
||||
}
|
||||
|
||||
g_peak_freq_hz = (float)peak_bin * (float)AUDIO_ANALYSIS_SAMPLE_RATE_HZ / (float)FFT_SIZE;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
const float *AudioAnalysis_GetMagnitudesDb(void)
|
||||
{
|
||||
return g_magnitudes_db;
|
||||
}
|
||||
|
||||
float AudioAnalysis_GetPeakFrequencyHz(void)
|
||||
{
|
||||
return g_peak_freq_hz;
|
||||
}
|
||||
|
||||
void AudioAnalysis_SetEnabled(bool enabled)
|
||||
{
|
||||
if (enabled && !g_analysis_enabled)
|
||||
{
|
||||
/* Redemarre une capture propre a chaque activation. */
|
||||
g_capture_fill_idx = 0;
|
||||
g_capture_write_buf = 0;
|
||||
g_capture_ready_buf = 0xFFU;
|
||||
}
|
||||
g_analysis_enabled = enabled;
|
||||
}
|
||||
|
||||
bool AudioAnalysis_IsEnabled(void)
|
||||
{
|
||||
return g_analysis_enabled;
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
#include "audio_effects.h"
|
||||
|
||||
static AudioEffectsParams g_params;
|
||||
|
||||
static FxOctaverState g_octaverState;
|
||||
static FxEqualizerState g_eqState;
|
||||
static FxOverdriveState g_overdriveState;
|
||||
static FxSaturationState g_saturationState;
|
||||
static FxEchoState g_echoState;
|
||||
static FxReverbState g_reverbState;
|
||||
|
||||
void AudioEffects_Init(void)
|
||||
{
|
||||
g_params.audio_on_off = false;
|
||||
g_params.master_volume = 0.0f;
|
||||
FxOctaver_Init(&g_octaverState, &g_params.octaver);
|
||||
FxEqualizer_Init(&g_eqState, &g_params.equalizer);
|
||||
FxOverdrive_Init(&g_overdriveState, &g_params.overdrive);
|
||||
FxSaturation_Init(&g_saturationState, &g_params.saturation);
|
||||
FxEcho_Init(&g_echoState, &g_params.echo);
|
||||
FxReverb_Init(&g_reverbState, &g_params.reverb);
|
||||
}
|
||||
|
||||
float AudioEffects_Process(float input)
|
||||
{
|
||||
float sample = input;
|
||||
sample = FxOctaver_Process(&g_octaverState, &g_params.octaver, sample);
|
||||
sample = FxEqualizer_Process(&g_eqState, &g_params.equalizer, sample);
|
||||
sample = FxOverdrive_Process(&g_overdriveState, &g_params.overdrive, sample);
|
||||
sample = FxSaturation_Process(&g_saturationState, &g_params.saturation, sample);
|
||||
sample = FxEcho_Process(&g_echoState, &g_params.echo, sample);
|
||||
sample = FxReverb_Process(&g_reverbState, &g_params.reverb, sample);
|
||||
|
||||
/* Coupure de sortie : les effets continuent de tourner (pas de discontinuite
|
||||
* d'etat au reactivation), seule la sortie audible est reduite au silence. */
|
||||
if (!g_params.audio_on_off)
|
||||
{
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
return sample * g_params.master_volume;
|
||||
}
|
||||
|
||||
AudioEffectsParams *AudioEffects_GetParams(void)
|
||||
{
|
||||
return &g_params;
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
#include "fx_echo.h"
|
||||
#include <string.h>
|
||||
|
||||
void FxEcho_Init(FxEchoState *state, FxEchoParams *params)
|
||||
{
|
||||
memset(state->buffer, 0, sizeof(state->buffer));
|
||||
state->write_idx = 0;
|
||||
|
||||
params->enabled = false;
|
||||
params->delay_ms = 300.0f;
|
||||
params->feedback = 0.35f;
|
||||
params->mix = 0.3f;
|
||||
}
|
||||
|
||||
float FxEcho_Process(FxEchoState *state, const FxEchoParams *params, float input)
|
||||
{
|
||||
if (!params->enabled)
|
||||
{
|
||||
return input;
|
||||
}
|
||||
|
||||
uint32_t delay_samples = (uint32_t)(params->delay_ms * (FX_ECHO_SAMPLE_RATE / 1000.0f));
|
||||
if (delay_samples >= FX_ECHO_BUFFER_SIZE)
|
||||
{
|
||||
delay_samples = FX_ECHO_BUFFER_SIZE - 1U;
|
||||
}
|
||||
|
||||
uint32_t read_idx = (state->write_idx + FX_ECHO_BUFFER_SIZE - delay_samples) % FX_ECHO_BUFFER_SIZE;
|
||||
float delayed = (float)state->buffer[read_idx] / 32768.0f;
|
||||
|
||||
float to_store = input + delayed * params->feedback;
|
||||
if (to_store > 1.0f) to_store = 1.0f;
|
||||
if (to_store < -1.0f) to_store = -1.0f;
|
||||
state->buffer[state->write_idx] = (int16_t)(to_store * 32767.0f);
|
||||
state->write_idx = (state->write_idx + 1U) % FX_ECHO_BUFFER_SIZE;
|
||||
|
||||
return input * (1.0f - params->mix) + delayed * params->mix;
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
#include "fx_equalizer.h"
|
||||
#include <math.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#define FX_EQ_SAMPLE_RATE 48000.0f
|
||||
|
||||
static const float fx_eq_default_freqs[FX_EQ_NUM_BANDS] =
|
||||
{
|
||||
31.0f, 62.0f, 125.0f, 250.0f, 500.0f, 1000.0f, 2000.0f, 4000.0f, 8000.0f, 16000.0f
|
||||
};
|
||||
|
||||
void FxEqualizer_Init(FxEqualizerState *state, FxEqualizerParams *params)
|
||||
{
|
||||
params->enabled = true;
|
||||
for (uint32_t i = 0; i < FX_EQ_NUM_BANDS; i++)
|
||||
{
|
||||
params->bands[i].freq_hz = fx_eq_default_freqs[i];
|
||||
params->bands[i].gain_db = 0.0f;
|
||||
params->bands[i].q = 1.0f;
|
||||
|
||||
state->band_state[i].last_freq_hz = -1.0f; /* force le calcul des coefficients au 1er sample */
|
||||
state->band_state[i].last_gain_db = 0.0f;
|
||||
state->band_state[i].last_q = 0.0f;
|
||||
state->x1[i] = state->x2[i] = state->y1[i] = state->y2[i] = 0.0f;
|
||||
}
|
||||
|
||||
// Pour couper les basses par defaukt et éviter les larsens :
|
||||
params->bands[0].gain_db = -15.0f;
|
||||
params->bands[1].gain_db = -10.0f;
|
||||
params->bands[2].gain_db = -2.5f;
|
||||
}
|
||||
|
||||
/* Filtre "peaking EQ" (cloche), formule de l'Audio EQ Cookbook (Robert Bristow-Johnson). */
|
||||
static void FxEq_ComputeBandCoeffs(FxEqBandState *bs, const FxEqBand *band)
|
||||
{
|
||||
float A = powf(10.0f, band->gain_db / 40.0f);
|
||||
float w0 = 2.0f * (float)M_PI * band->freq_hz / FX_EQ_SAMPLE_RATE;
|
||||
float alpha = sinf(w0) / (2.0f * band->q);
|
||||
float cosw0 = cosf(w0);
|
||||
|
||||
float a0 = 1.0f + alpha / A;
|
||||
bs->b0 = (1.0f + alpha * A) / a0;
|
||||
bs->b1 = (-2.0f * cosw0) / a0;
|
||||
bs->b2 = (1.0f - alpha * A) / a0;
|
||||
bs->a1 = (-2.0f * cosw0) / a0;
|
||||
bs->a2 = (1.0f - alpha / A) / a0;
|
||||
|
||||
bs->last_freq_hz = band->freq_hz;
|
||||
bs->last_gain_db = band->gain_db;
|
||||
bs->last_q = band->q;
|
||||
}
|
||||
|
||||
float FxEqualizer_Process(FxEqualizerState *state, const FxEqualizerParams *params, float input)
|
||||
{
|
||||
if (!params->enabled)
|
||||
{
|
||||
return input;
|
||||
}
|
||||
|
||||
float y = input;
|
||||
for (uint32_t i = 0; i < FX_EQ_NUM_BANDS; i++)
|
||||
{
|
||||
const FxEqBand *band = ¶ms->bands[i];
|
||||
FxEqBandState *bs = &state->band_state[i];
|
||||
|
||||
if (band->freq_hz != bs->last_freq_hz || band->gain_db != bs->last_gain_db || band->q != bs->last_q)
|
||||
{
|
||||
FxEq_ComputeBandCoeffs(bs, band);
|
||||
}
|
||||
|
||||
float x = y;
|
||||
y = bs->b0 * x + bs->b1 * state->x1[i] + bs->b2 * state->x2[i]
|
||||
- bs->a1 * state->y1[i] - bs->a2 * state->y2[i];
|
||||
|
||||
state->x2[i] = state->x1[i];
|
||||
state->x1[i] = x;
|
||||
state->y2[i] = state->y1[i];
|
||||
state->y1[i] = y;
|
||||
}
|
||||
|
||||
return y;
|
||||
}
|
||||
@@ -0,0 +1,147 @@
|
||||
#include "fx_octaver.h"
|
||||
#include <math.h>
|
||||
|
||||
#define FX_OCTAVER_BUFFER_MASK (FX_OCTAVER_BUFFER_SIZE - 1U)
|
||||
#define FX_OCTAVER_ENV_TABLE_SIZE 256U
|
||||
|
||||
/* Rapport de vitesse de lecture pour chaque voix : lire le buffer plus vite que
|
||||
* l'ecriture multiplie la frequence (octave au-dessus), plus lentement la divise
|
||||
* (octave en-dessous). */
|
||||
static const float fx_octaver_ratios[FX_OCTAVER_NUM_VOICES] =
|
||||
{
|
||||
0.25f, /* -2 octaves */
|
||||
0.5f, /* -1 octave */
|
||||
2.0f, /* +1 octave */
|
||||
4.0f /* +2 octaves */
|
||||
};
|
||||
|
||||
/* Fenetre de Hann tabulee (evite un cosf() par grain et par echantillon). */
|
||||
static float fx_octaver_env_table[FX_OCTAVER_ENV_TABLE_SIZE + 1U];
|
||||
static bool fx_octaver_env_table_ready = false;
|
||||
|
||||
static void FxOctaver_BuildEnvTable(void)
|
||||
{
|
||||
if (fx_octaver_env_table_ready)
|
||||
{
|
||||
return;
|
||||
}
|
||||
for (uint32_t i = 0; i <= FX_OCTAVER_ENV_TABLE_SIZE; i++)
|
||||
{
|
||||
float phase = (float)i / (float)FX_OCTAVER_ENV_TABLE_SIZE;
|
||||
fx_octaver_env_table[i] = 0.5f - 0.5f * cosf(2.0f * (float)M_PI * phase);
|
||||
}
|
||||
fx_octaver_env_table_ready = true;
|
||||
}
|
||||
|
||||
static inline float FxOctaver_EnvLookup(float phase)
|
||||
{
|
||||
float pos = phase * (float)FX_OCTAVER_ENV_TABLE_SIZE;
|
||||
uint32_t i0 = (uint32_t)pos;
|
||||
if (i0 >= FX_OCTAVER_ENV_TABLE_SIZE)
|
||||
{
|
||||
i0 = FX_OCTAVER_ENV_TABLE_SIZE - 1U;
|
||||
}
|
||||
float frac = pos - (float)i0;
|
||||
return fx_octaver_env_table[i0] * (1.0f - frac) + fx_octaver_env_table[i0 + 1U] * frac;
|
||||
}
|
||||
|
||||
static inline float FxOctaver_ReadInterpolated(const float *buffer, uint32_t write_idx, float delay)
|
||||
{
|
||||
/* write_idx grandit sans jamais etre replie (compteur perpetuel) ; le convertir
|
||||
* directement en float finirait par perdre en precision (un float ne represente
|
||||
* exactement les entiers que jusqu'a ~16.7 millions, soit quelques minutes a
|
||||
* 48kHz). On calcule donc la position de lecture uniquement a partir de l'index
|
||||
* DEJA REPLIE dans le buffer, qui reste toujours petit. */
|
||||
float write_pos = (float)(write_idx & FX_OCTAVER_BUFFER_MASK);
|
||||
float read_pos = write_pos - delay;
|
||||
while (read_pos < 0.0f)
|
||||
{
|
||||
read_pos += (float)FX_OCTAVER_BUFFER_SIZE;
|
||||
}
|
||||
uint32_t i0 = (uint32_t)read_pos & FX_OCTAVER_BUFFER_MASK;
|
||||
uint32_t i1 = (i0 + 1U) & FX_OCTAVER_BUFFER_MASK;
|
||||
float frac = read_pos - (float)(uint32_t)read_pos;
|
||||
return buffer[i0] * (1.0f - frac) + buffer[i1] * frac;
|
||||
}
|
||||
|
||||
/* Lecteur de grains a deux pointeurs en fondu croise : chaque pointeur avance
|
||||
* (ou recule) dans le buffer a une vitesse "ratio" differente de celle de
|
||||
* l'ecriture, ce qui change la hauteur percue. Les deux grains sont toujours
|
||||
* en opposition de phase exacte (decales d'un demi-grain a l'origine, et le
|
||||
* meme increment est applique aux deux avant chaque repli) : la fenetre de
|
||||
* Hann du second grain vaut donc toujours 1 moins celle du premier, ce qui
|
||||
* garantit un niveau de sortie constant pendant le fondu et evite un second
|
||||
* calcul de fenetre. */
|
||||
static float FxOctaver_ProcessVoice(FxOctaverVoiceState *vs, const float *buffer, uint32_t write_idx, float ratio)
|
||||
{
|
||||
float step = 1.0f - ratio;
|
||||
|
||||
for (uint32_t g = 0; g < 2U; g++)
|
||||
{
|
||||
vs->delay[g] += step;
|
||||
if (vs->delay[g] >= (float)FX_OCTAVER_GRAIN_SIZE)
|
||||
{
|
||||
vs->delay[g] -= (float)FX_OCTAVER_GRAIN_SIZE;
|
||||
}
|
||||
else if (vs->delay[g] < 0.0f)
|
||||
{
|
||||
vs->delay[g] += (float)FX_OCTAVER_GRAIN_SIZE;
|
||||
}
|
||||
}
|
||||
|
||||
float phase0 = vs->delay[0] / (float)FX_OCTAVER_GRAIN_SIZE;
|
||||
float env0 = FxOctaver_EnvLookup(phase0);
|
||||
float env1 = 1.0f - env0;
|
||||
|
||||
float sample0 = FxOctaver_ReadInterpolated(buffer, write_idx, vs->delay[0]);
|
||||
float sample1 = FxOctaver_ReadInterpolated(buffer, write_idx, vs->delay[1]);
|
||||
|
||||
return env0 * sample0 + env1 * sample1;
|
||||
}
|
||||
|
||||
void FxOctaver_Init(FxOctaverState *state, FxOctaverParams *params)
|
||||
{
|
||||
params->enabled = false;
|
||||
params->level_down2 = 0.0f;
|
||||
params->level_down1 = 0.0f;
|
||||
params->level_dry = 1.0f;
|
||||
params->level_up1 = 0.0f;
|
||||
params->level_up2 = 0.0f;
|
||||
|
||||
for (uint32_t i = 0; i < FX_OCTAVER_BUFFER_SIZE; i++)
|
||||
{
|
||||
state->buffer[i] = 0.0f;
|
||||
}
|
||||
state->write_idx = 0U;
|
||||
|
||||
for (uint32_t v = 0; v < FX_OCTAVER_NUM_VOICES; v++)
|
||||
{
|
||||
state->voices[v].delay[0] = 0.0f;
|
||||
state->voices[v].delay[1] = (float)FX_OCTAVER_GRAIN_SIZE * 0.5f;
|
||||
}
|
||||
|
||||
FxOctaver_BuildEnvTable();
|
||||
}
|
||||
|
||||
float FxOctaver_Process(FxOctaverState *state, const FxOctaverParams *params, float input)
|
||||
{
|
||||
if (!params->enabled)
|
||||
{
|
||||
return input;
|
||||
}
|
||||
|
||||
state->buffer[state->write_idx & FX_OCTAVER_BUFFER_MASK] = input;
|
||||
|
||||
float down2 = FxOctaver_ProcessVoice(&state->voices[0], state->buffer, state->write_idx, fx_octaver_ratios[0]);
|
||||
float down1 = FxOctaver_ProcessVoice(&state->voices[1], state->buffer, state->write_idx, fx_octaver_ratios[1]);
|
||||
float up1 = FxOctaver_ProcessVoice(&state->voices[2], state->buffer, state->write_idx, fx_octaver_ratios[2]);
|
||||
float up2 = FxOctaver_ProcessVoice(&state->voices[3], state->buffer, state->write_idx, fx_octaver_ratios[3]);
|
||||
|
||||
state->write_idx++;
|
||||
|
||||
return input * params->level_dry
|
||||
+ down2 * params->level_down2
|
||||
+ down1 * params->level_down1
|
||||
+ up1 * params->level_up1
|
||||
+ up2 * params->level_up2;
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
#include "fx_overdrive.h"
|
||||
#include <math.h>
|
||||
|
||||
void FxOverdrive_Init(FxOverdriveState *state, FxOverdriveParams *params)
|
||||
{
|
||||
state->tone_lp_state = 0.0f;
|
||||
|
||||
params->enabled = false;
|
||||
params->drive = 0.4f;
|
||||
params->tone = 0.6f;
|
||||
params->level = 0.7f;
|
||||
}
|
||||
|
||||
float FxOverdrive_Process(FxOverdriveState *state, const FxOverdriveParams *params, float input)
|
||||
{
|
||||
if (!params->enabled)
|
||||
{
|
||||
return input;
|
||||
}
|
||||
|
||||
float driven = input * (1.0f + params->drive * 20.0f);
|
||||
|
||||
/* Ecretage asymetrique (exponentiel) : plus caracteristique/agressif qu'un tanh symetrique. */
|
||||
float shaped;
|
||||
if (driven >= 0.0f)
|
||||
{
|
||||
shaped = 1.0f - expf(-driven);
|
||||
}
|
||||
else
|
||||
{
|
||||
shaped = -1.0f + expf(driven);
|
||||
}
|
||||
|
||||
/* Filtre passe-bas une pole pour la tonalite : coefficient = tone (0..1). */
|
||||
float coeff = 0.05f + params->tone * 0.9f;
|
||||
state->tone_lp_state += coeff * (shaped - state->tone_lp_state);
|
||||
|
||||
return state->tone_lp_state * params->level;
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
#include "fx_reverb.h"
|
||||
#include <string.h>
|
||||
|
||||
/* Lignes a retard inspirees de Freeverb (Jezar), redimensionnees de 44.1kHz vers 48kHz. */
|
||||
#define FX_REVERB_COMB0 1215U
|
||||
#define FX_REVERB_COMB1 1293U
|
||||
#define FX_REVERB_COMB2 1390U
|
||||
#define FX_REVERB_COMB3 1476U
|
||||
#define FX_REVERB_COMB4 1548U
|
||||
#define FX_REVERB_COMB5 1623U
|
||||
#define FX_REVERB_COMB6 1695U
|
||||
#define FX_REVERB_COMB7 1761U
|
||||
|
||||
#define FX_REVERB_ALLPASS0 605U
|
||||
#define FX_REVERB_ALLPASS1 480U
|
||||
#define FX_REVERB_ALLPASS2 371U
|
||||
#define FX_REVERB_ALLPASS3 245U
|
||||
|
||||
static float fx_reverb_comb_buf0[FX_REVERB_COMB0];
|
||||
static float fx_reverb_comb_buf1[FX_REVERB_COMB1];
|
||||
static float fx_reverb_comb_buf2[FX_REVERB_COMB2];
|
||||
static float fx_reverb_comb_buf3[FX_REVERB_COMB3];
|
||||
static float fx_reverb_comb_buf4[FX_REVERB_COMB4];
|
||||
static float fx_reverb_comb_buf5[FX_REVERB_COMB5];
|
||||
static float fx_reverb_comb_buf6[FX_REVERB_COMB6];
|
||||
static float fx_reverb_comb_buf7[FX_REVERB_COMB7];
|
||||
|
||||
static float fx_reverb_allpass_buf0[FX_REVERB_ALLPASS0];
|
||||
static float fx_reverb_allpass_buf1[FX_REVERB_ALLPASS1];
|
||||
static float fx_reverb_allpass_buf2[FX_REVERB_ALLPASS2];
|
||||
static float fx_reverb_allpass_buf3[FX_REVERB_ALLPASS3];
|
||||
|
||||
static float FxComb_Process(FxCombState *c, float input, float feedback, float damp1, float damp2)
|
||||
{
|
||||
float output = c->buffer[c->idx];
|
||||
c->filter_store = (output * damp2) + (c->filter_store * damp1);
|
||||
c->buffer[c->idx] = input + (c->filter_store * feedback);
|
||||
c->idx = (c->idx + 1U) % c->size;
|
||||
return output;
|
||||
}
|
||||
|
||||
static float FxAllpass_Process(FxAllpassState *a, float input, float feedback)
|
||||
{
|
||||
float buf_out = a->buffer[a->idx];
|
||||
float output = -input + buf_out;
|
||||
a->buffer[a->idx] = input + buf_out * feedback;
|
||||
a->idx = (a->idx + 1U) % a->size;
|
||||
return output;
|
||||
}
|
||||
|
||||
void FxReverb_Init(FxReverbState *state, FxReverbParams *params)
|
||||
{
|
||||
params->enabled = false;
|
||||
params->room_size = 0.5f;
|
||||
params->damping = 0.5f;
|
||||
params->mix = 0.3f;
|
||||
|
||||
float *comb_buffers[FX_REVERB_NUM_COMBS] = {
|
||||
fx_reverb_comb_buf0, fx_reverb_comb_buf1, fx_reverb_comb_buf2, fx_reverb_comb_buf3,
|
||||
fx_reverb_comb_buf4, fx_reverb_comb_buf5, fx_reverb_comb_buf6, fx_reverb_comb_buf7
|
||||
};
|
||||
uint32_t comb_sizes[FX_REVERB_NUM_COMBS] = {
|
||||
FX_REVERB_COMB0, FX_REVERB_COMB1, FX_REVERB_COMB2, FX_REVERB_COMB3,
|
||||
FX_REVERB_COMB4, FX_REVERB_COMB5, FX_REVERB_COMB6, FX_REVERB_COMB7
|
||||
};
|
||||
for (uint32_t i = 0; i < FX_REVERB_NUM_COMBS; i++)
|
||||
{
|
||||
state->combs[i].buffer = comb_buffers[i];
|
||||
state->combs[i].size = comb_sizes[i];
|
||||
state->combs[i].idx = 0;
|
||||
state->combs[i].filter_store = 0.0f;
|
||||
memset(comb_buffers[i], 0, comb_sizes[i] * sizeof(float));
|
||||
}
|
||||
|
||||
float *allpass_buffers[FX_REVERB_NUM_ALLPASS] = {
|
||||
fx_reverb_allpass_buf0, fx_reverb_allpass_buf1, fx_reverb_allpass_buf2, fx_reverb_allpass_buf3
|
||||
};
|
||||
uint32_t allpass_sizes[FX_REVERB_NUM_ALLPASS] = {
|
||||
FX_REVERB_ALLPASS0, FX_REVERB_ALLPASS1, FX_REVERB_ALLPASS2, FX_REVERB_ALLPASS3
|
||||
};
|
||||
for (uint32_t i = 0; i < FX_REVERB_NUM_ALLPASS; i++)
|
||||
{
|
||||
state->allpass[i].buffer = allpass_buffers[i];
|
||||
state->allpass[i].size = allpass_sizes[i];
|
||||
state->allpass[i].idx = 0;
|
||||
memset(allpass_buffers[i], 0, allpass_sizes[i] * sizeof(float));
|
||||
}
|
||||
}
|
||||
|
||||
float FxReverb_Process(FxReverbState *state, const FxReverbParams *params, float input)
|
||||
{
|
||||
if (!params->enabled)
|
||||
{
|
||||
return input;
|
||||
}
|
||||
|
||||
float feedback = 0.28f + params->room_size * 0.7f;
|
||||
float damp1 = params->damping * 0.4f;
|
||||
float damp2 = 1.0f - damp1;
|
||||
|
||||
float out = 0.0f;
|
||||
for (uint32_t i = 0; i < FX_REVERB_NUM_COMBS; i++)
|
||||
{
|
||||
out += FxComb_Process(&state->combs[i], input, feedback, damp1, damp2);
|
||||
}
|
||||
out /= (float)FX_REVERB_NUM_COMBS;
|
||||
|
||||
for (uint32_t i = 0; i < FX_REVERB_NUM_ALLPASS; i++)
|
||||
{
|
||||
out = FxAllpass_Process(&state->allpass[i], out, 0.5f);
|
||||
}
|
||||
|
||||
return input * (1.0f - params->mix) + out * params->mix;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
#include "fx_saturation.h"
|
||||
#include <math.h>
|
||||
|
||||
#define FX_SATURATION_DC_BLOCK_R 0.995f
|
||||
|
||||
void FxSaturation_Init(FxSaturationState *state, FxSaturationParams *params)
|
||||
{
|
||||
state->dc_block_x1 = 0.0f;
|
||||
state->dc_block_y1 = 0.0f;
|
||||
|
||||
params->enabled = false;
|
||||
params->drive = 0.3f;
|
||||
params->level = 0.8f;
|
||||
}
|
||||
|
||||
float FxSaturation_Process(FxSaturationState *state, const FxSaturationParams *params, float input)
|
||||
{
|
||||
if (!params->enabled)
|
||||
{
|
||||
return input;
|
||||
}
|
||||
|
||||
float driven = input * (1.0f + params->drive * 12.0f);
|
||||
float shaped = tanhf(driven);
|
||||
|
||||
/* Le tanh sur un signal non symetrique introduit un leger DC : filtre bloqueur de DC. */
|
||||
float y = shaped - state->dc_block_x1 + FX_SATURATION_DC_BLOCK_R * state->dc_block_y1;
|
||||
state->dc_block_x1 = shaped;
|
||||
state->dc_block_y1 = y;
|
||||
|
||||
return y * params->level;
|
||||
}
|
||||
@@ -25,6 +25,8 @@
|
||||
/* Private includes ----------------------------------------------------------*/
|
||||
/* USER CODE BEGIN Includes */
|
||||
#include "stm32h7s78_discovery_audio.h"
|
||||
#include "audio_effects.h"
|
||||
#include "audio_analysis.h"
|
||||
#include <string.h>
|
||||
/* USER CODE END Includes */
|
||||
|
||||
@@ -186,6 +188,9 @@ int main(void)
|
||||
fifo_write_idx = FIFO_SIZE / 2;
|
||||
fifo_read_idx = 0;
|
||||
|
||||
AudioEffects_Init();
|
||||
AudioAnalysis_Init();
|
||||
|
||||
sDmaConfig.Address = (uint32_t)adf_buf;
|
||||
sDmaConfig.DataLength = AUDIO_SAMPLES * sizeof(int32_t); /* OCTETS */
|
||||
sDmaConfig.MsbOnly = DISABLE; /* 32-bit/sample ; ENABLE si buffer int16 */
|
||||
@@ -309,7 +314,7 @@ static void MX_ADF1_Init(void)
|
||||
AdfFilterConfig0.Delay = 0;
|
||||
AdfFilterConfig0.CicMode = MDF_ONE_FILTER_SINC4;
|
||||
AdfFilterConfig0.DecimationRatio = 16;
|
||||
AdfFilterConfig0.Gain = 10;
|
||||
AdfFilterConfig0.Gain = 24;
|
||||
AdfFilterConfig0.ReshapeFilter.Activation = ENABLE;
|
||||
AdfFilterConfig0.ReshapeFilter.DecimationRatio = MDF_RSF_DECIMATION_RATIO_4;
|
||||
AdfFilterConfig0.HighPassFilter.Activation = ENABLE;
|
||||
@@ -768,11 +773,17 @@ static void MX_GPIO_Init(void)
|
||||
|
||||
/* USER CODE BEGIN 4 */
|
||||
|
||||
static inline int16_t adf_sample_to_pcm16(int32_t raw)
|
||||
static inline float adf_sample_to_float(int32_t raw)
|
||||
{
|
||||
int32_t v = raw >> 8; // 24 bits -> 16 bits (comme le fait le BSP)
|
||||
if (v > 32767) v = 32767;
|
||||
if (v < -32768) v = -32768;
|
||||
int32_t v = raw >> 8; // 24 bits -> valeur signee sur 24 bits
|
||||
return (float)v / 8388608.0f; // normalisation en [-1.0, 1.0]
|
||||
}
|
||||
|
||||
static inline int16_t float_to_pcm16(float x)
|
||||
{
|
||||
float v = x * 32767.0f;
|
||||
if (v > 32767.0f) v = 32767.0f;
|
||||
if (v < -32768.0f) v = -32768.0f;
|
||||
return (int16_t)v;
|
||||
}
|
||||
|
||||
@@ -782,7 +793,10 @@ static void push_to_fifo(int32_t raw)
|
||||
{
|
||||
return; // FIFO pleine : on jette l'échantillon plutôt que d'écraser du non-lu
|
||||
}
|
||||
int16_t s = adf_sample_to_pcm16(raw);
|
||||
float sample = adf_sample_to_float(raw);
|
||||
sample = AudioEffects_Process(sample);
|
||||
AudioAnalysis_PushSample(sample);
|
||||
int16_t s = float_to_pcm16(sample);
|
||||
uint32_t idx = fifo_write_idx & (FIFO_SIZE - 1);
|
||||
audio_fifo[idx * 2] = s;
|
||||
audio_fifo[idx * 2 + 1] = s;
|
||||
|
||||
@@ -0,0 +1,193 @@
|
||||
{
|
||||
"Application": {
|
||||
"Screens": [
|
||||
{
|
||||
"Name": "InitScreen",
|
||||
"Components": [
|
||||
{
|
||||
"Type": "Image",
|
||||
"Name": "image1",
|
||||
"Width": 800,
|
||||
"Height": 480,
|
||||
"RelativeFilename": "__generated\\alternate_theme_images_backgrounds_800x480_meteor_rain.png"
|
||||
},
|
||||
{
|
||||
"Type": "ButtonWithIcon",
|
||||
"Name": "buttonWithIcon1",
|
||||
"X": 280,
|
||||
"Y": 215,
|
||||
"Width": 240,
|
||||
"Height": 50,
|
||||
"Pressed": "__generated\\alternate_theme_images_widgets_button_regular_height_50_medium_rounded_pressed.png",
|
||||
"Released": "__generated\\alternate_theme_images_widgets_button_regular_height_50_medium_rounded_normal.png",
|
||||
"IconPressed": "__generated\\icon_theme_images_action_done_50_50_E8F6FB.svg.png",
|
||||
"IconReleased": "__generated\\icon_theme_images_action_input_50_50_E8F6FB.svg.png",
|
||||
"IconX": 97,
|
||||
"IconHeight": 50,
|
||||
"IconWidth": 50,
|
||||
"Preset": "alternate_theme\\presets\\button\\regular\\height_50\\medium_rounded_normal.json"
|
||||
}
|
||||
],
|
||||
"Interactions": [
|
||||
{
|
||||
"InteractionName": "Interaction1",
|
||||
"Trigger": {
|
||||
"Type": "TriggerClicked",
|
||||
"TriggerComponent": "buttonWithIcon1"
|
||||
},
|
||||
"Action": {
|
||||
"Type": "ActionGotoScreen",
|
||||
"ScreenTransitionType": "ScreenTransitionBlock",
|
||||
"ActionComponent": "Screen1"
|
||||
}
|
||||
}
|
||||
],
|
||||
"CustomActions": [
|
||||
{
|
||||
"Name": "changeScreen"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "Screen1",
|
||||
"Components": [
|
||||
{
|
||||
"Type": "Image",
|
||||
"Name": "image1",
|
||||
"Width": 800,
|
||||
"Height": 480,
|
||||
"RelativeFilename": "__generated\\glass_theme_images_backgrounds_800x480_gradient_rainbow.png"
|
||||
},
|
||||
{
|
||||
"Type": "Slider",
|
||||
"Name": "slider1",
|
||||
"X": 360,
|
||||
"Y": 224,
|
||||
"Width": 300,
|
||||
"Height": 11,
|
||||
"IsHorizontalSlider": true,
|
||||
"BackgroundUnselected": "__generated\\alternate_theme_images_widgets_slider_horizontal_thick_track_medium.png",
|
||||
"BackgroundSelected": "__generated\\alternate_theme_images_widgets_slider_horizontal_thick_filler_medium.png",
|
||||
"Indicator": "__generated\\alternate_theme_images_widgets_slider_horizontal_thick_rounded_dark.png",
|
||||
"BackgroundX": 16,
|
||||
"BackgroundY": 11,
|
||||
"IndicatorMax": 300,
|
||||
"ValueMax": 100,
|
||||
"Preset": "alternate_theme\\presets\\slider\\horizontal\\thick\\medium_rounded_dark.json"
|
||||
},
|
||||
{
|
||||
"Type": "Gauge",
|
||||
"Name": "gauge1",
|
||||
"X": 41,
|
||||
"Y": 104,
|
||||
"Width": 240,
|
||||
"Height": 240,
|
||||
"Preset": "alternate_theme\\presets\\gauges\\medium\\active.json",
|
||||
"FileNameBackground": "__generated\\alternate_theme_images_widgets_gauge_medium_backgrounds_active.png",
|
||||
"RotationCenterX": 120.0,
|
||||
"RotationCenterY": 120.0,
|
||||
"StartAngle": -113.0,
|
||||
"EndAngle": 112.0,
|
||||
"RangeMax": 100.0,
|
||||
"InitialValue": 50.0,
|
||||
"UseAnimation": true,
|
||||
"Easing": "Linear",
|
||||
"EasingOption": "In",
|
||||
"FileNameNeedle": "__generated\\alternate_theme_images_widgets_gauge_medium_needles_smooth.png",
|
||||
"NeedleRotationCenterX": 7.0,
|
||||
"NeedleRotationCenterY": 67.0,
|
||||
"NeedleMovingRenderingAlgorithm": "Bilinear Interpolation",
|
||||
"NeedleSteadyRenderingAlgorithm": "Bilinear Interpolation",
|
||||
"ArcColor": {
|
||||
"Red": 20,
|
||||
"Green": 151,
|
||||
"Blue": 197
|
||||
},
|
||||
"ArcCapStyle": "Butt"
|
||||
}
|
||||
],
|
||||
"Interactions": [
|
||||
{
|
||||
"InteractionName": "InteractionSlider1",
|
||||
"HasCompletedTrigger": true,
|
||||
"Trigger": {
|
||||
"Type": "TriggerSliderValueChanged",
|
||||
"TriggerComponent": "slider1"
|
||||
},
|
||||
"Action": {
|
||||
"Type": "ActionCustom",
|
||||
"FunctionName": "slider1Clicked"
|
||||
}
|
||||
}
|
||||
],
|
||||
"CustomActions": [
|
||||
{
|
||||
"Name": "Volume",
|
||||
"HasValue": true,
|
||||
"ValueType": "int16_t"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"CustomContainerDefinitions": [],
|
||||
"Name": "CelloEffects",
|
||||
"Resolution": {
|
||||
"Width": 800,
|
||||
"Height": 480
|
||||
},
|
||||
"SelectedColorDepth": 16,
|
||||
"StartupScreenName": "InitScreen",
|
||||
"SelectedStartupLanguage": "GB",
|
||||
"TouchGfxPath": "../Middlewares/ST/touchgfx",
|
||||
"UIPath": ".",
|
||||
"AvailableColorDepths": [
|
||||
16
|
||||
],
|
||||
"AvailableLCDs": {
|
||||
"16": "LCDGPU2D"
|
||||
},
|
||||
"AvailableSections": [
|
||||
"ExtFlashSection",
|
||||
"IntFlashSection"
|
||||
],
|
||||
"AvailableResolutions": [
|
||||
{
|
||||
"Width": 800,
|
||||
"Height": 480
|
||||
}
|
||||
],
|
||||
"PhysicalButtons": [],
|
||||
"GenerateAssetsCommand": "make -f simulator/gcc/Makefile assets -j8",
|
||||
"GenerateAssetsCommandOverride": "make -f simulator/gcc/Makefile assets -j8",
|
||||
"PostGenerateCommand": "touchgfx update_project --project-file=simulator/msvs/Application.vcxproj",
|
||||
"PostGenerateCommandOverride": "touchgfx update_project --project-file=simulator/msvs/Application.vcxproj",
|
||||
"PostGenerateTargetCommand": "touchgfx update_project",
|
||||
"CompileSimulatorCommand": "make -f simulator/gcc/Makefile -j8",
|
||||
"CompileSimulatorCommandOverride": "make -f simulator/gcc/Makefile -j1",
|
||||
"RunSimulatorCommand": "build\\bin\\simulator.exe",
|
||||
"CompileTargetCommandOverride": "make -f gcc/Makefile -j8",
|
||||
"FlashTargetCommandOverride": "make -f gcc/Makefile flash",
|
||||
"FlashTargetIntCommandOverride": "make -f gcc/Makefile intflash",
|
||||
"LandscapeSkinX": 0,
|
||||
"LandscapeSkinY": 0,
|
||||
"PortraitSkinX": 0,
|
||||
"PortraitSkinY": 0,
|
||||
"DisplayOrientation": "Landscape",
|
||||
"Family": "STM32H7",
|
||||
"SubFamily": "STM32H7R7/7S7",
|
||||
"Toolchain": "STM32CubeIDE",
|
||||
"Platform": "m7",
|
||||
"ProjectFile": "../../STM32H7S78-DK.ioc",
|
||||
"OptionalComponentsRoot": "../Middlewares/ST/touchgfx_components",
|
||||
"OptionalComponents": [
|
||||
"GPU2D"
|
||||
],
|
||||
"AdditionalFeatures": [
|
||||
"GPU2DVector",
|
||||
"VectorFonts",
|
||||
"Video"
|
||||
]
|
||||
},
|
||||
"Version": "4.26.1",
|
||||
"CreatedBy": "4.26.1"
|
||||
}
|
||||
@@ -0,0 +1,202 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
Before Width: | Height: | Size: 320 KiB |
|
Before Width: | Height: | Size: 890 B |
|
Before Width: | Height: | Size: 895 B |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 847 B |
|
Before Width: | Height: | Size: 279 B |
|
Before Width: | Height: | Size: 303 B |
|
Before Width: | Height: | Size: 303 B |
|
Before Width: | Height: | Size: 126 KiB |
|
After Width: | Height: | Size: 90 KiB |
|
After Width: | Height: | Size: 81 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 243 B |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 452 B |
|
After Width: | Height: | Size: 225 B |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 461 B |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 301 B |
|
Before Width: | Height: | Size: 301 B |
|
Before Width: | Height: | Size: 291 B |
|
After Width: | Height: | Size: 315 B |
|
After Width: | Height: | Size: 315 B |
|
After Width: | Height: | Size: 564 KiB |
@@ -4,10 +4,124 @@
|
||||
<Language Id="GB" />
|
||||
</Languages>
|
||||
<Texts>
|
||||
<TextGroup Id="Group1" />
|
||||
<TextGroup Id="Group1">
|
||||
<Text Id="PEDALBOARD" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">PEDALBOARD</Translation>
|
||||
</Text>
|
||||
<Text Id="EQUALIZER" Alignment="Center" TypographyId="Large">
|
||||
<Translation Language="GB" Alignment="Center">EQUALIZER</Translation>
|
||||
</Text>
|
||||
<Text Id="OCTAVER" Alignment="Center" TypographyId="Large">
|
||||
<Translation Language="GB">OCTAVER</Translation>
|
||||
</Text>
|
||||
<Text Id="OSCILLO" Alignment="Center" TypographyId="Large">
|
||||
<Translation Language="GB">OSCILLO</Translation>
|
||||
</Text>
|
||||
<Text Id="OVERDRIVE" Alignment="Center" TypographyId="Large">
|
||||
<Translation Language="GB" Alignment="Center">OVERDRIVE</Translation>
|
||||
</Text>
|
||||
<Text Id="SATURATION" Alignment="Center" TypographyId="Large">
|
||||
<Translation Language="GB" Alignment="Center">SATURATION</Translation>
|
||||
</Text>
|
||||
<Text Id="ECHO" Alignment="Center" TypographyId="Large">
|
||||
<Translation Language="GB" Alignment="Center">ECHO</Translation>
|
||||
</Text>
|
||||
<Text Id="REVERB" Alignment="Center" TypographyId="Large">
|
||||
<Translation Language="GB" Alignment="Center">REVERB</Translation>
|
||||
</Text>
|
||||
<Text Id="BACK" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">RETOUR</Translation>
|
||||
</Text>
|
||||
<Text Id="ON" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">ON</Translation>
|
||||
</Text>
|
||||
<Text Id="OFF" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">OFF</Translation>
|
||||
</Text>
|
||||
<Text Id="DRIVE" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">DRIVE</Translation>
|
||||
</Text>
|
||||
<Text Id="TONE" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">TONE</Translation>
|
||||
</Text>
|
||||
<Text Id="LEVEL" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">LEVEL</Translation>
|
||||
</Text>
|
||||
<Text Id="DELAY" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">DELAI</Translation>
|
||||
</Text>
|
||||
<Text Id="FEEDBACK" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">FEEDBACK</Translation>
|
||||
</Text>
|
||||
<Text Id="MIX" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">MIX</Translation>
|
||||
</Text>
|
||||
<Text Id="ROOMSIZE" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">TAILLE</Translation>
|
||||
</Text>
|
||||
<Text Id="DAMPING" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">AMORTI</Translation>
|
||||
</Text>
|
||||
<Text Id="EQ_31" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">31</Translation>
|
||||
</Text>
|
||||
<Text Id="EQ_62" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">62</Translation>
|
||||
</Text>
|
||||
<Text Id="EQ_125" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">125</Translation>
|
||||
</Text>
|
||||
<Text Id="EQ_250" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">250</Translation>
|
||||
</Text>
|
||||
<Text Id="EQ_500" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">500</Translation>
|
||||
</Text>
|
||||
<Text Id="EQ_1K" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">1K</Translation>
|
||||
</Text>
|
||||
<Text Id="EQ_2K" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">2K</Translation>
|
||||
</Text>
|
||||
<Text Id="EQ_4K" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">4K</Translation>
|
||||
</Text>
|
||||
<Text Id="EQ_8K" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">8K</Translation>
|
||||
</Text>
|
||||
<Text Id="EQ_16K" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">16K</Translation>
|
||||
</Text>
|
||||
<Text Id="OCT_m2" Alignment="Center" TypographyId="Large">
|
||||
<Translation Language="GB" Alignment="Center">-2</Translation>
|
||||
</Text>
|
||||
<Text Id="OCT_m1" Alignment="Center" TypographyId="Large">
|
||||
<Translation Language="GB" Alignment="Center">-1</Translation>
|
||||
</Text>
|
||||
<Text Id="OCT_0" Alignment="Center" TypographyId="Large">
|
||||
<Translation Language="GB" Alignment="Center">0</Translation>
|
||||
</Text>
|
||||
<Text Id="OCT_p1" Alignment="Center" TypographyId="Large">
|
||||
<Translation Language="GB">+1</Translation>
|
||||
</Text>
|
||||
<Text Id="OCT_p2" Alignment="Center" TypographyId="Large">
|
||||
<Translation Language="GB" Alignment="Center">+2</Translation>
|
||||
</Text>
|
||||
</TextGroup>
|
||||
<TextGroup Id="Unsorted">
|
||||
<Text Id="__SingleUse_U5V0" Alignment="Left" TypographyId="Default">
|
||||
<Translation Language="GB">100</Translation>
|
||||
</Text>
|
||||
<Text Id="textAreaMax" Alignment="Left" TypographyId="Default">
|
||||
<Translation Language="GB">Max : <d> Hz</Translation>
|
||||
</Text>
|
||||
<Text Id="__SingleUse_2C9Q" Alignment="Left" TypographyId="Default">
|
||||
<Translation Language="GB"><></Translation>
|
||||
</Text>
|
||||
</TextGroup>
|
||||
</Texts>
|
||||
<Typographies>
|
||||
<Typography Id="Default" Font="arial.ttf" Size="20" Bpp="4" IsVector="no" Direction="LTR" FallbackCharacter="?" />
|
||||
<Typography Id="Default" Font="arial.ttf" Size="20" Bpp="4" IsVector="no" Direction="LTR" FallbackCharacter="?" WidgetWildcardCharacters="-., 0123456789" />
|
||||
<Typography Id="Large" Font="arial.ttf" Size="40" Bpp="4" IsVector="no" Direction="LTR" FallbackCharacter="?" />
|
||||
<Typography Id="Small" Font="arial.ttf" Size="10" Bpp="4" IsVector="no" Direction="LTR" FallbackCharacter="?" />
|
||||
</Typographies>
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
#ifndef ECHOPRESENTER_HPP
|
||||
#define ECHOPRESENTER_HPP
|
||||
|
||||
#include <gui/model/ModelListener.hpp>
|
||||
#include <mvp/Presenter.hpp>
|
||||
|
||||
using namespace touchgfx;
|
||||
|
||||
class EchoView;
|
||||
|
||||
class EchoPresenter : public touchgfx::Presenter, public ModelListener
|
||||
{
|
||||
public:
|
||||
EchoPresenter(EchoView& v);
|
||||
|
||||
/**
|
||||
* The activate function is called automatically when this screen is "switched in"
|
||||
* (ie. made active). Initialization logic can be placed here.
|
||||
*/
|
||||
virtual void activate();
|
||||
|
||||
/**
|
||||
* The deactivate function is called automatically when this screen is "switched out"
|
||||
* (ie. made inactive). Teardown functionality can be placed here.
|
||||
*/
|
||||
virtual void deactivate();
|
||||
|
||||
virtual ~EchoPresenter() {}
|
||||
|
||||
private:
|
||||
EchoPresenter();
|
||||
|
||||
EchoView& view;
|
||||
};
|
||||
|
||||
#endif // ECHOPRESENTER_HPP
|
||||
@@ -0,0 +1,22 @@
|
||||
#ifndef ECHOVIEW_HPP
|
||||
#define ECHOVIEW_HPP
|
||||
|
||||
#include <gui_generated/echo_screen/EchoViewBase.hpp>
|
||||
#include <gui/echo_screen/EchoPresenter.hpp>
|
||||
|
||||
class EchoView : public EchoViewBase
|
||||
{
|
||||
public:
|
||||
EchoView();
|
||||
virtual ~EchoView() {}
|
||||
virtual void setupScreen();
|
||||
virtual void tearDownScreen();
|
||||
|
||||
virtual void toggleClicked();
|
||||
virtual void sliderDelaiChanged(int value);
|
||||
virtual void sliderFeedbackChanged(int value);
|
||||
virtual void sliderMixChanged(int value);
|
||||
protected:
|
||||
};
|
||||
|
||||
#endif // ECHOVIEW_HPP
|
||||
@@ -0,0 +1,36 @@
|
||||
#ifndef EQUALIZERPRESENTER_HPP
|
||||
#define EQUALIZERPRESENTER_HPP
|
||||
|
||||
#include <gui/model/ModelListener.hpp>
|
||||
#include <mvp/Presenter.hpp>
|
||||
|
||||
using namespace touchgfx;
|
||||
|
||||
class EqualizerView;
|
||||
|
||||
class EqualizerPresenter : public touchgfx::Presenter, public ModelListener
|
||||
{
|
||||
public:
|
||||
EqualizerPresenter(EqualizerView& v);
|
||||
|
||||
/**
|
||||
* The activate function is called automatically when this screen is "switched in"
|
||||
* (ie. made active). Initialization logic can be placed here.
|
||||
*/
|
||||
virtual void activate();
|
||||
|
||||
/**
|
||||
* The deactivate function is called automatically when this screen is "switched out"
|
||||
* (ie. made inactive). Teardown functionality can be placed here.
|
||||
*/
|
||||
virtual void deactivate();
|
||||
|
||||
virtual ~EqualizerPresenter() {}
|
||||
|
||||
private:
|
||||
EqualizerPresenter();
|
||||
|
||||
EqualizerView& view;
|
||||
};
|
||||
|
||||
#endif // EQUALIZERPRESENTER_HPP
|
||||
@@ -0,0 +1,29 @@
|
||||
#ifndef EQUALIZERVIEW_HPP
|
||||
#define EQUALIZERVIEW_HPP
|
||||
|
||||
#include <gui_generated/equalizer_screen/EqualizerViewBase.hpp>
|
||||
#include <gui/equalizer_screen/EqualizerPresenter.hpp>
|
||||
|
||||
class EqualizerView : public EqualizerViewBase
|
||||
{
|
||||
public:
|
||||
EqualizerView();
|
||||
virtual ~EqualizerView() {}
|
||||
virtual void setupScreen();
|
||||
virtual void tearDownScreen();
|
||||
|
||||
virtual void toggleClicked();
|
||||
virtual void sliderBand1Changed(int value);
|
||||
virtual void sliderBand2Changed(int value);
|
||||
virtual void sliderBand3Changed(int value);
|
||||
virtual void sliderBand4Changed(int value);
|
||||
virtual void sliderBand5Changed(int value);
|
||||
virtual void sliderBand6Changed(int value);
|
||||
virtual void sliderBand7Changed(int value);
|
||||
virtual void sliderBand8Changed(int value);
|
||||
virtual void sliderBand9Changed(int value);
|
||||
virtual void sliderBand10Changed(int value);
|
||||
protected:
|
||||
};
|
||||
|
||||
#endif // EQUALIZERVIEW_HPP
|
||||
@@ -1,17 +1,17 @@
|
||||
#ifndef SCREEN1PRESENTER_HPP
|
||||
#define SCREEN1PRESENTER_HPP
|
||||
#ifndef OCTAVERPRESENTER_HPP
|
||||
#define OCTAVERPRESENTER_HPP
|
||||
|
||||
#include <gui/model/ModelListener.hpp>
|
||||
#include <mvp/Presenter.hpp>
|
||||
|
||||
using namespace touchgfx;
|
||||
|
||||
class Screen1View;
|
||||
class OctaverView;
|
||||
|
||||
class Screen1Presenter : public touchgfx::Presenter, public ModelListener
|
||||
class OctaverPresenter : public touchgfx::Presenter, public ModelListener
|
||||
{
|
||||
public:
|
||||
Screen1Presenter(Screen1View& v);
|
||||
OctaverPresenter(OctaverView& v);
|
||||
|
||||
/**
|
||||
* The activate function is called automatically when this screen is "switched in"
|
||||
@@ -25,12 +25,12 @@ public:
|
||||
*/
|
||||
virtual void deactivate();
|
||||
|
||||
virtual ~Screen1Presenter() {}
|
||||
virtual ~OctaverPresenter() {}
|
||||
|
||||
private:
|
||||
Screen1Presenter();
|
||||
OctaverPresenter();
|
||||
|
||||
Screen1View& view;
|
||||
OctaverView& view;
|
||||
};
|
||||
|
||||
#endif // SCREEN1PRESENTER_HPP
|
||||
#endif // OCTAVERPRESENTER_HPP
|
||||
@@ -0,0 +1,24 @@
|
||||
#ifndef OCTAVERVIEW_HPP
|
||||
#define OCTAVERVIEW_HPP
|
||||
|
||||
#include <gui_generated/octaver_screen/OctaverViewBase.hpp>
|
||||
#include <gui/octaver_screen/OctaverPresenter.hpp>
|
||||
|
||||
class OctaverView : public OctaverViewBase
|
||||
{
|
||||
public:
|
||||
OctaverView();
|
||||
virtual ~OctaverView() {}
|
||||
virtual void setupScreen();
|
||||
virtual void tearDownScreen();
|
||||
|
||||
virtual void toggleClicked();
|
||||
virtual void slider1Clicked(int value);
|
||||
virtual void slider2Clicked(int value);
|
||||
virtual void slider3Clicked(int value);
|
||||
virtual void slider4Clicked(int value);
|
||||
virtual void slider5Clicked(int value);
|
||||
protected:
|
||||
};
|
||||
|
||||
#endif // OCTAVERVIEW_HPP
|
||||
@@ -0,0 +1,36 @@
|
||||
#ifndef OSCILLOPRESENTER_HPP
|
||||
#define OSCILLOPRESENTER_HPP
|
||||
|
||||
#include <gui/model/ModelListener.hpp>
|
||||
#include <mvp/Presenter.hpp>
|
||||
|
||||
using namespace touchgfx;
|
||||
|
||||
class OscilloView;
|
||||
|
||||
class OscilloPresenter : public touchgfx::Presenter, public ModelListener
|
||||
{
|
||||
public:
|
||||
OscilloPresenter(OscilloView& v);
|
||||
|
||||
/**
|
||||
* The activate function is called automatically when this screen is "switched in"
|
||||
* (ie. made active). Initialization logic can be placed here.
|
||||
*/
|
||||
virtual void activate();
|
||||
|
||||
/**
|
||||
* The deactivate function is called automatically when this screen is "switched out"
|
||||
* (ie. made inactive). Teardown functionality can be placed here.
|
||||
*/
|
||||
virtual void deactivate();
|
||||
|
||||
virtual ~OscilloPresenter() {}
|
||||
|
||||
private:
|
||||
OscilloPresenter();
|
||||
|
||||
OscilloView& view;
|
||||
};
|
||||
|
||||
#endif // OSCILLOPRESENTER_HPP
|
||||
@@ -0,0 +1,20 @@
|
||||
#ifndef OSCILLOVIEW_HPP
|
||||
#define OSCILLOVIEW_HPP
|
||||
|
||||
#include <gui_generated/oscillo_screen/OscilloViewBase.hpp>
|
||||
#include <gui/oscillo_screen/OscilloPresenter.hpp>
|
||||
|
||||
class OscilloView : public OscilloViewBase
|
||||
{
|
||||
public:
|
||||
OscilloView();
|
||||
virtual ~OscilloView() {}
|
||||
virtual void setupScreen();
|
||||
virtual void tearDownScreen();
|
||||
virtual void handleTickEvent();
|
||||
|
||||
virtual void toggleClicked();
|
||||
protected:
|
||||
};
|
||||
|
||||
#endif // OSCILLOVIEW_HPP
|
||||
@@ -0,0 +1,36 @@
|
||||
#ifndef OVERDRIVEPRESENTER_HPP
|
||||
#define OVERDRIVEPRESENTER_HPP
|
||||
|
||||
#include <gui/model/ModelListener.hpp>
|
||||
#include <mvp/Presenter.hpp>
|
||||
|
||||
using namespace touchgfx;
|
||||
|
||||
class OverdriveView;
|
||||
|
||||
class OverdrivePresenter : public touchgfx::Presenter, public ModelListener
|
||||
{
|
||||
public:
|
||||
OverdrivePresenter(OverdriveView& v);
|
||||
|
||||
/**
|
||||
* The activate function is called automatically when this screen is "switched in"
|
||||
* (ie. made active). Initialization logic can be placed here.
|
||||
*/
|
||||
virtual void activate();
|
||||
|
||||
/**
|
||||
* The deactivate function is called automatically when this screen is "switched out"
|
||||
* (ie. made inactive). Teardown functionality can be placed here.
|
||||
*/
|
||||
virtual void deactivate();
|
||||
|
||||
virtual ~OverdrivePresenter() {}
|
||||
|
||||
private:
|
||||
OverdrivePresenter();
|
||||
|
||||
OverdriveView& view;
|
||||
};
|
||||
|
||||
#endif // OVERDRIVEPRESENTER_HPP
|
||||
@@ -0,0 +1,22 @@
|
||||
#ifndef OVERDRIVEVIEW_HPP
|
||||
#define OVERDRIVEVIEW_HPP
|
||||
|
||||
#include <gui_generated/overdrive_screen/OverdriveViewBase.hpp>
|
||||
#include <gui/overdrive_screen/OverdrivePresenter.hpp>
|
||||
|
||||
class OverdriveView : public OverdriveViewBase
|
||||
{
|
||||
public:
|
||||
OverdriveView();
|
||||
virtual ~OverdriveView() {}
|
||||
virtual void setupScreen();
|
||||
virtual void tearDownScreen();
|
||||
|
||||
virtual void toggleClicked();
|
||||
virtual void sliderDriveChanged(int value);
|
||||
virtual void sliderToneChanged(int value);
|
||||
virtual void sliderLevelChanged(int value);
|
||||
protected:
|
||||
};
|
||||
|
||||
#endif // OVERDRIVEVIEW_HPP
|
||||
@@ -0,0 +1,36 @@
|
||||
#ifndef OVERVIEWPRESENTER_HPP
|
||||
#define OVERVIEWPRESENTER_HPP
|
||||
|
||||
#include <gui/model/ModelListener.hpp>
|
||||
#include <mvp/Presenter.hpp>
|
||||
|
||||
using namespace touchgfx;
|
||||
|
||||
class OverviewView;
|
||||
|
||||
class OverviewPresenter : public touchgfx::Presenter, public ModelListener
|
||||
{
|
||||
public:
|
||||
OverviewPresenter(OverviewView& v);
|
||||
|
||||
/**
|
||||
* The activate function is called automatically when this screen is "switched in"
|
||||
* (ie. made active). Initialization logic can be placed here.
|
||||
*/
|
||||
virtual void activate();
|
||||
|
||||
/**
|
||||
* The deactivate function is called automatically when this screen is "switched out"
|
||||
* (ie. made inactive). Teardown functionality can be placed here.
|
||||
*/
|
||||
virtual void deactivate();
|
||||
|
||||
virtual ~OverviewPresenter() {}
|
||||
|
||||
private:
|
||||
OverviewPresenter();
|
||||
|
||||
OverviewView& view;
|
||||
};
|
||||
|
||||
#endif // OVERVIEWPRESENTER_HPP
|
||||
@@ -0,0 +1,20 @@
|
||||
#ifndef OVERVIEWVIEW_HPP
|
||||
#define OVERVIEWVIEW_HPP
|
||||
|
||||
#include <gui_generated/overview_screen/OverviewViewBase.hpp>
|
||||
#include <gui/overview_screen/OverviewPresenter.hpp>
|
||||
|
||||
class OverviewView : public OverviewViewBase
|
||||
{
|
||||
public:
|
||||
OverviewView();
|
||||
virtual ~OverviewView() {}
|
||||
virtual void setupScreen();
|
||||
virtual void tearDownScreen();
|
||||
|
||||
virtual void toggleAudioOnOFF();
|
||||
virtual void slider1Changed(int value);
|
||||
protected:
|
||||
};
|
||||
|
||||
#endif // OVERVIEWVIEW_HPP
|
||||
@@ -0,0 +1,36 @@
|
||||
#ifndef REVERBPRESENTER_HPP
|
||||
#define REVERBPRESENTER_HPP
|
||||
|
||||
#include <gui/model/ModelListener.hpp>
|
||||
#include <mvp/Presenter.hpp>
|
||||
|
||||
using namespace touchgfx;
|
||||
|
||||
class ReverbView;
|
||||
|
||||
class ReverbPresenter : public touchgfx::Presenter, public ModelListener
|
||||
{
|
||||
public:
|
||||
ReverbPresenter(ReverbView& v);
|
||||
|
||||
/**
|
||||
* The activate function is called automatically when this screen is "switched in"
|
||||
* (ie. made active). Initialization logic can be placed here.
|
||||
*/
|
||||
virtual void activate();
|
||||
|
||||
/**
|
||||
* The deactivate function is called automatically when this screen is "switched out"
|
||||
* (ie. made inactive). Teardown functionality can be placed here.
|
||||
*/
|
||||
virtual void deactivate();
|
||||
|
||||
virtual ~ReverbPresenter() {}
|
||||
|
||||
private:
|
||||
ReverbPresenter();
|
||||
|
||||
ReverbView& view;
|
||||
};
|
||||
|
||||
#endif // REVERBPRESENTER_HPP
|
||||
@@ -0,0 +1,22 @@
|
||||
#ifndef REVERBVIEW_HPP
|
||||
#define REVERBVIEW_HPP
|
||||
|
||||
#include <gui_generated/reverb_screen/ReverbViewBase.hpp>
|
||||
#include <gui/reverb_screen/ReverbPresenter.hpp>
|
||||
|
||||
class ReverbView : public ReverbViewBase
|
||||
{
|
||||
public:
|
||||
ReverbView();
|
||||
virtual ~ReverbView() {}
|
||||
virtual void setupScreen();
|
||||
virtual void tearDownScreen();
|
||||
|
||||
virtual void toggleClicked();
|
||||
virtual void sliderTailleChanged(int value);
|
||||
virtual void sliderAmortiChanged(int value);
|
||||
virtual void sliderMixChanged(int value);
|
||||
protected:
|
||||
};
|
||||
|
||||
#endif // REVERBVIEW_HPP
|
||||
@@ -0,0 +1,36 @@
|
||||
#ifndef SATURATIONPRESENTER_HPP
|
||||
#define SATURATIONPRESENTER_HPP
|
||||
|
||||
#include <gui/model/ModelListener.hpp>
|
||||
#include <mvp/Presenter.hpp>
|
||||
|
||||
using namespace touchgfx;
|
||||
|
||||
class SaturationView;
|
||||
|
||||
class SaturationPresenter : public touchgfx::Presenter, public ModelListener
|
||||
{
|
||||
public:
|
||||
SaturationPresenter(SaturationView& v);
|
||||
|
||||
/**
|
||||
* The activate function is called automatically when this screen is "switched in"
|
||||
* (ie. made active). Initialization logic can be placed here.
|
||||
*/
|
||||
virtual void activate();
|
||||
|
||||
/**
|
||||
* The deactivate function is called automatically when this screen is "switched out"
|
||||
* (ie. made inactive). Teardown functionality can be placed here.
|
||||
*/
|
||||
virtual void deactivate();
|
||||
|
||||
virtual ~SaturationPresenter() {}
|
||||
|
||||
private:
|
||||
SaturationPresenter();
|
||||
|
||||
SaturationView& view;
|
||||
};
|
||||
|
||||
#endif // SATURATIONPRESENTER_HPP
|
||||
@@ -0,0 +1,21 @@
|
||||
#ifndef SATURATIONVIEW_HPP
|
||||
#define SATURATIONVIEW_HPP
|
||||
|
||||
#include <gui_generated/saturation_screen/SaturationViewBase.hpp>
|
||||
#include <gui/saturation_screen/SaturationPresenter.hpp>
|
||||
|
||||
class SaturationView : public SaturationViewBase
|
||||
{
|
||||
public:
|
||||
SaturationView();
|
||||
virtual ~SaturationView() {}
|
||||
virtual void setupScreen();
|
||||
virtual void tearDownScreen();
|
||||
|
||||
virtual void toggleClicked();
|
||||
virtual void sliderDriveClicked(int value);
|
||||
virtual void sliderLevelClicked(int value);
|
||||
protected:
|
||||
};
|
||||
|
||||
#endif // SATURATIONVIEW_HPP
|
||||
@@ -1,18 +0,0 @@
|
||||
#ifndef SCREEN1VIEW_HPP
|
||||
#define SCREEN1VIEW_HPP
|
||||
|
||||
#include <gui_generated/screen1_screen/Screen1ViewBase.hpp>
|
||||
#include <gui/screen1_screen/Screen1Presenter.hpp>
|
||||
|
||||
class Screen1View : public Screen1ViewBase
|
||||
{
|
||||
public:
|
||||
Screen1View();
|
||||
virtual ~Screen1View() {}
|
||||
virtual void setupScreen();
|
||||
virtual void tearDownScreen();
|
||||
virtual void slider1Clicked(int value);
|
||||
protected:
|
||||
};
|
||||
|
||||
#endif // SCREEN1VIEW_HPP
|
||||
@@ -0,0 +1,18 @@
|
||||
#include <gui/echo_screen/EchoView.hpp>
|
||||
#include <gui/echo_screen/EchoPresenter.hpp>
|
||||
|
||||
EchoPresenter::EchoPresenter(EchoView& v)
|
||||
: view(v)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void EchoPresenter::activate()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void EchoPresenter::deactivate()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
#include <gui/echo_screen/EchoView.hpp>
|
||||
#include <audio_effects.h>
|
||||
|
||||
EchoView::EchoView()
|
||||
{
|
||||
}
|
||||
|
||||
void EchoView::setupScreen()
|
||||
{
|
||||
EchoViewBase::setupScreen();
|
||||
toggleButton1.forceState(AudioEffects_GetParams()->echo.enabled);
|
||||
slider1.setValue((int16_t)(AudioEffects_GetParams()->echo.delay_ms / 10.0f));
|
||||
slider2.setValue((int16_t)(AudioEffects_GetParams()->echo.feedback / 0.95f * 100.0f));
|
||||
slider3.setValue((int16_t)(AudioEffects_GetParams()->echo.mix * 100.0f));
|
||||
}
|
||||
|
||||
void EchoView::tearDownScreen()
|
||||
{
|
||||
EchoViewBase::tearDownScreen();
|
||||
}
|
||||
|
||||
void EchoView::toggleClicked()
|
||||
{
|
||||
AudioEffects_GetParams()->echo.enabled = toggleButton1.getState();
|
||||
}
|
||||
|
||||
void EchoView::sliderDelaiChanged(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->echo.delay_ms = value * 10.0f;
|
||||
}
|
||||
void EchoView::sliderFeedbackChanged(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->echo.feedback = value / 100.0f * 0.95f;
|
||||
}
|
||||
void EchoView::sliderMixChanged(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->echo.mix = value / 100.0f;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#include <gui/equalizer_screen/EqualizerView.hpp>
|
||||
#include <gui/equalizer_screen/EqualizerPresenter.hpp>
|
||||
|
||||
EqualizerPresenter::EqualizerPresenter(EqualizerView& v)
|
||||
: view(v)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void EqualizerPresenter::activate()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void EqualizerPresenter::deactivate()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
#include <gui/equalizer_screen/EqualizerView.hpp>
|
||||
#include <audio_effects.h>
|
||||
|
||||
EqualizerView::EqualizerView()
|
||||
{
|
||||
}
|
||||
|
||||
void EqualizerView::setupScreen()
|
||||
{
|
||||
EqualizerViewBase::setupScreen();
|
||||
toggleButton1.forceState(AudioEffects_GetParams()->equalizer.enabled);
|
||||
bandSlider1.setValue((int16_t)((AudioEffects_GetParams()->equalizer.bands[0].gain_db + 24.0f) / 48.0f * 100.0f));
|
||||
bandSlider2.setValue((int16_t)((AudioEffects_GetParams()->equalizer.bands[1].gain_db + 24.0f) / 48.0f * 100.0f));
|
||||
bandSlider3.setValue((int16_t)((AudioEffects_GetParams()->equalizer.bands[2].gain_db + 24.0f) / 48.0f * 100.0f));
|
||||
bandSlider4.setValue((int16_t)((AudioEffects_GetParams()->equalizer.bands[3].gain_db + 24.0f) / 48.0f * 100.0f));
|
||||
bandSlider5.setValue((int16_t)((AudioEffects_GetParams()->equalizer.bands[4].gain_db + 24.0f) / 48.0f * 100.0f));
|
||||
bandSlider6.setValue((int16_t)((AudioEffects_GetParams()->equalizer.bands[5].gain_db + 24.0f) / 48.0f * 100.0f));
|
||||
bandSlider7.setValue((int16_t)((AudioEffects_GetParams()->equalizer.bands[6].gain_db + 24.0f) / 48.0f * 100.0f));
|
||||
bandSlider8.setValue((int16_t)((AudioEffects_GetParams()->equalizer.bands[7].gain_db + 24.0f) / 48.0f * 100.0f));
|
||||
bandSlider9.setValue((int16_t)((AudioEffects_GetParams()->equalizer.bands[8].gain_db + 24.0f) / 48.0f * 100.0f));
|
||||
bandSlider10.setValue((int16_t)((AudioEffects_GetParams()->equalizer.bands[9].gain_db + 24.0f) / 48.0f * 100.0f));
|
||||
}
|
||||
|
||||
void EqualizerView::tearDownScreen()
|
||||
{
|
||||
EqualizerViewBase::tearDownScreen();
|
||||
}
|
||||
|
||||
void EqualizerView::toggleClicked()
|
||||
{
|
||||
AudioEffects_GetParams()->equalizer.enabled = toggleButton1.getState();
|
||||
}
|
||||
|
||||
void EqualizerView::sliderBand1Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->equalizer.bands[0].gain_db = (value / 100.0f) * 48.0f - 24.0f;
|
||||
}
|
||||
void EqualizerView::sliderBand2Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->equalizer.bands[1].gain_db = (value / 100.0f) * 48.0f - 24.0f;
|
||||
}
|
||||
void EqualizerView::sliderBand3Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->equalizer.bands[2].gain_db = (value / 100.0f) * 48.0f - 24.0f;
|
||||
}
|
||||
void EqualizerView::sliderBand4Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->equalizer.bands[3].gain_db = (value / 100.0f) * 48.0f - 24.0f;
|
||||
}
|
||||
void EqualizerView::sliderBand5Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->equalizer.bands[4].gain_db = (value / 100.0f) * 48.0f - 24.0f;
|
||||
}
|
||||
void EqualizerView::sliderBand6Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->equalizer.bands[5].gain_db = (value / 100.0f) * 48.0f - 24.0f;
|
||||
}
|
||||
void EqualizerView::sliderBand7Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->equalizer.bands[6].gain_db = (value / 100.0f) * 48.0f - 24.0f;
|
||||
}
|
||||
void EqualizerView::sliderBand8Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->equalizer.bands[7].gain_db = (value / 100.0f) * 48.0f - 24.0f;
|
||||
}
|
||||
void EqualizerView::sliderBand9Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->equalizer.bands[8].gain_db = (value / 100.0f) * 48.0f - 24.0f;
|
||||
}
|
||||
void EqualizerView::sliderBand10Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->equalizer.bands[9].gain_db = (value / 100.0f) * 48.0f - 24.0f;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#include <gui/octaver_screen/OctaverView.hpp>
|
||||
#include <gui/octaver_screen/OctaverPresenter.hpp>
|
||||
|
||||
OctaverPresenter::OctaverPresenter(OctaverView& v)
|
||||
: view(v)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void OctaverPresenter::activate()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void OctaverPresenter::deactivate()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
#include <gui/octaver_screen/OctaverView.hpp>
|
||||
#include <audio_effects.h>
|
||||
|
||||
OctaverView::OctaverView()
|
||||
{
|
||||
}
|
||||
|
||||
void OctaverView::setupScreen()
|
||||
{
|
||||
OctaverViewBase::setupScreen();
|
||||
toggleButton1.forceState(AudioEffects_GetParams()->octaver.enabled);
|
||||
slider1.setValue((int16_t)(AudioEffects_GetParams()->octaver.level_down2 * 100.0f));
|
||||
slider2.setValue((int16_t)(AudioEffects_GetParams()->octaver.level_down1 * 100.0f));
|
||||
slider3.setValue((int16_t)(AudioEffects_GetParams()->octaver.level_dry * 100.0f));
|
||||
slider4.setValue((int16_t)(AudioEffects_GetParams()->octaver.level_up1 * 100.0f));
|
||||
slider5.setValue((int16_t)(AudioEffects_GetParams()->octaver.level_up2 * 100.0f));
|
||||
}
|
||||
|
||||
void OctaverView::tearDownScreen()
|
||||
{
|
||||
OctaverViewBase::tearDownScreen();
|
||||
}
|
||||
|
||||
void OctaverView::toggleClicked()
|
||||
{
|
||||
AudioEffects_GetParams()->octaver.enabled = toggleButton1.getState();
|
||||
}
|
||||
|
||||
void OctaverView::slider1Clicked(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->octaver.level_down2 = value / 100.0f;
|
||||
}
|
||||
void OctaverView::slider2Clicked(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->octaver.level_down1 = value / 100.0f;
|
||||
}
|
||||
void OctaverView::slider3Clicked(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->octaver.level_dry = value / 100.0f;
|
||||
}
|
||||
void OctaverView::slider4Clicked(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->octaver.level_up1 = value / 100.0f;
|
||||
}
|
||||
void OctaverView::slider5Clicked(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->octaver.level_up2 = value / 100.0f;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#include <gui/oscillo_screen/OscilloView.hpp>
|
||||
#include <gui/oscillo_screen/OscilloPresenter.hpp>
|
||||
|
||||
OscilloPresenter::OscilloPresenter(OscilloView& v)
|
||||
: view(v)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void OscilloPresenter::activate()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void OscilloPresenter::deactivate()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
#include <gui/oscillo_screen/OscilloView.hpp>
|
||||
#include <audio_analysis.h>
|
||||
#include <touchgfx/Unicode.hpp>
|
||||
|
||||
OscilloView::OscilloView()
|
||||
{
|
||||
}
|
||||
|
||||
void OscilloView::setupScreen()
|
||||
{
|
||||
OscilloViewBase::setupScreen();
|
||||
toggleButton1.forceState(AudioAnalysis_IsEnabled());
|
||||
|
||||
/* Echelle du graphe en dB (affichage uniquement, pas une mesure calibree) :
|
||||
* de -80dB (proche du plancher de bruit numerique) a +5dB de marge au-dessus
|
||||
* du 0dB nominal. */
|
||||
graph1.setGraphRangeY(-80.0f, 5.0f);
|
||||
|
||||
/* Axe X en Hz, de 0 a Fe/2 (24kHz) : ce graphe (statique, points X/Y explicites,
|
||||
* contrairement au precedent DynamicGraph a increment X automatique) recoit
|
||||
* directement la frequence de chaque bin avec addDataPoint(x, y). */
|
||||
graph1.setGraphRangeX(0.0f, (float)AUDIO_ANALYSIS_SAMPLE_RATE_HZ / 2.0f);
|
||||
}
|
||||
|
||||
void OscilloView::tearDownScreen()
|
||||
{
|
||||
OscilloViewBase::tearDownScreen();
|
||||
}
|
||||
|
||||
void OscilloView::handleTickEvent()
|
||||
{
|
||||
OscilloViewBase::handleTickEvent();
|
||||
|
||||
if (!AudioAnalysis_IsEnabled())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (AudioAnalysis_Update())
|
||||
{
|
||||
const float *magnitudesDb = AudioAnalysis_GetMagnitudesDb();
|
||||
const float binHz = (float)AUDIO_ANALYSIS_SAMPLE_RATE_HZ / (float)AUDIO_ANALYSIS_FFT_SIZE;
|
||||
|
||||
graph1.clear();
|
||||
for (int i = 0; i < (int)AUDIO_ANALYSIS_NUM_BINS; i++)
|
||||
{
|
||||
graph1.addDataPoint((float)i * binHz, magnitudesDb[i]);
|
||||
}
|
||||
|
||||
touchgfx::Unicode::snprintf(textArea2Buffer, TEXTAREA2_SIZE, "%d", (int)AudioAnalysis_GetPeakFrequencyHz());
|
||||
textArea2.setWildcard(textArea2Buffer);
|
||||
textArea2.invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
void OscilloView::toggleClicked()
|
||||
{
|
||||
AudioAnalysis_SetEnabled(toggleButton1.getState());
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#include <gui/overdrive_screen/OverdriveView.hpp>
|
||||
#include <gui/overdrive_screen/OverdrivePresenter.hpp>
|
||||
|
||||
OverdrivePresenter::OverdrivePresenter(OverdriveView& v)
|
||||
: view(v)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void OverdrivePresenter::activate()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void OverdrivePresenter::deactivate()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
#include <gui/overdrive_screen/OverdriveView.hpp>
|
||||
#include <audio_effects.h>
|
||||
|
||||
OverdriveView::OverdriveView()
|
||||
{
|
||||
}
|
||||
|
||||
void OverdriveView::setupScreen()
|
||||
{
|
||||
OverdriveViewBase::setupScreen();
|
||||
toggleButton1.forceState(AudioEffects_GetParams()->overdrive.enabled);
|
||||
slider1.setValue((int16_t)(AudioEffects_GetParams()->overdrive.drive * 100.0f));
|
||||
slider2.setValue((int16_t)(AudioEffects_GetParams()->overdrive.tone * 100.0f));
|
||||
slider3.setValue((int16_t)(AudioEffects_GetParams()->overdrive.level * 100.0f));
|
||||
}
|
||||
|
||||
void OverdriveView::tearDownScreen()
|
||||
{
|
||||
OverdriveViewBase::tearDownScreen();
|
||||
}
|
||||
|
||||
void OverdriveView::toggleClicked()
|
||||
{
|
||||
AudioEffects_GetParams()->overdrive.enabled = toggleButton1.getState();
|
||||
}
|
||||
|
||||
void OverdriveView::sliderDriveChanged(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->overdrive.drive = value / 100.0f;
|
||||
}
|
||||
void OverdriveView::sliderToneChanged(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->overdrive.tone = value / 100.0f;
|
||||
}
|
||||
void OverdriveView::sliderLevelChanged(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->overdrive.level = value / 100.0f;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#include <gui/overview_screen/OverviewView.hpp>
|
||||
#include <gui/overview_screen/OverviewPresenter.hpp>
|
||||
|
||||
OverviewPresenter::OverviewPresenter(OverviewView& v)
|
||||
: view(v)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void OverviewPresenter::activate()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void OverviewPresenter::deactivate()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
#include <gui/overview_screen/OverviewView.hpp>
|
||||
#include <audio_effects.h>
|
||||
|
||||
OverviewView::OverviewView()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void OverviewView::setupScreen()
|
||||
{
|
||||
OverviewViewBase::setupScreen();
|
||||
toggleButton1.forceState(AudioEffects_GetParams()->audio_on_off);
|
||||
slider1.setValue((int16_t)(AudioEffects_GetParams()->master_volume * 100.0f));
|
||||
}
|
||||
|
||||
void OverviewView::tearDownScreen()
|
||||
{
|
||||
OverviewViewBase::tearDownScreen();
|
||||
}
|
||||
|
||||
void OverviewView::toggleAudioOnOFF()
|
||||
{
|
||||
AudioEffects_GetParams()->audio_on_off = toggleButton1.getState();
|
||||
}
|
||||
|
||||
void OverviewView::slider1Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->master_volume = value / 100.0f;
|
||||
|
||||
/* Le volume pilote l'etat marche/arret (0 = off, non nul = on), mais pas
|
||||
* l'inverse : agir sur le toggle ne doit pas modifier le volume. */
|
||||
bool en = (value != 0);
|
||||
AudioEffects_GetParams()->audio_on_off = en;
|
||||
toggleButton1.forceState(en);
|
||||
toggleButton1.invalidate();
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#include <gui/reverb_screen/ReverbView.hpp>
|
||||
#include <gui/reverb_screen/ReverbPresenter.hpp>
|
||||
|
||||
ReverbPresenter::ReverbPresenter(ReverbView& v)
|
||||
: view(v)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void ReverbPresenter::activate()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void ReverbPresenter::deactivate()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
#include <gui/reverb_screen/ReverbView.hpp>
|
||||
#include <audio_effects.h>
|
||||
|
||||
ReverbView::ReverbView()
|
||||
{
|
||||
}
|
||||
|
||||
void ReverbView::setupScreen()
|
||||
{
|
||||
ReverbViewBase::setupScreen();
|
||||
toggleButton1.forceState(AudioEffects_GetParams()->reverb.enabled);
|
||||
slider1.setValue((int16_t)(AudioEffects_GetParams()->reverb.room_size * 100.0f));
|
||||
slider2.setValue((int16_t)(AudioEffects_GetParams()->reverb.damping * 100.0f));
|
||||
slider3.setValue((int16_t)(AudioEffects_GetParams()->reverb.mix * 100.0f));
|
||||
}
|
||||
|
||||
void ReverbView::tearDownScreen()
|
||||
{
|
||||
ReverbViewBase::tearDownScreen();
|
||||
}
|
||||
|
||||
void ReverbView::toggleClicked()
|
||||
{
|
||||
AudioEffects_GetParams()->reverb.enabled = toggleButton1.getState();
|
||||
}
|
||||
|
||||
void ReverbView::sliderTailleChanged(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->reverb.room_size = value / 100.0f;
|
||||
}
|
||||
void ReverbView::sliderAmortiChanged(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->reverb.damping = value / 100.0f;
|
||||
}
|
||||
void ReverbView::sliderMixChanged(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->reverb.mix = value / 100.0f;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#include <gui/saturation_screen/SaturationView.hpp>
|
||||
#include <gui/saturation_screen/SaturationPresenter.hpp>
|
||||
|
||||
SaturationPresenter::SaturationPresenter(SaturationView& v)
|
||||
: view(v)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void SaturationPresenter::activate()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void SaturationPresenter::deactivate()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
#include <gui/saturation_screen/SaturationView.hpp>
|
||||
#include <audio_effects.h>
|
||||
|
||||
SaturationView::SaturationView()
|
||||
{
|
||||
}
|
||||
|
||||
void SaturationView::setupScreen()
|
||||
{
|
||||
SaturationViewBase::setupScreen();
|
||||
toggleButton1.forceState(AudioEffects_GetParams()->saturation.enabled);
|
||||
slider1.setValue((int16_t)(AudioEffects_GetParams()->saturation.drive * 100.0f));
|
||||
slider2.setValue((int16_t)(AudioEffects_GetParams()->saturation.level * 100.0f));
|
||||
}
|
||||
|
||||
void SaturationView::tearDownScreen()
|
||||
{
|
||||
SaturationViewBase::tearDownScreen();
|
||||
}
|
||||
|
||||
void SaturationView::toggleClicked()
|
||||
{
|
||||
AudioEffects_GetParams()->saturation.enabled = toggleButton1.getState();
|
||||
}
|
||||
|
||||
void SaturationView::sliderDriveClicked(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->saturation.drive = value / 100.0f;
|
||||
}
|
||||
void SaturationView::sliderLevelClicked(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->saturation.level = value / 100.0f;
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
#include <gui/screen1_screen/Screen1View.hpp>
|
||||
#include <gui/screen1_screen/Screen1Presenter.hpp>
|
||||
|
||||
Screen1Presenter::Screen1Presenter(Screen1View& v)
|
||||
: view(v)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void Screen1Presenter::activate()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void Screen1Presenter::deactivate()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
#include <gui/screen1_screen/Screen1View.hpp>
|
||||
|
||||
Screen1View::Screen1View()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void Screen1View::setupScreen()
|
||||
{
|
||||
Screen1ViewBase::setupScreen();
|
||||
}
|
||||
|
||||
void Screen1View::tearDownScreen()
|
||||
{
|
||||
Screen1ViewBase::tearDownScreen();
|
||||
}
|
||||
void Screen1View::slider1Clicked(int value)
|
||||
{
|
||||
gauge1.setValue(value);
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
MSYS-1.0.19 Build:2016-07-13 17:45
|
||||
Exception: STATUS_ACCESS_VIOLATION at eip=7BE2BF6C
|
||||
eax=00000000 ebx=608B8FA8 ecx=00000000 edx=00000000 esi=60EA050C edi=FFFFFFFF
|
||||
ebp=0022FB78 esp=0022FB6C program=C:\TouchGFX\4.26.1\env\MinGW\msys\1.0\bin\sh.exe
|
||||
cs=0107 ds=0023 es=0023 fs=010F gs=0023 ss=0023
|
||||
Stack trace:
|
||||
Frame Function Args
|
||||
0022FB78 7BE2BF6C (0000009C, 0A018B38, 0022FBA8, 00411D94)
|
||||
0022FBA8 608119BA (60EA050C, 00000003, 0022FBD8, 00000080)
|
||||
0022FBC8 6085DC35 (00000003, 00000001, 0022FBF8, 6088DC39)
|
||||
0022FBF8 60804E3C (00000080, 60882EB0, 0022FC28, 60882AE9)
|
||||
0022FC08 60804ED2 (00000080, 00000000, 00000000, 00000003)
|
||||
0022FC28 60882AE9 (00000080, 00000000, 0022FC48, 00401D2A)
|
||||
0022FC38 00401D91 (00000080, 00000000, 0022FCB0, 004015C9)
|
||||
0022FC48 00401D2A (00000080, 00000003, 00000003, 00000000)
|
||||
0022FCB0 004015C9 (00000003, 0A012140, 0A010278, 625C2F5C)
|
||||
0022FED0 6080464B (6089C740, FFFFFFFE, 00000074, 6089C6A4)
|
||||
0022FF10 60804955 (00000000, 00000000, 00000000, 00000000)
|
||||
0022FF30 0046F62F (00401090, 037F0000, 0022FF58, 7BD9EA40)
|
||||
0022FF40 0040103E (7FFD1000, 7BE2CEA3, 7BE2CEA3, 7FFD1000)
|
||||
0022FF58 7BD9EA40 (7FFD1000, 00000000, 00000000, 0022FFE8)
|
||||
0022FF6C 7BE2CEA3 (7BD9EA30, 00401000, 7FFD1000, 7FFD1000)
|
||||
0022FFE8 7BE6250D (00000000, 00401000, 7FFD1000, 00000000)
|
||||
End of stack trace (more stack frames may be present)
|
||||
@@ -0,0 +1,539 @@
|
||||
/* ----------------------------------------------------------------------
|
||||
* Project: CMSIS DSP Library
|
||||
* Title: arm_common_tables.h
|
||||
* Description: Extern declaration for common tables
|
||||
*
|
||||
* @version V1.10.0
|
||||
* @date 08 July 2021
|
||||
*
|
||||
* Target Processor: Cortex-M and Cortex-A cores
|
||||
* -------------------------------------------------------------------- */
|
||||
/*
|
||||
* Copyright (C) 2010-2021 ARM Limited or its affiliates. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef _ARM_COMMON_TABLES_H
|
||||
#define _ARM_COMMON_TABLES_H
|
||||
|
||||
#include "arm_math_types.h"
|
||||
#include "dsp/fast_math_functions.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_FFT_ALLOW_TABLES)
|
||||
/* Double Precision Float CFFT twiddles */
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_BITREV_1024)
|
||||
extern const uint16_t armBitRevTable[1024];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F64_16)
|
||||
extern const uint64_t twiddleCoefF64_16[32];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F64_32)
|
||||
extern const uint64_t twiddleCoefF64_32[64];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F64_64)
|
||||
extern const uint64_t twiddleCoefF64_64[128];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F64_128)
|
||||
extern const uint64_t twiddleCoefF64_128[256];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F64_256)
|
||||
extern const uint64_t twiddleCoefF64_256[512];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F64_512)
|
||||
extern const uint64_t twiddleCoefF64_512[1024];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F64_1024)
|
||||
extern const uint64_t twiddleCoefF64_1024[2048];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F64_2048)
|
||||
extern const uint64_t twiddleCoefF64_2048[4096];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F64_4096)
|
||||
extern const uint64_t twiddleCoefF64_4096[8192];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F32_16)
|
||||
extern const float32_t twiddleCoef_16[32];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F32_32)
|
||||
extern const float32_t twiddleCoef_32[64];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F32_64)
|
||||
extern const float32_t twiddleCoef_64[128];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F32_128)
|
||||
extern const float32_t twiddleCoef_128[256];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F32_256)
|
||||
extern const float32_t twiddleCoef_256[512];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F32_512)
|
||||
extern const float32_t twiddleCoef_512[1024];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F32_1024)
|
||||
extern const float32_t twiddleCoef_1024[2048];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F32_2048)
|
||||
extern const float32_t twiddleCoef_2048[4096];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F32_4096)
|
||||
extern const float32_t twiddleCoef_4096[8192];
|
||||
#define twiddleCoef twiddleCoef_4096
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
/* Q31 */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_Q31_16)
|
||||
extern const q31_t twiddleCoef_16_q31[24];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_Q31_32)
|
||||
extern const q31_t twiddleCoef_32_q31[48];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_Q31_64)
|
||||
extern const q31_t twiddleCoef_64_q31[96];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_Q31_128)
|
||||
extern const q31_t twiddleCoef_128_q31[192];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_Q31_256)
|
||||
extern const q31_t twiddleCoef_256_q31[384];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_Q31_512)
|
||||
extern const q31_t twiddleCoef_512_q31[768];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_Q31_1024)
|
||||
extern const q31_t twiddleCoef_1024_q31[1536];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_Q31_2048)
|
||||
extern const q31_t twiddleCoef_2048_q31[3072];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_Q31_4096)
|
||||
extern const q31_t twiddleCoef_4096_q31[6144];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_Q15_16)
|
||||
extern const q15_t twiddleCoef_16_q15[24];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_Q15_32)
|
||||
extern const q15_t twiddleCoef_32_q15[48];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_Q15_64)
|
||||
extern const q15_t twiddleCoef_64_q15[96];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_Q15_128)
|
||||
extern const q15_t twiddleCoef_128_q15[192];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_Q15_256)
|
||||
extern const q15_t twiddleCoef_256_q15[384];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_Q15_512)
|
||||
extern const q15_t twiddleCoef_512_q15[768];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_Q15_1024)
|
||||
extern const q15_t twiddleCoef_1024_q15[1536];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_Q15_2048)
|
||||
extern const q15_t twiddleCoef_2048_q15[3072];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_Q15_4096)
|
||||
extern const q15_t twiddleCoef_4096_q15[6144];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
/* Double Precision Float RFFT twiddles */
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_RFFT_F64_32)
|
||||
extern const uint64_t twiddleCoefF64_rfft_32[32];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_RFFT_F64_64)
|
||||
extern const uint64_t twiddleCoefF64_rfft_64[64];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_RFFT_F64_128)
|
||||
extern const uint64_t twiddleCoefF64_rfft_128[128];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_RFFT_F64_256)
|
||||
extern const uint64_t twiddleCoefF64_rfft_256[256];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_RFFT_F64_512)
|
||||
extern const uint64_t twiddleCoefF64_rfft_512[512];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_RFFT_F64_1024)
|
||||
extern const uint64_t twiddleCoefF64_rfft_1024[1024];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_RFFT_F64_2048)
|
||||
extern const uint64_t twiddleCoefF64_rfft_2048[2048];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_RFFT_F64_4096)
|
||||
extern const uint64_t twiddleCoefF64_rfft_4096[4096];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_RFFT_F32_32)
|
||||
extern const float32_t twiddleCoef_rfft_32[32];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_RFFT_F32_64)
|
||||
extern const float32_t twiddleCoef_rfft_64[64];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_RFFT_F32_128)
|
||||
extern const float32_t twiddleCoef_rfft_128[128];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_RFFT_F32_256)
|
||||
extern const float32_t twiddleCoef_rfft_256[256];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_RFFT_F32_512)
|
||||
extern const float32_t twiddleCoef_rfft_512[512];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_RFFT_F32_1024)
|
||||
extern const float32_t twiddleCoef_rfft_1024[1024];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_RFFT_F32_2048)
|
||||
extern const float32_t twiddleCoef_rfft_2048[2048];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_RFFT_F32_4096)
|
||||
extern const float32_t twiddleCoef_rfft_4096[4096];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
|
||||
/* Double precision floating-point bit reversal tables */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_BITREVIDX_FLT64_16)
|
||||
#define ARMBITREVINDEXTABLEF64_16_TABLE_LENGTH ((uint16_t)12)
|
||||
extern const uint16_t armBitRevIndexTableF64_16[ARMBITREVINDEXTABLEF64_16_TABLE_LENGTH];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_BITREVIDX_FLT64_32)
|
||||
#define ARMBITREVINDEXTABLEF64_32_TABLE_LENGTH ((uint16_t)24)
|
||||
extern const uint16_t armBitRevIndexTableF64_32[ARMBITREVINDEXTABLEF64_32_TABLE_LENGTH];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_BITREVIDX_FLT64_64)
|
||||
#define ARMBITREVINDEXTABLEF64_64_TABLE_LENGTH ((uint16_t)56)
|
||||
extern const uint16_t armBitRevIndexTableF64_64[ARMBITREVINDEXTABLEF64_64_TABLE_LENGTH];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_BITREVIDX_FLT64_128)
|
||||
#define ARMBITREVINDEXTABLEF64_128_TABLE_LENGTH ((uint16_t)112)
|
||||
extern const uint16_t armBitRevIndexTableF64_128[ARMBITREVINDEXTABLEF64_128_TABLE_LENGTH];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_BITREVIDX_FLT64_256)
|
||||
#define ARMBITREVINDEXTABLEF64_256_TABLE_LENGTH ((uint16_t)240)
|
||||
extern const uint16_t armBitRevIndexTableF64_256[ARMBITREVINDEXTABLEF64_256_TABLE_LENGTH];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_BITREVIDX_FLT64_512)
|
||||
#define ARMBITREVINDEXTABLEF64_512_TABLE_LENGTH ((uint16_t)480)
|
||||
extern const uint16_t armBitRevIndexTableF64_512[ARMBITREVINDEXTABLEF64_512_TABLE_LENGTH];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_BITREVIDX_FLT64_1024)
|
||||
#define ARMBITREVINDEXTABLEF64_1024_TABLE_LENGTH ((uint16_t)992)
|
||||
extern const uint16_t armBitRevIndexTableF64_1024[ARMBITREVINDEXTABLEF64_1024_TABLE_LENGTH];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_BITREVIDX_FLT64_2048)
|
||||
#define ARMBITREVINDEXTABLEF64_2048_TABLE_LENGTH ((uint16_t)1984)
|
||||
extern const uint16_t armBitRevIndexTableF64_2048[ARMBITREVINDEXTABLEF64_2048_TABLE_LENGTH];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_BITREVIDX_FLT64_4096)
|
||||
#define ARMBITREVINDEXTABLEF64_4096_TABLE_LENGTH ((uint16_t)4032)
|
||||
extern const uint16_t armBitRevIndexTableF64_4096[ARMBITREVINDEXTABLEF64_4096_TABLE_LENGTH];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
/* floating-point bit reversal tables */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_BITREVIDX_FLT_16)
|
||||
#define ARMBITREVINDEXTABLE_16_TABLE_LENGTH ((uint16_t)20)
|
||||
extern const uint16_t armBitRevIndexTable16[ARMBITREVINDEXTABLE_16_TABLE_LENGTH];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_BITREVIDX_FLT_32)
|
||||
#define ARMBITREVINDEXTABLE_32_TABLE_LENGTH ((uint16_t)48)
|
||||
extern const uint16_t armBitRevIndexTable32[ARMBITREVINDEXTABLE_32_TABLE_LENGTH];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_BITREVIDX_FLT_64)
|
||||
#define ARMBITREVINDEXTABLE_64_TABLE_LENGTH ((uint16_t)56)
|
||||
extern const uint16_t armBitRevIndexTable64[ARMBITREVINDEXTABLE_64_TABLE_LENGTH];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_BITREVIDX_FLT_128)
|
||||
#define ARMBITREVINDEXTABLE_128_TABLE_LENGTH ((uint16_t)208)
|
||||
extern const uint16_t armBitRevIndexTable128[ARMBITREVINDEXTABLE_128_TABLE_LENGTH];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_BITREVIDX_FLT_256)
|
||||
#define ARMBITREVINDEXTABLE_256_TABLE_LENGTH ((uint16_t)440)
|
||||
extern const uint16_t armBitRevIndexTable256[ARMBITREVINDEXTABLE_256_TABLE_LENGTH];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_BITREVIDX_FLT_512)
|
||||
#define ARMBITREVINDEXTABLE_512_TABLE_LENGTH ((uint16_t)448)
|
||||
extern const uint16_t armBitRevIndexTable512[ARMBITREVINDEXTABLE_512_TABLE_LENGTH];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_BITREVIDX_FLT_1024)
|
||||
#define ARMBITREVINDEXTABLE_1024_TABLE_LENGTH ((uint16_t)1800)
|
||||
extern const uint16_t armBitRevIndexTable1024[ARMBITREVINDEXTABLE_1024_TABLE_LENGTH];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_BITREVIDX_FLT_2048)
|
||||
#define ARMBITREVINDEXTABLE_2048_TABLE_LENGTH ((uint16_t)3808)
|
||||
extern const uint16_t armBitRevIndexTable2048[ARMBITREVINDEXTABLE_2048_TABLE_LENGTH];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_BITREVIDX_FLT_4096)
|
||||
#define ARMBITREVINDEXTABLE_4096_TABLE_LENGTH ((uint16_t)4032)
|
||||
extern const uint16_t armBitRevIndexTable4096[ARMBITREVINDEXTABLE_4096_TABLE_LENGTH];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
|
||||
/* fixed-point bit reversal tables */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_BITREVIDX_FXT_16)
|
||||
#define ARMBITREVINDEXTABLE_FIXED_16_TABLE_LENGTH ((uint16_t)12)
|
||||
extern const uint16_t armBitRevIndexTable_fixed_16[ARMBITREVINDEXTABLE_FIXED_16_TABLE_LENGTH];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_BITREVIDX_FXT_32)
|
||||
#define ARMBITREVINDEXTABLE_FIXED_32_TABLE_LENGTH ((uint16_t)24)
|
||||
extern const uint16_t armBitRevIndexTable_fixed_32[ARMBITREVINDEXTABLE_FIXED_32_TABLE_LENGTH];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_BITREVIDX_FXT_64)
|
||||
#define ARMBITREVINDEXTABLE_FIXED_64_TABLE_LENGTH ((uint16_t)56)
|
||||
extern const uint16_t armBitRevIndexTable_fixed_64[ARMBITREVINDEXTABLE_FIXED_64_TABLE_LENGTH];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_BITREVIDX_FXT_128)
|
||||
#define ARMBITREVINDEXTABLE_FIXED_128_TABLE_LENGTH ((uint16_t)112)
|
||||
extern const uint16_t armBitRevIndexTable_fixed_128[ARMBITREVINDEXTABLE_FIXED_128_TABLE_LENGTH];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_BITREVIDX_FXT_256)
|
||||
#define ARMBITREVINDEXTABLE_FIXED_256_TABLE_LENGTH ((uint16_t)240)
|
||||
extern const uint16_t armBitRevIndexTable_fixed_256[ARMBITREVINDEXTABLE_FIXED_256_TABLE_LENGTH];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_BITREVIDX_FXT_512)
|
||||
#define ARMBITREVINDEXTABLE_FIXED_512_TABLE_LENGTH ((uint16_t)480)
|
||||
extern const uint16_t armBitRevIndexTable_fixed_512[ARMBITREVINDEXTABLE_FIXED_512_TABLE_LENGTH];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_BITREVIDX_FXT_1024)
|
||||
#define ARMBITREVINDEXTABLE_FIXED_1024_TABLE_LENGTH ((uint16_t)992)
|
||||
extern const uint16_t armBitRevIndexTable_fixed_1024[ARMBITREVINDEXTABLE_FIXED_1024_TABLE_LENGTH];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_BITREVIDX_FXT_2048)
|
||||
#define ARMBITREVINDEXTABLE_FIXED_2048_TABLE_LENGTH ((uint16_t)1984)
|
||||
extern const uint16_t armBitRevIndexTable_fixed_2048[ARMBITREVINDEXTABLE_FIXED_2048_TABLE_LENGTH];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_BITREVIDX_FXT_4096)
|
||||
#define ARMBITREVINDEXTABLE_FIXED_4096_TABLE_LENGTH ((uint16_t)4032)
|
||||
extern const uint16_t armBitRevIndexTable_fixed_4096[ARMBITREVINDEXTABLE_FIXED_4096_TABLE_LENGTH];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_REALCOEF_F32)
|
||||
extern const float32_t realCoefA[8192];
|
||||
extern const float32_t realCoefB[8192];
|
||||
#endif
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_REALCOEF_Q31)
|
||||
extern const q31_t realCoefAQ31[8192];
|
||||
extern const q31_t realCoefBQ31[8192];
|
||||
#endif
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_REALCOEF_Q15)
|
||||
extern const q15_t realCoefAQ15[8192];
|
||||
extern const q15_t realCoefBQ15[8192];
|
||||
#endif
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_DCT4_F32_128)
|
||||
extern const float32_t Weights_128[256];
|
||||
extern const float32_t cos_factors_128[128];
|
||||
#endif
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_DCT4_F32_512)
|
||||
extern const float32_t Weights_512[1024];
|
||||
extern const float32_t cos_factors_512[512];
|
||||
#endif
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_DCT4_F32_2048)
|
||||
extern const float32_t Weights_2048[4096];
|
||||
extern const float32_t cos_factors_2048[2048];
|
||||
#endif
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_DCT4_F32_8192)
|
||||
extern const float32_t Weights_8192[16384];
|
||||
extern const float32_t cos_factors_8192[8192];
|
||||
#endif
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_DCT4_Q15_128)
|
||||
extern const q15_t WeightsQ15_128[256];
|
||||
extern const q15_t cos_factorsQ15_128[128];
|
||||
#endif
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_DCT4_Q15_512)
|
||||
extern const q15_t WeightsQ15_512[1024];
|
||||
extern const q15_t cos_factorsQ15_512[512];
|
||||
#endif
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_DCT4_Q15_2048)
|
||||
extern const q15_t WeightsQ15_2048[4096];
|
||||
extern const q15_t cos_factorsQ15_2048[2048];
|
||||
#endif
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_DCT4_Q15_8192)
|
||||
extern const q15_t WeightsQ15_8192[16384];
|
||||
extern const q15_t cos_factorsQ15_8192[8192];
|
||||
#endif
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_DCT4_Q31_128)
|
||||
extern const q31_t WeightsQ31_128[256];
|
||||
extern const q31_t cos_factorsQ31_128[128];
|
||||
#endif
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_DCT4_Q31_512)
|
||||
extern const q31_t WeightsQ31_512[1024];
|
||||
extern const q31_t cos_factorsQ31_512[512];
|
||||
#endif
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_DCT4_Q31_2048)
|
||||
extern const q31_t WeightsQ31_2048[4096];
|
||||
extern const q31_t cos_factorsQ31_2048[2048];
|
||||
#endif
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_DCT4_Q31_8192)
|
||||
extern const q31_t WeightsQ31_8192[16384];
|
||||
extern const q31_t cos_factorsQ31_8192[8192];
|
||||
#endif
|
||||
|
||||
#endif /* if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_FFT_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_FAST_ALLOW_TABLES)
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FAST_TABLES) || defined(ARM_TABLE_RECIP_Q15)
|
||||
extern const q15_t armRecipTableQ15[64];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) defined(ARM_ALL_FAST_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FAST_TABLES) || defined(ARM_TABLE_RECIP_Q31)
|
||||
extern const q31_t armRecipTableQ31[64];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) defined(ARM_ALL_FAST_TABLES) */
|
||||
|
||||
/* Tables for Fast Math Sine and Cosine */
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FAST_TABLES) || defined(ARM_TABLE_SIN_F32)
|
||||
extern const float32_t sinTable_f32[FAST_MATH_TABLE_SIZE + 1];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) defined(ARM_ALL_FAST_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FAST_TABLES) || defined(ARM_TABLE_SIN_Q31)
|
||||
extern const q31_t sinTable_q31[FAST_MATH_TABLE_SIZE + 1];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) defined(ARM_ALL_FAST_TABLES) */
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FAST_TABLES) || defined(ARM_TABLE_SIN_Q15)
|
||||
extern const q15_t sinTable_q15[FAST_MATH_TABLE_SIZE + 1];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) defined(ARM_ALL_FAST_TABLES) */
|
||||
|
||||
/* Fast vector sqrt */
|
||||
#if defined(ARM_MATH_MVEI) && !defined(ARM_MATH_AUTOVECTORIZE)
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FAST_TABLES) || defined(ARM_TABLE_FAST_SQRT_Q31_MVE)
|
||||
extern const q31_t sqrtTable_Q31[256];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) defined(ARM_ALL_FAST_TABLES) */
|
||||
#endif
|
||||
|
||||
/* Accurate scalar sqrt */
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FAST_TABLES) || defined(ARM_TABLE_SQRT_Q31)
|
||||
extern const q31_t sqrt_initial_lut_q31[32];
|
||||
#endif
|
||||
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FAST_TABLES) || defined(ARM_TABLE_SQRT_Q15)
|
||||
extern const q15_t sqrt_initial_lut_q15[16];
|
||||
#endif
|
||||
|
||||
#if defined(ARM_MATH_MVEI) && !defined(ARM_MATH_AUTOVECTORIZE)
|
||||
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FAST_TABLES) || defined(ARM_TABLE_FAST_SQRT_Q15_MVE)
|
||||
extern const q15_t sqrtTable_Q15[256];
|
||||
#endif /* !defined(ARM_DSP_CONFIG_TABLES) defined(ARM_ALL_FAST_TABLES) */
|
||||
#endif
|
||||
|
||||
#endif /* if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_FAST_TABLES) */
|
||||
|
||||
#if (defined(ARM_MATH_MVEF) || defined(ARM_MATH_HELIUM)) && !defined(ARM_MATH_AUTOVECTORIZE)
|
||||
extern const float32_t exp_tab[8];
|
||||
extern const float32_t __logf_lut_f32[8];
|
||||
#endif /* (defined(ARM_MATH_MVEF) || defined(ARM_MATH_HELIUM)) && !defined(ARM_MATH_AUTOVECTORIZE) */
|
||||
|
||||
#if (defined(ARM_MATH_MVEI) || defined(ARM_MATH_HELIUM)) && !defined(ARM_MATH_AUTOVECTORIZE)
|
||||
extern const unsigned char hwLUT[256];
|
||||
#endif /* (defined(ARM_MATH_MVEI) || defined(ARM_MATH_HELIUM)) */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* ARM_COMMON_TABLES_H */
|
||||
|
||||