jmoenig / Snap

a visual programming language inspired by Scratch
http://snap.berkeley.edu
GNU Affero General Public License v3.0
1.47k stars 739 forks source link

i18n for the piano widget #3317

Open dhmartin opened 4 months ago

dhmartin commented 4 months ago

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

brianharvey commented 4 months ago

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.

ego-lay-atman-bay commented 4 months ago

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

bromagosa commented 4 months ago

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 :)

jmoenig commented 4 months ago

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.

brianharvey commented 4 months ago

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...)

jmoenig commented 4 months ago

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 :)