Package be.panako.strategy.pch
Class PitchClassHistogramStrategy
java.lang.Object
be.panako.strategy.Strategy
be.panako.strategy.pch.PitchClassHistogramStrategy
public class PitchClassHistogramStrategy extends Strategy
Implementation of the strategy described in
(2012) A Robust Audio Fingerprinter Based on Pitch Class Histograms: Applications for Ethnic Music Archives,
by Joren Six and Olmo Cornelis in Proceedings of the International Workshop of Folk Music Analysis (FMA 2012)
- Author:
- joren
-
Constructor Summary
Constructors Constructor Description PitchClassHistogramStrategy() -
Method Summary
Modifier and Type Method Description voidclear()Clear al information from the key value storebooleanhasResource(java.lang.String resource)Are there fingerprints for this resource already stored in the database?booleanisStorageAvailable()voidmonitor(java.lang.String query, int maxNumberOfReqults, java.util.Set<java.lang.Integer> avoid, QueryResultHandler handler)java.lang.Stringname()voidprintStorageStatistics()Print some storage statistics.voidquery(java.lang.String query, int maxNumberOfResults, java.util.Set<java.lang.Integer> avoid, QueryResultHandler handler)java.lang.Stringresolve(java.lang.String filename)Returns an internal identifier, probably an integer, for a given filename.doublestore(java.lang.String resource, java.lang.String description)Store an audio file in the data store.Methods inherited from class be.panako.strategy.Strategy
classToName, getInstance, printMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
PitchClassHistogramStrategy
public PitchClassHistogramStrategy()
-
-
Method Details
-
store
public double store(java.lang.String resource, java.lang.String description)Description copied from class:StrategyStore an audio file in the data store. The name of the resource is used to extract a numerical identifier. The description is arbitrary. -
query
public void query(java.lang.String query, int maxNumberOfResults, java.util.Set<java.lang.Integer> avoid, QueryResultHandler handler) -
monitor
public void monitor(java.lang.String query, int maxNumberOfReqults, java.util.Set<java.lang.Integer> avoid, QueryResultHandler handler) -
hasResource
public boolean hasResource(java.lang.String resource)Description copied from class:StrategyAre there fingerprints for this resource already stored in the database?- Specified by:
hasResourcein classStrategy- Parameters:
resource- The name of the resource.- Returns:
- True if the resource is already treated. False otherwise.
-
isStorageAvailable
public boolean isStorageAvailable()- Specified by:
isStorageAvailablein classStrategy- Returns:
- True if the storage is available, false otherwise.
-
printStorageStatistics
public void printStorageStatistics()Description copied from class:StrategyPrint some storage statistics.- Specified by:
printStorageStatisticsin classStrategy
-
resolve
public java.lang.String resolve(java.lang.String filename)Description copied from class:StrategyReturns an internal identifier, probably an integer, for a given filename. -
name
public java.lang.String name() -
clear
public void clear()Description copied from class:StrategyClear al information from the key value store
-