net.charlesames.music.ensemble
Class TuningMap

java.lang.Object
  extended by net.charlesames.utility.common.Disposable
      extended by net.charlesames.utility.entity.Entity
          extended by net.charlesames.utility.entity.WriteableEntity
              extended by net.charlesames.music.ensemble.EnsembleEntity
                  extended by net.charlesames.music.ensemble.TuningMap
All Implemented Interfaces:
EntityContainer
Direct Known Subclasses:
TuningMapChromatic, TuningMapDiatonic

public abstract class TuningMap
extends EnsembleEntity

A TuningMap manages mappings between Degree instances and tunings expressed in cents.

Author:
Charles Ames

Nested Class Summary
static class TuningMap.Type
          Tuning map options.
 
Nested classes/interfaces inherited from class net.charlesames.music.ensemble.EnsembleEntity
EnsembleEntity.AttributeTable
 
Constructor Summary
TuningMap(Ensemble ensemble)
          Constructor for TuningMap instances.
 
Method Summary
abstract  int getCents(Degree degree)
          Get the cents displacement from C natural for the indicated degree.
 int getCentsFromMiddleC(Pitch pitch)
          Get the cents displacement from middle C for the indicated pitch.
abstract  TuningMap.Type getType()
          Get the tuning map configuration.
abstract  void initialize()
          Fill in a minimal set of tuning elements, assuming 12 equal divisions of the octave.
 
Methods inherited from class net.charlesames.music.ensemble.EnsembleEntity
buildDescription, copyToClipboard, createIndentCell, createXmlSpec, describeFeature, equals, getContainer, getEnsemble, logError, predecessor, toString
 
Methods inherited from class net.charlesames.utility.entity.WriteableEntity
check, clearXmlSpecs, createXmlSpec, getTagName, getXmlData, getXmlSpec, getXmlSpec, initializeXsd, isPersistent, logError, logError, makeDirty, putXmlData, save, setID, setName, setPersistent, setStatus, toXmlNode
 
Methods inherited from class net.charlesames.utility.entity.Entity
decrementReferenceCount, dereferenceHandle, dispose, equals, getHandle, getID, getName, getPath, getReferenceCount, getStatus, getText, hasContainer, incrementReferenceCount, isModifiable, methodHasOverride, predecessor, resequenceEntities, setContainer, setModifiable, shiftEntitiesDown, shiftEntityDown, shiftEntityUp, successor, wipe
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TuningMap

public TuningMap(Ensemble ensemble)
Constructor for TuningMap instances.

Parameters:
ensemble - The Ensemble which contains this tuning map.
Method Detail

getType

public abstract TuningMap.Type getType()
Get the tuning map configuration.

Returns:
The tuning map configuration.

getCents

public abstract int getCents(Degree degree)
Get the cents displacement from C natural for the indicated degree.

Parameters:
degree - The indicated degree.
Returns:
The cents displacement from C natural.

getCentsFromMiddleC

public final int getCentsFromMiddleC(Pitch pitch)
Get the cents displacement from middle C for the indicated pitch.

Parameters:
pitch - The indicated pitch.
Returns:
The cents displacement from middle C.

initialize

public abstract void initialize()
Fill in a minimal set of tuning elements, assuming 12 equal divisions of the octave.