Devel/Chord Extraction TODO's

From Clam

Contents

Stand alone application (GSoC Pawel)

Big project milestones

  • Having an application that seeks allong the song.
  • Launching the analysis whenever you change the song
  • The playback controlling the time displayed on the views
  • Additional features/views
    • ...

Tasks

  • Image:Done.png Having a working sandbox
  • Having the editor configured to use tabs instead of spaces
  • Take a look at the FileReader classes
  • Understanding how unit tests work (compiling and running them and adding a dummy test class)
  • Take a look at the unit tests for the FileReader classes

Realtime segmentation (GSoC 2007 Roman)


  • Improve segmantation in ChordExtractor
    • Image:Done.png Extract the code responsible for segmentation and make a separate class out of it
      • Image:Done.png Make it possible to declare the class as a member of the dumper
      • Image:Done.png Remove reference to the pool and extractor from the class
      • Image:Done.png Change output into a Segmentation object
      • Image:Done.png Use the class from within ChordExtractor
    • Setup framework for comparisons between different implementation of segmentation algorithms
      • Image:Done.png Learn Python ;-)
      • Image:Done.png A simple script with fixed hopsize and two pool files given at the command line
      • Image:Done.png Compute Recall and Precision
      • Get the Beatles wavesurfer files
      • Write a bash script for:
        • computing the segmentation on the songs
        • comparing with ground truth
    • Image:Done.png Decide on a method for allowing use of different chord extraction algorithms
      • Image:Done.png Implement (not necessarily the right order of "Done"...)
      • Image:Done.png Enable choice in the ChordExtractor exec
      • Image:Done.png Enable configuration in the TonalAnalysis processing
    • A chord similarity based implementation
      • Image:Done.png Experiments, tests, fun, and some extremely ugly hacking
      • Image:Done.png Clean, code, commit the changes from the previous "take no prisoners an' burn all of 'em bridges" hacking
      • Improve some more...
    • Removing small segments
      • Image:Done.png offline
      • realtime
    • Joining segments with identical chords
      • Image:Done.png offline
      • Image:Done.png realtime
  • Realtime segmentation in chord extraction
    • Image:Done.png Add a time output control to AudioFileReaders
    • Add a time input control to TonalAnalysis
    • Use this time input to inform ChordExtractor of the time position (if ever we use AudioFileReaders with seeking)
    • Internal time in TonalAnalysis, reset to 0 when the network starts
    • Add a new port to TonalAnalysis for the segmentation from ChordExtractor
    • Some changes to the Segmentation classes to allow use through a port
      • Image:Done.png a constructor with no (default) parameters
      • Image:Done.png setMaxPosition
      • checking if any segments are out of bounds after setting maxPosition
      • Add labels for segments


Some other smaller/different/non-GSoC tasks:


Some short term goals for getting accustomed with the code:

  • Make the parameters of TonalAnalysis configurable in NetworkEditor, one by one:
    • Image:Done.png tunningEnabled
    • Image:Done.png peakWindowingEnabled
    • Image:Done.png hopRatio
    • Image:Done.png filter (PCPSmoother)
    • Change BinsPerOctave into BinsPerSemitone...
      • ...first making BinsPerOctave configurable, to check if everyting works
    • Make the algorithm "change the tunning" when starting from a different minimum frequency then 98 Hz
      • Quick (hopefully) and dirty (hopefully not) solution (hopefully) - change the reference tunning while reconfiguring TonalAnalysis
    • Find the reason of the "delete _implenentation; _implementation = new..." crash
    • Image:Done.png fix the .clamnetwork files!
  • Make a precomputed SparseKernel for the default configuration
  • Seperate the inner workings of TonalAnalysis into Processing Composites


Old Done Tasks

Exercise in using test with cppunit:

  • Image:Done.png Adapt InstantTunningEstimator's tests to the changes in the class
    • Image:Done.png Change assertFoundCenterIs to use the vector<pair> interface
    • Image:Done.png Divide any position (positions and expectedCenter) by 3 and pass 1 as the second constructor parameter
    • Image:Done.png Adapt the last two tests to use the vector<pair> interface
    • Image:Done.png Remove the useless doIt
    • Image:Done.png Change any occurrences of _binsPerSemitone within the class to a 1
    • Image:Done.png Adapt user interface and user code
    • Image:Done.png Change last two tests to use a special helper function

Detection algorithm enhancements

Several algorithm enhancements are to be considered:

  • Preprocessing
    • [done] Compute instant tunning by fasor addition on chroma peaks mapped to a semitone
    • [done] Limit the time scope of the global tunning computation (done but improvements needed)
    • Improve the limited scope tunning
  • Processing
    • Find faster and more precise algorithms than the current one
      • Emilia's algorithm (peak detect before folding)
      • Wavelet based
      • Self-Correlation based
  • Postprocessing
    • [done] Consider the None chord (all pitches) so that we can detect non chord segments and use it as reference for pitchness.
    • Symbolical analysis: Instead of correlation, analyze the pcp content using heuristic reasoning (Harte did plain filtering and some )
    • Double scope for analysis: Too large windows difuminate transitions but small ones fail to detect arpeggios based chords. We could choose depending on the number of high pitches on the PCP.
    • Onset alignment: Use realtime onset detection (aubio?) to 'quantize' the chord segments limits.

Helper information

Enrich algorithm output so that the user may take profit of non-perfect algorithm or music that is not using recognized cords (fifths, rare chords...)

  • Diffuse guessing: Minimize false positive impact to the user by computing a confidence value for each guess.
  • Keeping several candidates so the user may view that he has more than one option.
  • Rectified guess: Do a first realtime guess and correct it later if needed as the song goes on.

Visualization

In parallel to enhance the algorithm to realtime some views must be developed. Some views ideas:

  • [done] KeySpace (Emilia and Jordi's)
  • Augmented KeySpace (not just major and minor)
  • [done] Tonnetz (pcp)
  • Add chord figures to Tonnetz
  • Chord torus (map pcp into the tonal torus space)
  • Vectors in chord torus (needed to disambiguate dim chords)
  • [done] Chord ranking: all chords displayed as sorted probability bars
  • Highlight or filter candidates on chord ranking
  • Chord candidates: just the ones before the first strong decay
  • Realtime segment construction:
    • Instant chord segment: Display segment based on the best one on each instant.
    • Delayed segment: don't display a segment until we have enough information on the future to make a post processing
    • Guessed segments: Until sure, display the guess
  • Instrument fingering (playback suggest
  • Integrate a tunner