PG Music Home
Hi everybody,

I'm working on a little MIDI VST plugin that will generate a real-time guitar/bass fretboard display of the notes being played. What makes it different from pretty much every other fretboard visualizer that I've seen is that it shows the notes played in all possible positions simultaneously, serving as an educational tool to learn how to play the same thing in multiple positions. The user can customize the number of strings on the instrument and the tuning. Hopefully some people will find it useful. I'm planning to use it for a series of guitar lesson videos on YouTube.

Here's a simple example of my VST in its current early alpha form. This is a test with a simple example MIDI file I cooked up:


It's working pretty well so far, so I decided to export some MIDI from BIAB to test it out. Unfortunately, all of the notes coming from BIAB end up being visually "stuck," i.e. there appears to be no Note Off event telling the notes to stop playing. You can see that here:


I analyzed the output of BIAB using a third-party MIDI logger and my suspicions were confirmed. BIAB does not appear to generate Note Off events when a note ends. Take a look at this image (messages beginning with a 0x93 are note-on messages on channel 4... note-off messages would start with 0x83, but they never appear):


Further inspection led me to use BIAB's built-in MIDI Monitor (found in the Window menu). It produces the same result:


There is a filter option in the MIDI Monitor and I double-checked it to make sure that Note Off events would be displayed:


So, it's pretty clear that BIAB does not generate Note Off events. I have a few questions about this.

1) First of all, aren't Note Off messages an essential part of the MIDI spec? Why are they not being generated by BIAB?

2) How does the software know when to stop playing a note if there is no Note Off message corresponding to the Note On message? As far as I'm aware, there isn't any duration information in a Note On message, so I don't see how that would work.

3) Is there an option hidden in one of the menus in BIAB where I can enable Note Off messages?

Any insight would be greatly appreciated. Currently, BIAB's output doesn't work with my VST, which is a little frustrating.

Thanks!
So, this is one of those cases where I hit the post button a little too soon. It looks like BIAB sends Note On events with a velocity of 0 to represent Note Off events. That's a little odd, but now that I know this, I can modify my plugin code to make a special case for when it receives a velocity=0 Note On event.

I was able to update the code and it's now working.


I'm still curious though, why no Note Off events are generated. Again, it just seems counter-intuitive since the MIDI Spec says that notes should end with a Note Off event. Any insight?

Thanks!
My understanding of the MIDI spec is that there are two ways that a Note-Off event is produced.

1: Note-Off can be produced by 0x80 (top bit set in high nibble of the Status Byte),
2: Also if the velocity is set to zero then the Note-On message is interpreted as a Note-Off message, therefore releasing the note (Note-off).

BiaB probably use the second implementation

HTH. And good luck with your project!

Trevor
Thanks Trevor,

I wasn't aware of the second implementation, but it makes sense. Thanks for pointing it out! I have updated my code so that both cases are handled now.
Today, AFAIK, most MIDI notes end with velocity and not a note off event as this save time and code as explained here:

http://www.nyu.edu/classes/bello/FMT_files/9_MIDI_code.pdf

Velocity today really has two functions, to determine how hard the note is played and how long that note lasts.
Thanks, MarioD!
Thesleeve, I would really like to try your vst, actually there is nothing like it of what i can found !! And i would like to pay for if..

Please reply..

Thanks -
© PG Music Forums