Class Transcriber

java.lang.Object
com.softsynth.jmsl.score.transcribe.Transcriber

public class Transcriber
extends java.lang.Object
Notate a MusicShape. Chop it into measures and send each one's notation to a Score. Vector of TimeSignatures used to split up the MusicShape. If the MusicShape is longer than the number of TimeSignatures provided, the last one stays in effect. If no TimeSignatures are provided, uses 4/4 throughout MOD 9.9.07 adding notespelling
Author:
Nick Didkovsky, Feb 11, 2002 , (c) 2002 Nick Didkovsky, All Rights reserved.
  • Constructor Details

    • Transcriber

      public Transcriber()
  • Method Details

    • isAddCarriedOverMusicShapeToEnd

      public boolean isAddCarriedOverMusicShapeToEnd()
      Get flag to add the untranscribed leftover notes on the '1' of a final measure or not
      Returns:
      the addCarriedOverMusicShapeToEnd
    • setAddCarriedOverMusicShapeToEnd

      public void setAddCarriedOverMusicShapeToEnd​(boolean addCarriedOverMusicShapeToEnd)
      Set flag to add the untranscribed leftover notes on the '1' of a final measure or not
      Parameters:
      addCarriedOverMusicShapeToEnd - the addCarriedOverMusicShapeToEnd to set
    • setCommonTimeSig

      public void setCommonTimeSig()
      Create a Vector of one TimeSignature of 4/4, to be used throughout transcription
    • addTranscriberListener

      public void addTranscriberListener​(TranscriberListener t)
    • removeTranscriberListener

      public void removeTranscriberListener​(TranscriberListener t)
    • setTimeSignatures

      public void setTimeSignatures​(java.util.Vector timeSignatures)
    • setTempoTimeSignatures

      public void setTempoTimeSignatures​(java.util.Vector tempoTimeSignatureHolders)
    • setFillBeatWithNote

      public static void setFillBeatWithNote​(boolean flag)
      When true, rests occuring within a beat are filled out with the duration of a sounded sound. For example, a transcribed melody of staccato notes occuring every 8th can be transcribed either as 8th notes (when this flag is true) or 16th notes alternating with 16th rests (when this flag is false). When true, the resulting score is easier to read but may require more comments to the performer on how long to hold notes.
    • getFillBeatWithNote

      public static boolean getFillBeatWithNote()
    • setScore

      public void setScore​(Score score)
    • getExtendLastHoldTime

      public boolean getExtendLastHoldTime()
    • setExtendLastHoldTime

      public void setExtendLastHoldTime​(boolean extendLastHoldTime)
    • setSourceMusicShape

      public void setSourceMusicShape​(MusicShape source)
      Precondition of source musicshape: dimension 0 contains timestamps sorted in ascending order. dimension 1 contains pitch info 0..127 (fractions ok), dimension 2 contains amplitude 0..1, dimension 3 contains hold (sustain time). Higher dimensions are preserved. All time units in seconds.
    • setDebug

      public void setDebug​(boolean b)
    • printMeasure

      public void printMeasure​(int m)
    • transcribe

      public void transcribe() throws SearchPathListExpansionException, ElementMissedException
      Throws:
      SearchPathListExpansionException
      ElementMissedException
    • main

      public static void main​(java.lang.String[] args)
    • setLoopTimeSignatures

      public void setLoopTimeSignatures​(boolean flag)
      Default behaviour is to use the last time signature in time sig vector when last time sig is reached. Call loopTimeSignatures(true) to instead sequence through time signature vector from the beginning again when end is reached.
    • getLoopTimeSignatures

      public boolean getLoopTimeSignatures()
    • setUseAutomaticSpelling

      public void setUseAutomaticSpelling​(boolean useAutomaticSpelling)
      If true, notes will get spelled with #/b according to "line of 5ths rule"