Snap icon indicating copy to clipboard operation
Snap copied to clipboard

i18n for the piano widget

Open dhmartin opened this issue 1 year ago • 6 comments

Would it be possible to translate the names of the musical notes in the header of the piano widget, as used in the "play note" block?

In Spanish notes are named like "Do", "Re", "Mi"… instead of "C", "D", "E"… When trying to add something like:

"C (48)" : "Do (48)",

to lang-es.js, the piano gets badly broken. Just one single translation make the keys and the background be moved apart.

David

dhmartin avatar Feb 22 '24 18:02 dhmartin

Does "Do" always mean C in Spanish, regardless of the key in which the piece of music is scored? In English, "Do" is the tonic of whatever key you're in.

brianharvey avatar Feb 22 '24 21:02 brianharvey

Does "Do" always mean C in Spanish, regardless of the key in which the piece of music is scored? In English, "Do" is the tonic of whatever key you're in.

Apparently there is actually a Fixed Do solfege, and a Fixed Do solfege. In the movable Do solfege, Do is the tonic of a scale. In the fixed Do solfege, they treat Do as C. It is also apparently used in Spanish.

Here's the wikipedia article about solfege. https://en.m.wikipedia.org/wiki/Solf%C3%A8ge#Fixed_do_solf%C3%A8ge

ego-lay-atman-bay avatar Feb 22 '24 22:02 ego-lay-atman-bay

Lots of places in Europe use d'Arezzo notation, and Do is always C to us, yes. We call your way to represent notes "American notation".

I never knew there were places where people named notes after letters in the alphabet until I was a teenager :)

bromagosa avatar Feb 23 '24 09:02 bromagosa

what's worse: In Germany (and, I think, most Scandinavian and Eastern-European Countries) we refer to "B" as "H", and "Bb" as "B", so the C-major scale goes: C-D-E-F-G-A-H-C.

jmoenig avatar Feb 23 '24 09:02 jmoenig

Good grief. Maybe instead of naming the notes we should just put frequencies and MIDI numbers. :(

Actually I've always wondered why we start with "C" rather than calling that note "A."

So, are we going to attempt translation of note names? (Getting back on topic...)

brianharvey avatar Feb 23 '24 09:02 brianharvey

I'm not convinced about translating note names in the piano widget. Obviously translating something like "c" to "Do" is likely to break things in unexpected places, for example the "When 'c' key is pressed", and relying on upper-/lowercasing is something we've actively taken out in v9. So my hunch is to discourage it.

Pedagogically I'm also not convinced about referring to Notes in letters or words. The evangelism of computers is that they represent information as numbers, that's the powerful idea behind "digital". Midi-numbers for notes are really, really powerful, and I'm saying this as a trained musician. In fact, whenever I use Tunescope I end up cursing them for making me use archaic notation :)

jmoenig avatar Feb 23 '24 09:02 jmoenig