Scales from Scala files

Hello,

I have a hard time finding out how scales and tunings work in Supercollider. How can I build a scale in Supercollider from the data given in a Scala file - and then use that scale in Pbind?

For example from this Scala file:

!tetrany_1_4__3_5_7_9.scl
!
Tetrany (1,4) (3,5,7,9)
4
!
182.403696
498.044980
764.915907
2/1
! Created with the iOS app "Wilsonic" by Marcus Hobbs
!
! The 1/1 is explicitly added by the Scala tuning file format
! There is no 1/1 in a Tetrany, so we normalize by the first term
! 0.000000 ==> (9/9) ==> 1.12
! 182.403696 ==> (5/9) ==> 1.25
! 498.044980 ==> (3/9) ==> 1.5
! 764.915907 ==> (7/9) ==> 1.75

Any help would be appreciated. Thank you.

try:

a = Scale([0, 1, 2, 3], pitchesPerOctave:4, tuning:Tuning([0, 182.403696, 498.044980, 764.915907]/100))

then

Pbind(\scale, a, ..... )

Tuning expects units of midinotes so we need to divide the cents in your example by 100. We also need to add the first 0 degree explicitly (Scala does this implicitly)

there is also a nice Quark that lets you open scala files directily IIRC called TuningLib

evaluate Quarks.install("TuningLib") to check it out

2 Likes

Not sure if it is what you are looking for, but another option would be trying out my mitola quark: GitHub - shimpe/mitola: supercollider quark for microtonal music composition; microtonal counterpart to panola

1 Like

thank you so much, this works!

Thank you for this suggestion. I am sure this works very well. Unfortunately, it is beyond my capabilities to use the quark.