Previous Next Package
Class MIDICompose.MIDIFile
java.lang.Object
|
+----MIDICompose.MIDIObject
|
+----MIDICompose.MIDIContainer
|
+----MIDICompose.MIDIFile
- public class MIDIFile
- extends MIDIContainer
MIDIFile is an ABSOLUTE-typed MIDIContainer, that is not set to any specific channel.
It can write its elements to a MIDI-file.
-
MIDIFile()
- Creates new MIDIFile.
-
MIDIFile(double, int, int)
- Creates new MIDIFile with tempo, numerator and denominator.
-
MIDIFile(double, int, int, String)
- Creates new MIDIFile with tempo, numerator, denominator and copyright.
-
MIDIFile(MIDIFile)
- Creates new MIDIFile equal to another MIDIFile.
All methods from interfaces are implemented, but not listed here!
-
copyright()
- Returns current copyright-message.
-
denominator()
- Returns current denominator.
-
numerator()
- Returns current numerator.
-
tempo()
- Returns current tempo.
-
setCopyright(String)
- Sets copyright-message.
-
setDenominator(int)
- Sets denominator.
-
setNumerator(int)
- Sets numerator.
-
setTempo(double)
- Sets tempo.
-
setTimeSignature(int, int)
- Sets numerator and denominator.
-
print(FileOutputStream)
- Writes all elements to a MIDI-file.
MIDIFile
public MIDIFile()
- Creates a new MIDIFile with 120 BPM and 4/4 TimeSignature.
MIDIFile
public MIDIFile(double tempo,
int numerator,
int denominator)
- Creates a new MIDIFile.
- Parameters:
- tempo - any double between Tempo.MIN and Tempo.MAX.
- numerator - any int between 0 and 255.
- denominator - 1, 2, 4, 8, 16, 32 or 64.
MIDIFile
public MIDIFile(double tempo,
int numerator,
int denominator,
String copyright)
- Creates a new MIDIFile.
- Parameters:
- tempo - any double between Tempo.MIN and Tempo.MAX.
- numerator - any int between 0 and 255.
- denominator - 1, 2, 4, 8, 16, 32 or 64.
- copyright - any String.
MIDIFile
protected MIDIFile(MIDIFile object)
- Creates a new MIDIFile that is a copy of object.
- Parameters:
- object - any MIDIFile.
copyright
public String copyright()
- Returns the current copyright-message.
- Returns:
- a String.
setCopyright
public void setCopyright(String text)
- Sets the copyright-message.
- Parameters:
- text - any String.
tempo
public double tempo()
- Returns the current tempo.
- Returns:
- an int between Tempo.MIN and Tempo.MAX.
setTempo
public void setTempo(double tempo)
- Sets the tempo.
- Parameters:
- tempo - any int between Tempo.MIN and Tempo.MAX.
numerator
public int numerator()
- Returns the current numerator.
- Returns:
- an int between 0 and 255.
setNumerator
public void setNumerator(int numerator)
- Sets the numerator.
- Parameters:
- numerator - any int between 0 and 255.
denominator
public int denominator()
- Returns the current denominator.
- Returns:
- 1, 2, 4, 8, 16, 32 or 64.
setDenominator
public void setDenominator(int denominator)
- Sets the denominator.
- Parameters:
- denominator - 1, 2, 4, 8, 16, 32 or 64.
setTimeSignature
public void setTimeSignature(int numerator,
int denominator)
- Sets numerator and denominator.
- Parameters:
- numerator - any int between 0 and 255.
- denominator - 1, 2, 4, 8, 16, 32 or 64.
print
public void print(FileOutputStream fpp) throws IOException
- Writes all elements to a MIDI-file.
- Parameters:
- fpp - any FileOutputStream.
Previous Next Package