PG Music Home
Posted By: jonel Problem with Midi Channel Selection - 09/05/19 11:02 AM
Hi All,
I'm having a particularly annoying problem with my use of Midi files with RealBand. I'm pretty sure that there is no actual problem with RealBand, but my own understanding of the Midi protocol is causing me a real headache.

When I open a midi file in RealBand I am pleased to see that the set of instruments defined for the tracks of the music are correctly chosen, albeit in a GM format. This has been a great feature for me because it allows me to easily connect to an appropriate other non-gm synth for each track.


I've just been loading some Organ midi files but the instrument chosen by RealBand has been the the Acoustic Piano for each track.
From my understanding of midi I assume this instrument is chosen as the default instrument because none was mentioned in the midi file. Is it because the the midi file was generated using non GM instruments?

I opened the file using a hex editor and this was quite helpful in getting me familiar with the midi structure, but I could only find one channel select code for channel 0 which was 'CO' with the value '00' and I assumed this would be taken as the default Acoustic Piano.
I found myself getting drawn in more to the midi structure and it was using up a lot of my time because the hex editor wasn't too helpful with actual midi interpretation.

Anyway, if somebody could kindly tell me why some midi files do not have an instrument select code, I would be very grateful.

Thanks

Jonel
Posted By: jazzmammal Re: Problem with Midi Channel Selection - 09/05/19 12:54 PM
Downloaded files can have all kinds of crap in them. Forget hex for now, RB uses F3 or F5 or one of those Function keys I can't remember to open the Event Editor. That's a simple list of controllers and notes in the file. It sounds like there's no Program Change for a GM organ so you create it. If there is a PC there change it. If you see a channel number of zero change that too. Once you get into it it's easy to insert CC7 for volume changes to create dynamics, add modulation, whatever. It's all done in the Event Editor.

Downloaded files can be so much fun (not!) But they can teach you a lot. I've had some files so messed up I deleted everything but the notes and started over.

Bob
Posted By: Mike Head Re: Problem with Midi Channel Selection - 09/05/19 01:06 PM
Hi


There are 2 ways the patches get written in a standard midi file.
The first is in the header , these come up as the instruments on the track / channels when the file is loaded. But do not show in the events list.

The second way is to hard write them into the tracks channels in the events list,
this some times occurs at the very start of the event list you can see them as program changes (patches).
These are executed as the file progresses the time line, and can be changed at any time in the file, on any channel providing you don’t want patches from a different bank you only need to enter the new patch where req
In the case of GM all the patches come from MSB 000, LSB 000, so there fore just the instrument / patch number as a program change.
Yes and patch 0 is a piano

Note you probably wont see these changes in the track view as it will show the instrument from the header, but you should here them as the file plays and see them in the events list for that track /channel.

Mike
Posted By: Jim Fogle Re: Problem with Midi Channel Selection - 09/05/19 04:54 PM
jonel,

Thanks for asking the question. This is an interesting discussion.

Mike I'm familiar with patch selection as the first item in a midi channel event list I was not aware of the file header option. Can you go into more detail?
Posted By: Mike Head Re: Problem with Midi Channel Selection - 09/05/19 05:59 PM
Hi Jim

Not certain it is anything you can get control over as a user. Without some sort of hex editor at file level.

But for sure they are often not visible in the events list for a lot of midi files ,
Yet each channel has its own voice.

As far as I know it happens when the midi file is first saved, it writes the program patch assigned to that channel, channels with nothing assigned default to 0.
Once assigned in the header it will stay in force until you re assign it with a program change event. This can of course be right at the start or any time in the file.

Some Daws and synth write the initial ones, as events at the beginning of the event list any way, as well.

Mike
Posted By: jonel Re: Problem with Midi Channel Selection - 09/05/19 06:33 PM
Thank you very much for those very helpful replies. They have caused me to re-assess what I thought I understood about the midi format:

Bob:
Yes I did see some channel number of zero but assumed these to be the first channel available. In other files I did not find any channel numbers and you have explained this to me. What I don't understand is why a midi file, representing a piece of music, would not have any indication of what instrument was to play in the track?

Mike:
I hadn't realised that the patch instruction could actually be held in the header. Since the event list doesn't show it then I suppose I could examine it using the hex editor I mentioned in my original post. I was also confused with the actual value of the channel number and the patch until I noticed that I had to add 1 to each in order to make the result tie up with what was being played in the track.

I will return to the structure again although I find it hard going just working in the hex contents of the midi file. I don't know if there are any tools that can show the contents of the file in a more human friendly fashion.

But..., thanks, I have a lot to work on now.
Posted By: Mike Head Re: Problem with Midi Channel Selection - 09/05/19 09:01 PM
Hi

Ah the dreaded Yamaha instrument number trap.

Normal midi patch numbers 0 to 127 (that is zero based)
Yamaha use one based numbering 1 to 127. for its voice list in the manuals and on the keyboard. But write the midi file 0 based to conform.
This is why its so important to have a pat file if you use a Yamaha voice set .
To be fair BIAB allows you to use one or zero based numbering .

Daws like cakewalk achieve this with .ins file (Instrument definition files)

Obviously things like coyote wave table dxi use standard gm 0 based names.

Extract from Yamaha xg lite pat file.
ZEROBASED
0.0.0=1 Grand Piano
1.0.0=2 Bright Piano
2.0.0=3 Electric Grand Piano
3.0.0=4 Honky-tonk Piano
4.0.0=5 Electric Piano 1
5.0.0=6 Electric Piano 2
6.0.0=7 Harpsichord
7.0.0=8 Clavi
8.0.0=9 Celesta
9.0.0=10 Glockenspiel
10.0.0=11 Music Box
11.0.0=12 Vibraphone
12.0.0=13 Marimba
13.0.0=14 Xylophone
14.0.0=15 Tubular Bells
15.0.0=16 Dulcimer
16.0.0=17 Drawbar Organ
17.0.0=18 Percussive Organ
18.0.0=19 Rock Organ
19.0.0=20 Church Organ
20.0.0=21 Reed Organ
21.0.0=22 Accordion
22.0.0=23 Harmonica


Extract from Cakewalk ins file

[XG lite Bank 0]
0=1 Grand Piano
1=2 Bright Piano
2=3 Electric Grand Piano
3=4 Honky-tonk Piano
4=5 Electric Piano 1
5=6 Electric Piano 2
6=7 Harpsichord
7=8 Clavi
8=9 Celesta
9=10 Glockenspiel
10=11 Music Box
11=12 Vibraphone
12=13 Marimba
13=14 Xylophone
14=15 Tubular Bells
15=16 Dulcimer
16=17 Drawbar Organ
17=18 Percussive Organ
18=19 Rock Organ
19=20 Church Organ
20=21 Reed Organ
21=22 Accordion
22=23 Harmonica

Hope this helps more than confuse.
Mike
Posted By: jazzmammal Re: Problem with Midi Channel Selection - 09/05/19 10:22 PM
Are you confused yet?

Wait, there's more! I don't know about info in the header, I haven't seen that. What I have seen is a separate track with no instruments or notes but containing all the CC and program changes for all tracks and channels. This means if you look at the event list for track 8 for example all you see is the notes but everything else is in that other track. And what's even more confusing is that controlling track can be anywhere. It could be track 1 or track 20 meaning sometimes you have to hunt for it.

Another thing is sysex info. This is used if the original author of the file created it using a particular hardware synth. Sysex id's the synth and all the other CC's are specific to that synth. If you try to play that file with a different synth that sysex info is all wrong making the file sound completely wrong. The named instruments could be played as anything. In that case you delete all the sysex info and reset all the instruments to the GM standard patches.

You have to really want that file to do all that. I'll try to find a better file first.

Bob
Posted By: jonel Re: Problem with Midi Channel Selection - 09/06/19 05:08 AM
Thanks Bob. I really only started this over some curiosity about the behaviour of some of the midi files I had been playing. That drove me to look at the format and then I sort of got sucked in even more and its diverted me completely away from what I was doing in the first place.
The information I have been given on so far has helped a lot. I don't know why I get hung up on stuff like this because it is not that important since I can now achieve what I want to. But... it seems to be that itch I need to scratch.

Thanks
Posted By: Mike Head Re: Problem with Midi Channel Selection - 09/06/19 10:00 AM
Hi Jonel

Well if you are still in for a bit of info on this stuff.
Here below is a link to one of my old post of a technical articles from my website, about just what you see and what you hear or don’t in Realband track view window.
It takes a bit of getting your head round but you may find it useful.

https://www.pgmusic.com/forums/ubbthreads.php?ubb=showflat&Main=63093&Number=421946#Post421946

Mike
Posted By: jazzmammal Re: Problem with Midi Channel Selection - 09/06/19 01:33 PM
Originally Posted By: jonel
Thanks Bob. I really only started this over some curiosity about the behaviour of some of the midi files I had been playing. That drove me to look at the format and then I sort of got sucked in even more and its diverted me completely away from what I was doing in the first place.


Right, happens to me all the time as well. Usually this is the fun part of our little hobby. Where it gets frustrating is when I'm under a time crunch usually involving a gig and I need to create charts for new songs I've never played before. Otherwise, music in general and messing with all this software is what I really love to do and it keeps us sharp. It's not easy figuring this stuff out. Seriously, would you rather learn all you can about midi files or keep watching reruns of Law and Order?

Bob
Posted By: jonel Re: Problem with Midi Channel Selection - 09/19/19 06:36 PM
Thanks Bob, sorry for the delay in acknowledging - I've just had a little sojourn to Majorca.
Posted By: silvertones Re: Problem with Midi Channel Selection - 09/19/19 07:05 PM
Bob,
Unusual but I disagree. Sysex is for parameters of a synth that are not covered by system common paramaters.
Sysex = system exclusive.
CC = system common parameters
Posted By: silvertones Re: Problem with Midi Channel Selection - 09/19/19 07:08 PM
It's the GM thing that gets folks confused.If the synth be it hard or soft you are using is not GM you have a lot of resetting up to do.
Posted By: silvertones Re: Problem with Midi Channel Selection - 09/19/19 07:10 PM
Patch 1 on a synth doesn't have to be a piano unless it's a GM compatible synth.
Thanks for reposting that older post Mike. I had saved it on my old computer and never transferred it over to this new one. Got saved on this one now. good information.
Posted By: Jim Fogle Re: Problem with Midi Channel Selection - 09/20/19 10:48 PM
Originally Posted By: Mike Head
Hi Jonel

Well if you are still in for a bit of info on this stuff.
Here below is a link to one of my old post of a technical articles from my website, about just what you see and what you hear or don’t in Realband track view window.
It takes a bit of getting your head round but you may find it useful.

https://www.pgmusic.com/forums/ubbthreads.php?ubb=showflat&Main=63093&Number=421946#Post421946

Mike


Mike,

As Charlie indicated, that long post about getting synths to properly work in RealBand is GOLD. May I humbly suggest you either (1) Copy and paste the message to the Tips & Tricks forum section or (2) post the message link to the Tips & Tricks forum section along with an explanation of why the post exists.
Posted By: silvertones Re: Problem with Midi Channel Selection - 09/21/19 12:31 AM
Mike's post on midi is awesome and should be pinned in the RealBand Forum.
Posted By: Mike Head Re: Problem with Midi Channel Selection - 09/21/19 12:01 PM
hi

Thanks Jim, Charlie and John

Now available via tips and tricks.
Posted By: jazzmammal Re: Problem with Midi Channel Selection - 09/24/19 02:10 AM
I don't want to rain on your parade Mike, you're pretty knowlegeable but I just read through your Fine Tuning RB etc regarding VST's and don't get the first half of it.

It's not that complicated but you sure make it seem complicated. First you wrote you left the Use Default Synth checked and set it up for Tracks 1-5 and you were happy with your Thru track for your keyboard voice as you wrote:

Quote:
This is easy in Realband’s Options / preferences / midi /midi thru / set track specific
This way if I am recording a trumpet by playing notes into a track while recording I hear a trumpet or what ever other instrument I choose on any track I hear that tracks voice .

Ok we are looking good, now here comes the rub.

Lets say I have the first 5 tracks going to my default synth via the afore mentioned
Route MIDI playback to my default Dxi/Vst synth.
Fine I hear these and my thru voice is true to the selected track voice.


You don't say what the channel number was for Thru but the assumption is it had to be one of Tracks 1-5 otherwise you would not have heard it.

Then you talk about setting up Kontakt on Track 6:

Quote:
For track 6 I Insert Kontakt as a Specific vst synth for midi track
Load up an instrument from my Kontakt library. Realband sets up the fist available free port for this on this track in this case it would be port 17. Fine any midi data coming from data recorded on track 6 is routed to my Kontakt selection and plays that voice, and the other tracks play the default synth voices.

Unfortunately the Thru voice for track 6 still gets sent to the default synth as per my route MIDI playback to my default Dxi/Vst synth and plays the default piano (as there is no other voice specified for that track
As it is specified in Kontakt on port 17.

The work around for this is to un tick the box in midi set up for Route MIDI playback to my default Dxi/Vst synth.

Now I hear the Kontakt voice as the play through voice on track 6.


What's that? You said the default synth was set to channels 1-5. Did you mean 1-6? If it was 6 and you knew that was your Thru channel then of course you knew you needed to pick an instrument for it. But then you wrote "plays the default piano (as there is no other voice specified for that track) As it is specified in Kontakt on port 17" Again, what? You did not select an instrument for Track 6 in Kontakt? Color me confused here and then you say you had to uncheck Use Default synth. Ok unchecking that seems to be the main point so why put in all the rest of it? Just say you need to uncheck the Default Synth. That's really confusing.

Now you're talking about latency:

Quote:
The other 5 tracks now go to what ever I have set as my mid out device with I might say any latency derived from that trip, but I do hear the track specific voices.

So to get it back to my preferred synth for those tracks I have to:
Assign each track to its own instance of my preferred Dxi/Vst synth.
Its not really a separate instance as such it is the same synth inserted on port 32 once used multiple times. This way I get no latency and every track 1-5 and the Kontakt track have the track specific play through voice.


Talking about invoking a synth multiple times is fine but what you did here has nothing to do with latency. The default synth can be a Dxi or a VST and both are subject to whatever soundcard or interface driver you're using. Latency is latency regardless. Are you saying there really is a difference in latency between the Default Synth and any other synth? I've never heard that and I use different synths including the Default all the time.

Since some folks seem to think these instructions are gold and need to be put into Tip and Tricks, I respectfully disagree with the first half of this, it's pretty simple.

Here's all you need to do:

If you want to change a synth on any track you simply change it. Right click in the Track Name window, select Specific DSi/VST Synth. It's irrelevant if you have the Default Synth checked or not, it's all controlled by the Track Info window by selecting Specific Dxi/VST synth for MIDI track. If you have six synths then set them up on six tracks or if one is multitimbral then use it on several tracks as you described with one of the Kontakt synths.

If you want to test the same synth for the whole song then after selecting a synth for any track also click on Set all MIDI tracks to the same synth you just selected. You can do this to test every synth in your system if you want. Select it then Set all MIDI tracks to it.

That's it.

All of this has nothing to do with the Default Synth setting, the Track Info window bypasses that. UNLESS...

When using the Thru channel to play/record a midi instrument live the Default Synth overrides a different synth you put on that channel? Ok, so uncheck the Default Synth. There's your tip along with my simple instructions.

When I said RB is not complex this is what I mean. A Tip and Trick like this whole post makes it seem to noob's that man, you have to jump through a lot of hoops if you want to use something other than a basic GM synth and that's not true at all.

If I'm wrong please tell me but my workiflow is how I've been doing it for for some time. Just to make sure I'm not smokin my socks again I just set up a song with the Microsoft Wavetable, Coyote WT, SampleTank 3, the Forte Dxi and the Yamaha SPG2 that I think you posted. They're all playing fine together. AND the Default Synth is checked. AND I confirmed they're actually playing, I'm not listening to the Default Synth but the tracks say all these other synths. They're all playing.

Finally, your post is from 2017. Maybe my method was a new version since then? I'm thinking I've been doing this longer than that but memories fade. In any case I really think you should simplify your post in Tips and Tricks.

Bob
Posted By: Mike Head Re: Problem with Midi Channel Selection - 09/24/19 10:09 AM
Hi Bob

You miss understood yes I can set the first 5 tracks as default synth and it will play the thru voice if I make Track specific my preference
I realise that I could change any one of these to specific synth, and that would also play thru the specific voice, as you say this is normal.

Yes I did mean track 6 for my Kontakt track. Which was an empty track till now.
This gets its voice inside Kontakt from the Kontakt library instrument.
But the play thru voice you get is from the Realband track info, not the inserted internal Kontakt one on that track. You can make it sound the same if you have a similar midi patch in you synth by selecting it.
But the whole point of using Kontakt is to get voices I don’t have in my synth.

This is why as I explained to hear the actual voice in Kontakt as a play thru you have to not Route all midi to your vst dxi
Also explained is that after doing this to hear your other vst dxi including what was your default you have to insert individual instances of them on the tracks that use them (the first 5) in this case.
My main purpose for doing all this is to hear the play thru voice of the instrument I am using, as it may be a Kontakt instrument like Requiem light singing Latin Vowels played by a midi keyboard,
Hope this clears it up.

Please note
QUOTE From Kent PG music in response to an earlier link to my post on Realband

"Re: midi controller recording issue with Realband

Hi Mike,

Right, the "Track Specific" setting applies to the MIDI channel and patch you've assigned to the track, but not the plugin.

The tip in your longer post about unchecking "Reroute MIDI playback to default DXi/VSTi Synth", and manually assigning each track to a synth is the ticket to using a specific synth applied to a track for MIDI Thru.

Thanks for that tip, I'll add that workaround to my bug report in case this comes up again.

Thanks
Kent
PG Music
"

I rest my case.
Mike
Posted By: jazzmammal Re: Problem with Midi Channel Selection - 09/24/19 02:20 PM
I'm not disputing that point Mike, what I'm saying is that whole section of your post is very confusing that's all. All it needs to say is this:

"If you're using a midi controller to play a VST plugin live, uncheck the Default Synth."

I'm basically being a book editor here, just trying to keep things simple for users who don't understand all this.

Bob
Posted By: jonel Re: Problem with Midi Channel Selection - 09/24/19 04:01 PM
Mike was correct when he specified Options / preferences / midi /midi thru / set track specific because that is when you devolve the routing to the track that is selected. You would have been correct if Mike had specified selecting the global setting.

If a VST is now added (not Kontakt) to one of the tracks then Port 17+ takes over. With this track selected we will still get 'thru' routed correctly with all the other tracks being routed to the default VST.

If Kontakt is added there are sometimes issues and sometimes not.

For example, if I insert Kontakt and use a Strings or Brass instrument then it works just fine in the way that built-in VSTs works. However, if I use an instrument like Electric Sunburst Guitar then it definitely will not work. Only when Omni is selected on Kontakt and the routing in Midi Preferences is unswitched can I get this too work. I have had this problem lots of times in the past and I'm still not entirely sure why this happens.

But, as you say, other than these issues I've had with Kontakt, the configuration is quite simple.

There is one other problem I have faced in Midi Preferences for 'Thru'. If 'Global' is selected then the parameters in the box for Port and Channel become valid (which is what you were alluding to with regard to 'Thru'. I wanted to test this out with my Kontakt instrument. I noted that my instrument was allocated Port 17 and Channel 1. So, I tried to set Port 17 and Channel 1 in this box, assuming that this would be the instrument that would play from my midi controller. But, shock horror, I cannot set any port number above 16! So there does not seem to be any way of allowing this configuration.


Jonel
Posted By: Mike Head Re: Problem with Midi Channel Selection - 09/24/19 05:49 PM
Hi
Thank you both for your interest and support.

There are 3 things to consider hence my description.
To hear your keyboard playing the voice or synth set for a track. Be it the default or a plug in

1: Set thru to track specific in options / preferences / midi / midi thru.

2: If you are using a default midi synth in midi setting under the midi device icon
That is tick in the box reroute midi to DXI/ VST if using one.
That is all you need.

3: If you have another midi synth as a plug in on an other track to hear its voice as the thru voice you must take out the tick above. And then insert separate instances of what was your default synth to any tracks that required it.
This is all to do with port allocation and what Realband treats as the thru voice.

There is more about ports in my original post.

Have fun
Mike
© PG Music Forums