PG Music Home
Posted By: Dave R Help With MIDI Event Editing - 05/08/11 08:19 PM
I thought I'd post this question to see if other Forumites with more experience with MIDI editing could provide some suggestions to try to solve a MIDI related problem.

In the last few weeks, I decided to take some favorite MIDI files that I have collected over the years and import them into BIAB (2011). I have successfully imported the chords and melody tracks from about 60 MIDI files, but 1 or 2 of them exhibit a strange problem that I haven't been able to isolate and/or remedy (as of yet). I don't want to spend an inordinate amount of time or effort trying to figure out what's going on, but I thought someone may have run across this already, or know where to look for the source of the problem.

What I generally do is open the MIDI file first in Realband to examine its structure and identify the tracks for the melodies that I want to capture in BIAB. Most of these arrangements are pretty complex, requiring import of multiple channels from the source file in order to capture the good sound of the original file. Using the "Import chords from MIDI file" function, after inspection of the source file in Realband, I decide which channels to import to the Melody and/or Soloist tracks of BIAB. After importation, I then (usually) use the sequencer mode within BIAB to rechannel the imported tracks, so they don't appear on the channels used for the BIAB styles (2,3,6,7, and 10 plus Thru Channel 5). After selecting the appropriate style to go along with the melody, these files are then saved as .MGX files. In a few instances, with simpler, less complex melody tracks, I have been able to import the note information from the original MIDI file into the Melody or Soloist track, and then use the BIAB patch change features to change the Melody or Soloist track as needed to achieve the desired results, then saving that file as an .MGU file.

The problem that I have observed with two MIDI files that I have imported is that the song plays fine the first time it is run in BIAB, but when BIAB loops the song back to play again, or if you manually click “Play” after the song has played one time, one of the re-channeled tracks (comprising part of the melody) has a problem with correct sound playback on the second or subsequent playbacks. Usually only one of the re-channeled tracks is affected, and the problem is that some of the pitch bends during the second or subsequent playbacks of the song are not played correctly for that channel.

I need to indicate that I use an external MIDI synth, the Roland SD-50. I suspect that during the initial playing of these problem song files, there is some MIDI controller event somewhere in the body of the song that gets sent out to the SD-50, which affect playback on the second and subsequent runs. I have done some troubleshooting, and I have found that for one of the problem songs, the “rogue” event is near the end of the song, and for the other problem song, it is near the middle of the song. However, there are thousands of events to look at, making isolation of the exact cause a daunting task.

I have found that the only way to "fix" these problem files is to manually send a "GM Mode ON" message manually from BIAB to the SD-50 before trying to re-play the song. I looked at the MIDI Monitor and saw that the "GM Mode ON" message sends a Controller 122 message with the data value = 127 to all 16 MIDI channels (this is the Local Control ON message).

Of course, I can mentally flag these two songs and remember to send the "GM Mode ON" message after playing them as a “work-around” for the problem (I would also want to send this message so that it doesn't mess up any other song that is played after it), but if it is not too complicated to imbed some additional MIDI events into these two files to take care of the problem automatically, that would be preferred. I did try to manually add the “Local Control ON” message at the beginning of all of the imported channels for one of the songs (which has 10 imported channels divided between the Melody and Soloist tracks), but that didn't fix the problem, which still occurs during the second playback. I didn't add the” Local Control ON” message to the BIAB channels used by the BIAB style because I don't think they are being affected by the problem, and also I don't think that you can do this in BIAB (probably have to go back to Realband.......getting too messy for me!). I would think that if there is some sort of MIDI event sequence that can be appended onto the END of these files, which can reset "normal" operation, this would automatically fix the problem when re-playing these files (or any other file loaded after it).

Any thoughts and/or suggestions would be appreciated.

Thanks,
Dave R.
Posted By: Muzic Trax Re: Help With MIDI Event Editing - 05/08/11 10:47 PM
Dave,

Have you tried using the Piano Roll to isolate the messages? I assume they would show up as event data if you have selected the correct midi channel, CC # and bar # in the Piano Roll. I know the guitar bends show when properly selected, so I assume the GM reset message should also appear there. The key is selecting the correct set up, as mentioned above, to see the data.

You might be able to hi-lite the data and use copy/paste to place it in the desired position of your song.

Trax
Posted By: Mac Re: Help With MIDI Event Editing - 05/09/11 01:42 PM
Try placing Control Event 123 (MIDI Reset "Panic" Button) at the beginning of the file.

If that doesn't do the trick, try placing it at the end of the file as well.



--Mac
Posted By: Dave R Re: Help With MIDI Event Editing - 05/09/11 10:02 PM
Mac,

Thanks for the tip. One question......I'm assuming that I should add Control Event 123 just to the channel that I am having the problem with? Or does that controller message have to be added to all of the channels which have been imported from the MIDI file into the Soloist and Melody tracks of BIAB?

Thanks,
Dave R.
Posted By: Mac Re: Help With MIDI Event Editing - 05/10/11 02:16 PM
Well, it depends on what is going on inside the offending files.

Try it the easiest way first and if no joy, go for broke.

Bear in mind that this is only a suggestion from a MIDIOT who does not have the files to examine. It may be someting else entirely.

123 Panic can get the MIDIOT out of a lot of different troubles, though, since it will reset the MIDI synth back to square one. Sounds to me like these files are sending a command or two that does not get reset before the song ends. There can be lots of reasons for that, whoever created the file may have done so on a software or machine that does not require such resets. So the whole thing would work for them on their setup and they post it somewhere. The downloading of free MIDI files is nice, but there is a lot of stuff like this one must contend with from time to time.


--Mac
Posted By: Tommyc Re: Help With MIDI Event Editing - 05/11/11 12:56 PM
Scroll down your events list and see if there are changes in instrument patches, I have seen this in midi I have had problems before. I have erased the instrument patches from the beginning to end before and chose the sounds I wanted manually and it cleared up problems. Also events that have only 0 as a value can sometimes be a problem , especially if it appears to be of an unknown use. Most have at least 1 as a value . Save it as a new name in case it won't work after the changes.
Posted By: rharv Re: Help With MIDI Event Editing - 05/11/11 11:46 PM
For Roland JV (and others) the sysex message is F0 7E 7F 09 01 F7
That resets the synth to GM (performance) mode.
You can get the sysex file here-
http://www.gmarts.org/index.php?go=334


Can BiaB do sysex?? Never got that deep in BiaB, I'm in RB by that point..
I guess it can -
http://www.pgmusic.com/bandbox_featurelist.htm
Use ctrl+F to open the Find window and type in 'sysex'.
Posted By: Dave R Re: Help With MIDI Event Editing - 05/12/11 12:26 AM
Here's a status update...

I fixed one of the problem imported MIDI files by going to the affected channel imported into the BIAB Melody Track (there is more than one channel that was imported into the Melody Track), and I appended the #121 All Controllers Off message (value = 0) at the very end on that channel. That stops the Pitch Bend problem that was happening with that channel on replay.

With the other problem imported MIDI file, that trick didn't work! That song needed 10 imported channels to capture the total sound effectively, so I initially imported 3 into the Melody track and the other 7 into the Soloist track. The pitch bend problem is on one of the 3 channels within the Melody track. What I've done is move the 2 channels that are not having problems from the Melody track into the Soloist track, so that I have isolated the problem channel all by itself in the Melody track. I then reverted the Melody track back to single channel mode, which makes it easier to work on the problem channel. The only thing which "fixes" this imported file, is to manually send the GM Mode On message from BIAB to the SD-50 before replaying the song, which, according to what the MIDI monitor displays, is that a #122 Local Mode ON message (value =0) is sent out on all 16 channels to the SD-50. I tried embedding a #122 message at the beginning of the problem channel, but that also didn't fix the pitch bend problem on replay.

That problem channel does have an embedded patch change for about 16 bars within it, after which it changes back to the primary patch. So, I might try following the suggestion to delete all the embedded patch instructions on that channel, and have the changes made by BIAB using the bar settings function (which you can only do if the Melody Track is not in sequencer mode).

In the meantime, I have an another "almost-as-good" MIDI file for that song, which I have imported with no problems. But, I still want to play around to see if I can fix the problem file.

FYI, I did find one web page with some helpful MIDI info here:

http://home.roadrunner.com/~jgglatt/tech/midispec/ctllist.htm

I'll report back after I try the patch change modifications.

Dave R.
Posted By: Dave R Re: Help With MIDI Event Editing - 05/12/11 08:39 PM
Problem solved!

After I isolated the problem imported channel by itself on the BB Melody Track, I set the MIDI Event filter to look at "Other" controller events on the channel. I found a number of Controller #98 & #99 events (Non-Registered Parameter events) plus a number of Controller #100 & #101 events (Registered Parameter events), as well as a number of Controller #6 events (Data Entry events) spread throughout the song. I deleted all of these events, and that eliminated the Pitch Bend on second playback sound problem. I also found that, after deleting all of the "rogue" events, I didn't need to append a #121 Controller event (value = 0, all controllers off) to the end of the event list.

Thanks all for your suggestions.

Dave R.
Posted By: rharv Re: Help With MIDI Event Editing - 05/13/11 12:54 AM
Great problem solving.
This is how MIDI works; if you tell a computer to do something it will do it. Might not be what you want, but it will do it!

Those Non Registered Events can wreak havoc on different systems.
Posted By: jford Re: Help With MIDI Event Editing - 05/13/11 03:16 AM
I've always believed that computers only do exactly what you tell them to do, except for when they don't...
Posted By: jazzmammal Re: Help With MIDI Event Editing - 05/13/11 07:24 AM
This is a good example of the problems with some of the free midi's you find on the internet. Those files play fine on the equipment the person who created the files used but try it on a different setup and you see what you get. He then posted them on some website and they were picked up by others who put together those huge compilations of midi files without even trying them out. They just see the song title and think it would be cool to add it to their online collection. Luckily there's still enough good ones floating around that it's worth it to go trolling from time to time.

Bob
Posted By: Dave R Re: Help With MIDI Event Editing - 05/13/11 03:43 PM
FYI,

With all the messing around I've been doing, I also discovered a slight "glitch" with the BIAB "GM Mode ON" message. Apparently, BIAB sends out a GM1 message and not the newer GM2 message, because when I send that message to the synth, it locks into GM1 mode only, and from that point you can't get the synth to turn on a GM2 patch, although BIAB does send out the correct GM2 patch change message. If I need to send out this message, I have to then power cycle the SD-50 synth to use a GM2 patch!

I just posted this minor software change request on the BIAB wishlist.

Cheers,

Dave R.
© PG Music Forums