Files
chirping/song.h

29 lines
637 B
C++

#pragma once
#include <cstdint>
#include <vector>
//typedef uint16_t[4][64] Pattern;
class Song {
public:
Song();
void SetCurrentPatternNum(const int pattern_num);
void SetCurrentNote(const int channel, const int row, const uint16_t note);
const int GetCurrentPatternNum();
const int GetCurrentRow();
uint16_t GetCurrentNote(const int channel, int row = -1);
void Play();
void Stop();
const bool IsPlaying();
void Next();
private:
bool playing;
int current_pattern;
int current_row;
uint16_t pattern[4][64];
};