public final class ScalaFile
extends java.lang.Object
Constructor and Description |
---|
ScalaFile(java.lang.String scalaFile)
Reads a Scala file from disk and returns a new instance.
|
ScalaFile(java.lang.String desc,
double[] notes)
Create a new Scala file object.
|
ScalaFile(java.lang.String desc,
double[] notes,
java.lang.String[] names)
Create a new Scala file object.
|
Modifier and Type | Method and Description |
---|---|
ScalaFile |
findClosest(java.util.List<ScalaFile> haystack)
In a list of scala files it finds the closest one.
|
java.lang.String |
getDescription() |
java.util.List<java.lang.Integer> |
getIntervals(boolean onlyUniqeIntervals) |
double[] |
getPitches() |
java.lang.String[] |
getPitchNames() |
boolean |
hasNames() |
void |
setDescription(java.lang.String newDescription) |
java.lang.String |
toString() |
static ScalaFile |
westernTuning() |
void |
write(java.lang.String scalaFile)
Writes a Scala file to disk.
|
public ScalaFile(java.lang.String desc, double[] notes, java.lang.String[] names)
desc
- The description of the tone scale.notes
- The pitches (notes) used in the scale.names
- The names of the notes used (or null).public ScalaFile(java.lang.String desc, double[] notes)
desc
- The description of the tone scale.notes
- The pitches (notes) used in the scale.public ScalaFile(java.lang.String scalaFile)
The Scala
scale file format:
Usually it has .scl
as extension.
scalaFile
- The Scala file to read.public void write(java.lang.String scalaFile)
The Scala
scale file format:
Usually it has .scl
as extension.
scalaFile
- The location to write to.public java.lang.String toString()
toString
in class java.lang.Object
public double[] getPitches()
public java.lang.String getDescription()
public void setDescription(java.lang.String newDescription)
public java.lang.String[] getPitchNames()
public boolean hasNames()
public static ScalaFile westernTuning()
public ScalaFile findClosest(java.util.List<ScalaFile> haystack)
haystack
- a list of Scala files.public java.util.List<java.lang.Integer> getIntervals(boolean onlyUniqeIntervals)