ekzhang / composing.studio

Collaborative music composition for everyone.
https://composing.studio
MIT License
522 stars 11 forks source link

You are pure genius! #24

Closed omac777 closed 2 years ago

omac777 commented 2 years ago

I just tried your composing studio on via your web site with the example provided: https://composing.studio/groovy-angle-5252

It is pure genius.

You are a mozart of coding!

Congratulations and thank you so much!

You example was quite extnnsive and easy to understand. True brilliance on your part to make it so easy to use.

I small feature request. In your example you have violin 1 and 2. Is there any way to make the web browser actually select violin sounds for each of those parts? What instrument sounds are available with your web tool?

Thank you for listening.

ekzhang commented 2 years ago

Hi @omac777, thank you for the kind words. I am copying your snippet here so that it remains reproducible in the future.

X:286
T:Katyusha
C:anon.
O:Russia
Z: John Chambers
%http://www.musicaviva.com/abc/abcusers/1999.abc
%Posted by Nov. 8th 1999 at ABC-users John Chambers in reply to Ian Hall (see above)
M:2/4
L:1/8
K:Em
|| "Em"E3F | G3E | GG FE | "B7"F2B,2 |
w: 1.~Ras-tsve-ta-li yab-lo-ni i gru-shi,
w: 2.~Vy-kho-di-la pes-nyu za-vo-di-la
w: 3.~Oy, ty, pes-nya, pe-sen-ka de-vich-ya,
w: 4.~Pust' on vspom-nit de-vush-ku pro-stu-yu,
| F3G | A3F | AA GF | "Em"E4 |
w: Po-ply-li tu-ma-ny nad re-koy.
w: Pro step-no-vo si-zo-vo or-la.
w: Ty le-ti za yas-nym soln-tsem vsled,
w: Pust' u-sly-shit, kak o-na po-yot,
|: "Em"B2"C"e2 | "G"d2"E7"ed | "Am"cc BA | "Em"B2 E2 |
w: Vy-kho-di--la na be-reg Ka-tyu-sha,
w: Pro-to-vo,_ ko-to-ro-vo lyu-bi-la,
w: I boy-tsu_ na dal'-nem po-gra-nich-ye
w: Pust' on zem-lyu_ be-re-zhot rod-nu-yu,
| "Am"zc2A | "Em"B3G | "B7"AA GF | "Em"E4 :|
w: Na vy-so-kiy be-reg, na kru-toy.
w: Pro to-vo, chi  pis'-ma be-re-gla.
w: Ot Ka-tyu-shi pe-re-day pri-vet.
w: A lyu-bov' Ka-tyu-sha cbe-re-zhot.
W:
W:Ratsvetali yablani i grushi
W:papilee tumani nad rikoy.
W:  Vwihadeela na birek Katyusha,
W:  na vwisokee na bjerik na krutoy.
W:
W:---
W:(English translation:)
W:
W:Apple and pear trees were blooming, a mist rose from the river,
W:  Katyusha walked to the river's high, rocky bank.
W:
W:She walked and sang a song about her distant hero,
W:  the one she loves, whose letter she holds.
W:
W:Oh, song of a young girl, fly with the sun,
W:   To the man at the far border carry a greeting from Katyusha.
W:
W:Let him know that I am true, let him hear my song,
W:   Let him protect our homeland, and Katyusha will protect our love.
W:
W:
W:  From Musica Viva - http://www.musicaviva.com
W:  the Internet center for free sheet music downloads.

I believe there is a way to have the web browser select violin sounds by specifying MIDI channels, which is supported by the abcjs library that we use to render and synthesize music. You can specify the type of MIDI program to use in synthesis. For example, to use the violin sound (which is ID 41), you would write:

%%MIDI program 41

At the top of your piece. This works for me. See https://en.wikipedia.org/wiki/General_MIDI#Program_change_events for a list of instruments.