ice6 / opensheetmusicdisplay

Combine `osmd_transpose` and `osmd` together to show transposing function.
https://ice6.github.io/opensheetmusicdisplay/build
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

musicxml processor #15

Open AlbertHart opened 4 years ago

AlbertHart commented 4 years ago

I am combining all of my musicxml processing functions into a single .htm

https://ahlbapps.com/process_musicxml.htm

Almost nothing works on this page yet - but you can see what I am trying to do)

image

I would like to be able to display the score after processing - much like you to in OSMD demo, but by including the OSMD code as a library (of .js, etc) and not as code within the project.

I include a lot of their stuff by loading opensheetmusicdisplay.min.js, rather that having to build their project. Think about how we can do this - but also have something that will display the score after processing.

And also to use you new logic to select things in the score so we can make changes to just part of the score.

AlbertHart commented 4 years ago

I had a lot of fun with the web page today, take a look at the tabs. (Most don't work yet)

https://ahlbapps.com/

I think you'll get a kick out of the "Trim Score" tab: (Eventually this will be driven by your select range function)

image

ice6 commented 4 years ago

cool, and you even got the ahlbapps domain name :)

AlbertHart commented 4 years ago

cool, and you even got the ahlbapps domain name :)

and I was able to tell github to store the Project Pages Site directly on our domain as a custom domain.

The github project is here:

https://github.com/AlbertHart/music and you are a contributor when you want to start adding stuff.

I am excited about getting it working and seeing if anyone is interested in routines like these.

ice6 commented 4 years ago

OK, maybe we can create a library named like ABMusicXMLLib or ABMusicXMLProcessor or something else.

with 3 main function

transpose

trim

accompany (expandChord/voiceLeading/melodyChords)

can voiceLeading and melodyChords be categorized into accompany?

ice6 commented 4 years ago

I will try to integerate the transpose and add base / accompany function to this, so we can can see and play the transformed musicxml directly in the browser.

AlbertHart commented 4 years ago

That will be great to see.

Integrate the transpose_xml library first, so we can see how it works, but hold off on the base accompianiment until I clean up the code for it some more.

It will be cleaner when I have created the non-global libary as you suggest. (The transpose_dom2.js already uses a non-global library, and you may find some other changes we need to make before I make the new library)

AlbertHart commented 4 years ago

I'll create that library, but have a function for each tab.

There are also about 20 functions used by several tabs - such as add_note_to_xml().

I haven't cleaned up the code much yet - because when developing debugging it is much easier to have global functions and global variables.

We can work together to clean up the code, etc. I should have everything working this week.

I have existing code for voiceLeading and melodyChords which I am porting over. The tricky thing there, is that once yiu pick the starting inversion, you want to move as few fingers as possible (or have the voices changes notes as little as possible), when you move from chord to chord.

This Voice Leading is great fun. In the image below, I have selected the 1st inversion of Dmaj7 for my starting chord (the user can select any starting inversion he wants) For the Bm7 chord, we use the 2nd inversion so the A and D stay in the same finger (or the same voice) For the Em7 we use the root inversion to keep the G and D in the same place, and for the A7 we use the second inversion to keep the E and G.

Now it gets fun - since the A7 is a dominant 7th chord the 3rd of the chord - C#, which is part of the tritone, wants to resolve to a D. Since the next chord is a Dmaj7 chord, which has a C#, we could also leave the C# in the same voice, but, expecially because it is in the top voice of the chord notes, it often sounds better to let it resolve up.

image

AlbertHart commented 4 years ago

By the way, this Voice Leading is not just to make it easier to play, it also sounds better when the chords are moving and resolving in the right voices. The same as for choral pieces.

ice6 commented 4 years ago

I have to learn these music theory to catch up with you.

When I play piano to accompany, usally I use inversion to make the top voice of the chord same or lower than the singer's pitch.

One reason is the chord's melody line, another reason is that it is easy to sing. :P

I will integrate transpose to the online player at first.

Yes, we can clean up the code together.

AlbertHart commented 4 years ago

OK, maybe we can create a library named like ABMusicXMLLib

I Created a common file with for functions used by multiple tabs, and a second individual file for each tab. (Only two individual files are shown here).

I shortened the name because I could not read the end of the longer names on my Visual Studio Code App.

image

ice6 commented 4 years ago

👍

AlbertHart commented 4 years ago

I put a summary of all our function on our index page:

http://ahlbapps.com/

On the process_musicxml.htm page they only show up one tab at a time, so I wanted a good place to see all options.

AlbertHart commented 4 years ago

When I play piano to accompany, usally I use inversion to make the top voice of the chord same or lower than the singer's pitch

That is what our feature "Melody Chords" will do. Selects a right hand inversion at or just below the melody notes. .