Skip to content

Feature: Visualizer Animation #7

@8bitbuddhist

Description

@8bitbuddhist

Animation that renders a music visualizer-like output to the Section. This doesn't do any direct audio processing, but instead takes output from a process such as a fast Fourier transform and converts it into a byte array.

Variables:

  • samples: double array containing output from FFT function
  • sample_size: the number of samples in the FFT array
  • out: byte array for output of conversion from samples

When calling the set_input() function, the out array is initialized to the number of samples (only if it's uninitialized or different from the size of the samples array). It then converts the values from samples into bytes, which it stores in out.

When map() is called, the contents of out are scaled and set in map_. map() is called whenever set_input() is called or the grid resizes.

Users are expected to run set_input() as often as their FFT function can generate output. Users can also use any input values they want - it doesn't have to be output from an FFT function or even related to audio.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions