Modifier and Type | Field and Description |
---|---|
private static java.util.HashMap<java.lang.String,java.lang.String> |
generalInfo
Data structure for general information of the currently loaded soundfont.
|
private static javax.sound.midi.Soundbank |
soundfont
The currently loaded user-defined soundfont.
|
private static java.io.File |
soundfontFile
The successfully loaded soundfont file.
|
private static java.util.ArrayList<java.util.HashMap<java.lang.String,java.lang.String>> |
soundfontInstruments
Data structure for instruments and drum kits of the currently loaded soundfont.
|
private static java.util.ArrayList<java.util.HashMap<java.lang.String,java.lang.Object>> |
soundfontResources
Data structure for resources of the currently loaded soundfont.
|
Constructor and Description |
---|
SoundfontParser() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getFileName()
Returns the base name of the successfully loaded custom soundfont file.
|
static java.lang.String |
getFilePath()
Returns the absolute path of the successfully loaded custom soundfont file.
|
static java.util.HashMap<java.lang.String,java.lang.String> |
getSoundfontInfo()
Returns general information from the currently loaded soundfont.
|
static java.util.ArrayList<java.util.HashMap<java.lang.String,java.lang.String>> |
getSoundfontInstruments()
Returns instruments and drum kits from the currently loaded soundfont.
|
static java.util.ArrayList<java.util.HashMap<java.lang.String,java.lang.Object>> |
getSoundfontResources()
Returns resources from the currently loaded soundfont.
|
private static java.lang.String |
makeNumberRangeString(java.util.ArrayList<java.lang.Integer> list)
Transforms a list of numbers into a String describing these numbers in ranges.
|
void |
parse(java.io.File file)
Parses a soundfont file.
|
private static void |
parseSoundfontInfo()
Retrieves general information from the currently loaded soundfont.
|
private static void |
parseSoundfontInstruments()
Retrieves instruments and drum kits from the currently loaded soundfont.
|
static void |
parseSoundfontResources()
Retrieves resources from the soundfont.
|
private static javax.sound.midi.Soundbank soundfont
The currently loaded user-defined soundfont.
private static java.io.File soundfontFile
The successfully loaded soundfont file.
private static java.util.HashMap<java.lang.String,java.lang.String> generalInfo
Data structure for general information of the currently loaded soundfont.
private static java.util.ArrayList<java.util.HashMap<java.lang.String,java.lang.String>> soundfontInstruments
Data structure for instruments and drum kits of the currently loaded soundfont.
private static java.util.ArrayList<java.util.HashMap<java.lang.String,java.lang.Object>> soundfontResources
Data structure for resources of the currently loaded soundfont.
public void parse(java.io.File file) throws ParseException
Parses a soundfont file.
parse
in interface IParser
file
- Soundfont file chosen by the user.ParseException
- If the file can not be loaded correctly.public static java.lang.String getFileName()
Returns the base name of the successfully loaded custom soundfont file. If no custom soundfont is loaded successfully, null is returned.
public static java.lang.String getFilePath()
Returns the absolute path of the successfully loaded custom soundfont file. If no custom soundfont is loaded successfully, null is returned.
public static java.util.HashMap<java.lang.String,java.lang.String> getSoundfontInfo()
Returns general information from the currently loaded soundfont.
public static java.util.ArrayList<java.util.HashMap<java.lang.String,java.lang.String>> getSoundfontInstruments()
Returns instruments and drum kits from the currently loaded soundfont.
public static java.util.ArrayList<java.util.HashMap<java.lang.String,java.lang.Object>> getSoundfontResources()
Returns resources from the currently loaded soundfont.
private static void parseSoundfontInfo()
Retrieves general information from the currently loaded soundfont.
private static void parseSoundfontInstruments()
Retrieves instruments and drum kits from the currently loaded soundfont.
public static void parseSoundfontResources()
Retrieves resources from the soundfont.
private static java.lang.String makeNumberRangeString(java.util.ArrayList<java.lang.Integer> list)
Transforms a list of numbers into a String describing these numbers in ranges.
E.g. the list (2, 5, 6, 7, 8, 9, 11, 15, 16, 17, 20) would result in the string 2, 5-9, 11, 15-17, 20
list
- Sorted list of numbers.