com.softsynth.jmsl.score.transcribe
Class Transcriber

java.lang.Object
  extended by 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

Author:
Nick Didkovsky, Feb 11, 2002 , (c) 2002 Nick Didkovsky, All Rights reserved.

Constructor Summary
Transcriber()
           
 
Method Summary
 void addTranscriberListener(TranscriberListener t)
           
static boolean getFillBeatWithNote()
           
 boolean getLoopTimeSignatures()
           
static void main(java.lang.String[] args)
           
 void printMeasure(int m)
           
 void removeTranscriberListener(TranscriberListener t)
           
 void setCommonTimeSig()
          Create a Vector of one TimeSignature of 4/4, to be used throughout transcription
 void setDebug(boolean b)
           
static void setFillBeatWithNote(boolean flag)
          When true, rests occuring within a beat are filled out with the duration of a sounded sound.
 void setLoopTimeSignatures(boolean flag)
          Default behaviour is to use the last time signature in time sig vector when last time sig is reached.
 void setScore(Score score)
           
 void setSourceMusicShape(MusicShape source)
          Precondition of source musicshape: dimension 0 contains timestamps sorted in ascending order.
 void setTempoTimeSignatures(java.util.Vector tempoTimeSignatureHolders)
           
 void setTimeSignatures(java.util.Vector timeSignatures)
           
 void transcribe()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Transcriber

public Transcriber()
Method Detail

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 trascribed wither as 8th notes (when this flag is true) or 16th notes interleaved 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)

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()