A technical support community for Apple Logic Pro users.

 
User avatar
Dewdman42
Topic Author
Posts: 2680
Joined: Tue Sep 09, 2014 3:01 pm
Location: Park City, UT

SCRIPT: MidiFile Export

Tue Apr 28, 2020 3:24 pm

Logic MidiFile Export Script ( LogicGenCsv.js)

Due to bugs I found in Logic's midi file export, I have created a little Scripter midi file exporter for anyone interested. See the following forum past about the bug:

viewtopic.php?f=1&t=147755

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.

Here is the script:

midicsv.jpg
midicsv.jpg (47.3 KiB) Viewed 357 times


Script: https://gitlab.com/dewdman42/MainstageM ... cGenCsv.js

Docs: https://gitlab.com/dewdman42/MainstageM ... wikis/home


The results are much more accurate then LogicPros midi file export. Additionally I have provided options to export at many different PPQN resolutions. Going to a very large PPQN higher then 960 will result in even more accuracy exporting midi sequences out to midifiles closer to the accuracy they were recorded. Using a value lower then 960 can result in subtle PPQN quantizing which may or may not result in a slightly tighter groove.

Anyway, hopefully Apple may correct midi file export in the future to be both more accurate (higher PPQN as well as bug free from the deltaTime bug I have pointed out here.

Video Demo of the above Script to export midi file found here:

Last edited by Dewdman42 on Sun Sep 13, 2020 11:00 am, edited 8 times in total.
5,1 MacPro 3.46ghz x 12 128gb ram, OSX 10.14, Logic Pro 10.5, Mainstage3, Cubase10.5, StudioOne4, Reaper, DP10, VEP7, VSL, too many plugins to list
 
User avatar
fuzzfilth
Posts: 3844
Joined: Mon Aug 03, 2009 2:31 am
Location: Germany

Re: MidiFile Export Script

Tue Apr 28, 2020 4:09 pm

Wonderful. Now all that's needed is somehow tying that to the input of an Environment object :mrgreen:
Christian Obermaier
Contact me for private Logic Consulting, Training, Troubleshooting via Skype, Zoom or Teamviewer

1 x MacPro 6core 2010 24Gb RAM
2 x MacBookPro i7 2012 16Gb RAM
OSX.14.6. Mojave, Logic X.4.4 & 5.1
 
User avatar
Dewdman42
Topic Author
Posts: 2680
Joined: Tue Sep 09, 2014 3:01 pm
Location: Park City, UT

Re: MidiFile Export Script

Tue Apr 28, 2020 4:10 pm

what do you mean exactly?
5,1 MacPro 3.46ghz x 12 128gb ram, OSX 10.14, Logic Pro 10.5, Mainstage3, Cubase10.5, StudioOne4, Reaper, DP10, VEP7, VSL, too many plugins to list
 
User avatar
fuzzfilth
Posts: 3844
Joined: Mon Aug 03, 2009 2:31 am
Location: Germany

Re: MidiFile Export Script

Tue Apr 28, 2020 4:22 pm

Just kidding and expressing my long-standing wish to somehow unite the forces of Scripter and Environment in a more elegant way than IAC.
Christian Obermaier
Contact me for private Logic Consulting, Training, Troubleshooting via Skype, Zoom or Teamviewer

1 x MacPro 6core 2010 24Gb RAM
2 x MacBookPro i7 2012 16Gb RAM
OSX.14.6. Mojave, Logic X.4.4 & 5.1
 
User avatar
Dewdman42
Topic Author
Posts: 2680
Joined: Tue Sep 09, 2014 3:01 pm
Location: Park City, UT

Re: MidiFile Export Script

Tue Apr 28, 2020 4:48 pm

hehe yea. Doubt that will ever happen because Scripter runs in the mixer, with all the plugin and PDC processing that happens in the mixer for all plugins. The environment is running separately...without a buffer...and needs to be close to zero latency I guess...it was all built before VST/AU plugins were ever invented. Its just very unlikely to happen that we will ever be able to get that wish.

If they generally opened up the sending of midi data from mixer channel plugins back to the environment it would create all kinds of difficult to diagnose timing problems that would drive users insane due to the PDC and process block processing happening in the mixer.

I think there are just a couple common reasons people wish for that,

  1. They want to send midi from one plugin to several other mixer channels where different instrument plugins are being hosted. That could theoretically be handled by adding midi buses to the mixer and allow users to intercept midi at the end of the midi plugin chain to send over to other channels. Then midi could be routed around the mixer...without going back to the environment or tracks area..which are both outside of the mixer with its process block and PDC handling.
  2. they could build a special feature to send midi from the mixer back to a track for recording it. Not through the environment per say... a direct path to tracks from one of the above mentioned midi busses. Even if this was only provided as a non-realtime-bounce operation, I think many people would find that very useful and very doable. But I think it doesn't even have to be non-realtime-bounce...they could take the midi from the mixer...apply whatever record offset needed and record the events on the region at the right location, regardless of the mixer's latency and PDC happening....just like happens with audio bouncing.

Those two features I think would handle 99% of the cases of people wanting to get the midi output from various plugins, including Scripter...back to tracks, or over to other instrument channels. Most people aren't using the environment any more for tricky stuff.. But anyway I don't think they will provide the plugin->environment route ever because of the synchronization issues mentioned and if they open it up generally that way, people will get into weird trouble with it. But they could address those above mentioned pressing needs and cover 99% of the frustration on this issue.
5,1 MacPro 3.46ghz x 12 128gb ram, OSX 10.14, Logic Pro 10.5, Mainstage3, Cubase10.5, StudioOne4, Reaper, DP10, VEP7, VSL, too many plugins to list
 
User avatar
Dewdman42
Topic Author
Posts: 2680
Joined: Tue Sep 09, 2014 3:01 pm
Location: Park City, UT

Re: SCRIPT: MidiFile Export

Mon Sep 07, 2020 4:49 pm

Here's a short video i made showing how to use this:

5,1 MacPro 3.46ghz x 12 128gb ram, OSX 10.14, Logic Pro 10.5, Mainstage3, Cubase10.5, StudioOne4, Reaper, DP10, VEP7, VSL, too many plugins to list