musiclight2/config.h

51 lines
1.2 KiB
C
Raw Permalink Normal View History

2012-07-13 21:18:35 +02:00
/*
* vim: sw=2 ts=2 expandtab
*
2013-02-02 21:54:53 +01:00
* "THE PIZZA-WARE LICENSE" (derived from "THE BEER-WARE LICENCE"):
* Thomas Kolb <cfr34k@tkolb.de> wrote this file. As long as you retain this
* notice you can do whatever you want with this stuff. If we meet some day,
* and you think this stuff is worth it, you can buy me a pizza in return.
* - Thomas Kolb
2012-07-13 21:18:35 +02:00
*/
#ifndef CONFIG_H
#define CONFIG_H
#include <stdint.h>
// configuration variables for musiclight2
// networking
#define HOST "192.168.23.222"
#define PORT 2703
// FFT transformation parameters
#define FFT_EXPONENT 8 // ATTENTION: when you change this, run gen_lut.py with this value as argument
2012-07-13 21:18:35 +02:00
#define BLOCK_LEN (1 << FFT_EXPONENT) // 2^FFT_EXPONENT
#define SAMPLE_RATE 44100
#define DATALEN (BLOCK_LEN / 2)
// Number of parts in the sample buffer
#define BUFFER_PARTS 2
// update rate for the led strip (in seconds)
#define LED_INTERVAL 0.01
2012-07-13 21:18:35 +02:00
// frequency ranges for the base colors
#define RED_MIN_FREQ 0
#define RED_MAX_FREQ 400
#define GREEN_MIN_FREQ 400
#define GREEN_MAX_FREQ 4000
#define BLUE_MIN_FREQ 4000
#define BLUE_MAX_FREQ SAMPLE_RATE/2
#define COLOR_MAX_REDUCTION_FACTOR 0.9998
// sample data types
typedef int16_t sample;
typedef int64_t sample_sum;
typedef double value_type;
2012-07-13 21:18:35 +02:00
#endif // CONFIG_H