Exemplo n.º 1
0
const std::vector<ribi::Music::Note> ribi::Music::Scale::GetNotes() const noexcept
{
  std::vector<Note> notes;
  Note cur = m_root;
  notes.push_back(cur);
  std::for_each(m_intervals.begin(),m_intervals.end(),
    [&cur,&notes](const int interval)
    {
      cur = Note( (cur.ToInt() + interval) % 12);
      notes.push_back(cur);
    }
  );
  return notes;
}
Exemplo n.º 2
0
bool ribi::Music::operator<(const Note& lhs, const Note& rhs) noexcept
{
    return lhs.ToInt() < rhs.ToInt();
}