public class Helpers extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
AMIGA_TABLE |
static int |
BASEFREQUENCY
Some constants
|
static int |
BASEPERIOD |
static String |
CODING_COMMANLINE |
static String |
CODING_GUI
Codepages used when reading mod files
|
static String |
CODING_M3U
Codepages used when reading playlist files
|
static String |
COPYRIGHT |
static String |
currentCoding |
static String |
DEFAULTFONTPATH |
static Font |
DIALOG_FONT |
static double |
FILTER_PRECISION |
static int |
FILTER_SHIFT_BITS |
static int[] |
FineLinearSlideDownTable
not yet used
|
static int[] |
FineLinearSlideUpTable
not yet used
|
static int |
FLTMODE_BANDPASS |
static int |
FLTMODE_HIGHPASS |
static int |
FLTMODE_LOWPASS |
static int[] |
FreqS3MTable
Basic C4 S3M/IT --> These Values are from above (Octave 0)!
|
static int[] |
ft2VibratoTable
The FT2 vibrato table
|
static String |
FULLVERSION |
static String |
HOMEDIR
HomeDir is the property of the system value "user.home".
|
static int |
IT_AMIGA_TABLE |
static int[] |
it_fineTuneTable
This table is used by the stm, s3m, it mods, manly for the
old "fineTune" effekt as they are downward compatible
calculated by 8363*2^((i-8)/(12*8))
|
static int |
IT_LINEAR_TABLE |
static String |
JAVAMOD_URL |
static int |
KEY_OFF |
static int[] |
LinearSlideDownTable
Pitch Envelope Slider Table
|
static int[] |
LinearSlideUpTable
Pitch Envelope Slider Table
|
static int[] |
lintab
Triton's linear periods to frequency translation table (for XM modules)
|
protected static int |
LOGFAC
These are the values of the first octave of the above protracker_fineTunedPeriods
This table is used by the XM_AMIGA_TABLE routine
|
static int[] |
logtab |
static int |
LOOP_IS_PINGPONG |
static int |
LOOP_ON |
static int |
LOOP_SUSTAIN_IS_PINGPONG |
static int |
LOOP_SUSTAIN_ON |
static int |
MAXVOLUME |
static int |
MAXVOLUMESHIFT |
static int[] |
ModRampDownTable
Triangle wave table (ramp down)
|
static int[] |
ModRandomTable
Random wave table
|
static int[] |
ModSinusTable
Sinus table
|
static int[] |
ModSquareTable
Square wave table (normaly useless, but this keeps the used logic the same)
|
static int |
MODTYPE_IT |
static int |
MODTYPE_MOD |
static int |
MODTYPE_S3M |
static int |
MODTYPE_XM |
static int |
NNA_CONTINUE |
static int |
NNA_CUT |
static int |
NNA_FADE |
static int |
NNA_OFF |
static int |
NOTE_CUT |
static int[] |
noteValues |
static int |
PERIOD_SHIFT |
static int |
PLAYER_LOOP_DEACTIVATED |
static int |
PLAYER_LOOP_FADEOUT |
static int |
PLAYER_LOOP_IGNORE |
static String |
PROGRAM |
static int[][] |
protracker_fineTunedPeriods
From the Protracker V2.1A Playroutine, added one Octave above and two at the end
to avoid array index overflows (mainly with arpeggios)
|
static int |
SAMPLE_SHIFT |
static String |
SCROLLY_BLANKS
VU-Meter constants
|
static int |
SHIFT |
static int |
SHIFT_MASK |
static int |
SHIFT_ONE |
static int |
SM_16BIT |
static int |
SM_ADPCM4 |
static int |
SM_IT21416 |
static int |
SM_IT2148 |
static int |
SM_IT21516 |
static int |
SM_IT2158 |
static int |
SM_PCM16D |
static int |
SM_PCM16M |
static int |
SM_PCM16S |
static int |
SM_PCM16U |
static int |
SM_PCMD |
static int |
SM_PCMS |
static int |
SM_PCMU |
static int |
SM_STEREO |
static int |
SM_STPCM16D |
static int |
SM_STPCM16M |
static int |
SM_STPCM16S |
static int |
SM_STPCM16U |
static int |
SM_STPCM8D |
static int |
SM_STPCM8S |
static int |
SM_STPCM8U |
static int |
SONG_AMIGALIMITS |
static int |
SONG_CPUVERYHIGH |
static int |
SONG_EMBEDMIDICFG |
static int |
SONG_ENDREACHED |
static int |
SONG_EXFILTERRANGE |
static int |
SONG_FADINGSONG |
static int |
SONG_FASTVOLSLIDES |
static int |
SONG_FIRSTTICK |
static int |
SONG_GLOBALFADE |
static int |
SONG_ITCOMPATMODE |
static int |
SONG_ITOLDEFFECTS |
static int |
SONG_LINEARSLIDES |
static int |
SONG_MPTFILTERMODE |
static int |
SONG_PATTERNLOOP |
static int |
SONG_PAUSED |
static int |
SONG_STEP |
static int |
SONG_SURROUNDPAN |
static int |
STM_S3M_TABLE
The frequency tables supported!
|
static Font |
TEXTAREA_FONT |
static String |
VERSION
Version Information
|
static String |
VERSION_URL |
static int |
VOL_RAMP_FRAC |
static int |
VOL_RAMP_LEN |
static int |
VOLRAMPLEN_MS |
static int |
VOLUMESHIFT |
static int |
VOLUMESHIFT_FULL |
static int |
XBASS_BUFFER |
static int |
XBASS_DELAY |
static int |
XM_AMIGA_TABLE |
static int |
XM_LINEAR_TABLE |
| Modifier and Type | Method and Description |
|---|---|
static int |
compareVersions(String v1,
String v2)
Compares two version strings
|
static int |
convert3ByteToInt(byte[] buf,
int offset)
Converts an Motorola 86000er 3 Byte to an integer
|
static int |
convertDWordToInt(byte[] buf,
int offset)
Converts an Motorola 86000er dword to an integer (most significant byte first)
|
static int |
convertIntel3ByteToInt(byte[] buf,
int offset)
Converts an Intel like stored 3 Byte to an integer
|
static int |
convertIntelDWordToInt(byte[] buf,
int offset)
Converts an Intel like stored dword to an integer (less significant byte first)
|
static int |
convertIntelWordToInt(byte[] buf,
int offset)
Converts an Intel like stored word to an integer
|
static byte[] |
convertIntToDWord(int value)
Converts an integer to an Motorola 86000er dword byte array
|
static int |
convertWordToInt(byte[] buf,
int offset)
Converts an Motorola 86000er word to an integer
|
static int |
copyFromURL(URL fromURL,
File destination,
SimpleProgessDialog bar) |
static URL |
createAbsolutePathForFile(URL baseURL,
String inputFileName)
If the baseURL provided is not absolut this method will generate an absolute file path
based on the inputFileName string
|
static String |
createLocalFileStringFromURL(URL url,
boolean stayLocal) |
static String |
createStringFomURL(URL url) |
static String |
createStringFromURLString(String url) |
static URL |
createURLfromFile(File file) |
static URL |
createURLfromString(String urlLine) |
static int |
downloadJavaMod(File destination,
SimpleProgessDialog bar) |
static String |
getAsHex(int value,
int digits)
Displays a value as a hex-value, using #digits
|
static String |
getAudioInfos()
Prints the info about all installed and available audio lines
|
static byte[] |
getBytesFromString(String str,
int length,
String coding)
Converts a string to an array of bytes with the length specified
|
static Color |
getColorFromString(String color) |
static String |
getCurrentServerVersion()
Opens a txt-File on the server containing the current populated
Version.
|
static double |
getDBValueFrom(float decimalValue)
convert from DeciBel to decimalValue
|
static double |
getDecimalValueFrom(float dbValue)
Convert from decimalValue to DeciBel
|
static Dimension |
getDimensionFromString(String dimension) |
static String |
getExtensionFrom(String fileName) |
static String |
getExtensionFromURL(URL url) |
static String |
getFileNameFrom(String fileName) |
static String |
getFileNameFromURL(URL url) |
static Point |
getFrameCenteredLocation(Component centerThis,
Component parent)
Get the location for centered Dialog
|
static GridBagConstraints |
getGridBagConstraint(int gridx,
int gridy,
int gridheight,
int gridwidth,
int fill,
int anchor,
double weightx,
double weighty) |
static GridBagConstraints |
getGridBagConstraint(int gridx,
int gridy,
int gridheight,
int gridwidth,
int fill,
int anchor,
double weightx,
double weighty,
Insets insets) |
static Insets |
getInsetsFromString(String insets) |
static long |
getMillisecondsFromTimeString(String timeString) |
static int |
getNoteIndexForPeriod(int period)
get the index for the note
|
static String |
getNoteNameToIndex(int index)
For the patterndisplay: retrieve a String for the given note index
|
static String |
getNoteNameToPeriod(int noteIndex)
For the patterndisplay: retrieve a String for the given period
|
static Point |
getPointFromString(String point) |
static String |
getPreceedingExtensionFrom(String fileName) |
static String |
getPreceedingExtensionFromURL(URL url) |
static int |
getRoundedPeriod(int period)
Get the period of the nearest halftone
|
static String |
getStringFromDimension(Dimension dimension) |
static String |
getStringFromPoint(Point location) |
static String |
getTimeStringFromMilliseconds(long millis) |
static boolean |
isEqualURL(URL url1,
URL url2)
Compares to URLs and returns true, if they are equal and OK.
|
static int |
promoteSigned16BitToSigned24Bit(int sample)
converts signed 16 bit values to signed 24 bit
|
static int |
promoteSigned16BitToUnsigned8Bit(int sample)
converts signed 16 bit values to unsigned 8 bit
|
static int |
promoteSigned24BitToUnsigned24Bit(int sample)
converts signed 24 bit values to unsigned 24 bit
|
static int |
promoteSigned8BitToSigned16Bit(byte sample)
converts signed 8 bit values to signed 16 bit
|
static int |
promoteSigned8BitToSigned24Bit(byte sample)
converts signed 8 bit values to signed 24 bit
|
static int |
promoteUnsigned16BitToSigned16Bit(int sample)
converts unsigned 16 bit values to signed 16 bit
|
static int |
promoteUnsigned16BitToSigned24Bit(int sample)
converts unsigned 16 bit values to signed 24 bit
|
static int |
promoteUnsigned24BitToSigned24Bit(int sample)
converts unsigned 16 bit values to signed 24 bit
|
static int |
promoteUnsigned8BitToSigned16Bit(byte sample)
converts unsigned 8 bit values to signed 16 bit
|
static int |
promoteUnsigned8BitToSigned24Bit(byte sample)
converts unsigned 8 bit values to signed 24 bit
|
static void |
registerAllClasses()
Registers all Classes that should not load during playback
|
static void |
registerDropListener(ArrayList<DropTarget> list,
Container basePanel,
PlaylistDropListener myListener)
Register the droplistener to all components...
|
static String |
retrieveAsString(byte[] input,
int start,
int length)
Loads a C-Type String.
|
static String |
retrieveAsString(byte[] input,
int start,
int length,
String coding)
Loads a C-Type String.
|
static FileChooserResult |
selectFileNameFor(Component parent,
String showDir,
String action,
FileFilter[] filter,
int type,
boolean multiFileSelection)
Retrieves a java.io.File object via FileChooser
|
static void |
setCoding(boolean gui)
It's ridiculous, but with the GUI we need cp850 but with
the commandline we need cp1252.
|
static boolean |
urlExists(String url)
Checks first the File exists method - will try URL than
|
static boolean |
urlExists(URL url) |
public static final String VERSION
public static final String PROGRAM
public static final String FULLVERSION
public static final String COPYRIGHT
public static final String VERSION_URL
public static final String JAVAMOD_URL
public static final String CODING_GUI
public static final String CODING_COMMANLINE
public static final String CODING_M3U
public static String currentCoding
public static final Font DIALOG_FONT
public static final String DEFAULTFONTPATH
public static String HOMEDIR
public static Font TEXTAREA_FONT
public static final int[] noteValues
public static final int[][] protracker_fineTunedPeriods
public static final int[] FreqS3MTable
public static final int[] it_fineTuneTable
public static final int[] FineLinearSlideUpTable
public static final int[] FineLinearSlideDownTable
public static final int[] LinearSlideUpTable
public static final int[] LinearSlideDownTable
protected static final int LOGFAC
public static final int[] logtab
public static final int[] lintab
public static final int[] ModSinusTable
public static final int[] ModRampDownTable
public static final int[] ModSquareTable
public static final int[] ModRandomTable
public static final int[] ft2VibratoTable
public static final int BASEFREQUENCY
public static final int BASEPERIOD
public static final String SCROLLY_BLANKS
public static final int STM_S3M_TABLE
public static final int IT_LINEAR_TABLE
public static final int AMIGA_TABLE
public static final int XM_AMIGA_TABLE
public static final int XM_LINEAR_TABLE
public static final int IT_AMIGA_TABLE
public static final int VOLUMESHIFT
public static final int VOLUMESHIFT_FULL
public static final int MAXVOLUME
public static final int MAXVOLUMESHIFT
public static final int SHIFT
public static final int SHIFT_ONE
public static final int SHIFT_MASK
public static final int PERIOD_SHIFT
public static final int SAMPLE_SHIFT
public static final int VOL_RAMP_FRAC
public static final int VOL_RAMP_LEN
public static final int VOLRAMPLEN_MS
public static final int XBASS_DELAY
public static final int XBASS_BUFFER
public static final int MODTYPE_MOD
public static final int MODTYPE_XM
public static final int MODTYPE_S3M
public static final int MODTYPE_IT
public static final int SM_PCMS
public static final int SM_PCMU
public static final int SM_PCMD
public static final int SM_ADPCM4
public static final int SM_16BIT
public static final int SM_STEREO
public static final int SM_PCM16S
public static final int SM_PCM16U
public static final int SM_PCM16D
public static final int SM_PCM16M
public static final int SM_STPCM8S
public static final int SM_STPCM8U
public static final int SM_STPCM8D
public static final int SM_STPCM16S
public static final int SM_STPCM16U
public static final int SM_STPCM16D
public static final int SM_STPCM16M
public static final int SM_IT2148
public static final int SM_IT21416
public static final int SM_IT2158
public static final int SM_IT21516
public static final int LOOP_ON
public static final int LOOP_SUSTAIN_ON
public static final int LOOP_IS_PINGPONG
public static final int LOOP_SUSTAIN_IS_PINGPONG
public static final int NNA_CUT
public static final int NNA_CONTINUE
public static final int NNA_OFF
public static final int NNA_FADE
public static final int KEY_OFF
public static final int NOTE_CUT
public static final int FLTMODE_LOWPASS
public static final int FLTMODE_HIGHPASS
public static final int FLTMODE_BANDPASS
public static final int FILTER_SHIFT_BITS
public static final double FILTER_PRECISION
public static final int SONG_EMBEDMIDICFG
public static final int SONG_FASTVOLSLIDES
public static final int SONG_ITOLDEFFECTS
public static final int SONG_ITCOMPATMODE
public static final int SONG_LINEARSLIDES
public static final int SONG_PATTERNLOOP
public static final int SONG_STEP
public static final int SONG_PAUSED
public static final int SONG_FADINGSONG
public static final int SONG_ENDREACHED
public static final int SONG_GLOBALFADE
public static final int SONG_CPUVERYHIGH
public static final int SONG_FIRSTTICK
public static final int SONG_MPTFILTERMODE
public static final int SONG_SURROUNDPAN
public static final int SONG_EXFILTERRANGE
public static final int SONG_AMIGALIMITS
public static final int PLAYER_LOOP_DEACTIVATED
public static final int PLAYER_LOOP_FADEOUT
public static final int PLAYER_LOOP_IGNORE
public static void setCoding(boolean gui)
gui - public static String getNoteNameToIndex(int index)
index - public static String getNoteNameToPeriod(int noteIndex)
period - public static int getNoteIndexForPeriod(int period)
period - public static int getRoundedPeriod(int period)
period - public static String retrieveAsString(byte[] input, int start, int length)
input - start - length - public static String retrieveAsString(byte[] input, int start, int length, String coding)
input - start - length - coding - public static byte[] getBytesFromString(String str, int length, String coding)
str - the string to convertlength - the size of the byte arraypublic static String getAsHex(int value, int digits)
value - digits - public static int convertIntelWordToInt(byte[] buf,
int offset)
buf - offset - public static int convertIntel3ByteToInt(byte[] buf,
int offset)
buf - offset - public static int convertIntelDWordToInt(byte[] buf,
int offset)
buf - offset - public static int convertWordToInt(byte[] buf,
int offset)
buf - offset - public static int convert3ByteToInt(byte[] buf,
int offset)
buf - offset - public static int convertDWordToInt(byte[] buf,
int offset)
buf - offset - public static byte[] convertIntToDWord(int value)
value - offset - public static int promoteSigned8BitToSigned16Bit(byte sample)
sample - public static int promoteSigned8BitToSigned24Bit(byte sample)
sample - public static int promoteSigned16BitToSigned24Bit(int sample)
sample - public static int promoteUnsigned8BitToSigned16Bit(byte sample)
sample - public static int promoteUnsigned16BitToSigned16Bit(int sample)
sample - public static int promoteUnsigned8BitToSigned24Bit(byte sample)
sample - public static int promoteUnsigned16BitToSigned24Bit(int sample)
sample - public static int promoteUnsigned24BitToSigned24Bit(int sample)
sample - public static int promoteSigned16BitToUnsigned8Bit(int sample)
sample - public static int promoteSigned24BitToUnsigned24Bit(int sample)
sample - public static GridBagConstraints getGridBagConstraint(int gridx, int gridy, int gridheight, int gridwidth, int fill, int anchor, double weightx, double weighty)
gridx - gridy - gridheight - gridwidth - fill - anchor - weightx - weighty - public static GridBagConstraints getGridBagConstraint(int gridx, int gridy, int gridheight, int gridwidth, int fill, int anchor, double weightx, double weighty, Insets insets)
public static Point getFrameCenteredLocation(Component centerThis, Component parent)
centerThis - public static void registerDropListener(ArrayList<DropTarget> list, Container basePanel, PlaylistDropListener myListener)
list - ArrayList of resulting DropTarget-ClassesbasePanel - myListener - public static boolean isEqualURL(URL url1, URL url2)
url1 - url2 - URISyntaxExceptionpublic static URL createURLfromFile(File file)
file - public static URL createURLfromString(String urlLine)
urlLine - public static String createLocalFileStringFromURL(URL url, boolean stayLocal)
public static boolean urlExists(URL url)
public static boolean urlExists(String url)
url - public static URL createAbsolutePathForFile(URL baseURL, String inputFileName)
baseURL - fileName - public static FileChooserResult selectFileNameFor(Component parent, String showDir, String action, FileFilter[] filter, int type, boolean multiFileSelection)
parent - can be null. If not, the filechooser is centered to the componentshowDir - can be null. Is the start directory to begin the search or a preselected fileaction - a String for the "open File"-Buttonfilter - a FileChooserFiltertype - 0=load-Mod 1=save-modemultiFileSelection - true: multiple Files can be selectedpublic static String getStringFromPoint(Point location)
location - public static Point getPointFromString(String point)
point - public static String getStringFromDimension(Dimension dimension)
location - public static Dimension getDimensionFromString(String dimension)
point - public static Insets getInsetsFromString(String insets)
insets - public static Color getColorFromString(String color)
color - public static String getTimeStringFromMilliseconds(long millis)
millis - public static double getDecimalValueFrom(float dbValue)
dbValue - public static double getDBValueFrom(float decimalValue)
decimalValue - public static long getMillisecondsFromTimeString(String timeString)
timeString - public static String getAudioInfos()
public static void registerAllClasses()
throws ClassNotFoundException
ClassNotFoundExceptionpublic static String getCurrentServerVersion()
public static int compareVersions(String v1, String v2)
v1 - v2 - public static int downloadJavaMod(File destination, SimpleProgessDialog bar)
destination - bar - A JProgressBar or nullpublic static int copyFromURL(URL fromURL, File destination, SimpleProgessDialog bar)
destination - fromURL - Copyright © 2014. All rights reserved.