The attached patch fixes a silly bug in the pitch-tracker which causes it to 
have a target frequency of 0Hz whenever the target note is in the octave below 
the reference octave (usually the one with A440 in it).

As this is in the master branch now, I wonder if somebody with the appropriate 
permissions could apply it?

Thanks,

Nick/.

-- 
Nick Bailey
Science and Music Research Group, The University of Glasgow
http://www.n-ism.org/People/nick.php

Find out about our Masters in Signal Processing, Electronics and Computing 
Techniques for Researching and Understanding Music
http://www.n-ism.org/SPECTRUM
Index: src/sound/Tuning.cpp
===================================================================
--- src/sound/Tuning.cpp	(revision 12295)
+++ src/sound/Tuning.cpp	(working copy)
@@ -577,13 +577,13 @@
         octave--;
     }
     
-    int octaveDifference = octave - m_refOctave;
+    const int octaveDifference = octave - m_refOctave;
     
-    int octaveRatio = pow( 2, octaveDifference );
+    const double octaveRatio = pow( 2, octaveDifference );
     
     ratio *= octaveRatio;
     
-    double freq = m_cRefFreq * ratio;
+    const double freq = m_cRefFreq * ratio;
     
 #   if (TUNING_DEBUG)
     qDebug() << "Spelling " << spelling.c_str() 

Attachment: signature.asc
Description: This is a digitally signed message part.

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Rosegarden-devel mailing list
Rosegarden-devel@lists.sourceforge.net - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to