Package org.staccato
Class MicrotonePreprocessor
java.lang.Object
org.staccato.MicrotonePreprocessor
- All Implemented Interfaces:
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 -
Method Summary
Modifier and TypeMethodDescriptionstatic String
convertFrequencyToStaccato
(double frequency, String qualifier) Converts the given frequency to a music string that involves the Pitch Wheel and notes to create the frequencystatic MicrotonePreprocessor
preprocess
(String s, StaccatoParserContext context)
-
Constructor Details
-
MicrotonePreprocessor
public MicrotonePreprocessor()
-
-
Method Details
-
getInstance
-
preprocess
- Specified by:
preprocess
in interfacePreprocessor
-
convertFrequencyToStaccato
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
-