Package com.tagtraum.beatunes.matchtable
Class LanguageRule
- java.lang.Object
-
- com.tagtraum.beatunes.matchtable.ScoreRule
-
- com.tagtraum.beatunes.matchtable.LanguageRule
-
- All Implemented Interfaces:
Serializable
,Comparable<ScoreRule>
public class LanguageRule extends ScoreRule
LanguageRule.- Author:
- Hendrik Schreiber
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.tagtraum.beatunes.matchtable.ScoreRule
ScoreRule.BasicScoreRuleEditor, ScoreRule.WeightBoundedRangeModel
-
-
Constructor Summary
Constructors Constructor Description LanguageRule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDescription()
Description of how this rule works.String
getId()
Returns a unique name for this rule.SongPropertyFilter
getMatchFilter(AudioSong template, Float templateSyncBPM, boolean playMatchAtSyncTempo)
Returns a filter that matches Songs that match this rule at least somewhat.String
getName()
Short name, like "Similar BPM"float
score(AudioSong song, AudioSong template, Float syncBPM, boolean playMatchAtSyncTempo)
Returns a score between 0 and 1 for how well the given song matches the given template.-
Methods inherited from class com.tagtraum.beatunes.matchtable.ScoreRule
addPropertyChangeListener, compareTo, createEditor, getApplication, getScoreRuleEditor, getWeight, getWeightedMatchFilter, isIgnoredWhileQuickMatching, isSuitableForSorting, load, setApplication, setWeight, store, weightedScore
-
-
-
-
Method Detail
-
getId
public String getId()
Description copied from class:ScoreRule
Returns a unique name for this rule.
-
getName
public String getName()
Description copied from class:ScoreRule
Short name, like "Similar BPM"
-
getDescription
public String getDescription()
Description copied from class:ScoreRule
Description of how this rule works. May be displayed in tooltips.- Specified by:
getDescription
in classScoreRule
- Returns:
- description
-
score
public float score(AudioSong song, AudioSong template, Float syncBPM, boolean playMatchAtSyncTempo)
Description copied from class:ScoreRule
Returns a score between 0 and 1 for how well the given song matches the given template. A higher score indicates a better match.
-
getMatchFilter
public SongPropertyFilter getMatchFilter(AudioSong template, Float templateSyncBPM, boolean playMatchAtSyncTempo)
Description copied from class:ScoreRule
Returns a filter that matches Songs that match this rule at least somewhat. This should be used to find songs that at least somewhat match the rule.- Specified by:
getMatchFilter
in classScoreRule
- Parameters:
template
- template song to matchtemplateSyncBPM
- sync bpm for the template songplayMatchAtSyncTempo
- the given song is meant to be played at the same tempo as the template song- Returns:
- a filter (set) that matches this rule or null, if all songs match this rule.
-
-