Jump to content

ABC Transcription Tools


Michael Eskin

Recommended Posts

30 minutes ago, Don Taylor said:

Warning!  Geekiness ahead...

 

...

This means that a MIDI instrument number cannot be specified as more than 127 (for programmers who count from 0) or 128 if you are a musician who counts from 1.

...

 

 

There are only 10 kinds of people in this world: Those who understand binary and those who don't.

 

// Geekiness out

Link to comment
Share on other sites

37 minutes ago, Don Taylor said:

Warning!  Geekiness ahead...

 

There is a potential minefield here in that there is a good technical reason why MIDI instrument numbers are 0-127 (or 1-128 depending on how you count).

 

The MIDI specs say that any message byte with the top bit set is a status byte that is basically used to specify a command for the following data byte(s) - see: https://www.cs.cmu.edu/~music/cmsip/readings/MIDI tutorial for programmers.html, in particular:

 

 

This means that a MIDI instrument number cannot be specified as more than 127 (for programmers who count from 0) or 128 if you are a musician who counts from 1.

 

If I am wrong, or out of date about this, then I welcome being corrected.

 

 

That's true for MIDI files, but I can do whatever the heck I want in the walled-garden context of my own tool.  In my tool, MIDI patches 1-128 work exactly as you expect, but the higher number pull in my custom patches.  I'm leveraging the program number extension features of abcjs to do this. It doesn't care internally about the limited 1-128 range, I can do whatever I want.

Works perfectly. You can play the ABC in my tool with the custom patches, even generate .WAV and .MP3 files.

You just can't use MIDI files with patch numbers over 128 in other tools, so don't specify them if you intend to export the MIDI files.  That's the only caveat. 
 

 

 

Edited by eskin
Link to comment
Share on other sites

Michael and I discussed instrument numbers above 128 by PM a while back. I thought a 'proper' solution would be to use the bank number defined in GM level 2. The problem is that abcjs doesn't support it (see my last post).

 

As Michael said at the time: "anything over 128 is mine"!

Link to comment
Share on other sites

The Batch .MP3 Exporter in the ABC Transcription Tools now allows you to specify how many times the tune should be repeated in the file.
 

After adding some ABC tunes, click "Export all Tunes as MP3" in the "Advanced Controls" dialog to start the process.


You will now be prompted for a tune repeat count. Default is 1.


If you have ABC tunes with Bass and Chords, to create backing tracks for all the tunes in one operation, you can use the "Inject MIDI Melody" button in the "Advanced Controls" dialog to inject silence (program number 136) into all the tunes before the batch .MP3 export.


After you click "Export all Tunes as MP3", enter 3 (can be any number you like) as the tune repeat count, and what you will end up with is individual .MP3 bass/chord backing tracks for all of your tunes, with the tune played three times through. 

The files will be the in Downloads directory for your browser.

 

I think this is pretty exciting, looking forward to seeing what y'all do with it!


Demo Video:

 

Link to comment
Share on other sites

As a result of a private exchange we've been having on the topic of MIDI patch ranges, I've added this to the tool's User Guide in the MIDI export section:
 

Limits on Use of my Custom MIDI Instruments
 

The General MIDI specification only supports MIDI program numbers as high as 128.

My custom MIDI instruments start at MIDI program 129 and go up from there.

These custom instruments and program numbers can only be used by my ABC tool and are not interoperable with other ABC software.

Other MIDI applications will not be able to work with exported MIDI files that use any of my custom instrument MIDI program numbers.

You will need to change any %%MIDI program or %%MIDI chordprog entries that use the custom MIDI programs to a value less than 128 before exporting a MIDI file for use in another MIDI application.

Link to comment
Share on other sites

My batch .MP3 exporter feature now has an option to add a two-bar click track at the start of each tune. 

 

This is perfect for creating backing tracks, particularly where you also have chords in the ABC.

To do this, you can mute the melody track for all tunes in the ABC by setting its MIDI program number to 136 (Silence) using the "Inject MIDI Melody" button on the "Advanced Controls" dialog before doing the batch .MP3 export. Then be sure to enable the two-bar click intro when batch exporting the .MP3 files.

The result is a  backing track with a two-bar intro and only the bass/chords for the tune.
 

Demo video:
 

 

 

 

Edited by eskin
Link to comment
Share on other sites

This is kind of a lunatic-fringe new feature, but all the pieces were already in place to do it after I released the .MP3 exporter with repeats and click intros.
 

Maybe some of you might find it useful:


New Feature: Inject Repeats and Two-Bar Click Intros - Allows you to increase the number of times through each tune by duplicating the ABC for the tune.


Additionally, you may optionally inject a two-bar style-appropriate click intro at the top of each tune.


You will be prompted for how many times you want each tune to repeat. Default is 1.


Check Inject a two-bar style-appropriate click intro before each tune to add a two-bar click intro at the start of each tune.


For clean repeats, your tunes must not have extraneous pickup notes and must have proper and complete timing.


Important Requirement for 1st Part Repeats


If the 1st part of a tune has a 😐 repeat symbol at the end of it (or on a first ending), but not at the very start of the part, you will need to add the starting |: repeat bar symbol for the ABC to play correctly if there is more than one repetition through the tune.


The lack of a first repeat bar symbol in the ABC will make the first part of the tune on the second and repetitions appear to not repeat.


To Fix:


Add a |: repeat bar at the start of the tune.


Note: This feature, much like the multiple repeat feature in the .MP3 exporter will break with tunes that have multiple voices, key changes, or other *: style annotation in the middle of the tune after the top header.  It should work very well for most basic formatted single voice tunes like those from thesession or other traditional tune sources.


Demo video:
 

 

Link to comment
Share on other sites

I think there used to be a link to a paginated/formatted PDF copy of the User Guide? I can now no longer see this (though I may have missed it!). Instead there are instructions for using the browser's print-to-pdf facility. Is that the only way to get to a hard-copy of the UG?

 

One reason for asking is that the formatted PDF was ~70 pages, the print-to-pdf offering seems to be ~130 pages...

 

Another reason is that my own preference is always for a paginated/formatted document (how incredibly old-fashioned I am...😊).

 

Thanks.

Edited by lachenal74693
Link to comment
Share on other sites

I stopped generating the PDF myself. It was too much hassle updating it every time I made an update, which lately have been fast and furious.

 

It's formatted for optimal print to PDF in Chrome, with print media query CSS, anyone who wants a copy can generate it themselves.

 

There is even a section in the User Guide explaining how to do this:

 

http://michaeleskin.com/abctools/userguide.html#printing_the_user_guide

 

 

Edited by eskin
Link to comment
Share on other sites

17 hours ago, Michael Eskin said:

I stopped generating the PDF myself. It was too much hassle updating it every time I made an update etc...

Thanks for that. That's pretty much what I expected to hear, and I completely understand where you're coming from. I'm exactly the opposite - I used to generate web pages and PDF for my Shogi documents, but years ago, I got hacked off generating new PDF every time I made a change, so I stopped doing it, but elected to stick with PDF...

 

Yeah, I saw that section in the online UG, I'll have a fiddle and see if I can make things better (for me...😊).

 

Thanks again.

Edited by lachenal74693
Link to comment
Share on other sites

Well, I'm back in COVID jail for another five days after already isolating for 10 days (Paxlovid rebound, joy!) with only one day of freedom before I tested positive again, and now with mild symptoms (had none the past 7 days).

I'm focusing on doing clean-up work on the documentation, some useful refactoring of duplicated code for better maintainability, improving the reliability for some features like repeat injection/bathc MP3 export, as well as fixes for any bugs that come up.  

No ideas or intention to work on any new features at that time, but who knows...

Being locked in my office for 5 more days with a pile of accordions, concertinas, and my computer often leads to some sort of mischief... 🙂

Edited by Michael Eskin
Link to comment
Share on other sites

In the "Settings" dialog, you may now select between the three General MIDI soundfonts available for abcjs:

Fluid (default)
Musyng Kite
FatBoy

If you do nothing, you will continue to use the default "Fluid" soundfont.

Details on these soundfonts at:

https://paulrosen.github.io/midi-js-soundfonts/

Demo video:

https://youtu.be/R0EFQ3THDic

Edited by Michael Eskin
Link to comment
Share on other sites

Player now autoscroll when playing tunes. I've improved it even more since posting this video. There is an option to enable/disable the autoscrolling in the "Settings" dialog.
 



Also, I just checked in a fix specifically for iOS that appears to fix the issue where if you were playing tunes in one tab and then switched to another tab, the audio stopped working in the original tab, and the only way to get the audio back was to reload the tab and re-import the ABC. So annoying.
 

It's a generic issue with WebAudio on iOS, but some kind soul wrote a little bit of open-source Javascript code that appears to fix this, so I'm now including it in my tool.

So far it seems solid.

Last night I was playing with a lot of MusicXML files on my iPad for demos, and I'd have to do a "Copy All" before changing tabs to the site where I was downloading files, then go back to the tab with the tool, have to reload the tool to get the audio back, paste back the ABC, round and round.

Hopefully this fixes all that.

I don't know if Android has this "feature" of killing the audio contexts on inactive tabs. If you see this sort of behavior there as well, I can probably enable the tab mute fixer controller for Android as well, but I'd rather not to be honest. 

On iOS there is only one browser: Safari.  All other iOS "browsers" like Chrome are just wrappers on the core iOS Safari web-control. Apple doesn't allow true alternative browsers like Android. So fix the issue once, and it's fixed everywhere. 

On Android, there are multiple true independent browsers available and the fix for one may not work for others, so I'm almost certainly not going to try to fix this issue on Android if it occurs. If it does, and you care, I would suggest trying other browsers.
Edited by Michael Eskin
Link to comment
Share on other sites

Here in Firefox on Android, if I play a tune in your player and switch tab if keeps playing. If I switch to a tune in thesession.org and play that it plays both at once. Same if I switch app - Firefox keeps playing.

 

But it might be memory dependant. I think inactive tabs can be suspended, and inactive apps certainly can be. But I don't know how 'inactive' is defined.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...