Subversion Repositories DIN Is Noise

Rev

Rev 484 | Rev 909 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

/*
* note.cc
* DIN Is Noise is copyright (c) 2006-2018 Jagannathan Sampath
* For more information, please visit http://dinisnoise.org/
*/



#include "note.h"
#include "main.h"

#include <sstream>

note::note () {
  octave_position = 0;
  hz = 0;
  step = 0;
}

void note::set_frequency (float f) {
  hz = f;
  hz2step (hz, step);

  std::stringstream ss;
  ss << hz;
  ss >> hz_name;
}

void note::set_name (const std::string& n) {
  name = n;
  len = name.length ();
}