#include <xtd/xtd>
#include <chrono>
#include <vector>
#include <thread>
using namespace std;
using namespace std::this_thread;
enum class tone {
rest = 0,
g_below_c = 196,
a_sharp = 233,
c_sharp = 277,
d_sharp = 311,
e = 330,
f_sharp = 370,
g_sharp = 415,
};
enum class duration {
whole = 1600,
eighth = quarter / 2,
sixteenth = eighth / 2,
};
struct note final {
private:
tone tone_val = tone::rest;
public:
note(tone frequency, duration time) : tone_val(frequency), dur_val(time) {}
note() = default;
note(const note& note) = default;
note& operator=(const note& note) = default;
tone note_tone() const noexcept {return tone_val;}
duration note_duration() const noexcept {return dur_val;}
};
void play(
const vector<note>& tune) {
if (
n.note_tone() == tone::rest)
sleep_for(chrono::milliseconds(as<int>(
n.note_duration())));
else
cout << beep(as<unsigned int>(
n.note_tone()), as<unsigned int>(
n.note_duration()));
}
}
auto main()->int {
vector mary = {
note(tone::g_below_c, duration::quarter),
};
}