1 #ifndef UTILITIES_HPP_INCLUDED
2 #define UTILITIES_HPP_INCLUDED
10 using Number = double;
11 using MachineLearningOutput = std::vector<std::pair<ChordProgression, Number> >;
17 enum Unit {H, MIN, S, MS, US};
18 Time(
float v = 0, Unit u = Time::S);
21 Time& operator/=(
float v);
22 Time& operator*=(
float v);
23 Time operator/(
float v)
const;
24 Time operator*(
float v)
const;
25 float getNumber(Unit u = Time::S)
const;
36 std::string getFile(
const std::string& str);
40 std::string toString(
const T& a)
48 std::vector<std::vector<T> > createAllPossibilities(
const std::vector<T>& v,
unsigned l)
51 return std::vector<std::vector<T> >(1, std::vector<T>());
52 auto prec = createAllPossibilities(v, l-1);
53 std::vector<std::vector<T> > res;
54 for(
unsigned i=0;i<v.size();i++)
56 for(
unsigned j=0;j<prec.size();j++)
69 MachineLearningOutput getExhaustiveChordProgression(
const std::vector<std::string>& c,
unsigned size);
71 #endif // UTILITIES_HPP_INCLUDED
This file defines all the data structures related to music objects.
Definition: Utilities.hpp:14