org.herac.tuxguitar.song.managers
Class TGMeasureManager

java.lang.Object
  extended by org.herac.tuxguitar.song.managers.TGMeasureManager

public class TGMeasureManager
extends java.lang.Object


Constructor Summary
TGMeasureManager(TGSongManager songManager)
           
 
Method Summary
 void addBeat(TGMeasure measure, TGBeat beat)
          Agrega un beat al compas
 void addChord(TGBeat beat, TGChord chord)
          Agrega el acorde al compas
 void addChord(TGMeasure measure, long start, TGChord chord)
          Agrega el acorde al compas
 void addNote(TGBeat beat, TGNote note, TGDuration duration, int voice)
           
 void addNote(TGBeat beat, TGNote note, TGDuration duration, long start, int voice)
           
 void addNote(TGMeasure measure, long start, TGNote note, TGDuration duration, int voice)
           
 void addSilence(TGBeat beat, TGDuration duration, int voice)
           
 void addSilence(TGBeat beat, TGDuration duration, long start, int voice)
           
 void addSilence(TGMeasure measure, long start, TGDuration duration, int voice)
           
 void addText(TGBeat beat, TGText text)
          Agrega el texto al compas
 void addText(TGMeasure measure, long start, TGText text)
          Agrega el texto al compas
 void autoCompleteSilences(TGMeasure measure)
          Calcula si hay espacios libres.
 void changeAccentuatedNote(TGMeasure measure, long start, int string)
          Agrega un AccentuatedNote
 void changeBendNote(TGMeasure measure, long start, int string, TGEffectBend bend)
          Agrega un bend
 void changeDeadNote(TGNote note)
          Agrega una nota muerta
 void changeDuration(TGMeasure measure, TGBeat beat, TGDuration duration, int voice, boolean tryMove)
           
 void changeFadeIn(TGMeasure measure, long start, int string)
          Agrega un fadeIn
 void changeGhostNote(TGMeasure measure, long start, int string)
          Agrega un GhostNote
 void changeGraceNote(TGMeasure measure, long start, int string, TGEffectGrace grace)
          Agrega un grace
 void changeHammerNote(TGMeasure measure, long start, int string)
          Agrega un hammer
 void changeHarmonicNote(TGMeasure measure, long start, int string, TGEffectHarmonic harmonic)
          Agrega un harmonic
 void changeHeavyAccentuatedNote(TGMeasure measure, long start, int string)
          Agrega un GhostNote
 void changePalmMute(TGMeasure measure, long start, int string)
          Agrega un palm-mute
 void changePopping(TGMeasure measure, long start, int string)
          Agrega un popping
 void changeSlapping(TGMeasure measure, long start, int string)
          Agrega un slapping
 void changeSlideNote(TGMeasure measure, long start, int string)
          Agrega un slide
 void changeStaccato(TGMeasure measure, long start, int string)
          Agrega un staccato
 void changeTapping(TGMeasure measure, long start, int string)
          Agrega un tapping
 void changeTieNote(TGMeasure measure, long start, int string)
          Liga la nota
 void changeTieNote(TGNote note)
          Liga la nota
 void changeTremoloBar(TGMeasure measure, long start, int string, TGEffectTremoloBar tremoloBar)
          Agrega un tremoloBar
 void changeTremoloPicking(TGMeasure measure, long start, int string, TGEffectTremoloPicking tremoloPicking)
          Agrega un tremolo picking
 void changeTrillNote(TGMeasure measure, long start, int string, TGEffectTrill trill)
          Agrega un trill
 void changeVelocity(int velocity, TGMeasure measure, long start, int string)
          Cambia el Velocity
 void changeVibratoNote(TGMeasure measure, long start, int string)
          Agrega un vibrato
 void changeVoiceDirection(TGVoice voice, int direction)
           
 void cleanBeat(TGBeat beat)
           
 void cleanBeatNotes(TGBeat beat)
           
 void cleanBeatNotes(TGMeasure measure, long start)
           
 void cleanMeasure(TGMeasure measure)
           
 void cleanVoiceNotes(TGVoice voice)
           
static java.util.List createDurations(TGFactory factory, long time)
           
 TGBeat getBeat(TGMeasure measure, long start)
          Retorna las Nota en la posicion y cuerda
 TGBeat getBeatIn(TGMeasure measure, long start)
          Retorna las Nota en la posicion y cuerda
 java.util.List getBeatsBeforeEnd(java.util.List beats, long fromStart)
          Retorna Todos los desde Start hasta el final del compas
 TGChord getChord(TGMeasure measure, long start)
          Retorna el acorde en la position
 TGBeat getFirstBeat(java.util.List components)
          Retorna el Primer Componente
 TGVoice getFirstVoice(java.util.List beats, int index)
          Retorna el Primer Componente
 TGBeat getLastBeat(java.util.List components)
          Retorna el Ultimo Componente
 TGVoice getLastVoice(java.util.List beats, int index)
          Retorna el Ultimo Componente
 TGDuration getMinimumDuration(TGBeat beat)
           
 TGBeat getNextBeat(java.util.List beats, TGBeat beat)
          Retorna el Siguiente Componente
 TGNote getNextNote(TGMeasure measure, long start, int voiceIndex, int string)
           
 TGVoice getNextRestVoice(java.util.List beats, TGVoice voice)
          Retorna el Siguiente Componente
 TGVoice getNextVoice(java.util.List beats, TGBeat beat, int index)
          Retorna el Siguiente Componente
 TGNote getNote(TGBeat beat, int string)
          Retorna la Nota en la cuerda
 TGNote getNote(TGMeasure measure, long start, int string)
          Retorna la Nota en la posicion y cuerda
 TGNote getNote(TGVoice voice, int string)
           
 java.util.List getNotes(TGMeasure measure, long start)
          Retorna Todas las Notas en la posicion Start
 TGBeat getPreviousBeat(java.util.List beats, TGBeat beat)
          Retorna el Componente Anterior
 TGNote getPreviousNote(TGMeasure measure, long start, int voiceIndex, int string)
           
 TGVoice getPreviousVoice(java.util.List beats, TGBeat beat, int index)
          Retorna el Componente Anterior
 long getRealStart(TGMeasure measure, long currStart)
           
 TGSongManager getSongManager()
           
 TGText getText(TGMeasure measure, long start)
          Retorna el texto en la position
 TGVoice getVoiceIn(TGMeasure measure, long start, int voiceIndex)
          Retorna las Nota en la posicion y cuerda
 java.util.List getVoicesBeforeEnd(java.util.List beats, long fromStart, int index)
           
 boolean isUniqueVoice(TGVoice voice, boolean ignoreRests)
           
 void moveAllBeats(TGMeasure measure, long theMove)
           
 boolean moveBeats(TGMeasure measure, long start, long theMove, TGDuration fillDuration)
           
 void moveOutOfBoundsBeatsToNewMeasure(TGMeasure measure)
           
 boolean moveSemitoneDown(TGMeasure measure, long start, int string)
          Mueve la nota 1 semitono abajo
 boolean moveSemitoneUp(TGMeasure measure, long start, int string)
          Mueve la nota 1 semitono arriba
 void moveVoice(TGVoice voice, long theMove)
           
 void moveVoice(TGVoice voice, TGBeat beat)
           
 boolean moveVoices(TGMeasure measure, long start, long theMove, int voiceIndex, TGDuration fillDuration)
           
 void orderBeats(TGMeasure measure)
           
 void removeBeat(TGBeat beat)
           
 void removeBeat(TGBeat beat, boolean moveNextBeats)
          Elimina un silencio del compas.
 void removeBeat(TGMeasure measure, long start, boolean moveNextComponents)
           
 void removeBeatsBeforeEnd(TGMeasure measure, long fromStart)
           
 void removeChord(TGMeasure measure, long start)
          Borra el acorde en la position
 void removeEmptyBeats(TGMeasure measure)
           
 void removeMeasureVoices(TGMeasure measure, int index)
           
 void removeNote(TGMeasure measure, long start, int voiceIndex, int string)
           
 void removeNote(TGMeasure measure, long start, int voiceIndex, int string, boolean checkRestBeat)
          Elimina los Componentes que empiecen en Start y esten en la misma cuerda Si hay un Silencio lo borra sin importar la cuerda
 void removeNote(TGNote note)
           
 void removeNotesAfterString(TGMeasure measure, int string)
          Elimina los Componentes que empiecen en Start y esten en la misma cuerda Si hay un Silencio lo borra sin importar la cuerda
 void removeText(TGBeat beat)
          Borra el texto en el pulso
 boolean removeText(TGMeasure measure, long start)
          Borra el texto en la position
 void removeVoice(TGMeasure measure, long start, int index, boolean moveNextComponents)
           
 void removeVoice(TGVoice voice)
           
 void removeVoice(TGVoice voice, boolean moveNextVoices)
           
 boolean setStroke(TGMeasure measure, long start, int value, int direction)
          Set the beat stroke
 int shiftNoteDown(TGMeasure measure, long start, int string)
          Mueve la nota a la cuerda de abajo
 int shiftNoteUp(TGMeasure measure, long start, int string)
          Mueve la nota a la cuerda de arriba
 void tryChangeSilenceAfter(TGMeasure measure, TGVoice voice)
           
 boolean validateDuration(TGMeasure measure, TGBeat beat, int voice, TGDuration duration, boolean moveNextBeats, boolean setCurrentDuration)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TGMeasureManager

public TGMeasureManager(TGSongManager songManager)
Method Detail

getSongManager

public TGSongManager getSongManager()

orderBeats

public void orderBeats(TGMeasure measure)

addBeat

public void addBeat(TGMeasure measure,
                    TGBeat beat)
Agrega un beat al compas


removeBeat

public void removeBeat(TGBeat beat)

removeBeat

public void removeBeat(TGMeasure measure,
                       long start,
                       boolean moveNextComponents)

removeBeat

public void removeBeat(TGBeat beat,
                       boolean moveNextBeats)
Elimina un silencio del compas. si se asigna moveNextComponents = true. los componentes que le siguen se moveran para completar el espacio vacio que dejo el silencio


removeEmptyBeats

public void removeEmptyBeats(TGMeasure measure)

removeBeatsBeforeEnd

public void removeBeatsBeforeEnd(TGMeasure measure,
                                 long fromStart)

addNote

public void addNote(TGMeasure measure,
                    long start,
                    TGNote note,
                    TGDuration duration,
                    int voice)

addNote

public void addNote(TGBeat beat,
                    TGNote note,
                    TGDuration duration,
                    int voice)

addNote

public void addNote(TGBeat beat,
                    TGNote note,
                    TGDuration duration,
                    long start,
                    int voice)

removeNote

public void removeNote(TGNote note)

removeNote

public void removeNote(TGMeasure measure,
                       long start,
                       int voiceIndex,
                       int string)

removeNote

public void removeNote(TGMeasure measure,
                       long start,
                       int voiceIndex,
                       int string,
                       boolean checkRestBeat)
Elimina los Componentes que empiecen en Start y esten en la misma cuerda Si hay un Silencio lo borra sin importar la cuerda


removeNotesAfterString

public void removeNotesAfterString(TGMeasure measure,
                                   int string)
Elimina los Componentes que empiecen en Start y esten en la misma cuerda Si hay un Silencio lo borra sin importar la cuerda


getNotes

public java.util.List getNotes(TGMeasure measure,
                               long start)
Retorna Todas las Notas en la posicion Start


getNote

public TGNote getNote(TGMeasure measure,
                      long start,
                      int string)
Retorna la Nota en la posicion y cuerda


getNote

public TGNote getNote(TGBeat beat,
                      int string)
Retorna la Nota en la cuerda


getNote

public TGNote getNote(TGVoice voice,
                      int string)

getPreviousNote

public TGNote getPreviousNote(TGMeasure measure,
                              long start,
                              int voiceIndex,
                              int string)

getNextNote

public TGNote getNextNote(TGMeasure measure,
                          long start,
                          int voiceIndex,
                          int string)

getMinimumDuration

public TGDuration getMinimumDuration(TGBeat beat)

getBeat

public TGBeat getBeat(TGMeasure measure,
                      long start)
Retorna las Nota en la posicion y cuerda


getBeatIn

public TGBeat getBeatIn(TGMeasure measure,
                        long start)
Retorna las Nota en la posicion y cuerda


getVoiceIn

public TGVoice getVoiceIn(TGMeasure measure,
                          long start,
                          int voiceIndex)
Retorna las Nota en la posicion y cuerda


getNextBeat

public TGBeat getNextBeat(java.util.List beats,
                          TGBeat beat)
Retorna el Siguiente Componente


getPreviousBeat

public TGBeat getPreviousBeat(java.util.List beats,
                              TGBeat beat)
Retorna el Componente Anterior


getFirstBeat

public TGBeat getFirstBeat(java.util.List components)
Retorna el Primer Componente


getLastBeat

public TGBeat getLastBeat(java.util.List components)
Retorna el Ultimo Componente


getBeatsBeforeEnd

public java.util.List getBeatsBeforeEnd(java.util.List beats,
                                        long fromStart)
Retorna Todos los desde Start hasta el final del compas


moveOutOfBoundsBeatsToNewMeasure

public void moveOutOfBoundsBeatsToNewMeasure(TGMeasure measure)

moveAllBeats

public void moveAllBeats(TGMeasure measure,
                         long theMove)

moveBeats

public boolean moveBeats(TGMeasure measure,
                         long start,
                         long theMove,
                         TGDuration fillDuration)

cleanBeat

public void cleanBeat(TGBeat beat)

cleanBeatNotes

public void cleanBeatNotes(TGBeat beat)

cleanBeatNotes

public void cleanBeatNotes(TGMeasure measure,
                           long start)

cleanVoiceNotes

public void cleanVoiceNotes(TGVoice voice)

addChord

public void addChord(TGMeasure measure,
                     long start,
                     TGChord chord)
Agrega el acorde al compas


addChord

public void addChord(TGBeat beat,
                     TGChord chord)
Agrega el acorde al compas


getChord

public TGChord getChord(TGMeasure measure,
                        long start)
Retorna el acorde en la position


removeChord

public void removeChord(TGMeasure measure,
                        long start)
Borra el acorde en la position


addText

public void addText(TGMeasure measure,
                    long start,
                    TGText text)
Agrega el texto al compas


addText

public void addText(TGBeat beat,
                    TGText text)
Agrega el texto al compas


getText

public TGText getText(TGMeasure measure,
                      long start)
Retorna el texto en la position


removeText

public void removeText(TGBeat beat)
Borra el texto en el pulso


removeText

public boolean removeText(TGMeasure measure,
                          long start)
Borra el texto en la position


cleanMeasure

public void cleanMeasure(TGMeasure measure)

shiftNoteUp

public int shiftNoteUp(TGMeasure measure,
                       long start,
                       int string)
Mueve la nota a la cuerda de arriba


shiftNoteDown

public int shiftNoteDown(TGMeasure measure,
                         long start,
                         int string)
Mueve la nota a la cuerda de abajo


moveSemitoneUp

public boolean moveSemitoneUp(TGMeasure measure,
                              long start,
                              int string)
Mueve la nota 1 semitono arriba


moveSemitoneDown

public boolean moveSemitoneDown(TGMeasure measure,
                                long start,
                                int string)
Mueve la nota 1 semitono abajo


setStroke

public boolean setStroke(TGMeasure measure,
                         long start,
                         int value,
                         int direction)
Set the beat stroke


autoCompleteSilences

public void autoCompleteSilences(TGMeasure measure)
Calcula si hay espacios libres. y crea nuevos silencios


getRealStart

public long getRealStart(TGMeasure measure,
                         long currStart)

changeTieNote

public void changeTieNote(TGMeasure measure,
                          long start,
                          int string)
Liga la nota


changeTieNote

public void changeTieNote(TGNote note)
Liga la nota


changeVibratoNote

public void changeVibratoNote(TGMeasure measure,
                              long start,
                              int string)
Agrega un vibrato


changeDeadNote

public void changeDeadNote(TGNote note)
Agrega una nota muerta


changeSlideNote

public void changeSlideNote(TGMeasure measure,
                            long start,
                            int string)
Agrega un slide


changeHammerNote

public void changeHammerNote(TGMeasure measure,
                             long start,
                             int string)
Agrega un hammer


changePalmMute

public void changePalmMute(TGMeasure measure,
                           long start,
                           int string)
Agrega un palm-mute


changeStaccato

public void changeStaccato(TGMeasure measure,
                           long start,
                           int string)
Agrega un staccato


changeTapping

public void changeTapping(TGMeasure measure,
                          long start,
                          int string)
Agrega un tapping


changeSlapping

public void changeSlapping(TGMeasure measure,
                           long start,
                           int string)
Agrega un slapping


changePopping

public void changePopping(TGMeasure measure,
                          long start,
                          int string)
Agrega un popping


changeBendNote

public void changeBendNote(TGMeasure measure,
                           long start,
                           int string,
                           TGEffectBend bend)
Agrega un bend


changeTremoloBar

public void changeTremoloBar(TGMeasure measure,
                             long start,
                             int string,
                             TGEffectTremoloBar tremoloBar)
Agrega un tremoloBar


changeGhostNote

public void changeGhostNote(TGMeasure measure,
                            long start,
                            int string)
Agrega un GhostNote


changeAccentuatedNote

public void changeAccentuatedNote(TGMeasure measure,
                                  long start,
                                  int string)
Agrega un AccentuatedNote


changeHeavyAccentuatedNote

public void changeHeavyAccentuatedNote(TGMeasure measure,
                                       long start,
                                       int string)
Agrega un GhostNote


changeHarmonicNote

public void changeHarmonicNote(TGMeasure measure,
                               long start,
                               int string,
                               TGEffectHarmonic harmonic)
Agrega un harmonic


changeGraceNote

public void changeGraceNote(TGMeasure measure,
                            long start,
                            int string,
                            TGEffectGrace grace)
Agrega un grace


changeTrillNote

public void changeTrillNote(TGMeasure measure,
                            long start,
                            int string,
                            TGEffectTrill trill)
Agrega un trill


changeTremoloPicking

public void changeTremoloPicking(TGMeasure measure,
                                 long start,
                                 int string,
                                 TGEffectTremoloPicking tremoloPicking)
Agrega un tremolo picking


changeFadeIn

public void changeFadeIn(TGMeasure measure,
                         long start,
                         int string)
Agrega un fadeIn


changeVelocity

public void changeVelocity(int velocity,
                           TGMeasure measure,
                           long start,
                           int string)
Cambia el Velocity


createDurations

public static java.util.List createDurations(TGFactory factory,
                                             long time)

getNextVoice

public TGVoice getNextVoice(java.util.List beats,
                            TGBeat beat,
                            int index)
Retorna el Siguiente Componente


getPreviousVoice

public TGVoice getPreviousVoice(java.util.List beats,
                                TGBeat beat,
                                int index)
Retorna el Componente Anterior


getFirstVoice

public TGVoice getFirstVoice(java.util.List beats,
                             int index)
Retorna el Primer Componente


getLastVoice

public TGVoice getLastVoice(java.util.List beats,
                            int index)
Retorna el Ultimo Componente


getNextRestVoice

public TGVoice getNextRestVoice(java.util.List beats,
                                TGVoice voice)
Retorna el Siguiente Componente


getVoicesBeforeEnd

public java.util.List getVoicesBeforeEnd(java.util.List beats,
                                         long fromStart,
                                         int index)

addSilence

public void addSilence(TGMeasure measure,
                       long start,
                       TGDuration duration,
                       int voice)

addSilence

public void addSilence(TGBeat beat,
                       TGDuration duration,
                       int voice)

addSilence

public void addSilence(TGBeat beat,
                       TGDuration duration,
                       long start,
                       int voice)

removeVoice

public void removeVoice(TGVoice voice)

removeVoice

public void removeVoice(TGVoice voice,
                        boolean moveNextVoices)

removeVoice

public void removeVoice(TGMeasure measure,
                        long start,
                        int index,
                        boolean moveNextComponents)

removeMeasureVoices

public void removeMeasureVoices(TGMeasure measure,
                                int index)

changeVoiceDirection

public void changeVoiceDirection(TGVoice voice,
                                 int direction)

changeDuration

public void changeDuration(TGMeasure measure,
                           TGBeat beat,
                           TGDuration duration,
                           int voice,
                           boolean tryMove)

tryChangeSilenceAfter

public void tryChangeSilenceAfter(TGMeasure measure,
                                  TGVoice voice)

moveVoice

public void moveVoice(TGVoice voice,
                      long theMove)

moveVoice

public void moveVoice(TGVoice voice,
                      TGBeat beat)

validateDuration

public boolean validateDuration(TGMeasure measure,
                                TGBeat beat,
                                int voice,
                                TGDuration duration,
                                boolean moveNextBeats,
                                boolean setCurrentDuration)

moveVoices

public boolean moveVoices(TGMeasure measure,
                          long start,
                          long theMove,
                          int voiceIndex,
                          TGDuration fillDuration)

isUniqueVoice

public boolean isUniqueVoice(TGVoice voice,
                             boolean ignoreRests)