stfu/Source/config.h
2024-06-29 18:15:06 +03:00

37 lines
1.4 KiB
C

#if !defined(STFU_CONFIG)
#define STFU_CONFIG
/* Determines output framerate, in times per second. */
#define STFU_AUDIO_FRAME_RATE 44100
#define STFU_AUDIO_CHANNEL_COUNT 2
#define STFU_C4_FREQUENCY 261.63f
#define STFU_A4_FREQUENCY 440.0f
#define STFU_NOTE_UPSCALE_FACTOR 1.059463094f
#define STFU_NOTE_DOWNSCALE_FACTOR 0.943874313f
/* Introduces delayed buffering for purposes of crossfading channels when notes
* are retriggered, needed for filtering clicks */
#define STFU_CROSSFADE_BUFFER_FRAMES 32
static const float STFU_SCALE[12] = {
STFU_C4_FREQUENCY,
STFU_C4_FREQUENCY *STFU_NOTE_UPSCALE_FACTOR,
STFU_C4_FREQUENCY *STFU_NOTE_UPSCALE_FACTOR *STFU_NOTE_UPSCALE_FACTOR,
STFU_C4_FREQUENCY *STFU_NOTE_UPSCALE_FACTOR *STFU_NOTE_UPSCALE_FACTOR
*STFU_NOTE_UPSCALE_FACTOR,
STFU_C4_FREQUENCY *STFU_NOTE_UPSCALE_FACTOR *STFU_NOTE_UPSCALE_FACTOR
*STFU_NOTE_UPSCALE_FACTOR *STFU_NOTE_UPSCALE_FACTOR,
STFU_A4_FREQUENCY *STFU_NOTE_DOWNSCALE_FACTOR *STFU_NOTE_DOWNSCALE_FACTOR
*STFU_NOTE_DOWNSCALE_FACTOR *STFU_NOTE_DOWNSCALE_FACTOR,
STFU_A4_FREQUENCY *STFU_NOTE_DOWNSCALE_FACTOR *STFU_NOTE_DOWNSCALE_FACTOR
*STFU_NOTE_DOWNSCALE_FACTOR,
STFU_A4_FREQUENCY *STFU_NOTE_DOWNSCALE_FACTOR *STFU_NOTE_DOWNSCALE_FACTOR,
STFU_A4_FREQUENCY *STFU_NOTE_DOWNSCALE_FACTOR,
STFU_A4_FREQUENCY,
STFU_A4_FREQUENCY *STFU_NOTE_UPSCALE_FACTOR,
STFU_A4_FREQUENCY *STFU_NOTE_UPSCALE_FACTOR *STFU_NOTE_UPSCALE_FACTOR,
};
#endif