Jump to content

LogicPro exports midifiles at 480ppqn and incorrect timings!?!?!


Dewdman42

Recommended Posts

I am running some tests to see how LogicPro exports midifiles from regions and running into some crazy results. i am wondering if any of you are finding this or know another way to get better results.

 

Basically I created a region with 10 Note Events. exactly one tick apart. LogicPro uses an editor PPQN resolution of 960 ticks per beat.

 

roll.jpg.6127e27021a9f6b75eb79735ceb3d07a.jpglist.jpg.1b0bdb497ff5be623899de3a7b2cb2f5.jpg

 

 

Then I tried to export the region to a midi file. I did this several ways, including right clicking on the midi region and using the file menu to export the whole project to a midiefile. In all cases I found the following two problems:

 

  1. LogicPro exports midi files at 480 PPQN, rather then its own internal resolution of 960.
     
     
  2. In this case LogicPro also did not export the data correctly, it exported the above 10 notes on the same midi tick 0.

 

Here is a look at that actual midi file using command line tool midicsv to view it as text (the second value is the TIME parameter and see all the NoteOn events have the same time of zero.

 

 0, 0, Header, 0, 1, 480
1, 0, Start_track
1, 0, Channel_prefix, 0
1, 0, Title_t, "Inst 1"
1, 0, Instrument_name_t, "Inst 1"
1, 0, Time_signature, 4, 2, 24, 8
1, 0, Key_signature, 0, "major"
1, 0, SMPTE_offset, 33, 0, 0, 0, 0
1, 0, Tempo, 500000
1, 0, Note_on_c, 0, 60, 80
1, 0, Note_on_c, 0, 61, 80
1, 0, Note_on_c, 0, 62, 80
1, 0, Note_on_c, 0, 63, 80
1, 0, Note_on_c, 0, 64, 80
1, 0, Note_on_c, 0, 65, 80
1, 0, Note_on_c, 0, 66, 80
1, 0, Note_on_c, 0, 67, 80
1, 0, Note_on_c, 0, 68, 80
1, 0, Note_on_c, 0, 69, 80
1, 121, Note_off_c, 0, 60, 0
1, 121, Note_on_c, 0, 61, 0
1, 121, Note_on_c, 0, 62, 0
1, 121, Note_on_c, 0, 63, 0
1, 121, Note_off_c, 0, 64, 0
1, 121, Note_off_c, 0, 65, 0
1, 121, Note_off_c, 0, 66, 64
1, 121, Note_off_c, 0, 67, 64
1, 121, Note_off_c, 0, 68, 64
1, 121, Note_off_c, 0, 69, 64
1, 5760, End_track
0, 0, End_of_file

 

Also attempting to import this exported midi file back into LogicPro results in the following FUBAR region:

 

input.jpg.bcea167fe06915382e5150961703b423.jpg

 

 

Does anyone have any ideas about this? I'm quite shocked to be honest to see such a discrepancy. Will be reporting it as a bug to Apple, but just wondering if anyone else here has any other information about this or work arounds.

 

Thanks

Link to comment
Share on other sites

Is it common to have midifiles with a resolution above 480?

 

I had a look at a few midifile docs and they were saying the typical midifile time resolution range was up to 480 - so likely Logic exports at a resolution it figures will be most compatible to other apps, and your hypothetical worst case test illustrates where resolution will be lost, which in typical music cases probably wouldn't be noticed (it's smaller resolution than the transmission times of MIDI notes etc)

Link to comment
Share on other sites

Well, if I create a region in LogicPro with my events carefully placed on the piano roll and event list at 960 PPQN...which is the resolution of the entire LogicPro interface, and midifiles are capable of supporting 960 PPQN, then why should Logic throw away that resolution... That's the first thing

 

But its not even doing 480 correctly....

Link to comment
Share on other sites

If it was even exporting at 480 correctly, then it would export every other note in the right place in the above example I gave. It's not working correctly AT ALL, regardless of whether it exports at 480 or 960 PPQN.

 

I have already submitted a bug report. Right now I am asking if anyone knows a workaround to both questions, how to get export at 480 working properly...and if possible...is there any way to export midi regions at their full 960 resolution.

Link to comment
Share on other sites

For comparison, this is what Cubase exports with the same test:

 

0, 0, Header, 0, 1, 960
1, 0, Start_track
1, 0, Title_t, "cubase"
1, 0, Tempo, 500000
1, 0, Time_signature, 4, 2, 24, 8
1, 0, Note_on_c, 0, 60, 127
1, 1, Note_on_c, 0, 62, 127
1, 2, Note_on_c, 0, 64, 127
1, 3, Note_on_c, 0, 65, 127
1, 4, Note_on_c, 0, 66, 127
1, 5, Note_on_c, 0, 67, 127
1, 361, Note_off_c, 0, 62, 64
1, 437, Note_off_c, 0, 60, 64
1, 439, Note_off_c, 0, 64, 64
1, 453, Note_off_c, 0, 65, 64
1, 661, Note_off_c, 0, 67, 64
1, 795, Note_off_c, 0, 66, 64
1, 795, End_track
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...