comparison widgets/UnitConverter.cpp @ 1158:8e4b90aeefaa project-file-rework

Tidying
author Chris Cannam
date Tue, 25 Oct 2016 15:32:41 +0100
parents 78ae34f388f6
children a34a2a25907c
comparison
equal deleted inserted replaced
1157:e6c798c9bc91 1158:8e4b90aeefaa
323 double cents = 0; 323 double cents = 0;
324 int pitch = Pitch::getPitchForFrequency(m_freq->value(), &cents); 324 int pitch = Pitch::getPitchForFrequency(m_freq->value(), &cents);
325 int note, octave; 325 int note, octave;
326 Pitch::getNoteAndOctaveForPitch(pitch, note, octave); 326 Pitch::getNoteAndOctaveForPitch(pitch, note, octave);
327 327
328 cerr << "pitch " << pitch << " note " << note << " octave " << octave << " cents " << cents << endl; 328 // cerr << "pitch " << pitch << " note " << note << " octave " << octave << " cents " << cents << endl;
329 329
330 setTo(m_midi, pitch); 330 setTo(m_midi, pitch);
331 setTo(m_cents, cents); 331 setTo(m_cents, cents);
332 setTo(m_octave, octave); 332 setTo(m_octave, octave);
333 333
385 UnitConverter::updateTempiFromSamples() 385 UnitConverter::updateTempiFromSamples()
386 { 386 {
387 double samples = m_samples->value(); 387 double samples = m_samples->value();
388 double rate = getSampleRate(); 388 double rate = getSampleRate();
389 389
390 cerr << samples << " samples at rate " << rate << endl; 390 // cerr << samples << " samples at rate " << rate << endl;
391 391
392 double sec = samples / rate; 392 double sec = samples / rate;
393 double hz = rate / samples; 393 double hz = rate / samples;
394 double bpm = 60.0 / sec; 394 double bpm = 60.0 / sec;
395 395