Do Re Mi Fa Sol La Si naming

Please consider providing access also to this solfeggio naming notes.
It is used in Italy, France, Spain, Romania, Russia, Ukraine, Latin America, Greece, Israel, Turkey, Latvia, Estonia, Lithuania, and (!!!)many other countries".

maybe it is possible to add to those names with the same/similar syntax like :do :re :mi… etc, semis like :dob :do# etc.


As I understand it solfege notation can be either fixed, where Do = C, or moveable where Do refers to the tonic of the current key.

Sonic Pi doesn’t have a concept of current key, so it would need that to be added for the moveable solfege to make sense (it could get use_key / with_key functions similar to use_bpm/with_bpm for example), but I’m not sure if that’s something Sam would be willing to add or not.

On the other hand, the fixed version would probably be quite easy to add, as it would just involve adding some more names to be recognised in addition to the current set. And you could get a similar effect to the moveable solfege by using with_transpose to shift the key.

This could be considered if we ever add the idea of the “current key” which isn’t currently on my immediate todo list.

I was looking at it on wikipedia, and it seems that most non-English speaking countries actually use the fixed version, where Do is just another name for C, etc. so maybe this would be useful even without a “current key”?

Possibly - but what would it mean to use “do” octave 3, sharp? Would that be :dos3 (to match :cs3).

I’m more inclined to keep things simple.

Hi, I confirm that in Italy we use Do Re Mi as fixed note names.
My students struggle a little to learn English note names with letters, but at the end it is a useful task: they usually read international scores where chords symbols are written in letters.
A funny episode: a very young student of mine once wrote an erroneous code with the line “4.times do re mi” aiming to obtain the melody :c :d :e
We had fun and it was an opportunity to explain better how to write notes in SP.


This would be neat! To deal with the question of accidental suffixes, and to accommodate the weird nuances of international solfège, I wonder whether Sonic Pi could borrow the approach taken by Lilypond. They use a “language” declaration at the beginning of the file/block: LilyPond Notation Reference: 1.1.1 Writing pitches

Note that in Lilypond, this “language” setting applies only to note names. Functions, variables, and other identifiers remain in English.

Me, personally I would prefer to use a hash symbol for sharpness for better readability and habits of music students/professionals. I believe that others who relate to Doremi solfege might be with me. But for usability, maybe it is possible to use either approach.

so: cs3 could be either c#3, do#3, dos3.

I can confirm from the Latvian POV - floating of solfege is not used, though I am not a prof. musician - just a parent of a piano student. Never observed it. Do#3 is always the same black key…especially if we ignore the tonality of the bar/s, which You told will not be implemented soon…but as I understand, tonality just changes if the note has the signature, but not the naming. If the note should be played as it is named in C scale, then it will be called so, even if it lacks the sign locally on a sheet.

In Spain, Do, Re…Si is used. But in my opinion both notations are illogical because the same note can be flat or sharp depending on the scale in which the composition is, it is.
The midi notation is more logical, in which a note only has a name, in this case a number that is unique.
Cs3 = Db3 = Do#3 = Reb3 = 49

In addition, the note 69 is the standard 440 Hz …it seems very suggestive to me :slight_smile:

I agree this would be nice, but unfortunately # is the character used to start a comment in Ruby (and many other languages), so c#3 would just be interpreted as c with the rest of the line being a comment.



I’m using sonicpi with fourteen years french pupils and they aren’t more annoyed than that with the english notation.

IMHO if you can’t tell in your head c is for Do, D for Ré etc. then coding is not for you :slight_smile:. Just a tip, tell them F is for Fa the same initial letter f then they will get the habit quickly. They will be able to read chords notation often used on so many websites (tabs, classical score, jazz score), in sonic pi too.

By the way, 1 character per note is easier and faster to type than 2 and i can tell you that the keyboard for young people can be a problem as they are more agile with their smarphone keyboards than previous generation.



I disagree:
As long as it is in quotes, it doesn’t matter:

irb(main):001:0> x = “c3#”
=> “c3#”
irb(main):002:0> x
=> “c3#”

what you would need is a hashmap lookup to convert solfeggio to notes on a scale. You would also need a well defined scale to use that can then be converted into midi notes.
I went ahead and did all that to prove that this works. It does. and semis can also be inserted in later.

The only downside to this is that I have not released the converter from notes to midi so it may be some time before this works on other computers . The install may consist of unzipping a folder then referencing the folder as shown here.

require "/Users/rob/projects/platyrb/src/Index"

entry = "do:1.4 la la fa la:1.8 la do do so do"
# it can look like this^^^
# then convert to maml notation and send out to midi.

idx =
class NameProver
  def initialize
    #@names_set =  Set["do" , "re" , "mi" , "fa", "so" , "la" , "ti" ]
    @names =  {"do"=>0 , "re"=>1 , "mi"=>2 , "fa"=>3, "so"=>4 , "la"=>5 , "ti"=> 6 }
  def turn_into_notes(entry_in)
    result = ''
    puts ("hit entry")
    notes = []
    entry = entry_in.split(/\s+/)
    puts("entry #{entry.size}")
    for index in 0 ... entry.size
      entry_split = entry[index].split(":")
      note = nil
      beat = ''
      has_two = false
      if entry_split.length == 2
        note = entry_split[0]
        beat = entry_split[1]
        has_two = true
        note = entry_split[0]
      # check that it is in names_set here optionally if notes and names in same data .
      note = @names[note].to_s
      result = note
      if has_two
        result = note+":"+beat
    return notes
# undefined method `play' if this is inside a class? (not sure how to fix other than move outside the class)
def play_mate (note_output)
  for index in 0...note_output.size
    note = note_output[index]
    if note['midi_note'] == -1
      play note['midi_note'] ,velocity:  0
      play note['midi_note'], velocity: 22

prover =

##| notes = ["1:1.16
##| 2:-1.4
##| 3:1.8
##| 4 5 6 7 8",
##|          "1",
##|          "2:1.4"
##|          ]
puts entry

notes = prover.turn_into_notes(entry)
puts ("#{notes.size}")
# notes_to_midi(notes, tempo = 120, start_key= "c4", key_type = "major", offset = [0],octave = 0, channel = 1 , song_name = "example" )

# this is technically not released yet, but works very well
convert_to_midi = idx.notes_to_midi(notes, tempo = 120)


anyways, just showing it works on my end.
I’m using this: GitHub - fornof/music-yaml: MusicYaml (Maml) is the specification for writing musical notes in yaml, saving text instead of binary for readability and modification
If there’s enough interest, I will take a weekend to release the ruby zip file so it can be downloaded and have this example work for others.