Error Parsing Midi File: Midi file does not contain any event

What particular event is the BeatBuddy Manager parser looking for when the error “Midi file does not contain any event” is shown? I’ve attached a file that reproduces the issue along with a text dump of the events. Here’s the contents after opening and exporting in Anvil (which added StaffStyle):

1,Min:Sec:Frames=0:00:00,StaffStyle 25
2,Min:Sec:Frames=0:00:00,ProgramChange chan: 10, value: 10
3,Min:Sec:Frames=0:00:00,NoteOn chan: 10 note: 42 vol: 64 dur: 11
4,Min:Sec:Frames=0:00:00,NoteOn chan: 10 note: 36 vol: 70 dur: 11
5,Min:Sec:Frames=0:00:01,NoteOff chan: 10 note: 42
6,Min:Sec:Frames=0:00:01,NoteOff chan: 10 note: 36
7,Min:Sec:Frames=0:00:07,NoteOn chan: 10 note: 42 vol: 64 dur: 11
8,Min:Sec:Frames=0:00:09,NoteOff chan: 10 note: 42
9,Min:Sec:Frames=0:00:15,NoteOn chan: 10 note: 42 vol: 64 dur: 11
10,Min:Sec:Frames=0:00:15,NoteOn chan: 10 note: 38 vol: 68 dur: 11
11,Min:Sec:Frames=0:00:16,NoteOff chan: 10 note: 42
12,Min:Sec:Frames=0:00:16,NoteOff chan: 10 note: 38
13,Min:Sec:Frames=0:00:22,NoteOn chan: 10 note: 42 vol: 64 dur: 11
14,Min:Sec:Frames=0:00:24,NoteOff chan: 10 note: 42
15,Min:Sec:Frames=0:01:00,NoteOn chan: 10 note: 42 vol: 64 dur: 11
16,Min:Sec:Frames=0:01:00,NoteOn chan: 10 note: 36 vol: 70 dur: 11
17,Min:Sec:Frames=0:01:01,NoteOff chan: 10 note: 42
18,Min:Sec:Frames=0:01:01,NoteOff chan: 10 note: 36
19,Min:Sec:Frames=0:01:07,NoteOn chan: 10 note: 42 vol: 64 dur: 11
20,Min:Sec:Frames=0:01:09,NoteOff chan: 10 note: 42
21,Min:Sec:Frames=0:01:15,NoteOn chan: 10 note: 46 vol: 50 dur: 11
22,Min:Sec:Frames=0:01:15,NoteOn chan: 10 note: 38 vol: 68 dur: 11
23,Min:Sec:Frames=0:01:16,NoteOff chan: 10 note: 46
24,Min:Sec:Frames=0:01:16,NoteOff chan: 10 note: 38
25,Min:Sec:Frames=0:01:22,NoteOn chan: 10 note: 42 vol: 64 dur: 11
26,Min:Sec:Frames=0:01:24,NoteOff chan: 10 note: 42

I noticed the file is lacking:
2,Min:Sec:Frames=0:00:00,Synth: General MIDI
which appears when I open and resave the file with Anvil. Is that necessary?

Hello there, Charles!

I just took the time to compile the most recent BBManager code available to me, and I can confirm that your TestFile.mid was imported correctly for me, giving no errors in the process. I would like to help you further investigate the issue if you tell me what specific actions have you done prior to getting that message.

The debugger shows there were some warnings in the process of parsing your file. Namely,
“Parser - WARNING 1 - Time signature denominator was changed to default value.”
“Parser - WARNING 2 - Time signature numerator was changed to default value.”
“Parser - WARNING 4 - Tick per quarter notes value was changed to 480.”

These string are actively output to the debug stream. Under Windows OS this is done by OutputDebugString() WinAPI function. If you want to be able to see these (and other interesting) things BBManager actively swears with while running, SysInternals offers a great utility - DebugView. You can download it from Microsoft site directly - https://technet.microsoft.com/en-us/sysinternals/bb896647.aspx When it is launched it displays everything that is being dumped to the debug stream. So using it to the BBManager will help you see all these warnings that are silently ignored currently.

“Midi file does not contain any event” is shown whenever MIDI parser is unable to read the file.

It can be:

  • file doesn’t start with ‘MThd’ signature
  • standard header doesn’t have a length of 6
  • all the tracks of the file parsed but no track found with MIDI note on (0x90u) event was found.

There are also some magic tricks with checking the file properties.
But it will be much easier to deal with them basing on a sample file that gives you an error.

Thanks for the info. I should be able to figure it out now that I know where the trace statements can be picked up. I’ll get back to you if I can’t work it out.

Thanks a million, it was the fact that the file did not have the time signature metaevent! This also explains why some files I’ve created in Anvil aren’t able to be imported into BB manager until I’ve fiddled around with them enough, as Anvil doesn’t appear to always include that event in a newly created sequence for some reason.