Fault on midi playback

Trouble with Synthesia, your keyboard, or adapter? Think you found a bug?
When describing problems, always mention your OS and game version (shown at the bottom of the title screen).

If your keyboard has USB or MIDI ports, there is a tremendously high chance (>99%) it will work with Synthesia. See what you'll need on the keyboards page.
Post Reply
marthart
Posts: 35

Post by marthart »

Have you any idea what is wrong.
The "A" is a green line thoughout the song.
This has happened a few times now.
thanks
Attachments
1A.png
1A.png (99.86 KiB) Viewed 471 times
Bavi_H
Posts: 121

Post by Bavi_H »

Are you able to share a MIDI file that has the problem?
marthart
Posts: 35

Post by marthart »

Yes I didnt know I could up load a midi.
Is there software that will open midi files so you can adjust things that go wrong ?
Thanks
Mart
Attachments
BOOGIE2.mid
(2.58 KiB) Downloaded 16 times
Bavi_H
Posts: 121

Post by Bavi_H »

Thank you for sharing an example MIDI file. As you may have realized, the MIDI file contains some problematic note messages. (Synthesia isn't doing anything wrong.)

If you have never used any MIDI editor before, here are two that I like to use that can help fix some of the problems:

Sekaiju for Windows
Signal web app

Be aware that these editors will let you adjust the duration of some of the problematic notes, but there are some other problematic note messages in the file that these editors won't be able to edit or maybe not even see. Other MIDI file editors will probably work the same way.

It is possible to use command-line MIDICSV tools and a spreadsheet to examine the contents of the MIDI file to make more specific fixes, but the process is a little more technical. I am planning to write another post describing a possible way to examine and fix this MIDI file using MIDICSV, a spreadsheet, a text editor, and Sekiaju.



Technical information about the problem

MIDI files store notes as two separate events, a "note start" event at one time position and a "note end" event at a later time position:
1.png
1.png (446 Bytes) Viewed 435 times

Code: Select all

  time     type        data
---------  ----------  --------
  0 ticks  note start  pitch C4
 50 ticks  note end    pitch C4

100 ticks  note start  pitch C4
150 ticks  note end    pitch C4

200 ticks  note start  pitch C4
250 ticks  note end    pitch C4
Some MIDI software uses a different internal representation for notes where a note is stored as one "note" event at the starting time postion and includes a duration value as part of its data:
2.png
2.png (447 Bytes) Viewed 435 times

Code: Select all

  time      type   data
---------   -----  ---------------------------
  0 ticks   note   pitch C4, duration 50 ticks

100 ticks   note   pitch C4, duration 50 ticks

200 ticks   note   pitch C4, duration 50 ticks
My hypothesis is that:

This MIDI file was created with software that stores notes as one event with a duration.

While the person composing the music was editing the notes, some of the notes inadvertently ended up with a duration of zero:
3.png
3.png (312 Bytes) Viewed 435 times

Code: Select all

  time      type   data
---------   -----  ---------------------------
  0 ticks   note   pitch C4, duration 0 ticks

100 ticks   note   pitch C4, duration 0 ticks

200 ticks   note   pitch C4, duration 0 ticks
During the save process, the software has to convert notes to the MIDI file format that uses separate "note start" and "note end" events. For the notes with a duration of zero, the "note start" and the "note end" have the same time position and the software happened to put the "note end" first:
4.png
4.png (370 Bytes) Viewed 435 times

Code: Select all

  time     type        data
---------  ----------  --------
  0 ticks  note end    pitch C4
  0 ticks  note start  pitch C4

100 ticks  note end    pitch C4
100 ticks  note start  pitch C4

200 ticks  note end    pitch C4
200 ticks  note start  pitch C4
When you re-open the MIDI file, the notes are interpreted like this:
5.png
5.png (388 Bytes) Viewed 435 times

Code: Select all

  time     type        data
---------  ----------  --------
  0 ticks  note end    pitch C4

  0 ticks  note start  pitch C4
100 ticks  note end    pitch C4

100 ticks  note start  pitch C4
200 ticks  note end    pitch C4

200 ticks  note start  pitch C4
or:
6.png
6.png (389 Bytes) Viewed 435 times

Code: Select all

  time      type   data
---------   -----  ----------------------------
  0 ticks   note   pitch C4, duration 0 ticks  (or discarded as invalid)

  0 ticks   note   pitch C4, duration 100 ticks

100 ticks   note   pitch C4, duration 100 ticks

200 ticks   note   pitch C4, duration 0 ticks  (or never ending) (or discarded as invalid)
marthart
Posts: 35

Post by marthart »

Thanks for the very detailed reply.
I will have a look at the editors and see if it is a simple fix.
I have attached a picture of the software I made the midi from and everything looks ok and it plays fine.
Looks like some scores ar just a bit complicated for it.
Attachments
B2P3score.png
B2P3score.png (29.5 KiB) Viewed 433 times
Bavi_H
Posts: 121

Post by Bavi_H »

I previously thought you only had access to the MIDI file, so I was guessing what the original music was supposed to be based on what I saw in the MIDI file.

Now I see it looks like you are using sheet music scanning software to convert an image or PDF file of music notation into a MIDI file. I think the conversion software may be having a problem with the grace notes (the smaller notes). I don't how this conversion software works, but maybe you can select a smaller note and edit some properties to ensure the software will treat it as a grace note.
User avatar
jimhenry
Posts: 1904

Post by jimhenry »

I mean no disrespect but I wonder if you might be attempting to learn material you aren't ready for. I say this because the bigger issue with the excerpt you have posted is that it undoubtedly is intended to be played with a swing rhythm where what is notated as 2 eighth notes per beat is played more like a quarter note plus eighth note triplet.

This is most easily understood in the left hand rhythm. Synthesia is showing all the left hand eighth notes being of equal length. The eighth notes that fall on the quarter note beats should be about twice as long as the off beat eighth notes. If you were to learn this music in straight time, as it is in the current MIDI file, it will never sound right.

In the excerpt you have posted, things get really "interesting" with the notes notated as a quintuplet. At this point, this music is beyond my abilities. I have no idea if 5 equal length notes are intended there.

Blues and boogie is music that was originally played by ear and feel. Notating it is a challenge. I am not surprised that software trying to produce a MIDI file by OCR of sheet music for a boogie is stumbling. I would encourage you to learn to use the free MuseScore program and transcribe this type of sheet music by hand. It is really not that time consuming and you will understand the music better in the process.
Jim Henry
Author of the Miditzer, a free virtual theatre pipe organ
http://www.Miditzer.org/
User avatar
jimhenry
Posts: 1904

Post by jimhenry »

I loaded the MIDI file into MuseScore and adjusted it to be what I think is the correct interpretation. It now looks like this in Synthesia:
BOOGIE2 swing.png
BOOGIE2 swing.png (59.57 KiB) Viewed 364 times
MIDI and MusicXML files are attached.
Attachments
BOOGIE2 swing.mxl
(5.96 KiB) Downloaded 10 times
BOOGIE2 swing.mid
(1.92 KiB) Downloaded 374 times
Jim Henry
Author of the Miditzer, a free virtual theatre pipe organ
http://www.Miditzer.org/
Post Reply