1

I have an audio visualiser which currently represents 3RGB LEDs through an Arduino. I send a value for each channel of light and this currently works well.

I change the intensity of each channel based on how bassy the audio is and I cycle from 1 to 360 in Hue and convert HSV to RGB which gets sent to the Arduino.

What is a better way to represent the audio which is more "dynamic" instead of just cycling between 1 and 360

Community
  • 1
  • 1
Jamie
  • 674
  • 1
  • 10
  • 30

1 Answers1

2

You have a lot of ways to represent audio features, it all depends on what you want.

You also have other algorithms to detect the tunes and other things but I don't think it is suitable here.

Also you can adapt the intensity values so that they aren't linear. Try to have a logarithmic scale for those values, it will give better results (since the human ear has a "logarithmic perception" if I can say)

Community
  • 1
  • 1
ppetrov
  • 3,077
  • 2
  • 15
  • 27
  • Beat Detection looks incredibly complicated :( – Jamie May 19 '13 at 23:59
  • it's not that complicated, you just have to detect big variations in your spectral analysis over time, I'm sure you can find a simple implementation quickly (assuming you know how to get the spectral analysis) – ppetrov May 20 '13 at 00:53
  • Currently I just get the average of 0 to 15 in my FFT array which is always updating and use a HueToHSV function where the average is the Saturation which gives me the values I need. Would that be the Spectral analysis? – Jamie May 20 '13 at 02:33
  • Actually your FFT array contains the result of spectral analysis. As you said it updates periodically, so you'd need to find big variations in the values of that array compared to the last values you got, it's not really beat detection but it's a start. – ppetrov May 20 '13 at 02:51
  • So I could check the previous value each time I rebuild the average and see if there is a big change and then from there I get the biggest change and divide it by 10 or so to get an RGB colour from that and then times it by the general average to get some kind of saturation? – Jamie May 20 '13 at 02:54
  • you can do that or something else, it all depends on what kind of visual presentation you want – ppetrov May 20 '13 at 03:19