|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vwp.sound.mod.modplay.loader.ModUnits
public class ModUnits
Conversions between notes, rates and periods used by .MODs
Field Summary | |
---|---|
static java.lang.String |
NAME
|
static double |
NEW_MAX_PERIOD
The "new" maximum period |
static double |
NEW_MIN_PERIOD
The "new" minimum period |
static double |
NTSC
the clock frequency used by NTSC amiga machines |
static double |
PAL
the clock frequency used by PAL amiga machines |
static double |
TRADITIONAL_MAX_PERIOD
The traditional maximum period |
static double |
TRADITIONAL_MIN_PERIOD
The traditional minimum period |
Constructor Summary | |
---|---|
ModUnits(double amigaClock,
boolean traditional)
|
Method Summary | |
---|---|
double |
addPeriod(double note,
double period)
adds a period value to a note value |
double |
getAmigaClock()
|
double |
getLowerNoteLimit()
gets the lowest note that can be played in a module |
java.lang.String |
getName()
|
double |
getUpperNoteLimit()
gets the highest note that can be played in a module |
double |
note2period(double note)
converts a note value to a period value |
double |
note2rate(double note)
converts a note value to a rate value |
double |
period2note(double period)
converts a period value to a note value |
double |
period2rate(double period)
|
double |
rate2note(double rate)
converts a rate value to a note value |
double |
rate2period(double rate)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String NAME
public static final double TRADITIONAL_MAX_PERIOD
public static final double TRADITIONAL_MIN_PERIOD
public static final double NEW_MAX_PERIOD
public static final double NEW_MIN_PERIOD
public static final double PAL
public static final double NTSC
Constructor Detail |
---|
public ModUnits(double amigaClock, boolean traditional)
amigaClock
- the clock-frequency of the machine where the module was
createdtraditional
- if true: use traditional octaves 1 - 3, if false: use octaves
0 - 4Method Detail |
---|
public double period2rate(double period)
public double rate2period(double rate)
public double period2note(double period)
ModuleUnits
period2note
in interface ModuleUnits
public double note2period(double note)
ModuleUnits
note2period
in interface ModuleUnits
public double note2rate(double note)
ModuleUnits
note2rate
in interface ModuleUnits
public double rate2note(double rate)
ModuleUnits
rate2note
in interface ModuleUnits
public double addPeriod(double note, double period)
ModuleUnits
addPeriod
in interface ModuleUnits
public double getUpperNoteLimit()
ModuleUnits
getUpperNoteLimit
in interface ModuleUnits
public double getLowerNoteLimit()
ModuleUnits
getLowerNoteLimit
in interface ModuleUnits
public double getAmigaClock()
public java.lang.String getName()
getName
in interface ModuleUnits
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |