generate a performance and add it to this mpm, but caution: if another performance with the same name exists already in this mpm, accessing it via getPerformance(name) will return only the first in the list
add a performance to this mpm, but caution: if another performance with the same name exists already in this mpm, accessing it via getPerformance(name) will return only the first in the list
generate a performance and add it to this mpm, but caution: if another performance with the same name exists already in this mpm, accessing it via getPerformance(name) will return only the first in the list
apply the temporal spread to the chord/note sequence;
- the notes get new attributes ornament.date.offset or ornament.date.offset.milliseconds,
- and ornament.duration.offset or ornament.duration.milliseconds
apply the dynamics gradient and scale to the given chord/note sequence;
the notes get a new attribute ornament.dynamics, or, if it is already present, it will be edited accordingly
apply the temporal spread to the chord/note sequence;
+ the notes get new attributes ornament.date.offset or ornament.date.offset.milliseconds,
+ and ornament.duration.offset or ornament.duration.milliseconds
this constructor instantiates a Midi object from a midi file
+
constructor, instantiates a Midi object from a sequence and sets the midi file (a possibly existing file is not loaded and writeMidi() will overwrite it)
constructor, instantiates a Midi object from a sequence and sets the midi file (a possibly existing file is not loaded and writeMidi() will overwrite it)
+
this constructor instantiates a Midi object from a midi file
This class is based on the Midi2WavRenderer class Karl Helgason and, thus, inherits the following copyright notice.
@@ -433,6 +406,8 @@
M
convert a midi pitch value to a pitch name string witout accidental, the accidental will be ecoded in a separate string;
this method is used during MIDI to MSM conversion in class meico.midi.Midi2MSMConverter
iterate through the specified map, compute the milliseconds dates for all elements and add the results as attributes milliseconds.date and milliseconds.date.end
@@ -372,6 +343,10 @@
R
a static variant of the above method; iterate through the specified map, compute the milliseconds dates for all elements and add the results as attributes milliseconds.date and milliseconds.date.end;
this method includes a fallback mechanism if no tempoMap is provided
this method moves all subtrees of a measure that are non staff subtrees, i.e. they are control event subtrees, to the front as these have to be processed before the staffs
recursively traverse the mei tree (depth first) starting at the root element and return the list of Msm instances; root indicates the root of the subtree,
the resulting Msm objects are stored in this.helper.movements
this is an audio exporter that uses the specified soundbank or, if null, the default soundbank for synthesis
@@ -225,14 +200,6 @@
E
converts the mei data into msm format and returns a list of Msm instances, one per movement/mdiv; the thime resolution (pulses per quarter note) is 720 by default or more if required (for very short note durations)
converts the mei data into msm and mpm format and returns a tuplet of lists, one with the msms (one per movement/mdiv), the other with the corresponding mpms
a helper method to retrieve the date at which the indexed dynamics instruction ends, which is either the date of the subsequent instruction or Double.MAX_VALUE
@@ -454,6 +425,10 @@
G
a helper method to retrieve the date at which the indexed tempo instruction ends, which is either the date of the subsequent instruction or Double.MAX_VALUE
insert the specified map element at the right position, the element should be constructed in method addElement(),
the element will be added after other elements at the same date
This can be used to convert the byte array of an Audio object into an array of doubles between -1.0 and 1.0
which is far more convenient for audio analyses.
public static byte[] convertAudioInputStream2ByteArray(javax.sound.sampled.AudioInputStream stream)
+
public static byte[] convertAudioInputStream2ByteArray(javax.sound.sampled.AudioInputStream stream)
convert an AudioInputStream to a byte array
Parameters:
@@ -746,7 +675,7 @@
convertAudioInputStream2ByteArray
convertByteArray2AudioInputStream
-
public static javax.sound.sampled.AudioInputStream convertByteArray2AudioInputStream(byte[] array,
+
public static javax.sound.sampled.AudioInputStream convertByteArray2AudioInputStream(byte[] array,
javax.sound.sampled.AudioFormat format)
convert a byte array (without audio file header, just pure audio data) into an AudioInputStream in a given AudioFormat
@@ -763,7 +692,7 @@
convertByteArray2AudioInputStream
convertByteArray2DoubleArray
-
public static java.util.ArrayList<double[]> convertByteArray2DoubleArray(byte[] array,
+
public static java.util.ArrayList<double[]> convertByteArray2DoubleArray(byte[] array,
javax.sound.sampled.AudioFormat format)
This can be used to convert the byte array of an Audio object into an array of doubles between -1.0 and 1.0
which is far more convenient for audio analyses.
@@ -782,7 +711,7 @@
convertByteArray2DoubleArray
convertDoubleArray2ByteArray
-
public static byte[] convertDoubleArray2ByteArray(double[] array,
+
public static byte[] convertDoubleArray2ByteArray(double[] array,
int sampleSizeInBits)
This method converts an input double array into a byte array.
@@ -799,7 +728,7 @@
convertDoubleArray2ByteArray
exportWaveformImage
-
public java.awt.image.BufferedImage exportWaveformImage(int width,
+
public java.awt.image.BufferedImage exportWaveformImage(int width,
int height)
Make a waveform image from the audio data.
@@ -817,7 +746,7 @@
exportWaveformImage
convertWaveform2Image
-
public static java.awt.image.BufferedImage convertWaveform2Image(double[] audio,
+
public static java.awt.image.BufferedImage convertWaveform2Image(double[] audio,
int leftmostSample,
int rightmostSample,
int width,
@@ -857,7 +786,7 @@
exportConstantQTransformSpectrogram
exportConstantQTransformSpectrogram
-
public java.util.ArrayList<com.tagtraum.jipes.audio.LogFrequencySpectrum> exportConstantQTransformSpectrogram(com.tagtraum.jipes.math.WindowFunction windowFunction,
+
public java.util.ArrayList<com.tagtraum.jipes.audio.LogFrequencySpectrum> exportConstantQTransformSpectrogram(com.tagtraum.jipes.math.WindowFunction windowFunction,
int hopSize,
float minFrequency,
float maxFrequency,
@@ -883,7 +812,7 @@
exportConstantQTransformSpectrogram
exportConstantQTransformSpectrogram
-
public java.util.ArrayList<com.tagtraum.jipes.audio.LogFrequencySpectrum> exportConstantQTransformSpectrogram(com.tagtraum.jipes.math.WindowFunction windowFunction,
+
public java.util.ArrayList<com.tagtraum.jipes.audio.LogFrequencySpectrum> exportConstantQTransformSpectrogram(com.tagtraum.jipes.math.WindowFunction windowFunction,
int hopSize,
float minFrequency,
float maxFrequency,
@@ -911,7 +840,7 @@
exportConstantQTransformSpectrogram
convertSpectrogramToImage
-
public static java.awt.image.BufferedImage convertSpectrogramToImage(java.util.ArrayList<com.tagtraum.jipes.audio.LogFrequencySpectrum> spectrogram)
+
public static java.awt.image.BufferedImage convertSpectrogramToImage(java.util.ArrayList<com.tagtraum.jipes.audio.LogFrequencySpectrum> spectrogram)
A convenient helper method to convert a spectrogram (as obtained by, e.g., method exportConstantQTransformSpectrogram()) into a BufferedImage.
Parameters:
@@ -926,7 +855,7 @@
convertSpectrogramToImage
convertSpectrogramToImage
-
public static java.awt.image.BufferedImage convertSpectrogramToImage(java.util.ArrayList<com.tagtraum.jipes.audio.LogFrequencySpectrum> spectrogram,
+
a setter for the audio clip, can be used to load audio data without playing it back
Parameters:
@@ -516,7 +463,7 @@
setAudioData
setAudioData
-
public boolean setAudioData(byte[] pcmAudio,
+
public boolean setAudioData(byte[] pcmAudio,
javax.sound.sampled.AudioFormat format)
a setter for the audio clip, can be used to load audio data without playing it back
@@ -545,7 +492,7 @@
play
play
-
public void play(int playbackPositionInFrames)
+
public void play(int playbackPositionInFrames)
Given that the AudioPlayer has already loaded audio data (i.e. an audio clip), this can be used to start playback.
The playback will start at the beginning or at a specified position.
@@ -560,7 +507,7 @@
play
play
-
public void play(double relativePlaybackPosition)
+
public void play(double relativePlaybackPosition)
Given that the AudioPlayer has already loaded audio data (i.e. an audio clip), this can be used to start playback.
The playback will start at the beginning or at a specified position.
this method adds element addThis to a timely sequenced list, the map, and ensures the timely order of the elements in the map;
therefore, addThis must contain the attribute "date"; if not, addThis is appended at the end
this method converts the string of a barline (MEI element measure in attributes left and right) to an msm sequencing command (marker and/or goto element) and adds it to the global sequencingMap
check for pending elements with endid attributes to be finished when the element with this endid is found,
note that this will compute the end date including(!)
compute midi pitch of an mei note or return -1.0 if failed; the return is a double number that captures microtonality, too; 0.5 is a quarter tone
parameter pitchdata should be an empty ArrayList>String<, it is filled with pitchname, accidentals and octave of the computed midi pitch for further use
compute the length of one measure in midi ticks at the currentDate in the currentPart of the currentMovement; if no time signature information available it returns the length of a 4/4 measure
when a new MEI mdiv is processed this method generates a hashmap of all notes and chords, so we don't have to do it again during processing (e.g. in method isSameLayer() etc.)
convert a midi pitch value to a pitch name string witout accidental, the accidental will be ecoded in a separate string;
this method is used during MIDI to MSM conversion in class meico.midi.Midi2MSMConverter
this method moves all subtrees of a measure that are non staff subtrees, i.e. they are control event subtrees, to the front as these have to be processed before the staffs
public void indexNotesAndChords(nu.xom.Element mdiv)
+
public void indexNotesAndChords(nu.xom.Element mdiv)
when a new MEI mdiv is processed this method generates a hashmap of all notes and chords, so we don't have to do it again during processing (e.g. in method isSameLayer() etc.)
Parameters:
@@ -1136,7 +1013,7 @@
indexNotesAndChords
validateAgainstSchema
-
public static void validateAgainstSchema(java.io.File file,
+
public static void validateAgainstSchema(java.io.File file,
java.net.URL schema)
throws org.xml.sax.SAXException,
java.io.IOException
@@ -1157,7 +1034,7 @@
validateAgainstSchema
validateAgainstSchema
-
public static void validateAgainstSchema(java.lang.String xml,
+
public static void validateAgainstSchema(java.lang.String xml,
java.net.URL schema)
throws org.xml.sax.SAXException,
java.io.IOException
@@ -1178,7 +1055,7 @@
validateAgainstSchema
getFirstChildElement
-
public static nu.xom.Element getFirstChildElement(nu.xom.Element ofThis)
+
public static nu.xom.Element getFirstChildElement(nu.xom.Element ofThis)
get the first child of an xml element
Parameters:
@@ -1193,7 +1070,7 @@
getFirstChildElement
getFirstChildElement
-
public static nu.xom.Element getFirstChildElement(nu.xom.Element ofThis,
+
public static nu.xom.Element getFirstChildElement(nu.xom.Element ofThis,
java.lang.String localname)
XOM's method getFirstChild(String) sometimes doesn't seem to work even though an XPath query finds something. For these situations this method can be used as workaround.
@@ -1210,7 +1087,7 @@
getFirstChildElement
getFirstChildElement
-
public static nu.xom.Element getFirstChildElement(java.lang.String name,
+
public static nu.xom.Element getFirstChildElement(java.lang.String name,
nu.xom.Element ofThis)
this function became necessary because the XOM methods sometimes do not seem to work for whatever reason