-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MIDI tempo and mode notes #6
Comments
What is currently the best way to implement a MIDI player for Verovio? I tried some but they were not satisfying (synth-js, timidity, midi-player-js, Midi.js). So I guess https://github.com/rism-digital/midi-player still is the way to go with https://github.com/zz85/wild-web-midi as WebAssembly module. I would like to use another frontend for the player since I don't want to use jQuery. But as I understood it
I'm not so sure about the mode here since it (beatus vir) ends in c and thus looks to C ionian to me with a atypical beginning that seems to be in G mixolydian. Never the less: is there a way to mark spines with a distinction between let's say dorian and the plagal mode hypodorian to store some additional informations about the ambitus? It would be interesting to compare the expected range of the abitus with the effective max. and min. notes (from Otherwise I would just use https://github.com/WolfgangDrescher/lassus-geistliche-psalmen/blob/master/meta/01-beatus-vir.yaml to store this information and parse it later on. Btw. I found the Perl script to convert PMX files into SVG on https://wiki.ccarh.org/wiki/Music_253_Humdrum_homework. Is the code of the converter itself open sourced? I am thinking about a different (and maybe even interactive) way to display this graph since im not interested in average or median notes but more in the comparison to the ambitus of the mode and the range of the voice. What can Humdrum do with the mode annotated like e.g. |
I looked around and there was nothing better than Wild Web MIDI adjusted by @lpugin for compiling with emscripten about 6 years ago. Since then I have look around every once in a while, but not noticed anything better (there probably is, but I have not come across it). The MIDI player used in the Piano Roll Project at Stanford looks promising:
but it is wrapped up in a lot of scripting languages, and I have not had time to see if it can be distilled into pure Javascript (I also would like to avoid using jQuery and other nonsense).
The front end should be independent of WWM, I played around with making my own last year, but it was too much of a bother, so I didn't bother much trying to remove jQuery from the interface. If you are not planning on having a lot of files (such as less than a few thousand), and you have lots of storage on your web server, you can consider converting the MIDI to MP3 offline (I use timidity for this on JRP), and then use the MP3s for playback. This is what I do on the JRP and Tasso websites (WWM is not used and only the HTML 5 |
Yes, I must have been reading the C clefs wrong. The piece ends in a C major triad. Here is the keyscape for it: It matches most strongly to C major throughout its entirety. So categorizing at C ionian is best. |
I don't do anything much with the modal refinement (keyscapes only look at major/minor and I have problems getting good results when trying to deal with modal assignments). But they would be useful for some types of analysis. Cadences in dorian and phrygian are quite different due to the 6th scale degree being a minor second above the 5th. I do use the tonic for calculating relative versus absolute keyscapes. In absolute mode green is C major, light blue is G, and yellow is F. For a relative view (functional harmony view), I transpose to C major/minor and then green means tonic, light blue means dominant and yellow means subdominant. But this does not consider the modal refinement since I color keys with a major third in a bright color and those with a minor third in a darker color. |
That specific method is private. There is a Javascript/Angular implementation for purely on the web, but I cannot find the link to it at the moment. The converter from Humdrum to SCORE PMX data is the Humdrum Extras tool called "prange" using the http://extras.humdrum.org/man/prange https://github.com/craigsapp/humextra/blob/master/cli/prange.cpp |
prange also has textual output that can be used for this purpose:
Just the bassus:
The ambitus:
(F3 to A4 for the Bassus part) |
I am in discussion with several people on how to encode something like hypodorian in a key such as There is no formal system, but you could make one up such as |
But I just tried the script and it is working (the converter from PMX to SVG is private, but the conversion itself is publicly accessible). From the command line: prange --score input.krn | pmx2svg > output.svg In theory it could be done directly on a website, but I would cache the plots before hand to avoid delays related to talking across web sites. A lazy way would be to hack the PMX data to add an option to prange to remove the median note (it is one of the lines. Prange has a
Where the median one has the fourth number on the line greater than 100. Here is an example of removing the median notes by hand from the PMX data before converting to SVG: |
I checked how they have done the playback. They are using
Yes I was also thinking about this, but I'm confident to somehow get the audio running directly in the browser.
That is a nice command. Thank you!
This sound promising. Both variants look fine for me. Please give me a notice then it's implemented and ready to use or when you need someone to test the implementation (I'm not so deep into C++ yet to help with the implementation itself).
If
Ulenberg, Kaspar: Die Psalmen Davids: https://www.digitale-sammlungen.de/de/view/bsb11116252?page=53 How would you encode this considering the problematic of the needed bar lines in Verovio? Bars by printed staffs from the source or by lyrics? Since I don't have a GitHub repository yet for this my WIP draft is:
|
Is there a documentation on how to read PMX? I can't figure out how to interpret it. E.g.:
Or
|
Send me your email to craigsapp at gmail.com and I will email some documentation. The PMX is the data format for the SCORE notation editor (SCORE files are binary but there is a command in SCORE called PMX which outputs the data to an ASCII file). PMX means "Parameter MatriX", since it is like a 2D array of numbers (although the second dimension does not have a fixed length). Each line represents a particular object type, with the first number on the line indicating the object type.
I teach SCORE for two weeks each year in my class at Stanford, so there is some more detailed information about SCORE and PMX data: https://wiki.ccarh.org/wiki/Music_253/CS_275a_Winter_2022_Syllabus#week5 Here is a cheat sheet for the meaning of note parameters: I have a C++ SCORE data parser: https://github.com/craigsapp/scorelib And here is an example score + audio alignment that was created from PMX data: https://www.ccarh.org/beethoven/op131/mvmt4 |
If you want to have nicer playback tempos, you can add tempos to the score like this:
Where
*MM280
is the tempo marking, meaning 280 quarter notes per minute (units are always quarter notes).Also for elegance, I would place the time signature, meter sign and tempo adjacent to each other in that order (I moved the key signature before the time signature):
Somewhat related, if you want to assign modalities to the pieces you can add modal qualifiers to the key designation:
Notice that the third scale degree of the mode matches the capitalization of the tonic (
c
implies E-flat is in the scale, andC
implies E-natural). This allows using the nearest of major/minor scales when the exact mode is not needed.So in this example piece, I would say that it is in G mixolydian, and I place the key assignment just under the key signature:
The text was updated successfully, but these errors were encountered: