Program Listing for File vuanimation.h

Return to documentation for file (src/animation/vuanimation.h)

#ifndef VUANIMATION_H
#define VUANIMATION_H

#include "animation.h"

// TODO: Complete VUAnimation
// Example with code: https://github.com/shajeebtm/Arduino-audio-spectrum-visualizer-analyzer/
// Other example: https://classes.engineering.wustl.edu/ese205/core/index.php?title=Fast_Fourier_Transform_Library_%26_Arduino

namespace PixelMaestro {
    class VUAnimation : public Animation {
        public:
            explicit VUAnimation(Section& section);
            ~VUAnimation() = default;
            void set_sample(uint8_t index, double sample);
            void update();

        private:
            static const uint8_t NUM_SAMPLES = 128;

            double vReal[NUM_SAMPLES];
            double vImg[NUM_SAMPLES];

            void map();
    };
}

#endif // VUANIMATION_H