Mercurial > hg > nnls-chroma
changeset 95:dab7e7bfeba1 matthiasm-plugin 0.2
added release notes, updated README
author | matthiasm |
---|---|
date | Fri, 03 Dec 2010 00:46:12 +0900 |
parents | 19f3b33a19fb |
children | 0b2d7524f248 |
files | Chordino.cpp NNLSBase.cpp README chromamethods.cpp nnls-chroma.n3 releasenotes-0.2.txt |
diffstat | 6 files changed, 48 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/Chordino.cpp Thu Dec 02 23:39:57 2010 +0900 +++ b/Chordino.cpp Fri Dec 03 00:46:12 2010 +0900 @@ -148,11 +148,11 @@ ParameterDescriptor boostn; boostn.identifier = "boostn"; boostn.name = "boost N"; - boostn.description = "Relative weight of the N label."; + boostn.description = "Boost likelihood of the N (no chord) label."; boostn.unit = ""; - boostn.minValue = 1.0; - boostn.maxValue = 2.0; - boostn.defaultValue = 1.1; + boostn.minValue = 0.0; + boostn.maxValue = 1.0; + boostn.defaultValue = 0.1; boostn.isQuantized = false; list.push_back(boostn);
--- a/NNLSBase.cpp Thu Dec 02 23:39:57 2010 +0900 +++ b/NNLSBase.cpp Fri Dec 03 00:46:12 2010 +0900 @@ -49,7 +49,7 @@ m_tuneLocal(0.0), m_doNormalizeChroma(0), m_rollon(0.0), - m_boostN(1.1), + m_boostN(0.1), m_s(0.7), sinvalues(0), cosvalues(0) @@ -82,7 +82,7 @@ if (debug_on) cerr << "--> getPluginVersion" << endl; // Increment this each time you release a version that behaves // differently from the previous one - return 1; + return 2; } string @@ -448,7 +448,7 @@ for (size_t iBin = 0; iBin < m_blockSize/2; iBin++) { magnitude[iBin] = sqrt(fbuf[2 * iBin] * fbuf[2 * iBin] + fbuf[2 * iBin + 1] * fbuf[2 * iBin + 1]); - if (magnitude[iBin]>m_blockSize*1.0) magnitude[iBin] = m_blockSize; + if (magnitude[iBin]>m_blockSize*1.0) magnitude[iBin] = m_blockSize; // a valid audio signal (between -1 and 1) should not be limited here. if (maxmag < magnitude[iBin]) maxmag = magnitude[iBin]; if (m_rollon > 0) { energysum += pow(magnitude[iBin],2);
--- a/README Thu Dec 02 23:39:57 2010 +0900 +++ b/README Fri Dec 03 00:46:12 2010 +0900 @@ -30,6 +30,7 @@ * Bass Chromagram: a 12-dimensional chromagram, restricted to the bass range. At each frame the Semitone Spectrum is multiplied by a bass pattern and then mapped to the 12 chroma bins. * Chromagram: a 12-dimensional chromagram, restricted with mid-range emphasis. At each frame the Semitone Spectrum is multiplied by a mid-range pattern and then mapped to the 12 chroma bins. * Chromagram and Bass Chromagram: a 24-dimensional chromagram, consisting of the both Bass Chromgram and Chromagram, see above. When normalisation is used, this representation will however be scaled differently, and hence be different from the individual chromagrams. +* Consonance estimate: A simple consonance value based on the convolution of a consonance profile with the Semitone Spectrum. Experimental status. Compare two pieces of audio in terms of consonance if the instrumentation is similar. Instruments with fluctuating pitches (also: voice) will decrease the consonance value. ### Chordino ### @@ -49,11 +50,13 @@ * spectral whitening (0.0 -- 1.0; default: 1.0): determines how much the log-frequency spectrum is whitened. A value of 0.0 means no whitening. For values other than 0.0 the log-freq spectral bins are divided by [standard deviation of their neighbours]^[spectral whitening], where "^" means "to the power of". * spectral shape (0.5 -- 0.9; default: 0.7): the shape of the notes in the NNLS dictionary. Their harmonic amplitude follows a geometrically decreasing pattern, in which the i-th harmonic has an amplitude of [spectral shape]^[i-1], where "^" means "to the power of". * chroma normalisation (none, maximum norm, L1 norm, L2 norm; default: none): determines whether or how the chromagrams are normalised. If the setting is not 'none', then each chroma frame separately is divided by the chosen vector norm. Note that normalisation implies that the joint 24-dim. "Chroma and Bass Chromagram" output will be different from the individual 12-dim. "Chromagram" and "Bass Chromagram" outputs. +* boost likelihood of the N (no chord) label (0.0 -- 1.0; default: 0.1): leads to greater values in the profile of the "no chord" chord, hence non-harmonic parts of audio files are more likely to be recogised as such. Warning: for values above the default, it quickly leads to many chords being misclassified as N. #### Outputs #### * Chord Estimate: estimated chord times and labels. * Harmonic Change Value: an indication of the likelihood of harmonic change. Depends on the chord dictionary. Calculation is different depending on whether the Viterbi algorithm is used for chord estimation, or the simple chord estimate. +* Note Representation of Chord Estimate: a simple MIDI-like represenation of the estimated chord with bass note (if applicable) and chord notes. Can be used, for example, to export MIDI chords from Sonic Visuliser. ### Tuning ###
--- a/chromamethods.cpp Thu Dec 02 23:39:57 2010 +0900 +++ b/chromamethods.cpp Fri Dec 03 00:46:12 2010 +0900 @@ -468,7 +468,7 @@ if (iChord < (int)loadedChordDict.size()/24 - 1) { stand = powf(stand,1.0f/exponent); } else { - stand = powf(stand,1.0f/exponent) / boostN; + stand = powf(stand,1.0f/exponent) / (1+boostN); } for (int iST = 0; iST < 24; ++iST) { loadedChordDict[24 * iChord + iST] /= stand;
--- a/nnls-chroma.n3 Thu Dec 02 23:39:57 2010 +0900 +++ b/nnls-chroma.n3 Fri Dec 03 00:46:12 2010 +0900 @@ -42,6 +42,7 @@ vamp:parameter plugbase:chordino_param_tuningmode ; vamp:parameter plugbase:chordino_param_whitening ; vamp:parameter plugbase:chordino_param_s ; + vamp:parameter plugbase:chordino_param_boostn ; vamp:output plugbase:chordino_output_simplechord ; vamp:output plugbase:chordino_output_chordnotes ; @@ -110,6 +111,16 @@ vamp:unit "" ; vamp:default_value 0.7 ; vamp:value_names (); + +plugbase:chordino_param_boostn a vamp:Parameter ; + vamp:identifier "boostn" ; + dc:title "Boost likelihood of the N (no chord) label." ; + dc:format "" ; + vamp:min_value 0 ; + vamp:max_value 1 ; + vamp:unit "" ; + vamp:default_value 0.1 ; + vamp:value_names (); . plugbase:chordino_output_simplechord a vamp:SparseOutput ; vamp:identifier "simplechord" ; @@ -177,6 +188,7 @@ vamp:output plugbase:nnls-chroma_output_chroma ; vamp:output plugbase:nnls-chroma_output_basschroma ; vamp:output plugbase:nnls-chroma_output_bothchroma ; + vamp:output plugbase:nnls-chroma_output_consonance ; . plugbase:nnls-chroma_param_useNNLS a vamp:QuantizedParameter ; vamp:identifier "useNNLS" ;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/releasenotes-0.2.txt Fri Dec 03 00:46:12 2010 +0900 @@ -0,0 +1,25 @@ +NNLS Chroma 0.2 -- Release Notes + +General Description: + +A Vamp plugin library for harmony and chord extraction with some features aimed at amateur musicians, and some at music information retrieval researchers. +It contains the Chordino, NNLS Chroma and Tuning plugins. +For more information see README or http://isophonics.net/nnls-chroma + +New features: + +Chordino: +* The new MIDI note output of the estimated chords allows, for example, instant playback of chord notes in Sonic Visualiser. +* new parameter "boost N": allows better recognition of the "no chord" label N (default setting is 0.1, previous Chordino version had no boost, i.e. 0.0). + +NNLS Chroma: +* new output "Consonance Estimate". Experimental attempt to capture the tonal consonance in at a given time. Based on the convolution of a simple consonance profile with the semitone spectrum. + +Bug fixes: + +* Default chord dictionary loads when no chord.dict file found in Vamp path. +* Corrected parameter range for spectral rollon parameter (Chordino). +* Semitone Spectrum has values at zero energy frames (NNLS Chroma). +* Crash with non-standard input resolved (now amplitude-limited). +* minor internal fixes. +