Lippeth Posted January 22, 2020 Share Posted January 22, 2020 (edited) I've been composing the soundtrack for a game modding community project. Each song is designed to loop endlessly during gameplay. When loading the exported .mid file into something like VLC, the length is over an hour long, despite the composition being under four minutes. When opening with Windows Media Player, the length is correct. When loaded into the game, the .mid file loops back to the beginning as intended when playing back the MIDI info with a Roland Sound Canvas running from the MIDI out port of my interface, but when using soundfonts or OPL emulations, the full hour of silence is present after the song plays, which is not the intention. I'm exporting as a type 1 MIDI file, with each track separated by channel and consolidated to a region. Each region starts with a program change event at bar 1, beat 1 to play the right instrument, followed by things like volume, pan and reverb, then all the notes and automation. Is there an event list controller that I'm missing? No other .mid file I load into Logic seems to have any indicator in the event list, yet they all display the correct length in VLC and loop in game as expected no matter the method of playback. I've set the project start and end time, hoping that the MIDI regions will magically somehow know, and I've even deleted the click track through the environment window, thinking that it might interfere with the length of the project. Also, how is the tempo even stored in a .mid file? They seem to playback at the right tempo with no apparent instruction. Maybe it's a SysEx thing? I've read that in hexadecimal code F0 and F7 indicate the beginning and ending of something, but I'm not sure if that's even the same thing at all. I've scoured the far reaches of the web, and though I've learned a lot of useful information, I'm still searching for a solution. Edited July 2, 2020 by Lippeth Quote Link to comment Share on other sites More sharing options...
Lippeth Posted January 22, 2020 Author Share Posted January 22, 2020 I've found a workaround by importing the .mid file into Pro Tools and exporting it from there. Quote Link to comment Share on other sites More sharing options...
Lippeth Posted June 30, 2020 Author Share Posted June 30, 2020 So with the newest update, the dead air at the end of exported midi files has been reduced to about 20 seconds. While it's a step in the right direction, it's not quite the result I'm looking for. I've talked to support twice about this issue, and they tell me it must be a third party issue because I'm doing everything right, but am getting an unwanted result. I can't be the only one having this issue. Is this a bug or is it trying to add a tail after the region ends when exporting? My only workaround has been importing the file into Pro Tools and exporting, everything works as intended, but it's such a headache switching DAWs. Quote Link to comment Share on other sites More sharing options...
Lippeth Posted July 2, 2020 Author Share Posted July 2, 2020 To better clarify my issue here are the steps I take: -Create a new session and start with an instrument track -Open Midi Environment Window and create a new multi-instrument, open all 16 channels and route it to the instrument track, removing its existing channel port settings (which I am unsure exactly what this entails) -Create 16 new External MIDI tracks, set MIDI destination to off and check ascending, and leave Use External Instrument plug-in off -Add and set up plugin on the instrument track (either DLSMusicDevice in stereo, or Roland Sound Canvas VA) -Create song, making sure that all program changes and notes are listed in the Event List for each track -Join regions so that each track is comprised of one region that is no longer than the last note -Normalize region parameters for each track, making sure everything's going through the right channel -Select all regions and export selection as MIDI file -Check MIDI file in VLC, and notice that it's way longer than the song itself, with 20 seconds to an hour of dead silence, and if scrubbed to the silent part, will jump back to the beginning of the song -Import into Pro Tools and export as MIDI file -Check the new MIDI file in VLC, and the song is the expected length, ending at the very last note, so the file is able to loop in game engines. Is there any way to make sure that the MIDI file ends at the last note when exporting from Logic? Side note: If I open the MIDI file in another editor, it lists the hardware input and output for every track. Is this necessary or is there a way to omit this from the Event List? Also, is there a way to include the tempo information when importing a MIDI file? Logic is the only software I've used where I'm unsure how to do this, it's automatic in other software. Quote Link to comment Share on other sites More sharing options...
Lippeth Posted July 2, 2020 Author Share Posted July 2, 2020 To better clarify my issue here are the steps I take: -Create a new session and start with an instrument track -Open Midi Environment Window and create a new multi-instrument, open all 16 channels and route it to the instrument track, removing its existing channel port settings (which I am unsure exactly what this entails) -Create 16 new External MIDI tracks, set MIDI destination to off and check ascending, and leave Use External Instrument plug-in off -Add and set up plugin on the instrument track (either DLSMusicDevice in stereo, or Roland Sound Canvas VA) -Create song, making sure that all program changes and notes are listed in the Event List for each track -Join regions so that each track is comprised of one region that is no longer than the last note -Normalize region parameters for each track, making sure everything's going through the right channel -Select all regions and export selection as MIDI file -Check MIDI file in VLC, and notice that it's way longer than the song itself, with 20 seconds to an hour of dead silence, and if scrubbed to the silent part, will jump back to the beginning of the song -Import into Pro Tools and export as MIDI file -Check the new MIDI file in VLC, and the song is the expected length, ending at the very last note, so the file is able to loop in game engines. Is there any way to make sure that the MIDI file ends at the last note when exporting from Logic? Side note: If I open the MIDI file in another editor, it lists the hardware input and output for every track. Is this necessary or is there a way to omit this from the Event List? Also, is there a way to include the tempo information when importing a MIDI file? Logic is the only software I've used where I'm unsure how to do this, it's automatic in other software. Quote Link to comment Share on other sites More sharing options...
ValliSoftware Posted July 2, 2020 Share Posted July 2, 2020 I've been composing the soundtrack for a game modding community project. Each song is designed to loop endlessly during gameplay. When loading the exported .mid file into something like VLC, the length is over an hour long, despite the composition being under four minutes. When opening with Windows Media Player, the length is correct. When loaded into the game, the .mid file loops back to the beginning as intended when playing back the MIDI info with a Roland Sound Canvas running from the MIDI out port of my interface, but when using soundfonts or OPL emulations, the full hour of silence is present after the song plays, which is not the intention. I'm exporting as a type 1 MIDI file, with each track separated by channel and consolidated to a region. Each region starts with a program change event at bar 1, beat 1 to play the right instrument, followed by things like volume, pan and reverb, then all the notes and automation. Is there an event list controller that I'm missing? No other .mid file I load into Logic seems to have any indicator in the event list, yet they all display the correct length in VLC and loop in game as expected no matter the method of playback. I've set the project start and end time, hoping that the MIDI regions will magically somehow know, and I've even deleted the click track through the environment window, thinking that it might interfere with the length of the project. Also, how is the tempo even stored in a .mid file? They seem to playback at the right tempo with no apparent instruction. Maybe it's a SysEx thing? I've read that in hexadecimal code F0 and F7 indicate the beginning and ending of something, but I'm not sure if that's even the same thing at all. I've scoured the far reaches of the web, and though I've learned a lot of useful information, I'm still searching for a solution. Can you post that MIDI file. I'd like to examine it with a program I wrote using CoreMIDI, not a 3rd party MIDI library but CoreMIDI. [attachment=0]MidiInfo.png[/attachment] Quote Link to comment Share on other sites More sharing options...
ValliSoftware Posted July 2, 2020 Share Posted July 2, 2020 I've been composing the soundtrack for a game modding community project. Each song is designed to loop endlessly during gameplay. When loading the exported .mid file into something like VLC, the length is over an hour long, despite the composition being under four minutes. When opening with Windows Media Player, the length is correct. When loaded into the game, the .mid file loops back to the beginning as intended when playing back the MIDI info with a Roland Sound Canvas running from the MIDI out port of my interface, but when using soundfonts or OPL emulations, the full hour of silence is present after the song plays, which is not the intention. I'm exporting as a type 1 MIDI file, with each track separated by channel and consolidated to a region. Each region starts with a program change event at bar 1, beat 1 to play the right instrument, followed by things like volume, pan and reverb, then all the notes and automation. Is there an event list controller that I'm missing? No other .mid file I load into Logic seems to have any indicator in the event list, yet they all display the correct length in VLC and loop in game as expected no matter the method of playback. I've set the project start and end time, hoping that the MIDI regions will magically somehow know, and I've even deleted the click track through the environment window, thinking that it might interfere with the length of the project. Also, how is the tempo even stored in a .mid file? They seem to playback at the right tempo with no apparent instruction. Maybe it's a SysEx thing? I've read that in hexadecimal code F0 and F7 indicate the beginning and ending of something, but I'm not sure if that's even the same thing at all. I've scoured the far reaches of the web, and though I've learned a lot of useful information, I'm still searching for a solution. Can you post that MIDI file. I'd like to examine it with a program I wrote using CoreMIDI, not a 3rd party MIDI library but CoreMIDI. Quote Link to comment Share on other sites More sharing options...
Lippeth Posted July 2, 2020 Author Share Posted July 2, 2020 Sure! It's not song specific either, but here's one example. Quote Link to comment Share on other sites More sharing options...
Lippeth Posted July 2, 2020 Author Share Posted July 2, 2020 Sure! It's not song specific either, but here's one example. shattered_decanter.mid Quote Link to comment Share on other sites More sharing options...
ValliSoftware Posted July 2, 2020 Share Posted July 2, 2020 Sure! It's not song specific either, but here's one example. I loaded this midi file in VLC (Mac), Logic Pro X, Quick Time Pro 7 and all show it as 4:03 seconds long. The one thing I was going to look for is a stray CC message that would create that silence, but since all three of the above programs show the same time, I wouldn't see that in my program. My program shows the raw data (as you see in the pic), no calculated data. Which version of VLC are you using, OS and Version number. Quote Link to comment Share on other sites More sharing options...
ValliSoftware Posted July 2, 2020 Share Posted July 2, 2020 Sure! It's not song specific either, but here's one example. I loaded this midi file in VLC (Mac), Logic Pro X, Quick Time Pro 7 and all show it as 4:03 seconds long. The one thing I was going to look for is a stray CC message that would create that silence, but since all three of the above programs show the same time, I wouldn't see that in my program. My program shows the raw data (as you see in the pic), no calculated data. Which version of VLC are you using, OS and Version number. Quote Link to comment Share on other sites More sharing options...
Lippeth Posted July 2, 2020 Author Share Posted July 2, 2020 Thanks for checking it out! I've been using version 3.0.8 Vetinari of VLC. I just updated to 3.0.11, and am getting a length of 4:30, which is better than 5:36, but there's still silence. OS is Catalina 10.15.5, but I started noticing the problem with Mojave. Logic version 10.5.1 Honestly I haven't done MIDI music since Snow Leopard and Logic Pro 9. And VLC isn't really my end goal either. In Windows Media Player, the MIDI file loops just fine and is the correct length, but any game engine that it plays in includes the exact amount of silence that VLC detects. If I import the file into another program and export that, the issue is completely gone, which makes me believe that the problem starts in Logic, whether it's a preference or something I'm doing. EDIT: I just did a test and created a region exactly 30 seconds long with a note that extends the entire length, and after exporting, VLC reads it as 4:36. I did the same thing in Pro Tools and VLC reads it as 0:30. Not that it proves anything new, but I thought I'd share. EDIT: I've also reset all Logic preferences and did the test again, and the time is reduced to 0:46, both in simple and advanced mode. Quote Link to comment Share on other sites More sharing options...
Lippeth Posted July 2, 2020 Author Share Posted July 2, 2020 Thanks for checking it out! I've been using version 3.0.8 Vetinari of VLC. I just updated to 3.0.11, and am getting a length of 4:30, which is better than 5:36, but there's still silence. OS is Catalina 10.15.5, but I started noticing the problem with Mojave. Logic version 10.5.1 Honestly I haven't done MIDI music since Snow Leopard and Logic Pro 9. And VLC isn't really my end goal either. In Windows Media Player, the MIDI file loops just fine and is the correct length, but any game engine that it plays in includes the exact amount of silence that VLC detects. If I import the file into another program and export that, the issue is completely gone, which makes me believe that the problem starts in Logic, whether it's a preference or something I'm doing. EDIT: I just did a test and created a region exactly 30 seconds long with a note that extends the entire length, and after exporting, VLC reads it as 4:36. I did the same thing in Pro Tools and VLC reads it as 0:30. Not that it proves anything new, but I thought I'd share. EDIT: I've also reset all Logic preferences and did the test again, and the time is reduced to 0:46, both in simple and advanced mode. Quote Link to comment Share on other sites More sharing options...
Lippeth Posted July 3, 2020 Author Share Posted July 3, 2020 Okay, so I opened all the MIDI files in a program called Sekaiju and in the first track of each song (which is invisible in Logic) there's an event list for tempo, time signature, key, timecode, and an End of Track event, which in my case is set at a later time than the end of the actual song. Is there a way to see this info in Logic? Quote Link to comment Share on other sites More sharing options...
Lippeth Posted July 3, 2020 Author Share Posted July 3, 2020 Okay, so I opened all the MIDI files in a program called Sekaiju and in the first track of each song (which is invisible in Logic) there's an event list for tempo, time signature, key, timecode, and an End of Track event, which in my case is set at a later time than the end of the actual song. Is there a way to see this info in Logic? Quote Link to comment Share on other sites More sharing options...
rAC Posted July 3, 2020 Share Posted July 3, 2020 Okay, so I opened all the MIDI files in a program called Sekaiju and in the first track of each song (which is invisible in Logic) there's an event list for tempo, time signature, key, timecode, and an End of Track event, which in my case is set at a later time than the end of the actual song. ... What do you mean by this? I am afraid I don’t understand what you mean by ‘first track’. Quote Link to comment Share on other sites More sharing options...
rAC Posted July 3, 2020 Share Posted July 3, 2020 Okay, so I opened all the MIDI files in a program called Sekaiju and in the first track of each song (which is invisible in Logic) there's an event list for tempo, time signature, key, timecode, and an End of Track event, which in my case is set at a later time than the end of the actual song. ... What do you mean by this? I am afraid I don’t understand what you mean by ‘first track’. Quote Link to comment Share on other sites More sharing options...
Lippeth Posted July 3, 2020 Author Share Posted July 3, 2020 Meaning each channel of a type 1 midi file, but the track that each channel appears on. Apparently there's a hidden track before all channels that lists information about the entire song. Say you have a midi file with 10 channels: Sekaiju sees 11 tracks, the first being track 0, followed by each instrument channel, only I can't find it in Logic. It has to be there, otherwise a program like Quicktime or VLC wouldn't know what the tempo or time signature it is. I can't seem to find any information about this. Also, When importing a midi file with tempo info into Logic, it doesn't change the tempo of the session, even with Smart Tempo selected. Quote Link to comment Share on other sites More sharing options...
Lippeth Posted July 3, 2020 Author Share Posted July 3, 2020 Meaning each channel of a type 1 midi file, but the track that each channel appears on. Apparently there's a hidden track before all channels that lists information about the entire song. Say you have a midi file with 10 channels: Sekaiju sees 11 tracks, the first being track 0, followed by each instrument channel, only I can't find it in Logic. It has to be there, otherwise a program like Quicktime or VLC wouldn't know what the tempo or time signature it is. I can't seem to find any information about this. Also, When importing a midi file with tempo info into Logic, it doesn't change the tempo of the session, even with Smart Tempo selected. Quote Link to comment Share on other sites More sharing options...
rAC Posted July 3, 2020 Share Posted July 3, 2020 I have always found the info your talking about in the header of a MIDI filehence my confusion. Quote Link to comment Share on other sites More sharing options...
rAC Posted July 3, 2020 Share Posted July 3, 2020 I have always found the info your talking about in the header of a MIDI filehence my confusion. Quote Link to comment Share on other sites More sharing options...
Lippeth Posted July 3, 2020 Author Share Posted July 3, 2020 So...any idea on how to access the header of a MIDI file in Logic? Quote Link to comment Share on other sites More sharing options...
Lippeth Posted July 3, 2020 Author Share Posted July 3, 2020 So...any idea on how to access the header of a MIDI file in Logic? Quote Link to comment Share on other sites More sharing options...
Lippeth Posted July 3, 2020 Author Share Posted July 3, 2020 Ah, I think I see where you're confused. So the information that's in the track header gets embedded in the first track of a multichannel MIDI file, but the only way to see it in Logic is by looking at the header itself. I'm trying to access the End Of Track event (hex code FF 2F 00), which I am unable to find in Logic. Is there any way I can access this event in the project's event list? Quote Link to comment Share on other sites More sharing options...
JT1312 Posted May 14, 2022 Share Posted May 14, 2022 Hi. I also have the problem that Logic adds 20 seconds of "silence" to every midi export. Has anyone found a solution in the meantime? Thanks! Quote Link to comment Share on other sites More sharing options...
polanoid Posted May 14, 2022 Share Posted May 14, 2022 (edited) 6 hours ago, JT1312 said: Hi. I also have the problem that Logic adds 20 seconds of "silence" to every midi export. Has anyone found a solution in the meantime? Thanks! Can you post an example project in which this happens? Obviously doesn't happen for all projects, as I don't see this here. Also, what exactly do you mean by "20 seconds of silence"? Are the imported MIDI regions too long with no content at the end? Edited May 14, 2022 by polanoid 1 Quote Link to comment Share on other sites More sharing options...
JT1312 Posted May 14, 2022 Share Posted May 14, 2022 As you can see in the (german) screenshot, I created a midi track in Logix Pro X (version 10.7.4) that is about 1 minute long with one midi command at the beginning and one at the end: After exporting, however, a midi file is created that is 1:20 min long: I have attached the file midi-export.mid. midi export.mid This "20 sec bug" does not only occur in this Logic test project, but in all our song projects where midi tracks have to be exported. Quote Link to comment Share on other sites More sharing options...
polanoid Posted May 14, 2022 Share Posted May 14, 2022 (edited) If I reimport that file into Logic, the result is exactly 1 minute long. I assume your second screenshot is from VLC? Is there any documentation on how VLC determines lengths of MIDI files? Also, is there any other software apart from VLC that show the file's length as 1:20? Edited May 14, 2022 by polanoid 1 Quote Link to comment Share on other sites More sharing options...
JT1312 Posted May 14, 2022 Share Posted May 14, 2022 Yes, even if I drag it into my Logic project it is 1 minute long again. The problem is that live on stage we control our guitar effects (and more) via this midi file. It is played through the uTrack24. And unfortunately this also intreprets the 20 seconds longer. Basically I wouldn't care But every song with this midi file has 20 seconds of silence at the end. If you don't have standin ovations after every song, that's a pretty long time until the next song can be loaded. Quote Link to comment Share on other sites More sharing options...
triplets Posted May 14, 2022 Share Posted May 14, 2022 (edited) 38 minutes ago, JT1312 said: This "20 sec bug" does not only occur in this Logic test project, but in all our song projects where midi tracks have to be exported. Yes, VLC will add the 20 seconds in the player, but if you reimport the midi file into Logic nothing is added: Edited May 14, 2022 by triplets 1 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.