Sound2Light auf RGB(W)-LED-Leisten
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

config.h 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * vim: sw=2 ts=2 expandtab
  3. *
  4. * THE PIZZA-WARE LICENSE" (derived from "THE BEER-WARE LICENCE"):
  5. * <cfr34k@tkolb.de> wrote this file. As long as you retain this notice you can
  6. * do whatever you want with this stuff. If we meet some day, and you think
  7. * this stuff is worth it, you can buy me a pizza in return. - Thomas Kolb
  8. */
  9. #ifndef CONFIG_H
  10. #define CONFIG_H
  11. #include <stdint.h>
  12. // configuration variables for musiclight2
  13. // networking
  14. #define HOST "192.168.23.222"
  15. #define PORT 2703
  16. // FFT transformation parameters
  17. #define FFT_EXPONENT 10
  18. #define BLOCK_LEN (1 << FFT_EXPONENT) // 2^FFT_EXPONENT
  19. #define SAMPLE_RATE 44100
  20. #define DATALEN (BLOCK_LEN / 2)
  21. // Number of parts in the sample buffer
  22. #define BUFFER_PARTS 2
  23. // update rate for the led strip (in seconds)
  24. #define LED_INTERVAL 0.03
  25. // frequency ranges for the base colors
  26. #define RED_MIN_FREQ 0
  27. #define RED_MAX_FREQ 400
  28. #define GREEN_MIN_FREQ 400
  29. #define GREEN_MAX_FREQ 4000
  30. #define BLUE_MIN_FREQ 4000
  31. #define BLUE_MAX_FREQ SAMPLE_RATE/2
  32. #define COLOR_MAX_REDUCTION_FACTOR 0.9998
  33. // sample data types
  34. typedef int16_t sample;
  35. typedef int64_t sample_sum;
  36. #endif // CONFIG_H