Scales in Sonic Pi

is there a way to see a list of all the scales that are supported in SP?
acem_asiran, :acem_kurdi, :acemli_rast, :aeolian, :ahirbhairav, :augmented, :augmented2, :bartok, :bayati, :bayati_2,bayati_araban, :bestenigar, :bhairav, :blues_major, :blues_minor, :buselik, :buselik_2, :cargah, :chinese, :chromatic, :diatonic, :diminished, :diminished2, :dorian, :dugah, :dugah_2, :egyptian, :enigmatic, :evcara, :evcara_2, :evcara_3, :evcara_4, :evic, :evic_2, :ferahfeza, :ferahfeza_2, :ferahnak, :gong, :gulizar, :harmonic_major, :harmonic_minor, :hex_aeolian, :hex_dorian, :hex_major6, :hex_major7, :hex_phrygian, :hex_sus, :hicaz, :hicaz_2, :hicaz_humayun, :hicaz_humayun_2, :hicazkar, :hicazkar_2, :hindu, :hirajoshi, :hungarian_minor, :huseyni, :huseyni_2, :huzzam, :huzzam_2, :indian, :ionian, :isfahan, :isfahan_2, :iwato, :jiao, :karcigar, :kumoi, :kurdi, :kurdili_hicazkar, :kurdili_hicazkar_2, :kurdili_hicazkar_3, :kurdili_hicazkar_4, :kurdili_hicazkar_5, :leading_whole, :locrian, :locrian_major, :lydian, :lydian_minor, :mahur, :major, :major_pentatonic, :marva, :melodic_major, :melodic_minor, :melodic_minor_asc, :melodic_minor_desc, :messiaen1, :messiaen2, :messiaen3, :messiaen4, :messiaen5, :messiaen6, :messiaen7, :minor, :minor_pentatonic, :mixolydian, :muhayyer, :neapolitan_major, :neapolitan_minor, :neva, :neva_2, :nihavend, :nihavend_2, :octatonic, :pelog, :phrygian, :prometheus, :purvi, :rast, :ritusen, :romanian_minor, :saba, :scriabin, :sedaraban, :sedaraban_2, :segah, :segah_2, :sehnaz, :sehnaz_2, :sehnaz_3, :sehnaz_4, :sevkefza, :sevkefza_2, :sevkefza_3, :shang, :spanish, :sultani_yegah, :sultani_yegah_2, :super_locrian, :suzidil, :suzidil_2, :suznak, :suznak_2, :tahir, :tahir_2, :todi, :ussak, :uzzal, :uzzal_2, :whole, :whole_tone, :yegah, :yegah_2, :yu, :zhi, :zirguleli_hicaz, :zirguleli_hicaz_2, :zirguleli_suznak, :zirguleli_suznak_2, :zirguleli_suznak_3
is this complete? couldnt find info on it in the tutorial. enjoying microtonal music and want to work with it in SP
thanks!

There is a function scale_names
However as there 151 scales in the release version of 4.5 (puts scale_names.length) you can’t do puts scale_names as the string is too long to show in the log.
However you can do

k= scale_names
k.each do |x|
  puts x
end
puts k.length

to print them one by one in the log.

oh thanks… so nobody really knows what scales are supported unless one goes through this one by one ? The title of my next novel: β€œSonic PI and the case of the mysterious scales” :slight_smile:

Don’t see the problem. This list is available. You can do further string manipulation to get it say in groups of 10 if you dont like the list one below the other.
For example I copied the list from the log and then manipulated it to give ring with 5 entries per line which is manageable to see in a program window on Sonic Pi.

I also did a little loop which prints out the scale name and the note offsets for that scale in groups of 10. This for example, immediately lets ytou see which scales are microtonal.

scNames = (
  ring :acem_asiran, :acem_kurdi, :acemli_rast, :aeolian, :ahirbhairav,\
  :augmented, :augmented2, :bartok, :bayati, :bayati_2,\
  :bayati_araban, :bestenigar, :bhairav, :blues_major,\
  :blues_minor, :buselik, :buselik_2, :cargah, :chinese,\
  :chromatic, :diatonic, :diminished, :diminished2, :dorian,\
  :dugah, :dugah_2, :egyptian, :enigmatic, :evcara,\
  :evcara_2, :evcara_3, :evcara_4, :evic, :evic_2,\
  :ferahfeza, :ferahfeza_2, :ferahnak, :gong, :gulizar,\
  :harmonic_major, :harmonic_minor, :hex_aeolian, :hex_dorian,\
  :hex_major6, :hex_major7, :hex_phrygian, :hex_sus, :hicaz,\
  :hicaz_2, :hicaz_humayun, :hicaz_humayun_2, :hicazkar, :hicazkar_2,\
  :hindu, :hirajoshi, :hungarian_minor, :huseyni, :huseyni_2,\
  :huzzam, :huzzam_2, :indian, :ionian, :isfahan,\
  :isfahan_2, :iwato, :jiao, :karcigar, :kumoi,\
  :kurdi, :kurdili_hicazkar, :kurdili_hicazkar_2, :kurdili_hicazkar_3, :kurdili_hicazkar_4,\
  :kurdili_hicazkar_5, :leading_whole, :locrian, :locrian_major, :lydian,\
  :lydian_minor, :mahur, :major, :major_pentatonic, :marva,\
  :melodic_major, :melodic_minor, :melodic_minor_asc, :melodic_minor_desc, :messiaen1,\
  :messiaen2, :messiaen3, :messiaen4, :messiaen5, :messiaen6,\
  :messiaen7, :minor, :minor_pentatonic, :mixolydian, :muhayyer,\
  :neapolitan_major, :neapolitan_minor, :neva, :neva_2, :nihavend,\
  :nihavend_2, :octatonic, :pelog, :phrygian, :prometheus,\
  :purvi, :rast, :ritusen, :romanian_minor, :saba,\
  :scriabin, :sedaraban, :sedaraban_2, :segah, :segah_2,\
  :sehnaz, :sehnaz_2, :sehnaz_3, :sehnaz_4, :sevkefza,\
  :sevkefza_2, :sevkefza_3, :shang, :spanish, :sultani_yegah,\
  :sultani_yegah_2, :super_locrian, :suzidil, :suzidil_2,\
  :suznak, :suznak_2, :tahir, :tahir_2, :todi,\
  :ussak, :uzzal, :uzzal_2, :whole, :whole_tone,\
  :yegah, :yegah_2, :yu, :zhi, :zirguleli_hicaz,\
  :zirguleli_hicaz_2, :zirguleli_suznak, :zirguleli_suznak_2, :zirguleli_suznak_3
)


scNames.each_with_index do |nv,i|
  puts i,nv,scale(nv).notes
  sleep 0.1 if i%10==0
end

This gives output in the log window:

{run: 101, time: 0.0}
 └─ 0 :acem_asiran [0, 2.0377358490566038, 4.0754716981132075, 4.981132075471698, 7.018867924528301, 9.056603773584905, 11.09433962264151, 12.0]
 
{run: 101, time: 0.1026}
 β”œβ”€ 1 :acem_kurdi [0, 0.9056603773584906, 2.9433962264150946, 4.981132075471699, 7.018867924528303, 9.056603773584907, 9.962264150943398, 12.000000000000002]
 β”œβ”€ 2 :acemli_rast [0, 2.0377358490566038, 3.849056603773585, 4.981132075471698, 7.018867924528301, 9.056603773584905, 9.962264150943396, 12.0]
 β”œβ”€ 3 :aeolian [0, 2, 3, 5, 7, 8, 10, 12]
 β”œβ”€ 4 :ahirbhairav [0, 1, 4, 5, 7, 9, 10, 12]
 β”œβ”€ 5 :augmented [0, 3, 4, 7, 8, 11, 12]
 β”œβ”€ 6 :augmented2 [0, 1, 4, 5, 8, 9, 12]
 β”œβ”€ 7 :bartok [0, 2, 4, 5, 7, 8, 10, 12]
 β”œβ”€ 8 :bayati [0, 1.8113207547169812, 2.9433962264150946, 4.981132075471699, 7.018867924528303, 7.924528301886793, 9.962264150943398, 12.000000000000002]
 β”œβ”€ 9 :bayati_2 [0, 1.8113207547169812, 2.9433962264150946, 4.981132075471699, 7.018867924528303, 7.924528301886793, 9.962264150943398, 12.000000000000002, 12.905660377358492, 14.943396226415096, 16.9811320754717]
 └─ 10 :bayati_araban [0, 1.8113207547169812, 2.9433962264150946, 4.981132075471699, 6.113207547169812, 8.830188679245284, 9.962264150943398, 12.000000000000002, 12.905660377358492, 14.943396226415096, 16.9811320754717]
 
{run: 101, time: 0.2002}
 β”œβ”€ 11 :bestenigar [0, 1.1320754716981132, 3.169811320754717, 4.981132075471699, 6.113207547169812, 7.245283018867925, 9.962264150943398, 11.094339622641511, 13.132075471698116, 14.26415094339623, 16.981132075471702, 18.113207547169814]
 β”œβ”€ 12 :bhairav [0, 1, 4, 5, 7, 8, 11, 12]
 β”œβ”€ 13 :blues_major [0, 2, 3, 4, 7, 9, 12]
 β”œβ”€ 14 :blues_minor [0, 3, 5, 6, 7, 10, 12]
 β”œβ”€ 15 :buselik [0, 2.0377358490566038, 2.9433962264150946, 4.981132075471699, 7.018867924528303, 7.924528301886793, 9.962264150943398, 12.000000000000002]
 β”œβ”€ 16 :buselik_2 [0, 2.0377358490566038, 2.9433962264150946, 4.981132075471699, 7.018867924528303, 8.150943396226417, 10.867924528301888, 12.000000000000002]
 β”œβ”€ 17 :cargah [0, 2.0377358490566038, 4.0754716981132075, 4.981132075471698, 7.018867924528301, 9.056603773584905, 11.09433962264151, 12.0]
 β”œβ”€ 18 :chinese [0, 4, 6, 7, 11, 12]
 β”œβ”€ 19 :chromatic [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
 └─ 20 :diatonic [0, 2, 4, 5, 7, 9, 11, 12]
 
{run: 101, time: 0.3018}
 β”œβ”€ 21 :diminished [0, 1, 3, 4, 6, 7, 9, 10, 12]
 β”œβ”€ 22 :diminished2 [0, 2, 3, 5, 6, 8, 9, 11, 12]
 β”œβ”€ 23 :dorian [0, 2, 3, 5, 7, 9, 10, 12]
 β”œβ”€ 24 :dugah [0, 1.8113207547169812, 2.9433962264150946, 4.0754716981132075, 6.7924528301886795, 7.9245283018867925, 9.962264150943396, 11.09433962264151, 13.81132075471698, 14.943396226415095]
 β”œβ”€ 25 :dugah_2 [0, 1.1320754716981132, 3.849056603773585, 4.981132075471698, 7.018867924528301, 8.150943396226415, 10.867924528301888, 12.000000000000002]
 β”œβ”€ 26 :egyptian [0, 2, 5, 7, 10, 12]
 β”œβ”€ 27 :enigmatic [0, 1, 4, 6, 8, 10, 11, 12]
 β”œβ”€ 28 :evcara [0, 1.1320754716981132, 3.849056603773585, 4.981132075471698, 7.018867924528301, 8.150943396226415, 10.867924528301888, 12.000000000000002]
 β”œβ”€ 29 :evcara_2 [0, 1.1320754716981132, 3.849056603773585, 4.981132075471698, 7.018867924528301, 8.150943396226415, 10.867924528301888, 12.000000000000002, 14.037735849056606, 15.16981132075472, 16.981132075471702]
 └─ 30 :evcara_3 [0, 1.1320754716981132, 3.849056603773585, 4.981132075471698, 7.018867924528301, 8.150943396226415, 10.867924528301888, 12.000000000000002, 13.132075471698116, 15.16981132075472, 17.207547169811324, 18.113207547169814]
 
{run: 101, time: 0.3994}
 β”œβ”€ 31 :evcara_4 [0, 1.1320754716981132, 3.849056603773585, 4.981132075471698, 7.018867924528301, 8.150943396226415, 10.867924528301888, 12.000000000000002, 13.132075471698116, 15.16981132075472, 16.981132075471702, 18.113207547169814]
 β”œβ”€ 32 :evic [0, 1.1320754716981132, 3.169811320754717, 4.981132075471699]
 β”œβ”€ 33 :evic_2 [0, 1.1320754716981132, 3.169811320754717, 4.981132075471699, 6.113207547169812]
 β”œβ”€ 34 :ferahfeza [0, 2.0377358490566038, 2.9433962264150946, 4.981132075471699, 7.018867924528303, 8.150943396226417, 10.867924528301888, 12.000000000000002]
 β”œβ”€ 35 :ferahfeza_2 [0, 2.0377358490566038, 2.9433962264150946, 4.981132075471699, 7.018867924528303, 8.830188679245284, 9.962264150943398, 12.000000000000002]
 β”œβ”€ 36 :ferahnak [0, 1.1320754716981132, 3.169811320754717, 5.2075471698113205, 7.018867924528301, 8.150943396226415, 10.867924528301888, 12.000000000000002]
 β”œβ”€ 37 :gong [0, 2, 4, 7, 9, 12]
 β”œβ”€ 38 :gulizar [0, 1.8113207547169812, 2.9433962264150946, 4.981132075471699, 7.018867924528303, 8.830188679245284, 9.962264150943398, 12.000000000000002]
 β”œβ”€ 39 :harmonic_major [0, 2, 4, 5, 7, 8, 11, 12]
 └─ 40 :harmonic_minor [0, 2, 3, 5, 7, 8, 11, 12]
 
{run: 101, time: 0.501}
 β”œβ”€ 41 :hex_aeolian [0, 3, 5, 7, 8, 10, 12]
 β”œβ”€ 42 :hex_dorian [0, 2, 3, 5, 7, 10, 12]
 β”œβ”€ 43 :hex_major6 [0, 2, 4, 5, 7, 9, 12]
 β”œβ”€ 44 :hex_major7 [0, 2, 4, 7, 9, 11, 12]
 β”œβ”€ 45 :hex_phrygian [0, 1, 3, 5, 8, 10, 12]
 β”œβ”€ 46 :hex_sus [0, 2, 5, 7, 9, 10, 12]
 β”œβ”€ 47 :hicaz [0, 1.1320754716981132, 3.849056603773585, 4.981132075471698, 7.018867924528301, 8.830188679245282, 9.962264150943396, 12.0]
 β”œβ”€ 48 :hicaz_2 [0, 1.1320754716981132, 3.849056603773585, 4.981132075471698, 7.018867924528301, 8.830188679245282, 9.962264150943396, 12.0, 14.037735849056604, 14.943396226415095, 16.9811320754717]
 β”œβ”€ 49 :hicaz_humayun [0, 1.1320754716981132, 3.849056603773585, 4.981132075471698, 7.018867924528301, 7.924528301886792, 9.962264150943396, 12.0]
 └─ 50 :hicaz_humayun_2 [0, 1.1320754716981132, 3.849056603773585, 4.981132075471698, 7.018867924528301, 7.924528301886792, 9.962264150943396, 12.0, 12.90566037735849, 14.943396226415095, 16.9811320754717]
 
{run: 101, time: 0.6026}
 β”œβ”€ 51 :hicazkar [0, 1.1320754716981132, 3.849056603773585, 4.981132075471698, 7.018867924528301, 8.150943396226415, 10.867924528301888, 12.000000000000002]
 β”œβ”€ 52 :hicazkar_2 [0, 1.1320754716981132, 3.849056603773585, 4.981132075471698, 7.018867924528301, 8.150943396226415, 10.867924528301888, 12.000000000000002, 14.037735849056606, 14.943396226415096, 16.9811320754717, 19.0188679245283]
 β”œβ”€ 53 :hindu [0, 2, 4, 5, 7, 8, 10, 12]
 β”œβ”€ 54 :hirajoshi [0, 2, 3, 7, 8, 12]
 β”œβ”€ 55 :hungarian_minor [0, 2, 3, 6, 7, 8, 11, 12]
 β”œβ”€ 56 :huseyni [0, 1.8113207547169812, 2.9433962264150946, 4.981132075471699, 7.018867924528303, 8.830188679245284, 9.962264150943398, 12.000000000000002]
 β”œβ”€ 57 :huseyni_2 [0, 1.8113207547169812, 2.9433962264150946, 4.981132075471699, 7.018867924528303, 8.830188679245284, 9.962264150943398, 12.000000000000002, 14.037735849056606, 14.943396226415096, 16.9811320754717, 19.0188679245283]
 β”œβ”€ 58 :huzzam [0, 1.1320754716981132, 3.169811320754717, 4.30188679245283, 7.018867924528302, 8.150943396226415, 10.867924528301888, 12.000000000000002]
 β”œβ”€ 59 :huzzam_2 [0, 1.1320754716981132, 3.169811320754717, 4.30188679245283, 7.018867924528302, 8.150943396226415, 10.18867924528302, 11.09433962264151, 13.132075471698114, 15.169811320754718]
 └─ 60 :indian [0, 4, 5, 7, 10, 12]
 
{run: 101, time: 0.7002}
 β”œβ”€ 61 :ionian [0, 2, 4, 5, 7, 9, 11, 12]
 β”œβ”€ 62 :isfahan [0, 1.8113207547169812, 2.9433962264150946, 4.981132075471699, 7.018867924528303, 7.924528301886793, 9.962264150943398, 12.000000000000002]
 β”œβ”€ 63 :isfahan_2 [0, 1.8113207547169812, 2.9433962264150946, 4.981132075471699, 7.018867924528303, 7.924528301886793, 9.962264150943398, 12.000000000000002, 12.905660377358492, 14.943396226415096, 16.9811320754717]
 β”œβ”€ 64 :iwato [0, 1, 5, 6, 10, 12]
 β”œβ”€ 65 :jiao [0, 3, 5, 8, 10, 12]
 β”œβ”€ 66 :karcigar [0, 1.8113207547169812, 2.9433962264150946, 4.981132075471699, 6.113207547169812, 8.830188679245284, 9.962264150943398, 12.000000000000002]
 β”œβ”€ 67 :kumoi [0, 2, 3, 7, 9, 12]
 β”œβ”€ 68 :kurdi [0, 0.9056603773584906, 2.9433962264150946, 4.981132075471699, 7.018867924528303, 7.924528301886793, 9.962264150943398, 12.000000000000002]
 β”œβ”€ 69 :kurdili_hicazkar [0, 0.9056603773584906, 2.9433962264150946, 4.981132075471699, 7.018867924528303, 7.924528301886793, 9.962264150943398, 12.000000000000002]
 └─ 70 :kurdili_hicazkar_2 [0, 0.9056603773584906, 2.9433962264150946, 4.981132075471699, 6.113207547169812, 8.830188679245284, 9.962264150943398, 12.000000000000002, 12.905660377358492, 14.943396226415096, 16.9811320754717]
 
{run: 101, time: 0.8018}
 β”œβ”€ 71 :kurdili_hicazkar_3 [0, 0.9056603773584906, 2.9433962264150946, 4.981132075471699, 6.113207547169812, 8.830188679245284, 9.962264150943398, 11.094339622641511, 13.811320754716984, 14.943396226415098, 16.981132075471702]
 β”œβ”€ 72 :kurdili_hicazkar_4 [0, 0.9056603773584906, 2.9433962264150946, 4.981132075471699, 6.7924528301886795, 7.9245283018867925, 9.962264150943396, 12.0, 12.90566037735849, 14.943396226415095, 16.9811320754717]
 β”œβ”€ 73 :kurdili_hicazkar_5 [0, 0.9056603773584906, 2.9433962264150946, 4.981132075471699, 6.7924528301886795, 7.9245283018867925, 9.962264150943396, 11.773584905660377, 12.90566037735849, 14.943396226415095]
 β”œβ”€ 74 :leading_whole [0, 2, 4, 6, 8, 10, 11, 12]
 β”œβ”€ 75 :locrian [0, 1, 3, 5, 6, 8, 10, 12]
 β”œβ”€ 76 :locrian_major [0, 2, 4, 5, 6, 8, 10, 12]
 β”œβ”€ 77 :lydian [0, 2, 4, 6, 7, 9, 11, 12]
 β”œβ”€ 78 :lydian_minor [0, 2, 4, 6, 7, 8, 10, 12]
 β”œβ”€ 79 :mahur [0, 2.0377358490566038, 4.0754716981132075, 4.981132075471698, 7.018867924528301, 9.056603773584905, 11.09433962264151, 12.0]
 └─ 80 :major [0, 2, 4, 5, 7, 9, 11, 12]
 
{run: 101, time: 0.8994}
 β”œβ”€ 81 :major_pentatonic [0, 2, 4, 7, 9, 12]
 β”œβ”€ 82 :marva [0, 1, 4, 6, 7, 9, 11, 12]
 β”œβ”€ 83 :melodic_major [0, 2, 4, 5, 7, 8, 10, 12]
 β”œβ”€ 84 :melodic_minor [0, 2, 3, 5, 7, 9, 11, 12]
 β”œβ”€ 85 :melodic_minor_asc [0, 2, 3, 5, 7, 9, 11, 12]
 β”œβ”€ 86 :melodic_minor_desc [0, 2, 3, 5, 7, 8, 10, 12]
 β”œβ”€ 87 :messiaen1 [0, 2, 4, 6, 8, 10, 12]
 β”œβ”€ 88 :messiaen2 [0, 1, 3, 4, 6, 7, 9, 10, 12]
 β”œβ”€ 89 :messiaen3 [0, 2, 3, 4, 6, 7, 8, 10, 11, 12]
 └─ 90 :messiaen4 [0, 1, 2, 5, 6, 7, 8, 11, 12]
 
{run: 101, time: 1.001}
 β”œβ”€ 91 :messiaen5 [0, 1, 5, 6, 7, 11, 12]
 β”œβ”€ 92 :messiaen6 [0, 2, 4, 5, 6, 8, 10, 11, 12]
 β”œβ”€ 93 :messiaen7 [0, 1, 2, 3, 5, 6, 7, 8, 9, 11, 12]
 β”œβ”€ 94 :minor [0, 2, 3, 5, 7, 8, 10, 12]
 β”œβ”€ 95 :minor_pentatonic [0, 3, 5, 7, 10, 12]
 β”œβ”€ 96 :mixolydian [0, 2, 4, 5, 7, 9, 10, 12]
 β”œβ”€ 97 :muhayyer [0, 1.8113207547169812, 2.9433962264150946, 4.981132075471699, 7.018867924528303, 8.830188679245284, 9.962264150943398, 12.000000000000002]
 β”œβ”€ 98 :neapolitan_major [0, 1, 3, 5, 7, 9, 11, 12]
 β”œβ”€ 99 :neapolitan_minor [0, 1, 3, 5, 7, 8, 11, 12]
 └─ 100 :neva [0, 1.8113207547169812, 2.9433962264150946, 4.981132075471699, 7.018867924528303, 8.830188679245284, 9.962264150943398, 12.000000000000002]
 
{run: 101, time: 1.1026}
 β”œβ”€ 101 :neva_2 [0, 1.8113207547169812, 2.9433962264150946, 4.981132075471699, 7.018867924528303, 8.830188679245284, 9.962264150943398, 12.000000000000002, 14.037735849056606, 14.943396226415096, 16.9811320754717]
 β”œβ”€ 102 :nihavend [0, 2.0377358490566038, 2.9433962264150946, 4.981132075471699, 7.018867924528303, 7.924528301886793, 9.962264150943398, 12.000000000000002]
 β”œβ”€ 103 :nihavend_2 [0, 2.0377358490566038, 2.9433962264150946, 4.981132075471699, 7.018867924528303, 8.150943396226417, 10.867924528301888, 12.000000000000002]
 β”œβ”€ 104 :octatonic [0, 2, 3, 5, 6, 8, 9, 11, 12]
 β”œβ”€ 105 :pelog [0, 1, 3, 7, 8, 12]
 β”œβ”€ 106 :phrygian [0, 1, 3, 5, 7, 8, 10, 12]
 β”œβ”€ 107 :prometheus [0, 2, 4, 6, 11, 12]
 β”œβ”€ 108 :purvi [0, 1, 4, 6, 7, 8, 11, 12]
 β”œβ”€ 109 :rast [0, 2.0377358490566038, 3.849056603773585, 4.981132075471698, 7.018867924528301, 9.056603773584905, 10.867924528301886, 12.0]
 └─ 110 :ritusen [0, 2, 5, 7, 9, 12]
 
{run: 101, time: 1.2002}
 β”œβ”€ 111 :romanian_minor [0, 2, 3, 6, 7, 9, 10, 12]
 β”œβ”€ 112 :saba [0, 1.8113207547169812, 2.9433962264150946, 4.0754716981132075, 6.7924528301886795, 7.9245283018867925, 9.962264150943396, 11.09433962264151, 13.81132075471698, 14.943396226415095]
 β”œβ”€ 113 :scriabin [0, 1, 4, 7, 9, 12]
 β”œβ”€ 114 :sedaraban [0, 1.1320754716981132, 3.849056603773585, 4.981132075471698, 7.018867924528301, 8.150943396226415, 10.867924528301888, 12.000000000000002]
 β”œβ”€ 115 :sedaraban_2 [0, 1.1320754716981132, 3.849056603773585, 4.981132075471698, 7.018867924528301, 8.150943396226415, 10.867924528301888, 12.000000000000002, 13.132075471698116, 15.849056603773587, 16.9811320754717, 19.0188679245283, 19.92452830188679, 21.962264150943394, 23.999999999999996]
 β”œβ”€ 116 :segah [0, 1.1320754716981132, 3.169811320754717, 4.981132075471699, 7.018867924528303, 8.150943396226417, 10.867924528301888, 12.000000000000002]
 β”œβ”€ 117 :segah_2 [0, 1.1320754716981132, 3.169811320754717, 4.981132075471699, 6.113207547169812, 8.150943396226415, 10.18867924528302, 11.09433962264151, 13.132075471698114, 15.169811320754718]
 β”œβ”€ 118 :sehnaz [0, 1.1320754716981132, 3.849056603773585, 4.981132075471698, 7.018867924528301, 7.924528301886792, 9.962264150943396, 12.0]
 β”œβ”€ 119 :sehnaz_2 [0, 1.1320754716981132, 3.849056603773585, 4.981132075471698, 7.018867924528301, 8.830188679245282, 9.962264150943396, 12.0]
 └─ 120 :sehnaz_3 [0, 1.1320754716981132, 3.849056603773585, 4.981132075471698, 7.018867924528301, 8.830188679245282, 9.962264150943396, 12.0]
 
{run: 101, time: 1.3018}
 β”œβ”€ 121 :sehnaz_4 [0, 1.1320754716981132, 3.849056603773585, 4.981132075471698, 7.018867924528301, 8.150943396226415, 10.867924528301888, 12.000000000000002]
 β”œβ”€ 122 :sevkefza [0, 2.0377358490566038, 4.0754716981132075, 4.981132075471698, 7.018867924528301, 9.056603773584905, 11.09433962264151, 12.0]
 β”œβ”€ 123 :sevkefza_2 [0, 2.0377358490566038, 4.0754716981132075, 4.981132075471698, 7.018867924528301, 8.150943396226415, 10.867924528301888, 12.000000000000002, 14.037735849056606, 15.16981132075472, 17.886792452830193, 19.018867924528305]
 β”œβ”€ 124 :sevkefza_3 [0, 2.0377358490566038, 3.169811320754717, 5.886792452830189, 7.018867924528302, 8.150943396226415, 10.867924528301888, 12.000000000000002, 14.037735849056606, 15.16981132075472, 17.886792452830193, 19.018867924528305]
 β”œβ”€ 125 :shang [0, 2, 5, 7, 10, 12]
 β”œβ”€ 126 :spanish [0, 1, 4, 5, 7, 8, 10, 12]
 β”œβ”€ 127 :sultani_yegah [0, 2.0377358490566038, 2.9433962264150946, 4.981132075471699, 7.018867924528303, 7.924528301886793, 9.962264150943398, 12.000000000000002]
 β”œβ”€ 128 :sultani_yegah_2 [0, 2.0377358490566038, 2.9433962264150946, 4.981132075471699, 7.018867924528303, 8.150943396226417, 10.867924528301888, 12.000000000000002]
 β”œβ”€ 129 :super_locrian [0, 1, 3, 4, 6, 8, 10, 12]
 └─ 130 :suzidil [0, 1.1320754716981132, 3.849056603773585, 4.981132075471698, 7.018867924528301, 8.150943396226415, 10.867924528301888, 12.000000000000002]
 
{run: 101, time: 1.3994}
 β”œβ”€ 131 :suzidil_2 [0, 1.1320754716981132, 3.849056603773585, 4.981132075471698, 7.018867924528301, 8.150943396226415, 10.867924528301888, 12.000000000000002, 13.132075471698116, 15.849056603773587, 16.9811320754717, 19.0188679245283, 19.92452830188679, 21.962264150943394, 23.999999999999996]
 β”œβ”€ 132 :suznak [0, 2.0377358490566038, 3.849056603773585, 4.981132075471698, 7.018867924528301, 8.150943396226415, 10.867924528301888, 12.000000000000002]
 β”œβ”€ 133 :suznak_2 [0, 2.0377358490566038, 3.849056603773585, 4.981132075471698, 7.018867924528301, 8.150943396226415, 10.867924528301888, 12.000000000000002, 14.037735849056606, 14.943396226415096, 16.9811320754717, 19.0188679245283]
 β”œβ”€ 134 :tahir [0, 1.8113207547169812, 2.9433962264150946, 4.981132075471699, 7.018867924528303, 8.830188679245284, 9.962264150943398, 12.000000000000002]
 β”œβ”€ 135 :tahir_2 [0, 1.8113207547169812, 2.9433962264150946, 4.981132075471699, 7.018867924528303, 8.830188679245284, 9.962264150943398, 12.000000000000002, 14.037735849056606, 14.943396226415096, 16.9811320754717]
 β”œβ”€ 136 :todi [0, 1, 3, 6, 7, 8, 11, 12]
 β”œβ”€ 137 :ussak [0, 1.8113207547169812, 2.9433962264150946, 4.981132075471699, 7.018867924528303, 7.924528301886793, 9.962264150943398, 12.000000000000002]
 β”œβ”€ 138 :uzzal [0, 1.1320754716981132, 3.849056603773585, 4.981132075471698, 7.018867924528301, 8.830188679245282, 9.962264150943396, 12.0]
 β”œβ”€ 139 :uzzal_2 [0, 1.1320754716981132, 3.849056603773585, 4.981132075471698, 7.018867924528301, 8.830188679245282, 9.962264150943396, 12.0, 14.037735849056604, 14.943396226415095, 16.9811320754717, 19.0188679245283]
 └─ 140 :whole [0, 2, 4, 6, 8, 10, 12]
 
{run: 101, time: 1.501}
 β”œβ”€ 141 :whole_tone [0, 2, 4, 6, 8, 10, 12]
 β”œβ”€ 142 :yegah [0, 2.0377358490566038, 3.849056603773585, 4.981132075471698, 7.018867924528301, 9.056603773584905, 9.962264150943396, 12.0]
 β”œβ”€ 143 :yegah_2 [0, 2.0377358490566038, 3.849056603773585, 4.981132075471698, 7.018867924528301, 8.830188679245282, 9.962264150943396, 12.0, 14.037735849056604, 15.849056603773585, 16.9811320754717, 19.0188679245283]
 β”œβ”€ 144 :yu [0, 3, 5, 7, 10, 12]
 β”œβ”€ 145 :zhi [0, 2, 5, 7, 9, 12]
 β”œβ”€ 146 :zirguleli_hicaz [0, 1.1320754716981132, 3.849056603773585, 4.981132075471698, 7.018867924528301, 8.150943396226415, 10.867924528301888, 12.000000000000002]
 β”œβ”€ 147 :zirguleli_hicaz_2 [0, 1.1320754716981132, 3.849056603773585, 4.981132075471698, 7.018867924528301, 8.150943396226415, 10.867924528301888, 12.000000000000002, 14.037735849056606, 14.943396226415096, 16.9811320754717, 19.0188679245283]
 β”œβ”€ 148 :zirguleli_suznak [0, 1.1320754716981132, 3.849056603773585, 4.981132075471698, 7.018867924528301, 8.150943396226415, 10.867924528301888, 12.000000000000002]
 β”œβ”€ 149 :zirguleli_suznak_2 [0, 1.1320754716981132, 3.849056603773585, 4.981132075471698, 7.018867924528301, 8.150943396226415, 10.867924528301888, 12.000000000000002, 14.037735849056606, 14.943396226415096, 16.9811320754717, 19.0188679245283]
 └─ 150 :zirguleli_suznak_3 [0, 1.1320754716981132, 3.849056603773585, 4.981132075471698, 7.018867924528301, 8.150943396226415, 10.867924528301888, 12.000000000000002, 13.132075471698116, 15.849056603773587, 16.9811320754717, 19.0188679245283]
 
{run: 101, time: 1.6026}
 └─ Stopped internal thread
 
=> Completed run 101

=> All runs completed

=> Pausing SuperCollider Audio Server

This should give you all the info you need :slight_smile:

2 Likes

thank you so much, beautiful !

If it is difficult to read the pitch with numbers, try this.

a=scale(:Cs4,:acem_asiran)
a.length.times do
  b=note_info(a.tick).to_s.slice(16..19)
  b=note_info(a.tick).to_s.slice(16..18) if b.slice(b.length-1,b.length)==">"
  puts b
end

β”œβ”€ β€œ:Cs4”
β”œβ”€ β€œ:Eb4”
β”œβ”€ β€œ:F4”
β”œβ”€ β€œ:Ab4”
β”œβ”€ β€œ:Bb4”
β”œβ”€ β€œ:C5”
β”œβ”€ β€œ:Cs4”
└─ β€œ:Eb4”

Is there a better way?

To my knowledge, note_info is the only way to get this.

For the query, I asked the bots for a revision with regex, eg

returning everything including that β€˜last’ colon, before the closing the chevron, to return notename symbol, if present, eg β€˜:Cs4’ etc

This seemed to work, for getting the note_name.

# Regular expression pattern to match the note name symbol
regex = /:\w+\d+/

# Iterate over each note in the scale
(scale(:Cs4, :acem_asiran)).each do |note|
  # Convert the note to string representation and extract the note name using regex
  note_info_string = note_info(note).to_s
  note_name_match = note_info_string.match(regex)

  # Output the matched note name
  puts note_name_match[0] if note_name_match
end
  • The regular expression pattern /:\w+\d+/ matches the note name symbol, where \w+ matches one or more word characters (letters, digits, or underscores) and \d+ matches one or more digits.
  • Inside the loop, each note is converted to a string representation using note_info(note).to_s.
  • The match method is used to find the first match of the regex pattern in the note info string.
  • If a match is found, it prints the matched note name including the colon symbol.

In case still curious… love to see if anyone would do differently (better:) hope this helps!

1 Like

Thank you very much.
I put them side by side.

note_name=[]
(scale(:Cs4, :acem_asiran)).each do |note|
  note_info_string = note_info(note).to_s
  note_name_match = note_info_string.match(/:\w+\d+/)
  note_name<<(note_name_match[0]) if note_name_match
  puts note_name_match[0],note_name_match[1]
end
puts note_name

[":Cs4", ":Eb4", ":F4", ":F4", ":Ab4", ":Bb4", ":C5", ":C5"]

1 Like

One thing to be aware of is that there are several scales in Sonic Pi that do not abide by the equal temperament tuning or even the note labeling system used in Western European music, so printing out notes in those scales may not give you an accurate representation of what those scales actually sound like.

For example, the interval of the 2nd note of acem_asiran scale you use in your example (which I believe is Turkish in origin) is 2.0377358490566038 away from the first note.

However, the interval of the 2nd note of an aeolian scale (which is a minor scale in Western European music) is 2.0 away from the first note.

Using the code you have here would print out the first note as :cs4 for the first note and :eb4 for the second note for both scales. However, if we converted those to MIDI notes, the first note would be 61 for both scales, but the second note would be 63.0377358490566038 for the acem_asiran and 63.0 for the aeolian which would not sound quite the same due to a microtonal difference. Also, if you look at the output from your code, the 3rd and 4th note are both :F4, but converting the actual scale degrees from the acem_asiran to MIDI notes would be 65.0754716981132075 for the 3rd note and 65.981132075471698 for the 4th note, neither of which is exactly 65 which would be the MIDI equivelant for :F4, and they are almost a full semitone apart, but not quite. Same with the last two notes that are both :C5 but that does not match up to that actual notes in the acem_asiran scale.

Also, if you were to play through the notes that printed out from your code, it is not going to sound the same then if you played through the notes of the actual acem_asiran that is built into Sonic Pi.

Run this code to hear the difference between the notes output by your code which was supposed to be the acem_asiran scale and then the actual acem_asiran. There is definitely a difference.

scale1 = [:Cs4, :Eb4, :F4, :F4, :Ab4, :Bb4, :C5, :C5]

acem = scale(:Cs4, :acem_asiran)


scale1.length.times do |i|
  play scale1[i]
  sleep 1
end

sleep 2

acem.length.times do |i|
  play acem[i]
  sleep 1
end

So it is not quite accurate to represent other scales which use microtonal tuning using the Western European music note naming model (A, Bb, C# etc) nor is it authentic to the musical context and culture that these scales comes from.

One of the great things about Sonic Pi is that is does not assume the Western European musical model as the default which a lot of other DAWs and musical making softwares do. Because of that, I think it is important to try to acknowledge those differences and be careful of trying to fit them into that specific system because, as we see, you wind up misrepresenting what the actual scale is as well as not capturing what makes it unique in the first place.

Of course, you are welcome to experiment with all the tools available in Sonic Pi in whatever way you find interesting, but within the context of this thread about the different types of scales available in Sonic Pi, I think it is important to bring this point up.

1 Like

Thanks @mrbombmusic, that’s a good point. Is there anything currently in SP that can be leveraged, to identify the scales which this could work with? If I’m correct in understanding the problem is that note-name lookup will only work on a (small?) subset of β€œSP’s scales collection”

Maybe this is something done by ziffers!
the popular β€œz” extension I always forget the name of…

I am making a table like this.
The circles represent integers (temperament), and the diamond shapes represent real numbers.
Although almost invisible, the horizontal position of the diamond shape represents the pitch.

1 Like