fbpx
Skip to main content

MIDI Forum

how to control VSTH...
 
Notifications
Clear all

how to control VSTHost with a midi controller?

20 Posts
3 Users
0 Reactions
13.3 K Views
asdf
 asdf
Posts: 8
Active Member
Topic starter
 

I used VSThost to play some effects with my guitar but I also started to have fun with keyboards plugins and figured, what the hell?, why not using a real keyboard instead of my mouse?

So I've bought a cheap keyboard (miditech MT-49) and I try to understand how it works (the manual is not always very clear, some pages are missing actually).

I plug the keyboard from the midi out to the USB port of my computer.
I use ASIO4All as the wave device.
I select USB2.0-midi in "Midi Input" and that's pretty much it. My miditech keyboard is recognized. I can play music.

Now, I'd like to have more control and this is where it's getting problematic.

For instance, I have two plugin (synth1 and noisemo). How can I make the miditech to use synth1 only, or noisemo only or both at the same time?

I've set VSTHost to filter any channel but the 1 and the 2.
I've set synth1 to filter out any channel but channel 1 and noisemo to filter out any channel but channel 2.

I expected that miditech would select synth01 on channel 1 and play noisemo on channel 2 and no sound at all when I select any other channel.

Indeed, only synth01 is played on channel 01 but when I select channel 02, it plays both plugins.
And when I select any other channel, it still works even if it's not supposed to.

And sometimes some note keep ringing even if I don't press them. Sometimes it's in one plugin, sometimes both. It's not regular.

What I'm supposed to do? 😮

Also, I've started to look into the CC. I want to put the volume up and down. So I selected CC 07 and move the modulation wheel and indeed the volume knob move in the plugins but not like the wheel. When it's on the max it goes to the min and sometimes it's on the middle and also I have a feeling that moving the wheel doesn't affet only the volume but all the sound as well...

I don't know where to start. So far I can only play note and change programs.

By the way, how can I be sure that the Keyboard only the presets of the plugins and not his own presets ?
I've seen that I could select "local on/off" on CC 0 and 32 but... according to the manual there's only CC 1-31, then 33-95.
There's 119 CC in total.

It's my first keyboard, I'm lost. 🙁

 
Posted : 09/10/2018 11:12 am
asdf
 asdf
Posts: 8
Active Member
Topic starter
 

No one can help? 🙁

 
Posted : 16/10/2018 1:00 pm
Geoff
Posts: 1043
Noble Member
 

Probably not, given the way you describe things. Unless there's someone with the right combination of all the same bits.

You really need to break the problem right down, start again almost from square one - or maybe with the last point at which things still worked.

Then, add further things, one by one, ensuring that at each step/stage, things get to work again, before moving on to the next step. If you have problems at any stage, by all means ask again, but keep the questions specific to the things that work, and the new bit you've just added that does not work.

Your full question above reminds me of the old (?) joke. Tourists are lost somewhere in Ireland, and they ask a local for directions. Local thinks for a while, then offers "Well, if I were you, I wouldn't start from here!"

Geoff

 
Posted : 17/10/2018 1:29 pm
asdf
 asdf
Posts: 8
Active Member
Topic starter
 

Well, let's start with the beginning then.

My keyboard always send some data on Channel 1 even when I "ask" him to use channel 2.
I set my keyboard on channel 02, I set my plugins to receive on channel 02 and the Note On is sent on channel 02 but the Note Off is sent on channel 01.

I know because I've checked with Midi Monitor.

Therefore, the plugins doesn't receive the "Note Off" message and the note keep ringing, you see what I mean ?

 
Posted : 17/10/2018 2:02 pm
Geoff
Posts: 1043
Noble Member
 

OK.

I can get my head around this. Which is a start.

Firstly, how does the Midi Implementation Chart for the bits you're using define the Channels recognised for In and Out. One problem that you MIGHT be having (and sorry, but if we're going to get anywhere I'll have to ask some 'obvious' questions) is that MIDI really refers to the channels as 0 to 15 (hex &00 to &0F) while many devices etc will refer to them as 1 to 16 so sometimes the same channel may be say 1 and on another device (or piece of software) it will be 0 and on another it might be 2. If you have something that shows the literal midi data, i.e. &91 for the Note ON for Channel 2 (referring to channels as 1 to 16) and &81 (or &91 but with velocity zero) for Note OFF then this will be a help so that you always know what the REAL channels being used are.

In my experience, very few devices SEND midi data on specific channels. Your software/sequencer can do this fine anyway. Usually data is sent on ALL channels, and it is up to settings on RECEIVING devices to be selective as to which channels they respond to. Most devices can be set to respond to certain channels ONLY. If you can, I'd recommend that you go with this as the base, and concentrate on making partic devices respond to certain (or single) channels and don't try to mess with how the data is sent. This has the extra benefit that you'll know the data is there somewhere, this will remove one possible problem.

Next, can you write down an example of the midi data received? Esp an example of where note ON seems to show as a different channel to the Note OFF So I can see the literal hex numbers. ALL of them. One thing to check is regarding the type of Note OFF messages, i.e. as noted above, using literal note off, or using Note ON but with Velocity zero. Most things react to both, but I've heard of things that need to be TOLD to do so (a setting somewhere).

See where this gets us?

Geoff

 
Posted : 17/10/2018 3:01 pm
asdf
 asdf
Posts: 8
Active Member
Topic starter
 

Thanks for the detailled answer.

In my experience, very few devices SEND midi data on specific channels. Your software/sequencer can do this fine anyway. Usually data is sent on ALL channels

Ok. I didn't know that.
But if the keyboard always send on every channel, what's the "channel" button for?
My Keyboard is MIDI Out only, there's no MIDI In port. I plug it in my computer with a MIDI Out -> USB cable.

and it is up to settings on RECEIVING devices to be selective as to which channels they respond to. Most devices can be set to respond to certain channels ONLY. If you can, I'd recommend that you go with this as the base, and concentrate on making partic devices respond to certain (or single) channels

No problem for doing that with VSThost, that's easy. I can filter the channel globally or for each plugin.

Here, I tell VSThost to block all channel on plugin 1 (synth) except channel 2 (for keyboard) and channel 4 (for built-in virtual keyboard).

ps : what's "partic devices"? English is not my language, sorry.

Next, can you write down an example of the midi data received? Esp an example of where note ON seems to show as a different channel to the Note OFF

Like this?

91 24 53 Ch.2 Note On: C1 (36), Velocity: 83
80 24 40 Ch.1 Note Off: C1 (36), Velocity: 64

This what happens when I set my keyboard on channel 02 and I press the first key. I didn't do anything else.

On midi monitor, if I tick all options (on, thru, bytes, time, wrap) this is what I got :

91 24 64 00:05:13.178::59 Ch.2 Note On: C1 (36), Velocity: 100
80 24 40 00:05:13.257::86 Ch.1 Note Off: C1 (36), Velocity: 64

Another example with my keyboard on channel 3

92 24 43 00:09:24.060::70 Ch.3 Note On: C1 (36), Velocity: 67
80 24 40 00:09:24.157::57 Ch.1 Note Off: C1 (36), Velocity: 64

And finally, an example with the VSTHost virtual keyboard, which is set on channel 4 and works as it should :

93 24 69 00:10:02.805::82 Ch.4 Note On: C1 (36), Velocity: 105
93 24 00 00:10:02.839::97 Ch.4 Note Off: C1 (36), Velocity: 0

By the way, when I save the log it also saves a midi file, if you want it....

or using Note ON but with Velocity zero.

I don't know how to have Note ON with Velocity zero.

Thanks for your help.

 
Posted : 18/10/2018 9:36 am
Geoff
Posts: 1043
Noble Member
 

OK. Interesting?

Firstly, clearly I'm not correct about sending channels - prob most of the devices I've used use all channels, is's possible that many keyboards may be single (or few) channels. I've just dug out the manual for a Casio keyboard I have, and that sends on Ch 1 ONLY. I'm prob thinking about the more complex ones, than can load/play midi files for example, and connect to external sound modules, etc.

Sorry about the 'partic'. Blame the quality of your English. I should NOT have expected you to be familiar with 'partic' as an abbreviation of 'particular' (as in 'specific').

I note the midi data sent/recorded. Yes, it may be a help to see the midi file generated, just to be sure. However, the data you show clearly shows that the midi data is as you described in your earlier message, and a spurious (wrong) Note OFF is being created/sent, so we need to try and trace where that's coming from, and why, and more important, where is the correct Note Off for channel 1 going to?

I'll try and download a manual for your Miditech MT-49. This might just be something that that device does, for whatever reason.

I note that the MT does in fact send a Note OFF 8x command, while I see that the Virtual Keyboard sends a Note ON with Velocity 0 to achieve Note OFF. Simpler keyboards may not be troubled by this option and just use the Note OFF, more MIDI enabled devices may well lean towards the Note ON with Velocity zero, as this option is more use for creating midi files which take advantage of 'running status' to save data bytes (but this is not immediately relevant so I'll not go into that now)(and I nearly wrote 'immed' as another abbreviation then...). Since you asked, some devices may have a setting to select which variant you use. Most sound modules (etc) should respond to both variants.

Which channels will the keyboard send on? If it has the same problem on Ch 4 (putting Note OFF on Ch 1) then we know that the problem IS something the keyboard is doing as the VST Virtual keyboard does NOT do this - this sends Note ON and OFF on the same channel (Ch 4). If Ch 4 is OK, can you use the keyboard on 4, and the other device on Ch 1 or 2?

Get this sorted, then move on to the next stage?

Geoff

 
Posted : 18/10/2018 12:36 pm
Geoff
Posts: 1043
Noble Member
 

Right, found a manual for the MT-49.

4 pages long. Remarkably brief. NOT a very reliable manual??

A picture shows the keyboard linked to an external sound module. Misleading, given the other points.

The Midi Implementation Chart gives the impression that the keyboard will transmit Ch 1 - 16, but the text is more explicit that ONE channel ONLY may be selected at a time. Or is there a setting for multiple channels. Assuming that the text is correct, then the keyboard could be used on Ch 4, but will this still put the note OFF elsewhere.

I don't see anything in the manual that might indicate WHY the Note OFF command is going on Ch 1. Ch 1 is the default channel, but the manual says that ALL midi commands go out on the selected channel (which can be any of 1 thru 16). I need to look again at this.

Geoff

 
Posted : 18/10/2018 12:58 pm
asdf
 asdf
Posts: 8
Active Member
Topic starter
 

I note the midi data sent/recorded. Yes, it may be a help to see the midi file generated, just to be sure.

Ok. Here all the 4 logs and midi files generated by midimonitor.

midi files zip

I note that the MT does in fact send a Note OFF 8x command, while I see that the Virtual Keyboard sends a Note ON with Velocity 0 to achieve Note OFF. Simpler keyboards may not be troubled by this option and just use the Note OFF, more MIDI enabled devices may well lean towards the Note ON with Velocity zero, as this option is more use for creating midi files which take advantage of 'running status' to save data bytes

Speaking about Velocity, there's a CC 132 for Velocity but I don't know how it works.

If it has the same problem on Ch 4 (putting Note OFF on Ch 1)

Yes it does (cf the 4th log) and when I play a chord it's even worst ; pratically all the notes, On and Off, are going on channel 1.

can you use the keyboard on 4, and the other device on Ch 1 or 2?

Sorry (again) for my english which one is the keyboard and which one is the device? If the device is the Miditech MT-49, I started with the channel 1 and 2 (see my first message). And the problem then was both plugins were heard when I used channel 2.

The only thing that works correctly is when I use the keyboard on channel 1 with one plugin on channel 1.
But I want to go from one plugin to another from my keyboard...
Unless I can do it without selecting channel but I don't see how.

Do you think all the problem could be related to the USB connection?

 
Posted : 18/10/2018 2:01 pm
Geoff
Posts: 1043
Noble Member
 

Bonjour.

I've d/l the .mid files, I'll have a look in them and see if there's any clarification.

I see that you asked the same original question in another forum (KVRaudio) and you've had a few answers. Has none of that helped? I don't want to be just repeating the same things.

Regarding the midi/usb connection, I don't know. The midi data is explicitly H80 (hex) and H91. It would take a strange cable fault to be altering the data from H81 to H80, i.e. altering ONE of the 8 bits in the number, Unlikely. Like someone in the other forum suggests, something is treating the note off info differently and is continuing to put that to the default channel, Ch 1, regardless of the other channel setting. Why, I don't know. If we cannot stop that action, then we need to find a way around it, so this anomoly doesn't matter.

Oh, when I referred to 'keyboard' I meant the MT-47. By 'device' I mean whatever else you're using at the same time. The virtual keyboard will always be the 'virtual keyboard' and never the 'keyboard' ulness it's the ONLY keyboard being referred to at the time.

Geoff

 
Posted : 18/10/2018 2:41 pm
Geoff
Posts: 1043
Noble Member
 

Bonjour,

Well, I've found something. What, and what use, I don't know. But 'something' is better than nothing.

I attach a file midim.zip. This contains midimoni.txt, which is a 'DECODE' of your midimoni.mid file.

It shows a listing of the data in the file, in a more 'human-readable' form.

Everything is as per previous comments, EXCEPT....

Note that in some cases, a note has been set ON on Ch 4, then turned OFF on Ch 1 (which is wrong, and would have no effect) and then further down the file the note has been pressed again, which appears to have created a normal Note OFF event with velocity 0 immed followed by the correct Note ON again. I'm assuming that this Note OFF has been created by the keyboard, when it sees that the note is already ON, and it needs it OFF so it can turn it ON again properly.

Could be the (quite irrelevant) velocity data on the other Note OFF events that are causing the channel switch?? I think that one of the writers on the other forum was wondering about this too?

Could you test this by pressing the same key a number of times, then another key a number of times, and see if this behaviour is maintained?

Geoff

 
Posted : 18/10/2018 3:24 pm
Clemens Ladisch
Posts: 323
Reputable Member
 

USB2.0-MIDI

That name indicates that your USB/MIDI interface (which probably looks like this) is based on the CH345 chip, which is broken. Its two most egregious bugs are that it replaces all messages that use running status with a note-on on channel 1, and that it garbles received SysEx messages.

Your keyboard and VSTHost are fine. Use any other USB/MIDI interface.

 
Posted : 18/10/2018 10:37 pm
Geoff
Posts: 1043
Noble Member
 

Clemens,

Sorry to be pedantic, but still trying to understand EXACTLY what might be happening here, so need to be.

The running status commands do not have the status byte to be changed, I think you meant to say that the chip is not saving the status byte (which contains the command and the channel) correctly when it actions the original command correctly, so that the following running status commands are actioned to the wrong channel?

This might tie in with the data I'm looking at, although I think there are non-running-status commands that may have been altered 🙂

Geoff

 
Posted : 19/10/2018 5:36 am
Clemens Ladisch
Posts: 323
Reputable Member
 

The USB MIDI protocol does not use running status. When the CH345 firmware encounters a missing (running) status byte, it inserts not the last status byte but 90h.

 
Posted : 19/10/2018 7:03 am
Geoff
Posts: 1043
Noble Member
 

Aha, I didn't know that. Not used USB connection before.

So, as there's running status data coming out the other end, the connection here cannot be using a CH345? Or not using USB at all? But OP refers to using USB connector on PC. So how does that square up?

Geoff

 
Posted : 19/10/2018 8:19 am
Page 1 / 2
Share: