Update to upstream version 0.97.7 0.97.7
authorjohn <john@movingsucks.org>
Fri, 23 Nov 2007 20:53:25 +0000 (13:53 -0700)
committerjohn <john@movingsucks.org>
Fri, 23 Nov 2007 20:53:25 +0000 (13:53 -0700)
12 files changed:
TODO
configure
configure.ac
libs/Music/Music.cpp
libs/Music/Music.h
src/CustomInstrumentTunerForm.cpp
src/DummyMonoQuantizer.cpp
src/LatencyMonoQuantizer.cpp
src/modules/DialView.cpp
src/modules/MicrotonalView.cpp
ui/ConfigForm.ui
ui/InstrumentTunerForm.ui

diff --git a/TODO b/TODO
index 2cf53df..6e673f6 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,7 +1,7 @@
 look for translations
 
 volume à partir de la somme des harmoniques pas de la valeur max
-       perceptive volume from weighted spectrum ?
+       perceptive volume from weighted spectrum ? loudness ? de Bark ?
 high pass with FIR
 band pass ranges with low pass
 tests corrects des working transport possibles
index ac51f3a..d3f4e3e 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for fmit 0.97.6.
+# Generated by GNU Autoconf 2.59 for fmit 0.97.7.
 #
 # Copyright (C) 2003 Free Software Foundation, Inc.
 # This configure script is free software; the Free Software Foundation
@@ -267,8 +267,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
 # Identity of this package.
 PACKAGE_NAME='fmit'
 PACKAGE_TARNAME='fmit'
-PACKAGE_VERSION='0.97.6'
-PACKAGE_STRING='fmit 0.97.6'
+PACKAGE_VERSION='0.97.7'
+PACKAGE_STRING='fmit 0.97.7'
 PACKAGE_BUGREPORT=''
 
 ac_default_prefix=/usr/local/
@@ -791,7 +791,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures fmit 0.97.6 to adapt to many kinds of systems.
+\`configure' configures fmit 0.97.7 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -857,7 +857,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of fmit 0.97.6:";;
+     short | recursive ) echo "Configuration of fmit 0.97.7:";;
    esac
   cat <<\_ACEOF
 
@@ -1004,7 +1004,7 @@ fi
 test -n "$ac_init_help" && exit 0
 if $ac_init_version; then
   cat <<\_ACEOF
-fmit configure 0.97.6
+fmit configure 0.97.7
 generated by GNU Autoconf 2.59
 
 Copyright (C) 2003 Free Software Foundation, Inc.
@@ -1018,7 +1018,7 @@ cat >&5 <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by fmit $as_me 0.97.6, which was
+It was created by fmit $as_me 0.97.7, which was
 generated by GNU Autoconf 2.59.  Invocation command line was
 
   $ $0 $@
@@ -1664,7 +1664,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='fmit'
- VERSION='0.97.6'
+ VERSION='0.97.7'
 
 
 # Some tools Automake needs.
@@ -9900,7 +9900,7 @@ _ASBOX
 } >&5
 cat >&5 <<_CSEOF
 
-This file was extended by fmit $as_me 0.97.6, which was
+This file was extended by fmit $as_me 0.97.7, which was
 generated by GNU Autoconf 2.59.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -9963,7 +9963,7 @@ _ACEOF
 
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
-fmit config.status 0.97.6
+fmit config.status 0.97.7
 configured by $0, generated by GNU Autoconf 2.59,
   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
 
index aedbf1d..703b1bb 100644 (file)
@@ -2,7 +2,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ(2.59)
-AC_INIT(fmit, 0.97.6)
+AC_INIT(fmit, 0.97.7)
 AM_CONFIG_HEADER(config.h)
 AC_PREFIX_DEFAULT(/usr/local/)
 AM_INIT_AUTOMAKE([no-define dist-bzip2])
index 71847cd..03db216 100644 (file)
 using namespace std;
 
 Music::NotesName Music::s_notes_name = Music::LOCAL_ANGLO;
+
 int Music::s_tonality = 0;
+double Music::s_semitones[13] = { 1.0000, 1.0595, 1.1225, 1.1892, 1.2599, 1.3348, 1.4142, 1.4983, 1.5874, 1.6818, 1.7818, 1.8877, 2.0000 }; // Chromatic, never used
+static double semitones_werckmeister3[] = { 1.0, 1.06425952556, 1.125, 1.19729196625, 1.26134462288, 1.33785800438, 1.41901270074, 1.5, 1.59638928833, 1.68179283051, 1.78986403988, 1.89201693432, 2.0 };
+static double semitones_kirnberger3[] = { 1.0, 1.06335913331, 1.12151158592, 1.19627902498, 1.26027749133, 1.33748060995, 1.41781217775, 1.49534878122, 1.59503869997, 1.68036998845, 1.788854382, 1.890416237, 2.0 };
+static double semitones_diatonic[] = { 1.0, 1.06666666667, 1.125, 1.2, 1.25, 1.35, 1.44, 1.5, 1.6, 1.6875, 1.8, 1.875, 2.0 };
+static double semitones_meantone[] = { 1.0, 1.06998448796, 1.11803398875, 1.19627902498, 1.25, 1.33748060995, 1.4310835056, 1.49534878122, 1.6, 1.67185076244, 1.788854382, 1.86918597653, 2.0};
+Music::Tuning Music::s_tuning = Music::CHROMATIC;
+
 int Music::s_sampling_rate = -1;
 double Music::s_AFreq = 440.0;
 const int Music::UNDEFINED_SEMITONE = -1000;
@@ -51,6 +59,41 @@ void Music::RemoveSettingsListener(SettingsListener* l)
        s_settings_listeners.remove(l);
 }
 
+void Music::SetTuning(Tuning tuning)
+{
+       int i;
+       s_tuning=tuning;
+       switch (tuning) {
+       case CHROMATIC:
+               // Nothing to do
+               break;
+       case WERCKMEISTER3:
+               for (i = 0; i < 13; i += 1)
+               {
+                       s_semitones[i] = semitones_werckmeister3[i];
+               }
+               break;
+       case KIRNBERGER3:
+               for (i = 0; i < 13; i += 1)
+               {
+                       s_semitones[i] = semitones_kirnberger3[i];
+               }
+               break;
+       case DIATONIC:
+               for (i = 0; i < 13; i += 1)
+               {
+                       s_semitones[i] = semitones_diatonic[i];
+               }
+               break;
+       case MEANTONE:
+               for (i = 0; i < 13; i += 1)
+               {
+                       s_semitones[i] = semitones_meantone[i];
+               }
+               break;
+       }
+}
+
 void Music::SetSamplingRate(int sampling_rate)
 {
        s_sampling_rate = sampling_rate;
index 18bbd4e..e319851 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright 2004 "Gilles Degottex"
+// Copyright 2004 "Gilles Degottex", 2007 "Florian Hars"
 
 // This file is part of "Music"
 
@@ -29,6 +29,8 @@ using namespace std;
 #include <CppAddons/CAMath.h>
 #include <CppAddons/StringAddons.h>
 
+#include <iostream>
+
 namespace Music
 {
        enum NotesName{LOCAL_ANGLO, LOCAL_LATIN};
@@ -40,6 +42,13 @@ namespace Music
        inline int GetTonality()                                                {return s_tonality;}
        inline void SetTonality(int tonality)                   {s_tonality = tonality;}
 
+       enum Tuning{CHROMATIC,WERCKMEISTER3,KIRNBERGER3,DIATONIC,MEANTONE};
+       extern Tuning s_tuning;
+       extern double s_semitones[13];
+       inline Tuning GetTuning()                                               {return s_tuning;}
+       void SetTuning(Tuning tuning);
+
+
        extern int s_sampling_rate;
        inline int GetSamplingRate()                                    {return s_sampling_rate;}
        void SetSamplingRate(int sampling_rate);
@@ -70,111 +79,209 @@ namespace Music
        void AddSettingsListener(SettingsListener* l);
        void RemoveSettingsListener(SettingsListener* l);
 
-//! convert frequency to a float number of half-tones from A3
-/*!
- * \param freq the frequency to convert to \f$\in R+\f$ {Hz}
- * \param AFreq tuning frequency of the A3 (Usualy 440) {Hz}
- * \return the float number of half-tones from A3 \f$\in R\f$
- */
-inline double f2hf(double freq, double AFreq=GetAFreq())               {return 12.0*(log(freq)-log(AFreq))/log(2.0);}
-// TODO VERIF
-// le ht doit �re le ht le plus proche de freq !! et pas un simple arrondi en dessous de la valeur r�l !!
-//! convert frequency to number of half-tones from A3
-/*!
- * \param freq the frequency to convert to \f$\in R+\f$ {Hz}
- * \param AFreq tuning frequency of the A3 (Usualy 440) {Hz}
- * \return the number of half-tones from A3. Rounded to the nearest half-tones(
- * not a simple integer convertion of \ref f2hf ) \f$\in R\f$
- */
-inline int f2h(double freq, double AFreq=GetAFreq())
-{
-       double ht = f2hf(freq, AFreq);
-       if(ht>0)        return int(ht+0.5);
-       if(ht<0)        return int(ht-0.5);
-       return  0;
-}
-//! convert number of half-tones to frequency
-/*!
- * \param ht number of half-tones to convert to \f$\in Z\f$
- * \param AFreq tuning frequency of the A3 (Usualy 440) {Hz}
- * \return the converted frequency
- */
-inline double h2f(double ht, double AFreq=GetAFreq())                  {return AFreq * pow(2.0, ht/12.0);}
-
-//! convert half-tones from A3 to the corresponding note name
-/*!
- * \param ht number of half-tones to convert to \f$\in Z\f$
- * \param local
- * \return his name (Do, Re, Mi, Fa, Sol, La, Si; with '#' if needed)
- */
-inline string h2n(int ht, NotesName local=GetNotesName(), int tonality=GetTonality(), bool show_oct=true)
-{
-       ht += tonality;
-
-       int oct = 4;
-       while(ht<0)
+       //! convert frequency to a float number of chromatic half-tones from A3
+       /*!
+       * \param freq the frequency to convert to \f$\in R+\f$ {Hz}
+       * \param AFreq tuning frequency of the A3 (Usualy 440) {Hz}
+       * \return the float number of half-tones from A3 \f$\in R\f$
+       */
+       inline double f2hf(double freq, double AFreq=GetAFreq())
+       {
+                       return 17.3123404906675624 * log(freq/AFreq); //12.0*(log(freq)-log(AFreq))/log(2.0)
+       }
+       //! find the halftone in the array for non-chromatic tunings
+       // TODO:
+       // Decide wether the step from 12/2 for linar search to log_2(12) for a
+       // binary search really matters in a FFT-bound program
+       /*!
+       * \param relFreq the frequency divided by the frequency of the next lower A
+       * \return the number of halftones above this A
+       */
+       inline int f2h_find(double relFreq)
+       {
+               if (relFreq < s_semitones[1])
+               {
+                       if (s_semitones[1] / relFreq > relFreq / s_semitones[0])
+                       {
+                               return 0;
+                       }
+                       else
+                       {
+                               return 1;
+                       }
+               }
+               else
+               {
+                       int i;
+                       for (i = 2; i < 12; i += 1)
+                       {
+                               if (relFreq < s_semitones[i]) { break; }
+                       }
+                       if (s_semitones[i] / relFreq > relFreq / s_semitones[i - 1])
+                       {
+                               return i - 1;
+                       }
+                       else
+                       {
+                               return i;
+                       }
+               }
+       }
+       // TODO VERIF
+       // le ht doit �re le ht le plus proche de freq !! et pas un simple arrondi en dessous de la valeur r�l !!
+       //! convert frequency to number of half-tones from A3
+       /*!
+       * \param freq the frequency to convert to \f$\in R+\f$ {Hz}
+       * \param AFreq tuning frequency of the A3 (Usualy 440) {Hz}
+       * \return the number of half-tones from A3. Rounded to the nearest half-tones(
+       * not a simple integer convertion of \ref f2hf ) \f$\in R\f$
+       */
+       inline int f2h(double freq, double AFreq=GetAFreq(), int tuning=GetTuning())
+       {
+               if (CHROMATIC == tuning)
+               {
+                       double ht = f2hf(freq, AFreq);
+                       if(ht>0)        return int(ht+0.5);
+                       if(ht<0)        return int(ht-0.5);
+                       return  0;
+               }
+               else
+               {
+                       if (freq <= 1.0) return UNDEFINED_SEMITONE;
+                       int oct = 0;
+                       while (freq < AFreq)        { freq *= 2.0; oct -= 1; }
+                       while (freq >= 2.0 * AFreq) { freq /= 2.0; oct += 1; }
+                       int ht = f2h_find(freq/AFreq);
+                       return (12 * oct + ht);
+               }
+       }
+       //! convert number of chromatic half-tones to frequency
+       /*!
+       * \param ht number of half-tones to convert to \f
+       * \param AFreq tuning frequency of the A3 (Usualy 440) {Hz}
+       * \return the converted frequency
+       */
+       inline double h2f(double ht, double AFreq=GetAFreq())
        {
-               ht += 12;
-               oct--;
+               return AFreq * pow(2.0, ht/12.0);
        }
-       while(ht>11)
+       //! convert number of half-tones to frequency
+       /*!
+       * \param ht number of half-tones to convert to \f$\in Z\f$
+       * \param AFreq tuning frequency of the A3 (Usualy 440) {Hz}
+       * \return the converted frequency
+       */
+       inline double h2cf(int ht, double AFreq=GetAFreq(), int tuning=GetTuning())
        {
-               ht -= 12;
-               oct++;
+               if (CHROMATIC == tuning)
+               {
+                       return AFreq * pow(2.0, ht/12.0);
+               }
+               else if (ht >= s_semitone_min)
+               {
+                       int oct = 0;
+                       while(ht<0)
+                       {
+                               ht += 12;
+                               oct--;
+                       }
+                       while(ht>11)
+                       {
+                               ht -= 12;
+                               oct++;
+                       }
+                       return AFreq * pow(2.0, oct) * s_semitones[ht];
+               }
+               else
+               {
+                       return 0.0;
+               }
+       }
+       //! convert frequency to the frequency of the nearest half tone
+       /*!
+       * \param freq the frequency to convert to \f$\in R+\f$ {Hz}
+       * \param AFreq tuning frequency of the A3 (Usualy 440) {Hz}
+       * \return the converted frequency
+       */
+       inline double f2cf(double freq, double AFreq=GetAFreq(), int tuning=GetTuning())
+       {
+               return h2cf(f2h(freq, AFreq, tuning), AFreq, tuning);
        }
 
-       if(ht>2)        oct++;  // octave start from C
-//     if(oct<=0)      oct--;  // skip 0-octave in occidental notations ??
+       //! convert half-tones from A3 to the corresponding note name
+       /*!
+       * \param ht number of half-tone to convert to \f$\in Z\f$
+       * \param local
+       * \return its name (Do, Re, Mi, Fa, Sol, La, Si; with '#' or 'b' if needed)
+       */
+       inline string h2n(int ht, NotesName local=GetNotesName(), int tonality=GetTonality(), int tunig=GetTuning(), bool show_oct=true)
+       {
+               ht += tonality;
 
-//     char coct[3];
-//     sprintf(coct, "%d", oct);
-//     string soct = coct;
+               int oct = 4;
+               while(ht<0)
+               {
+                       ht += 12;
+                       oct--;
+               }
+               while(ht>11)
+               {
+                       ht -= 12;
+                       oct++;
+               }
 
-       string soct;
-       if(show_oct)
-               soct = StringAddons::toString(oct);
+               if(ht>2)        oct++;  // octave start from C
+       //      if(oct<=0)      oct--;  // skip 0-octave in occidental notations ??
 
-       if(local==LOCAL_ANGLO)
-       {
-               if(ht==0)               return "A"+soct;
-               else if(ht==1)  return "A#"+soct;
-               else if(ht==2)  return "B"+soct;
-               else if(ht==3)  return "C"+soct;
-               else if(ht==4)  return "C#"+soct;
-               else if(ht==5)  return "D"+soct;
-               else if(ht==6)  return "D#"+soct;
-               else if(ht==7)  return "E"+soct;
-               else if(ht==8)  return "F"+soct;
-               else if(ht==9)  return "F#"+soct;
-               else if(ht==10) return "G"+soct;
-               else if(ht==11) return "G#"+soct;
+       //      char coct[3];
+       //      sprintf(coct, "%d", oct);
+       //      string soct = coct;
+
+               string soct;
+               if(show_oct)
+                       soct = StringAddons::toString(oct);
+
+               if(local==LOCAL_ANGLO)
+               {
+                       if(ht==0)       return "A"+soct;
+                       else if(ht==1)  return "Bb"+soct;
+                       else if(ht==2)  return "B"+soct;
+                       else if(ht==3)  return "C"+soct;
+                       else if(ht==4)  return "C#"+soct;
+                       else if(ht==5)  return "D"+soct;
+                       else if(ht==6)  return "Eb"+soct;
+                       else if(ht==7)  return "E"+soct;
+                       else if(ht==8)  return "F"+soct;
+                       else if(ht==9)  return "F#"+soct;
+                       else if(ht==10) return "G"+soct;
+                       else if(ht==11) return "G#"+soct;
+               }
+               else
+               {
+                       if(ht==0)       return "La"+soct;
+                       else if(ht==1)  return "Sib"+soct;
+                       else if(ht==2)  return "Si"+soct;
+                       else if(ht==3)  return "Do"+soct;
+                       else if(ht==4)  return "Do#"+soct;
+                       else if(ht==5)  return "Re"+soct;
+                       else if(ht==6)  return "Mib"+soct;
+                       else if(ht==7)  return "Mi"+soct;
+                       else if(ht==8)  return "Fa"+soct;
+                       else if(ht==9)  return "Fa#"+soct;
+                       else if(ht==10) return "Sol"+soct;
+                       else if(ht==11) return "Sol#"+soct;
+               }
+
+               return "Th#1138";
        }
-       else
+
+       inline int n2h(const std::string& note, NotesName local=LOCAL_ANGLO, int tonality=GetTonality())
        {
-               if(ht==0)               return "La"+soct;
-               else if(ht==1)  return "La#"+soct;
-               else if(ht==2)  return "Si"+soct;
-               else if(ht==3)  return "Do"+soct;
-               else if(ht==4)  return "Do#"+soct;
-               else if(ht==5)  return "Re"+soct;
-               else if(ht==6)  return "Re#"+soct;
-               else if(ht==7)  return "Mi"+soct;
-               else if(ht==8)  return "Fa"+soct;
-               else if(ht==9)  return "Fa#"+soct;
-               else if(ht==10) return "Sol"+soct;
-               else if(ht==11) return "Sol#"+soct;
+               // TODO
+               return -1;
        }
 
-       return "Th#1138";
-}
-
-inline int n2h(const std::string& note, NotesName local=LOCAL_ANGLO, int tonality=GetTonality())
-{
-       // TODO
-       return -1;
-}
-
-std::vector<double> conv(const std::vector<double>& u, const std::vector<double>& v);
+       std::vector<double> conv(const std::vector<double>& u, const std::vector<double>& v);
 
        // TODO freq reffinement
 }
index 2c776e4..e5a70d5 100644 (file)
@@ -63,6 +63,7 @@ CustomInstrumentTunerForm::CustomInstrumentTunerForm()
        m_settings.add(m_config_form.ui_chkAutoSaveOnExit);
        m_settings.add(m_config_form.ui_chkShowA4Offset);
 
+       m_settings.add(m_config_form.ui_cbTuning);
        m_settings.add(m_config_form.ui_cbTonality);
        m_settings.add(m_config_form.ui_cbNotesName);
        m_settings.add(ui_spinAFreq);
@@ -213,6 +214,7 @@ CustomInstrumentTunerForm::CustomInstrumentTunerForm()
        connect(m_config_form.ui_btnRestoreFactorySettings, SIGNAL(clicked()), this, SLOT(restoreFactorySettings()));
        connect(m_config_form.ui_spinMinHT, SIGNAL(valueChanged(int)), this, SLOT(noteRangeChanged()));
        connect(m_config_form.ui_spinMaxHT, SIGNAL(valueChanged(int)), this, SLOT(noteRangeChanged()));
+       connect(m_config_form.ui_cbTuning, SIGNAL(highlighted(int)), this, SLOT(noteRangeChanged()));
        connect(m_config_form.ui_cbTonality, SIGNAL(highlighted(int)), this, SLOT(noteRangeChanged()));
        connect(m_config_form.ui_cbNotesName, SIGNAL(highlighted(int)), this, SLOT(noteRangeChanged()));
        connect(m_config_form.ui_btnAutoDetect, SIGNAL(clicked()), this, SLOT(autoDetectTransport()));
@@ -695,6 +697,28 @@ void CustomInstrumentTunerForm::configure()
 }
 void CustomInstrumentTunerForm::configure_ok()
 {
+       switch(m_config_form.ui_cbTuning->currentItem())
+       {
+       case 0:
+               SetTuning(CHROMATIC);
+               break;
+       case 1:
+               SetTuning(WERCKMEISTER3);
+               break;
+       case 2:
+               SetTuning(KIRNBERGER3);
+               break;
+       case 3:
+               SetTuning(DIATONIC);
+               break;
+       case 4:
+               SetTuning(MEANTONE);
+               break;
+       default:
+               SetTuning(CHROMATIC);
+               break;
+       }
+
        if(m_config_form.ui_cbTonality->currentItem()==0)               SetTonality(0);
        else if(m_config_form.ui_cbTonality->currentItem()==1)  SetTonality(+2);
        else                                                                                                    SetTonality(-3);
@@ -867,7 +891,7 @@ void CustomInstrumentTunerForm::loadSettings()
        }
        catch(QString error)
        {
-               cerr << "CustomInstrumentTunerForm: ERROR: " << error << endl;
+//             cerr << "CustomInstrumentTunerForm: ERROR: " << error << endl;
        }
        Pa_Terminate();
 #endif
index 323ddce..d129d81 100644 (file)
@@ -36,7 +36,7 @@ void DummyMonoQuantizer::quantize(double freq)
 
        double current_time = m_time.elapsed();
 
-       double current_center_freq = h2f(f2h(freq));
+       double current_center_freq = f2cf(freq);
        m_avg_freq = freq;
 
        if(m_current_center_freq==0.0)
index b9624a8..5122cb2 100644 (file)
@@ -40,13 +40,13 @@ void LatencyMonoQuantizer::quantize(double freq)
 
        m_states.push_front(State(current_time, freq));
 
-       double current_center_freq = h2f(f2h(freq));
+       double current_center_freq = f2cf(freq);
        int max_dens = 1;
        m_avg_freq = freq;
        map<double,Note> densities;
        for(int i=0; i<m_states.size(); i++)
        {
-               double cf = h2f(f2h(m_states[i].m_freq));
+               double cf = f2cf(m_states[i].m_freq);
                map<double,Note>::iterator it=densities.find(cf);
                if(it==densities.end())
                        densities.insert(make_pair(cf,Note(m_states[i].m_freq)));
index 0119731..0be471e 100644 (file)
@@ -39,7 +39,7 @@ DialView::DialView(QWidget* parent)
        setting_useCents->addTo(&m_popup_menu);
 
        m_popup_menu.insertItem(new Title(tr("Scale range"), &m_popup_menu));
-       setting_spinScale = new QSpinBox(5, 50, 1, &m_popup_menu);
+       setting_spinScale = new QSpinBox(5, 100, 1, &m_popup_menu);
        setting_spinScale->setValue(50);
        QToolTip::add(setting_spinScale, tr("Scale range (in cents)"));
        connect(setting_spinScale, SIGNAL(valueChanged(int)), this, SLOT(update()));
index 8475025..7f4935e 100644 (file)
@@ -216,7 +216,7 @@ void MScale::load_scala(const QString& file_name)
                                        float cents=0.0;
                                        stringstream in(buff);
                                        in >> cents;
-                                       if(cents<=0.0) throw QString("Line ")+QString::number(num_line)+": Parsed cents value is negative '"+QString::number(cents)+"'";
+                                       if(cents<0.0) throw QString("Line ")+QString::number(num_line)+": Parsed cents value is negative '"+QString::number(cents)+"'";
                                        values.push_back(MValue(cents));
                                }
                        }
index 93fa781..9cd3db8 100644 (file)
                     </widget>
                     <widget class="QLayoutWidget">
                         <property name="name">
+                            <cstring>layout34_1</cstring>
+                        </property>
+                        <hbox>
+                            <property name="name">
+                                <cstring>unnamed</cstring>
+                            </property>
+                            <widget class="QLabel">
+                                <property name="name">
+                                    <cstring>textLabel1_7_1</cstring>
+                                </property>
+                                <property name="text">
+                                    <string>Tuning scale</string>
+                                </property>
+                                <property name="toolTip" stdset="0">
+                                    <string>The tuning used.</string>
+                                </property>
+                                <property name="whatsThis" stdset="0">
+                                    <string>The tuning used to determine note values. Useful for tuning historic intruments.</string>
+                                </property>
+                            </widget>
+                            <widget class="QComboBox">
+                                <item>
+                                    <property name="text">
+                                        <string>Chromatic</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property name="text">
+                                        <string>Werckmeister III</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property name="text">
+                                        <string>Kirnberger III</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property name="text">
+                                        <string>Diatonic</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property name="text">
+                                        <string>Meantone (1/4)</string>
+                                    </property>
+                                </item>
+                                <property name="name">
+                                    <cstring>ui_cbTuning</cstring>
+                                </property>
+                                <property name="toolTip" stdset="0">
+                                    <string>The tuning used.</string>
+                                </property>
+                                <property name="whatsThis" stdset="0">
+                                    <string>The tuning used to determine note values. Useful for tuning historic intruments.</string>
+                                </property>
+                            </widget>
+                        </hbox>
+                    </widget>
+                    <widget class="QLayoutWidget">
+                        <property name="name">
                             <cstring>layout34_2</cstring>
                         </property>
                         <hbox>
@@ -434,10 +494,10 @@ Even if the capture system is available, it may not works if it's bad configured
                                             <string>automaticaly connect at startup to</string>
                                         </property>
                                         <property name="toolTip" stdset="0">
-                                            <string>Connect automaticaly FMIT to the following source at startup</string>
+                                            <string>Connect automaticaly FMIT to the following source at startup (eg. alsa_pcm:capture_1)</string>
                                         </property>
                                         <property name="whatsThis" stdset="0">
-                                            <string>Connect automaticaly FMIT to the following source at startup</string>
+                                            <string>Connect automaticaly FMIT to the following source at startup (eg. alsa_pcm:capture_1)</string>
                                         </property>
                                     </widget>
                                     <widget class="QLineEdit">
@@ -456,10 +516,10 @@ Even if the capture system is available, it may not works if it's bad configured
                                             </sizepolicy>
                                         </property>
                                         <property name="toolTip" stdset="0">
-                                            <string>Connect automaticaly FMIT to the this source at startup</string>
+                                            <string>Connect automaticaly FMIT to the this source at startup (eg. alsa_pcm:capture_1)</string>
                                         </property>
                                         <property name="whatsThis" stdset="0">
-                                            <string>Connect automaticaly FMIT to the this source at startup</string>
+                                            <string>Connect automaticaly FMIT to the this source at startup (eg. alsa_pcm:capture_1)</string>
                                         </property>
                                     </widget>
                                 </hbox>
index 0bbf5de..66ffad0 100644 (file)
@@ -24,7 +24,7 @@
         </property>
         <widget class="QLayoutWidget">
             <property name="name">
-                <cstring>layout19</cstring>
+                <cstring>layout42</cstring>
             </property>
             <hbox>
                 <property name="name">
@@ -407,6 +407,14 @@ Green if a note is beeing catured and conditions are ok</string>
                             <property name="name">
                                 <cstring>ui_txtFreq</cstring>
                             </property>
+                            <property name="sizePolicy">
+                                <sizepolicy>
+                                    <hsizetype>1</hsizetype>
+                                    <vsizetype>1</vsizetype>
+                                    <horstretch>0</horstretch>
+                                    <verstretch>0</verstretch>
+                                </sizepolicy>
+                            </property>
                             <property name="minimumSize">
                                 <size>
                                     <width>0</width>
@@ -423,15 +431,15 @@ Green if a note is beeing catured and conditions are ok</string>
                                 <enum>Flat</enum>
                             </property>
                             <property name="toolTip" stdset="0">
-                                <string>The frequency of the current played note</string>
+                                <string>The frequency in Hertz of the current played note</string>
                             </property>
                             <property name="whatsThis" stdset="0">
-                                <string>The frequency of the current played note</string>
+                                <string>The frequency in Hertz of the current played note</string>
                             </property>
                         </widget>
                         <widget class="QLayoutWidget">
                             <property name="name">
-                                <cstring>layout69</cstring>
+                                <cstring>layout40</cstring>
                             </property>
                             <hbox>
                                 <property name="name">
@@ -484,10 +492,10 @@ Green if a note is beeing catured and conditions are ok</string>
                                         <enum>Flat</enum>
                                     </property>
                                     <property name="toolTip" stdset="0">
-                                        <string>The frequency of the note as it should be</string>
+                                        <string>The frequency in Hertz of the note as it should be</string>
                                     </property>
                                     <property name="whatsThis" stdset="0">
-                                        <string>The frequency of the note as it should be</string>
+                                        <string>The frequency in Hertz of the note as it should be</string>
                                     </property>
                                 </widget>
                             </hbox>