[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sc-devel] Scale





I realised that my former mail is a bit confusing.

What I meant is that it's nice to write the scales in this form:

[2,2,1,2,2,2,1]

And get them returned in this form:

[ 1.1224620483094, 1.2599210498949, 1.33483985417, 1.4983070768767, 1.6817928305074, 1.8877486253634, 2 ]

i.e. ratios and not midinotes.

the methods in Lance's Scale do this beautifully

t

---------------



Hey Tim

That's nice.

Now the question is whether the scales should be written in the form of 

[2,2,1,2,2,2,1]

or

[0,2,4,5,7,9,11]

(both ionian scales).

I prefer the former. It means that in a 12 tone scale, 2 means a whole note,
1 means half note.

Then, for the maqams one just writes 3 for 3/4th note. (in a 24 tone tuning).

This is better than dealing with these as midinote numbers IMHO.

thor




On second thought, here's a version that does a lot better at mimicking
normal object behavior:

ScaleTest {

classvar scaleDict;

var <>stepRatios;

*initClass {
scaleDict = IdentityDictionary[
\ionian -> [2, 2, 1, 2, 2, 2, 1],
\aeolian -> [2, 1, 2, 2, 1, 2, 2],
// etc.
];
}

*new {
|key|
var newScale;
newScale = super.new;
^key.notNil.if({ newScale.init(key) }, { newScale })
}

init {
|key|
stepRatios = scaleDict[key];
^stepRatios.isNil.if({ nil }, { this })
}

*doesNotUnderstand {
|selector, args|
^(scaleDict.includesKey(selector)).if({
this.new(selector)
}, {
super.doesNotUnderstand(selector, args)
})
}
}

-- 


_______________________________________________
Sc-devel mailing list