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
|
2018-08-14 21:52:33 +02:00
|
|
|
#define HOST "musiclight0.wiese.icmp.camp"
|
2012-07-13 21:18:35 +02:00
|
|
|
#define PORT 2703
|
|
|
|
|
|
|
|
// FFT transformation parameters
|
2018-06-19 22:13:22 +02:00
|
|
|
#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
|
2018-08-14 21:52:33 +02:00
|
|
|
#define SAMPLE_RATE 48000
|
2012-07-13 21:18:35 +02:00
|
|
|
#define DATALEN (BLOCK_LEN / 2)
|
|
|
|
|
|
|
|
// Number of parts in the sample buffer
|
|
|
|
#define BUFFER_PARTS 2
|
|
|
|
|
|
|
|
// update rate for the led strip (in seconds)
|
2018-06-19 22:13:22 +02:00
|
|
|
#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;
|
|
|
|
|
2012-09-03 17:16:14 +02:00
|
|
|
typedef double value_type;
|
|
|
|
|
2012-07-13 21:18:35 +02:00
|
|
|
#endif // CONFIG_H
|