[Bluemusic-commits] SF.net SVN: bluemusic:[4201] blue/trunk/blue-core/src/blue/soundObject/ pianoRo
Brought to you by:
kunstmusik
|
From: <kun...@us...> - 2010-04-07 02:59:49
|
Revision: 4201
http://bluemusic.svn.sourceforge.net/bluemusic/?rev=4201&view=rev
Author: kunstmusik
Date: 2010-04-07 02:59:43 +0000 (Wed, 07 Apr 2010)
Log Message:
-----------
made getTET always return new scale in to prevent issues with shared scale have base freq changed
Modified Paths:
--------------
blue/trunk/blue-core/src/blue/soundObject/pianoRoll/Scale.java
Modified: blue/trunk/blue-core/src/blue/soundObject/pianoRoll/Scale.java
===================================================================
--- blue/trunk/blue-core/src/blue/soundObject/pianoRoll/Scale.java 2010-04-07 02:48:51 UTC (rev 4200)
+++ blue/trunk/blue-core/src/blue/soundObject/pianoRoll/Scale.java 2010-04-07 02:59:43 UTC (rev 4201)
@@ -37,21 +37,7 @@
*/
public class Scale implements Serializable {
- private static Scale TWELVE_TET;
- static {
- TWELVE_TET = new Scale();
-
- TWELVE_TET.scaleName = "12TET";
- TWELVE_TET.ratios = new float[12];
-
- double ratio = Math.pow(2.0, 1.0 / 12.0);
-
- for (int i = 0; i < TWELVE_TET.ratios.length; i++) {
- TWELVE_TET.ratios[i] = (float) Math.pow(ratio, i);
- }
- }
-
private String scaleName = "";
private float[] ratios;
@@ -128,7 +114,18 @@
}
public static Scale get12TET() {
- return TWELVE_TET;
+ Scale retrVal = new Scale();
+
+ retrVal.scaleName = "12TET";
+ retrVal.ratios = new float[12];
+
+ double ratio = Math.pow(2.0, 1.0 / 12.0);
+
+ for (int i = 0; i < retrVal.ratios.length; i++) {
+ retrVal.ratios[i] = (float) Math.pow(ratio, i);
+ }
+
+ return retrVal;
}
private static float getMultiplier(String lineInput) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|