Package org.staccato
Class MicrotonePreprocessor
- java.lang.Object
-
- org.staccato.MicrotonePreprocessor
-
- All Implemented Interfaces:
Preprocessor
public class MicrotonePreprocessor extends java.lang.Object implements Preprocessor
The MicrotonePreprocess lets a user express a microtone using 'm' followed by the frequency - e.g., m440. The MicrotonePreprocessor takes this String, parses the frequency value, figures out what Pitch Wheel and Note events need to be called to generate this frequency in MIDI, and returns the full set of Staccato Pitch Wheel and Note events.
-
-
Constructor Summary
Constructors Constructor Description MicrotonePreprocessor()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.lang.StringconvertFrequencyToStaccato(double frequency, java.lang.String qualifier)Converts the given frequency to a music string that involves the Pitch Wheel and notes to create the frequencystatic MicrotonePreprocessorgetInstance()java.lang.Stringpreprocess(java.lang.String s, StaccatoParserContext context)
-
-
-
Method Detail
-
getInstance
public static MicrotonePreprocessor getInstance()
-
preprocess
public java.lang.String preprocess(java.lang.String s, StaccatoParserContext context)- Specified by:
preprocessin interfacePreprocessor
-
convertFrequencyToStaccato
public static java.lang.String convertFrequencyToStaccato(double frequency, java.lang.String qualifier)Converts the given frequency to a music string that involves the Pitch Wheel and notes to create the frequency- Parameters:
freq- the frequency- Returns:
- a MusicString that represents the frequency
-
-