Skip to content
This repository has been archived by the owner on Mar 16, 2021. It is now read-only.

Add support for MIDI type 1 files #24

Open
nikreiman opened this issue Jan 8, 2012 · 5 comments
Open

Add support for MIDI type 1 files #24

nikreiman opened this issue Jan 8, 2012 · 5 comments
Assignees

Comments

@nikreiman
Copy link
Member

Right now, only MIDI type 0 files are supported. Type 1 is very common, and should also be supported.

At the moment, I think that the program should just take the first track from such files, but a command-line switch could be added here.

@ghost ghost assigned nikreiman Mar 16, 2013
@carlthome
Copy link

ETA? Need help?

@nikreiman
Copy link
Member Author

@carlthome I've got a fix now, I just need some files to test it with (I'll google around a bit and let you know if I don't find anything).

@carlthome
Copy link

carlthome commented Oct 31, 2016

These maybe?

@martin19
Copy link

@nikreiman Hi Nik,
this issue has been open for a while: have you implemented MIDI type 1 support yet - would you be willing to share the code?

I'm currently evaluating MrsWatson for a project and would like to extend midi support a bit. Specifically I've run into problems for midi0 files that cannot be rendered properly.

I've tried a simple file from wikipedia here https://en.wikipedia.org/wiki/List_of_musical_scales_and_modes.
The file I've tried is https://upload.wikimedia.org/wikipedia/commons/4/40/Aeolian_mode_C.mid which I have converted with http://www.gnmidi.com/gnfreeen.htm.
Here is the file:
Aeolian_mode_C0.zip

The file simply contains 8 notes:

C5 (0x3C) vel 0x56
D5 (0x3E) vel 0x68
D#5 (0x3F) vel 0x69
F5 (0x41) vel 0x68
G5 (0x43) vel 0x64
G#5 (0x44) vel 0x69
A#5 (0x46) vel 0x63
C6 (0x48) vel 0x69

Here is some debugging output from MrsWatson

D 00000000 000172 MIDI file is type 0, has 1 tracks, and time division 256 (type 1)
D 00000000 000172 Parsed MIDI meta event of type 0x58 at 0
D 00000000 000188 Ignoring MIDI meta event of type 0x59 at 0
D 00000000 000188 Parsed MIDI meta event of type 0x51 at 0
D 00000000 000188 MIDI event of type 0xc0 parsed at 0
D 00000000 000188 MIDI event of type 0xb0 parsed at 0
D 00000000 000188 MIDI event of type 0x40 parsed at 0
D 00000000 000188 MIDI event of type 0x30 parsed at 7838
D 00000000 000188 MIDI event of type 0x00 parsed at 12230
D 00000000 000203 MIDI event of type 0x90 parsed at 12230
D 00000000 000203 MIDI event of type 0x3c parsed at 100430
D 00000000 000203 MIDI event of type 0x68 parsed at 105770
D 00000000 000203 MIDI event of type 0x00 parsed at 111110
D 00000000 000203 MIDI event of type 0x88 parsed at 120153
D 00000000 000203 MIDI event of type 0x00 parsed at 120153
D 00000000 000219 MIDI event of type 0x41 parsed at 208353
D 00000000 000219 MIDI event of type 0x64 parsed at 214123
D 00000000 000219 MIDI event of type 0x00 parsed at 219893
D 00000000 000219 MIDI event of type 0x88 parsed at 228936
D 00000000 000219 MIDI event of type 0x00 parsed at 228936
D 00000000 000219 Parsed MIDI meta event of type 0x51 at 317136
D 00000000 000235 MIDI event of type 0x80 parsed at 317136
D 00000000 000235 MIDI event of type 0x90 parsed at 317136
D 00000000 000235 Parsed MIDI meta event of type 0x51 at 405249
D 00000000 000235 MIDI event of type 0x80 parsed at 405335
D 00000000 000235 Parsed MIDI meta event of type 0x2f at 405421

The result is note 1 being played continuously for a few seconds, then the last note is played.
This happens for several 32 and 64 bit plugins - I've tested synth1 for example.

Do you have any ideas what could cause this issue?
(https://github.com/teragonaudio/MrsWatson/files/2518267/Aeolian_mode_C0.zip)

Thanks for sharing this great tool.

@martin19
Copy link

Hi again, I've committed a few changes to my fork that seem to solve the problems with aforementioned file.

martin19@6775c63

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants