MIDI Tapper beta 54

December 19, 2015

This beta release of MIDI Tapper fixes reported bugs from the last cycle, and adds two user-requested features.

One of the reported problems concerned an interesting aspect of MIDI files. Some exported MIDI files from MIDI Tapper would play back at the wrong tempo in other software, but they would play at the right tempo when imported into MIDI Tapper. Moreover, it was found that if this file was exported from MIDI tapper, then imported back into MIDI Tapper, and then exported again, then it would play correctly in other software. The last bit was the clue I needed to solve the problem, which had to do with the Parts Per Quarter Note (PPQN) value in a MIDI file.

As the name suggests, the PPQN is the number of units used to represent a quarter note in a MIDI file. Since music consists of many rhythmic values smaller than a quarter note, one can imagine that the number chosen for the PPQN should be divisible by a lot of factors. MIDI Tapper uses 480, which is a widely used standard for MIDI files, because of its large number of factors:

Factors of 480: 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 16, 20, 24, 30, 32, 40, 48, 60, 80, 96, 120, 160, 240, 480

Some software will optimize this value based on the smallest note value used in the file, so the recorded numbers can be as small as possible, to save bytes. Well, you can see how the choice of number for PPQN will have an effect on the tempo of playback. Time is all about counting, and conducting music is all about timing. In this case, the computer is the conductor, and it needs to know how many things are supposed to represent a certain amount of time. A human being could not count 480 things in a second, but of course a computer can do that very easily. You can see that if conductor thinks some value represents a quarter note, and that value actually represents an eighth note, then the tempo would be two times too slow. This is the sort of thing that was happening with some exported files (not all) from MIDI Tapper. In terms of a MIDI file, for the tempo to be right, the PPQN has to be known and matched to the internal clock which is conducting the music, both when recording, and when playing back.

The problem was this: MIDI Tapper would read the PPQN of an imported file, and play it back at whatever the PPQN was for that file (so far so good), but it would always record takes at 480 PPQN — and here's where a problem could arise: when MIDI Tapper would export a MIDI file, it would grab the PPQN from the original file to put in the exported file. So a take recorded at 480 PPQN could be exported at, say, 120 PPQN. The result would be, wrong tempo when playing back the exported file. Why? Because the PPQN in the exported file was not the same as the PPQN used when recording. Tempos would only be consistent for MIDI files imported that used 480 PPQN, which was most, but not all.

Another problem that was solved concerned MIDI Running Status. This is a way to save bytes in a MIDI file, by omitting the status byte for messages that follow in a series that are all the same status byte. The Note OFF message is often not used because Note ON with a Velocity of 0 can be used in its place, with running status, to save bytes. Well, up to now, MIDI Tapper would read these values almost correctly, but not quite. The problem was that after a running status was found, everything would be read wrongly offset by one byte — the missing status byte. The result was that notes would be read correctly, but the delta time for the very first note would be lost, so that all the notes on all the track would begin at time zero. My test piece for this problem was the first fugue from J.S.Bach's Art of Fugue, and the result of the wrongly read file is kind of funny. The fugue entrances at the octave and fifth (notice the tonal answer) are all stacked on top of each other, giving a sort of medieval effect.

After fixing the problem, the voices enter at the right time. (The window title still says artoffugue_wrong_start-times only because this is the name of the MIDI file.)

To make a long story longer, here is a list of the fixes in this version of MIDI Tapper:

This beta cycle will end on February 1, 2016. Still no Windows version. I know I have been pushing this back for some time. The reason is, as you can see, there still have been some basic issues to iron out in the Mac version, which is what I use for the code base. One I get a test cycle that has no reported bugs, then I will port it to Windows, and there are bound to be issues there specific to the platform that will then need to be addressed.

So for now MIDI Tapper is still Mac only. If you already have a beta license, this new version is a free download from the MIDI Tapper software page. If you would like to join the beta testing team, just purchase a beta license (it's only $2.99, and is valid for all beta releases).

Regards,
Aaron

[ Showing 1 entry | Next entry | Show all entries ]