var Scale = new Class({
    initialize: function(degrees, tuning) {
        this.degrees = degrees;
        this.tuning = tuning || new EqualTemperamentTuning(12);
    },

    getFrequency: function(degree, rootFrequency, octave) {
        var frequency = rootFrequency;
        frequency *= Math.pow(this.tuning.octaveRatio, octave);
        frequency *= this.tuning.ratios[this.degrees[degree]];
        return frequency;
    }
});

@@ -260,24 +260,123 @@
 tFrequency;%0A
+        octave += Math.floor(degree / this.degrees.length);%0A        degree %25= this.degrees.length;%0A
         freq

Make scale automatically wrap high degrees to higher octaves.