Dewdman42 Posted April 26, 2020 Share Posted April 26, 2020 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. 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: LogicPro exports midi files at 480 PPQN, rather then its own internal resolution of 960. 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: 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 Quote Link to comment Share on other sites More sharing options...
des99 Posted April 26, 2020 Share Posted April 26, 2020 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) Quote Link to comment Share on other sites More sharing options...
Dewdman42 Posted April 26, 2020 Author Share Posted April 26, 2020 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.... Quote Link to comment Share on other sites More sharing options...
des99 Posted April 26, 2020 Share Posted April 26, 2020 Like I say, the resolution thing might be a bug, or it might be intentional behaviour to maximise compatibility (they may have figured it was the lesser of two evils). In any case - submit a bug report, let them know... Quote Link to comment Share on other sites More sharing options...
Dewdman42 Posted April 26, 2020 Author Share Posted April 26, 2020 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. Quote Link to comment Share on other sites More sharing options...
Dewdman42 Posted April 26, 2020 Author Share Posted April 26, 2020 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 Quote Link to comment Share on other sites More sharing options...
Dewdman42 Posted April 26, 2020 Author Share Posted April 26, 2020 And FWIW, the above midi file exported from Cubase at 960ppqn imports into LogicPro correctly...retaining the full 960 PPQN that is in the midi file. Quote Link to comment Share on other sites More sharing options...
Dewdman42 Posted April 28, 2020 Author Share Posted April 28, 2020 As a workaround, here is a Scripter script I made, someone might find it useful in some way, if nothing else to study Scripter.. but anyway, this Script will listen to a given channel and log output to the scripter window which is in a format suitable to create a midi file using the csvmidi utility. viewtopic.php?f=45&t=147817 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.