org.rubato.rubettes.bigbang.model.denotators
Class BigBangDenotatorManager

java.lang.Object
  extended by org.rubato.rubettes.bigbang.model.denotators.BigBangDenotatorManager

public class BigBangDenotatorManager
extends java.lang.Object

This class allows for the manipulation of a Denotator by adding and moving objects and making them absolute or relative as necessary. It keeps track of any changing or new paths. Whenever the paths are requested using the getPathResults method, tracking starts anew. This is useful for more complex operations that consist in several steps.

Author:
florian thalmann

Constructor Summary
BigBangDenotatorManager()
           
BigBangDenotatorManager(Form form)
           
 
Method Summary
 OperationPathResults addAlteration(java.util.Set<DenotatorPath> foregroundComposition, java.util.Set<DenotatorPath> backgroundComposition, java.util.List<DenotatorPath> alterationCoordinates, double startDegree, double endDegree, DenotatorPath degreesDimensionPath)
           
 OperationPathResults addObjects(DenotatorPath powersetPath, java.util.List<java.util.Map<DenotatorPath,java.lang.Double>> pathsWithValues)
           
 java.util.List<Denotator> addObjects(java.util.List<Denotator> objects, java.util.List<DenotatorPath> parentPaths, int[] powersetIndices)
          Adds the given objects to the powersets at the given powersetIndices found in the given parentObjects.
 java.util.List<Denotator> addObjectsToParent(java.util.List<Denotator> newObjects, DenotatorPath powersetPath)
          Adds the given objects to the powerset at the given powersetPath while making them relative.
 OperationPathResults addTransformation(java.util.Set<DenotatorPath> objectPaths, DenotatorPath anchorPath, BigBangTransformation transformation)
           
 void addWallpaperDimension(java.util.Set<DenotatorPath> objectPaths, int rangeFrom, int rangeTo)
           
 OperationPathResults buildSatelliteObjects(java.util.Set<DenotatorPath> objectPaths, DenotatorPath parentPath, int powersetIndex)
          Adds the notes at the given paths to a children set of the given parent, either the modulator set or the satellite set
 BigBangDenotatorManager clone()
          does not clone current wallpaper or alteration
 void endWallpaper()
           
 OperationPathResults flattenObjects(java.util.Set<DenotatorPath> objectPaths)
           
 Denotator getAbsoluteObject(DenotatorPath objectPath)
           
 java.util.List<Denotator> getAbsoluteObjects(java.util.List<DenotatorPath> objectPaths)
           
 Denotator getComposition()
           
 Form getForm()
           
 ObjectGenerator getObjectGenerator()
           
 OperationPathResults getPathResults()
           
 boolean isFormCompatibleWithCurrentForm(Form form)
           
 java.util.List<Denotator> removeObjects(java.util.List<DenotatorPath> removedObjectsPaths)
           
 void replaceObjects(java.util.List<Denotator> newObjects, java.util.List<DenotatorPath> replacedObjectsPaths)
           
 void replaceSiblingObjects(java.util.List<Denotator> newObjects, java.util.List<DenotatorPath> replacedObjectsPaths)
           
 void reset()
           
 void setComposition(Denotator composition)
           
 void setForm(Form baseForm)
           
 OperationPathResults setOrAddComposition(Denotator composition)
           
 OperationPathResults shapeObjects(java.util.Set<DenotatorPath> objectPaths, java.util.TreeMap<java.lang.Double,java.lang.Double> shapingLocations, java.util.List<TransformationPaths> shapingPaths, boolean copyAndShape)
           
 java.util.List<DenotatorPath> sortAndReverse(java.util.List<DenotatorPath> paths)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BigBangDenotatorManager

public BigBangDenotatorManager()

BigBangDenotatorManager

public BigBangDenotatorManager(Form form)
Method Detail

setForm

public void setForm(Form baseForm)

getForm

public Form getForm()

isFormCompatibleWithCurrentForm

public boolean isFormCompatibleWithCurrentForm(Form form)

getObjectGenerator

public ObjectGenerator getObjectGenerator()

reset

public void reset()

getPathResults

public OperationPathResults getPathResults()

setOrAddComposition

public OperationPathResults setOrAddComposition(Denotator composition)

setComposition

public void setComposition(Denotator composition)

getComposition

public Denotator getComposition()

addTransformation

public OperationPathResults addTransformation(java.util.Set<DenotatorPath> objectPaths,
                                              DenotatorPath anchorPath,
                                              BigBangTransformation transformation)

addWallpaperDimension

public void addWallpaperDimension(java.util.Set<DenotatorPath> objectPaths,
                                  int rangeFrom,
                                  int rangeTo)

endWallpaper

public void endWallpaper()

addAlteration

public OperationPathResults addAlteration(java.util.Set<DenotatorPath> foregroundComposition,
                                          java.util.Set<DenotatorPath> backgroundComposition,
                                          java.util.List<DenotatorPath> alterationCoordinates,
                                          double startDegree,
                                          double endDegree,
                                          DenotatorPath degreesDimensionPath)

shapeObjects

public OperationPathResults shapeObjects(java.util.Set<DenotatorPath> objectPaths,
                                         java.util.TreeMap<java.lang.Double,java.lang.Double> shapingLocations,
                                         java.util.List<TransformationPaths> shapingPaths,
                                         boolean copyAndShape)

addObjects

public OperationPathResults addObjects(DenotatorPath powersetPath,
                                       java.util.List<java.util.Map<DenotatorPath,java.lang.Double>> pathsWithValues)

flattenObjects

public OperationPathResults flattenObjects(java.util.Set<DenotatorPath> objectPaths)

buildSatelliteObjects

public OperationPathResults buildSatelliteObjects(java.util.Set<DenotatorPath> objectPaths,
                                                  DenotatorPath parentPath,
                                                  int powersetIndex)
Adds the notes at the given paths to a children set of the given parent, either the modulator set or the satellite set

Parameters:
notePaths -
parentPath -
asModulators - if true then the notes are added as modulators
Returns:

addObjects

public java.util.List<Denotator> addObjects(java.util.List<Denotator> objects,
                                            java.util.List<DenotatorPath> parentPaths,
                                            int[] powersetIndices)
Adds the given objects to the powersets at the given powersetIndices found in the given parentObjects.

Returns:
the added objects (made relative)

addObjectsToParent

public java.util.List<Denotator> addObjectsToParent(java.util.List<Denotator> newObjects,
                                                    DenotatorPath powersetPath)
Adds the given objects to the powerset at the given powersetPath while making them relative.


replaceObjects

public void replaceObjects(java.util.List<Denotator> newObjects,
                           java.util.List<DenotatorPath> replacedObjectsPaths)

replaceSiblingObjects

public void replaceSiblingObjects(java.util.List<Denotator> newObjects,
                                  java.util.List<DenotatorPath> replacedObjectsPaths)

removeObjects

public java.util.List<Denotator> removeObjects(java.util.List<DenotatorPath> removedObjectsPaths)

getAbsoluteObjects

public java.util.List<Denotator> getAbsoluteObjects(java.util.List<DenotatorPath> objectPaths)

getAbsoluteObject

public Denotator getAbsoluteObject(DenotatorPath objectPath)

sortAndReverse

public java.util.List<DenotatorPath> sortAndReverse(java.util.List<DenotatorPath> paths)

clone

public BigBangDenotatorManager clone()
does not clone current wallpaper or alteration

Overrides:
clone in class java.lang.Object