#pragma once #include #include #include #include #include class AudioEmitter { private: std::unique_ptr system; FMOD::Channel *timer{nullptr}; std::vector> chords; std::vector> drums; std::vector> notes; std::vector> markov_matrix_chords; std::vector> markov_matrix_melody; int nbr_melo_max{4}; int nbr_melo_total{ 64 }; int current_beat{0}; std::vector> rythmes; int index_note; std::vector chordProgression; std::vector activeChannels; public: int tempo{ 170 }; AudioEmitter(); std::vector> generateMusic(); void audioUpdate(); void audioEnd(); int firstChord(); int nextChord(int currentChord); int firstNote(); int nextNote(int currentNote); int noteSecondaire(int note); float getTimeTempo() const; float getTime() const; float timeBeforeNewGeneration{4.f}; };