Notice: Array to string conversion in /var/www/wiki.sourcebinder.org/includes/Setup.php on line 304

Warning: Parameter 1 to Language::getMagic() expected to be a reference, value given in /var/www/wiki.sourcebinder.org/includes/StubObject.php on line 58
Using a Spectrum Analyzer - SourceBinder Wiki

Using a Spectrum Analyzer

From SourceBinder Wiki

Jump to: navigation, search

This tutorial shows you how to use the sound spectrum analyzer in SourceBinder.


1. Grab a MP3Player node and a ComputeSpectrum node and connect the former to the Output node.

step1.png

2. After that, you have to handle the values that ComputeSpectrum node gives you. By default it's 128 numbers and it gives you as an array.

3. Let's say, you want to use the first value in this array, this value is the magnitude value of the lowest frequency. You need something that extracts this value from the array.

4. Put an ArrayItemNumber node to your composition. By default it grabs the first value of an array.

5. Then it's easy to visualize this number value in a line chart by using a VerticalLineChart node After you connected them together, an line chart appeared at the top left corner of the screen.

step2.png

As the music goes, it grabs the lowest frequency values and put them on the chart.

6. Let's make it more sophisticated by using more values.

step3.png

7. After that, you've to set which values you want to put into the line charts. Let's double click on one of the ArrayItemNumber nodes and set that value. You have 128 numbers so the 64th would be fine.

step4.png

8. Let's do the same with the remaining ArrayItemNumber node. It'd be the 127th.

step5.png

That's all folks, you can play with the colors of the line charts, you can make them nicer. But obviously that's just a starter, you can use the spectrum input for a lot more things. Just to give you some examples: drive scale, offset, rotation and of course any other numeric input of any object.

Here you can find this composition.

Personal tools