PG Music Home
Posted By: riddlereader Band in a Box Midi Recording Issue - 01/03/20 04:00 PM
Hi,

I have been struggling with a BIAB MIDI recording problem for several years. I am close to going bonkers over this – or maybe I'm there already! I posted about it a few years ago, and got a lot of helpful suggestions (thanks, guys!); one of them seemed to fix the problem, and I reported the success here, but within minutes of my posting the problem returned! I gave up on it at the time, but I have taken up the cause every now and then, to no avail. I have spent a lot of time working on it, without result.

The problem occurs when I use BIAB to record from a Yamaha Clavier digital piano. You can see the issue here - note the bottom red/green line, which indicates overlapping notes.

BIAB recording


So my questions are: What is causing those? And how can I prevent it?

A few basic facts before I get to the nitty-gritty:

• The problem does not occur with RealBand, Aria or Pianoteq.
• The problem does occur with two different Yamaha piano models (Yamaha P120 and Yamaha Clavinova).
• The problem occurs whether I connect with a USB cable, or with a Yamaha MIDI cable with MIDI/USB adapter.
• The problem occurs whether I use the built-in drivers or the Yamaha MIDI USB driver.
• The problem occurs with BIAB2006 (yes, 2006, I just recently re-installed it and checked), and BIAB2020, and all BIAB'S in between that I have had.
• The problem has occurred on three computers (2 laptops, 1 desktop), with different versions of Windows.
• The problem does not occur with my old CASIO LK-220 keyboard.
• The problem is repeatable, in that if I play and record for a few minutes, it almost always happens; but it is random, in that it does not always happen at the same time or on the same notes. The randomness makes it hard to troubleshoot.
• If I record a longer piece, more of those lines accumulate.

There was a suggestion that perhaps the Yamaha sends a flood of MIDI messages that overwhelm BIAB. To check, I installed software called Midi-Ox, which monitors incoming MIDI messages. I don't know how to devise a good diagnostic test, but I have run a few simple tests, with results that seem normal. If I press ten keys at once, ten note-on messages show up; if I release them, ten note-off messages are displayed. If I do that test many times, rapidly, I still get ten note-on and ten note-off messages. If I monitor the input while simultaneously recording in BIAB, the only MIDI messages I see are the notes that I press on the Yamaha. Nothing I did seemed to stimulate a flood of messages.

If I set Midi-Ox to see all messages, not just the notes, I do get a continuous stream of Active Sensing messages, a few per second. I assume these are benign; however, it is interesting to note that the Casio keyboard does not send Active Sensing messages, and does not cause overlapping notes. There does not seem to be any way to tell the Yamaha to stop the Active Sensing.

I have varied just about everything I can think of, with no change in results. Things I have played around with, to no avail:
• ASIO vs MME
• MIDI Through ON/OFF
• One-way MIDI comm (disconnected other cable)
• MIDI input and output drivers
• VST settings
• Playing with/without pedal
• Yamaha transmitting on different channels
• Latency settings
• Record on the soloist track vs melody track
• Jbridge settings
• 32 bit vs 64 bit
• Quantizing settings
• Timer resolution settings
• Ethernet function disabled
• Antivirus off
• Record filter – various settings
• MIDI file resolution
• Windows audio sample rate settings
• Piano Local Control ON/OFF
• Set piano to not send Pitchbend, Systemrealtime, Sysex, Program, or Control messages
• Uninstall BIAB, reinstall (twice!)
• Send Extra Note Off Messages set to YES
• Piano Local On set to OFF, at both piano and in BIAB software
• Monitored CPU load while recording, no spikes noted
• Reset priority of BIAB process in Windows
• Isolate the computer from the internet
• Turn off WI-FI
• Stop programs running in the background
• Computer cleanup measures – defrag, disk error check, PC Cleanup, etc



Recently, I began to wonder if some other software on my computer was causing an interaction of some sort. (I had a strange problem once with MS Word, and MS told me to upgrade Adobe Acrobat to fix it. They were right. I guess the two programs used the same DLL file or something like that, so there was an interaction that I would not have expected.) With that in mind, I deleted the Vanbasco MIDI Player to see if that would fix the MIDI problem. Nope.

I had previously assumed two things that I am now not sure of. I assumed that the problem was due to losing a note off message, but now I think that is not right, because sometimes the problem occurs when I am sure I was still holding down the key (i.e., I am sure no note off message has been sent). Also, I assumed that the problem was most likely when there are a lot of notes coming from the piano, but sometimes there are lots of notes, and no overlap problem, and sometimes there is a problem when there are not so many notes.

How accurate is my data? I have no expertise in these things, so I may be misinterpreting some results. Also, I have always assumed I was on the brink of solving the problem, so I was never motivated to keep detailed data for the future analysis; the result being that the quality of my note-taking was not what you would call meticulous.

I have lots of files that can be examined to see the effect. Also, it is but a few minutes effort to create new files showing the effect, with any desired set of parameters.

One thing that mystifies me is that no one else is complaining about this. I tend to take that to mean there is something very specific about my pianos or computers or setup that is causing the problem. But maybe it means that no one else is using the MIDI recording function (???).

Questions that seem to point to a culprit:
• Why does the problem occur with BIAB but not RealBand or Pianoteq? What's different?
• Why does it occur with Yamaha pianos but not with the Casio keyboard? What's different?

Thanks for any suggestion or comments!

Ed

Posted By: Matt Finley Re: Band in a Box Midi Recording Issue - 01/03/20 04:07 PM
That may be clearest problem statement I have ever read on this site.

My first reaction was, is the Yamaha sending MIDI Note Off, but you answered that. My second reaction was to filter the MIDI input (as some do with wind controllers that spew a huge number of messages) but you answered that.

Have you tried writing directly to Support@pgmusic.com ? We are only fellow users here. Further, the number of us who use MIDI actively appears to be a small subset that shrinks more each year.
Posted By: Mike Head Re: Band in a Box Midi Recording Issue - 01/03/20 04:49 PM
Hi
Nice to see a fellow Yamaha user.
Yes indeed. I had this type of problem once with cubase the only program to give me this.
However if you wind the timeline back to the start of the long red note (this is the offending note) and seems stuck on so look at that point for excessive midi activity at that time particularly on that channel but on the others also . This should allow you to see the problem in the events view.

If you don’t need that note delete it, if you do need it insert an end time, before the next occurrence.
You may need a full Daw like Cakewalk for this.
Mike
Can you please attach a file with this problem? You can use the file manager to attach an .MGU file, or use dropbox etc., or send to support email. Mention specifically which bars the problem occurs at.
Posted By: Mike Head Re: Band in a Box Midi Recording Issue - 01/04/20 11:36 AM
Hi

AS I said in my last post if you look at (open) the file in RealBand
You can see in the event list for track 6 that the first stuck note occurs at bar 9.04 .104
Where you send E5 for 21.820 ms
And next at bar 11.04.11 B4 for 22,003 ms.
and similar occurrences just after hat time.
If you shorten these times to a reasonable note length you can rescue your file.
Mike

Attached File
piano.jpg  (7 downloads)
Posted By: riddlereader Re: Band in a Box Midi Recording Issue - 01/04/20 02:24 PM
Mike, yes, thanks. I have rescued files this way using RealBand, and I agree: When there are only a few overlaps, and the fixes are obvious, that works.

But I should explain that when I am setting out to produce a recording, I usually do it in RealBand. On the other hand, when I am practicing, I usually use BIAB. I create or find a file, set it for maybe 40 choruses, set it to record MIDI, and improvise over it. Then I can play it back, assess what I played, and decide where to go next in my practicing. BIAB is much better for these purposes, because it has the repeat capabilities, and the files are so easy to create and modify. I love using BIAB this way as a practice tool. But after 40 choruses, you can imagine what the recording looks like!

Thanks again,

Ed
Posted By: MarioD Re: Band in a Box Midi Recording Issue - 01/04/20 02:34 PM
FYI, Realband, like most all DAWs, allow loop recording. In Realband you can have each looped recording on separate tracks. You might want to try this.
Posted By: Mike Head Re: Band in a Box Midi Recording Issue - 01/04/20 06:19 PM
Hi
Glad this worked.
It seems likely to me that in all your cutting and pasting different choruses together you are some times leaving behind the note off, or overwriting the note off with the next paste.


I also notice that you send an almost continuous stream of pedal events for expression.
This may cause some midi congestion ??

Just a thought.
Mike
Posted By: riddlereader Re: Band in a Box Midi Recording Issue - 01/06/20 02:04 PM
I don't have any idea what the limits are for MIDI traffic, but my experience with Pianoteq and RealBand lead me to believe that the messages from my piano are not pushing the limits.

Just to explore this a bit, I conducted some high tech scientific experiments (kidding there!) that I would call: "Pounding on the Keys with All Ten Fingers". The concept should be clear from the name. I compared Aria, which is free midi recording software; Anvil Studio, which is also free; and BIAB, which ... you know all about.

This image shows piano roll views, comparing the results. As you can see, the Aria and Anvil Studio recordings are clean; but the BIAB recording is a total mess!

Ed

Attached picture midi comparison.JPG
Posted By: riddlereader Re: Band in a Box Midi Recording Issue - 01/06/20 02:14 PM
Originally Posted By: Mike Head
Hi
...
I also notice that you send an almost continuous stream of pedal events for expression.
This may cause some midi congestion ??

Just a thought.
Mike
\

Mike, yes, I was suspicious about that too, so I made some recordings without pedal. I found that it did not make a difference. Also, I record very often with Pianoteq, using the same (ok, sloppy) pedal technique, and have never had the problem with Pianoteq.

Ed
Posted By: riddlereader Re: Band in a Box Midi Recording Issue - 01/06/20 03:41 PM
Originally Posted By: Mike Head
...
It seems likely to me that in all your cutting and pasting different choruses together you are some times leaving behind the note off, or overwriting the note off with the next paste.


Mike, I was not certain what you meant by this, specifically, by the reference to cutting and pasting. Thinking about this, I made the interpretation that you might be referring to the way I input chords on the chord sheet by, for instance, typing chords into the A section, then copying it and pasting it into A2, typing the B section, then again pasting A into A3. So, yes, I'm wondering if something gets dropped in the copy/paste process. So I opened a new BIAB file, with the default 32 bar song consisting of the C chord only, and executed my "Pounding on the Keys with All Ten Fingers" test. So there was no copying or pasting involved. Result: Lots of overlap stuff.

Anyway, thanks for the good idea.

Ed
So just to confirm, this problem happens even if you *do not* use the pedal while recording?
Posted By: riddlereader Re: Band in a Box Midi Recording Issue - 01/06/20 05:29 PM
Originally Posted By: Andrew - PG Music
So just to confirm, this problem happens even if you *do not* use the pedal while recording?


Correct, it happens even if I do not use the pedal.

Ed
Posted By: Mike Head Re: Band in a Box Midi Recording Issue - 01/06/20 05:38 PM
HI

In options / preferences / record filter.
You can chose what sort of midi events to record.
The default is note, sustain, pitch bend.
According to the help button , it might just pay to include other controllers.

The other thing that may be causing you problem with the Yamaha Clavier digital piano, is polyphony. If it is low. I don’t know what yours is, my Clavinover is 128.
I had a DGX 620 that was only 32 note polyphony and it caused me all sorts of midi problems.
32 notes may seem like a lot but if you are playing full left and right hand chords and the piano is using multiple layers as in chorused or octave it can run out.
Then note stealing will occur according to the instruments note stealing rules.
Usually starting on a first in first out basis.

Mike
I would like to see the data that the keyboard is sending. We can see this by using the MIDI monitor. Here is what to do.
1. Open the MIDI Monitor (under the Window menu) and filter it to show only external MIDI input.
2. Press Clear, then Record something in Band-in-a-Box and keep the take.
3. In the MIDI Monitor, click Save Text, and save as a txt file.
4. In BB, save the BB song.
5. Attach the text file and BB song.
Thanks. However that text file is messed up. I'm not sure how you got a text file like that... It should look something like this. After you press the Save Text button (in the MIDI Monitor), you could also simply just highlight and press Ctrl+C to copy, and then paste it into a text file.


Evt # Time (mS) Source Raw Status Chan Data 1 Data 2
1 0 6376 00 00 00 Note Off ($8x) 1 Pitch = C 0 Velocity = 0
2 0 Ext 94 48 63 Note On ($9x) 5 Pitch = C 6 Velocity = 99
3 17 Ext 94 4A 63 Note On ($9x) 5 Pitch = D 6 Velocity = 99
4 19 Ext 94 47 63 Note On ($9x) 5 Pitch = B 5 Velocity = 99
5 81 Ext 94 4C 63 Note On ($9x) 5 Pitch = E 6 Velocity = 99
6 144 Ext 94 47 00 Note On ($9x) 5 Pitch = B 5 Velocity = 0
7 176 Ext 94 4A 00 Note On ($9x) 5 Pitch = D 6 Velocity = 0
8 178 Ext 94 48 00 Note On ($9x) 5 Pitch = C 6 Velocity = 0
9 270 Ext 94 48 63 Note On ($9x) 5 Pitch = C 6 Velocity = 99
10 272 Ext 94 4C 00 Note On ($9x) 5 Pitch = E 6 Velocity = 0
11 303 Ext 94 4A 63 Note On ($9x) 5 Pitch = D 6 Velocity = 99
12 397 Ext 94 4D 63 Note On ($9x) 5 Pitch = F 6 Velocity = 99
13 399 Ext 94 4C 63 Note On ($9x) 5 Pitch = E 6 Velocity = 99
14 461 Ext 94 4A 00 Note On ($9x) 5 Pitch = D 6 Velocity = 0


Attached File
Untitled2.txt  (5 downloads)
Perfect, thanks for sending the files. It's clear what happened in this particular case. I am seeing one stuck note G4 in this file. As you can see in the screenshot, the computer did not receive a MIDI note off (actually a note on with velocity 0) for the first G4.



I suppose Band-in-a-Box should automatically be setting the maximum duration of the note if it doesn't receive a note off before the same note is played again?

I would be interested in seeing a .SEQ (RealBand) with a MIDI recording to see how RealBand is handling this. It would also be good to look at another sample recording to see if there are any patterns.
Posted By: Mike Head Re: Band in a Box Midi Recording Issue - 01/08/20 04:04 PM
HI

Hmm well from the examples you have sent including the one I mentioned earlier.
That is stuck notes E5 B4 and G4 as Andrew has found.
It might just pay to make a test recording playing these notes one at a time instead of a handful.

You could have a key contact problem in the octave 4 and 5 part of the key bed
Or may be as I said some sort of congestion, due to lack of polyphony.
What is your spec polyphony wise?
A very interesting project, this one!!
Mike
Posted By: Mike Head Re: Band in a Box Midi Recording Issue - 01/09/20 07:18 PM
Hi
No problem with polyphony then!
I am clutching at straws now, not much left.

But I do recall when I first bought my Novation impulse 61 key mid controller keyboard, have all sorts of problems of a similar random nature with midi data.
In the end this turned out to be an inferior quality mid cable (too thin) once changed for a thicker gauge all has work well ever since.
I just wonder if because, of the size and position of a large piano your lead may be a bit longer than the norm, mine is from the Clavinover and I made sure to use a thick one.
Below is a copy of an article I wrote explaining this on my web site .
It might just be the golden bullet.

Not all USB cables are the same.

Having spent many hours and sleepless nights in the past with USB connectivity problems. Like my Novation impulse 61 controller keyboard and my Yamaha Cvp 405 dropping their connection to my music software. At a critical point and loosing hours of work. Or the dreaded drive not available when using USB hard drives on my Cvp.
I thought I would pass this on. USB leads from the pound shop just wont do .
Since upgrading my USB leads to the spec below I have had no problems for the last 12 mths or so

Not all USB cables are the same. The thickness of the wires that supply power to the device can be critical to both audio performance,
and its resilience to static electricity. The best way to choose a cable is to look at the markings on the side. These will usually say '2725' and then another set of numbers containing 'AWG': '28AWG/1PR AND 24AWG/2C' or similar. The first number will always be 28AWG, and the second will be a number between 20 and 28. The lower this second number, the thicker the wire. If the printing just says '28AWG', this means 28AWG for both numbers. Focusrite recommends using cables where the second number is 24AWG or lower.

This is especially important if the device takes its power from the USB skt as my Impulse 61 does
As it will play havoc with any running auto keyboard mapping programs like Automap
If it drops its connection..

Also Yamaha keyboards don’t have much power to spare for running usb hard drives that are powered by usb.

Have fun

Rev 8-10-14


Good luck
Mike
Quote:
then another E4 NOTE ON, with no NOTE OFF in between.


Right exactly, so the problem is conceptually very simple... just a missing note off. There aren't extra messages.

I'm just wondering how RealBand handles it - can you record MIDI into RealBand and attach the .SEQ file?
Presumably we should get Band-in-a-Box to handle it like RealBand does, which I'm guessing is to add a missing note off.
Posted By: Mike Head Re: Band in a Box Midi Recording Issue - 01/09/20 08:53 PM
Hi Andrew

Yes but how will you know how long the note should be.
It may be a tied note carried across to the next bar to underlie those notes and complete a chord.
And in any case could be a whole note half note or quarter note etc in which case it will be ms in time compared to tempo as well.
Very perplexing.
Mike
Posted By: Matt Finley Re: Band in a Box Midi Recording Issue - 01/09/20 10:05 PM
Although the solution here appears to involve MIDI commands as I had first guessed, Mike makes good points about cables, and it's a very simple thing to rule out by swapping. Also, a USB cable should not be over 14 feet in length, preferably well shorter.
Posted By: riddlereader Re: Band in a Box Midi Recording Issue - 01/10/20 11:59 AM
Originally Posted By: Andrew - PG Music
Quote:
then another E4 NOTE ON, with no NOTE OFF in between.


Right exactly, so the problem is conceptually very simple... just a missing note off. There aren't extra messages.

...


Andrew,

There are the same number of ON and OFF messages in the file (227). In the cases I checked, there is an OFF corresponding each ON. But you could look at the lines that I marked and make the interpretation that one of the OFF messages got delayed till after the next ON message was received. (As if an OFF got lost in a traffic jam on the MIDI bus!) Lots of possible interpretations.

Ed
Posted By: riddlereader Re: Band in a Box Midi Recording Issue - 01/10/20 12:01 PM
Re the cable discussion:

Yes, I am always suspicious of cables. I have used four cables. Two were USB cables, and I had the problem with both of them. Neither of the cables has any AWG markings that I can see. The other two were MIDI-to-USB, with an active device that translates MIDI to USB. Again, I don't see any AWG. All my cables have been relatively short.

The one I am using at the moment is the Yamaha device with the MIDI-USB converter. I bought this device specifically to see if it would fix the problem.

I also was concerned about my USB hub. It is not in the loop, but I disconnected it anyway to see if that made a difference. No change.

I don't have a computer nowadays with a MIDI-compatible connector. It would be interesting to try that.

At any rate, I will continue to look into the cable issue some more to see what I can come up with.

Ed
This seems a bit different from what I saw with the previous file. With the previous file that I looked at, the second note was played a long time after the first note and there was no note off in between. In this case it seems like there are two notes received for a single note played.
Posted By: riddlereader Re: Band in a Box Midi Recording Issue - 01/14/20 01:03 AM
Agree.

Perplexing!

Ed
Posted By: riddlereader Re: Band in a Box Midi Recording Issue - 01/17/20 10:52 AM
Is there a difference between RealBand and BIAB in how the software reacts to Active Sensing?

If so, that might be a good clue, because the Yamaha pianos use Active Sensing, but the Casio keyboard does not.

Ed
Posted By: riddlereader Re: Band in a Box Midi Recording Issue - 01/22/20 12:14 PM
It has been pointed out to me that my Clavinova uses a "triple sensor" keyboard technology called GH3. (Yeah, surprised the heck out of me, too!) There is a video on Youtube by Pianomanchuck explaining the technology in general terms.

It seems plausible to me that this technology might result in overlapping notes. It has been suggested that maybe Realband, Aria, Anvil, and Pianoteq have incorporated some algorithms to deal with it, but BIAB has not.

I have the feeling of being hot on the trail of something!

Any thoughts?

Andrew, do your software guys know anything about this?

Thanks,

Ed
Posted By: Mike Head Re: Band in a Box Midi Recording Issue - 01/22/20 01:34 PM
HI R reader

I think not, as I am using a CVP405 Clavinova that’s has GH3 and don’t seem to get this problem.
Mike
Posted By: riddlereader Re: Band in a Box Midi Recording Issue - 01/23/20 02:57 PM
I have discovered that this issue has been discussed quite a bit in the Reaper community. I'm pretty sure they are describing the same problem. They attribute it to how the software deals with signals from triple sensor keyboards.

Here are some extracts:

**************************

Consider this MIDI sequence:

TIMESTAMP IN PORT STATUS DATA1 DATA2 CHAN NOTE EVENT
146543542 1 3 144 60 95 1 C 4 Note On
146543812 1 3 144 60 95 1 C 4 Note On
146544096 1 3 144 60 95 1 C 4 Note On
146545843 1 3 144 62 91 1 D 4 Note On
146545972 1 3 144 60 0 1 C 4 Note Off
146545972 1 3 144 62 0 1 D 4 Note Off
146546288 1 3 144 62 91 1 D 4 Note On
146546442 1 3 144 60 0 1 C 4 Note Off
146546442 1 3 144 62 0 1 D 4 Note Off
146546823 1 3 144 62 87 1 D 4 Note On
146547009 1 3 144 60 0 1 C 4 Note Off
146547009 1 3 144 62 0 1 D 4 Note Off
...

The problem is, modern piano keyboards that use a three sensor technology will produce these sequences when a key is stroken and thereafter not fully released, but only half-released and stroken again.
This behaviour mimics the repetition behaviour of a real Grand Piano.
...
Yamaha Digitals and Hybrids like GT2, Avant Grand and all Clavinovas with GH3 keyboards can produce such sequences.
Roland PHA III keyboards /should/ do it. Casio Tri sensor keyboards do it definitely, this are almost all recent piano models from Casio.
...
When I play from my Kawai MP7 to a hardware synth via Reaper, I can have the same note overlapped ...If I use another controller I don't have the problem. ...
MP7 has a triple-sensor keybed action, this is a pretty normal thing then, because you can start a new event before the first one has finished.
...
Triple sensor actions can and will create stuff like that, because you can trigger another note before the first one receives a note off (because of the third sensor placed in between the main two ones that all the other regular actions have).
***************
Extracted from discussions on this forum:
https://forum.cockos.com

Ed
Interesting, so can you confirm that in your testing? If you release the keys completely all the time there should be no overlapping notes recorded? And anybody else with one of these keyboards could confirm this result.
Posted By: Mike Head Re: Band in a Box Midi Recording Issue - 01/23/20 06:41 PM
Hi
Yes that seems a likely reason
When I done my test the other day if I played precisely make sure to let keys fully return before pressing again every thing was fine.
However the first test I done playing odd handfuls of notes without attention of complete key return I did get the stuck notes.

Like in the Ops original test these where often around B3 and E4 that I would often play with my small finger depending when I crossed over especially if playing left hand chords.

I put it down to my sloppy playing for the test , which is why I went on to make a more precise test paying attention to complete key release.

I can see this being a problem with some classical piano.

Holding a note over as in tied notes to underlie notes in the next bar should be ok providing you don’t let that tied note return to the half point.

One of my problems is I tend to be a bit on the legato side as I often use evolving voices for sweep pads that can take a couple of bars to complete the sweep.
If this is layered as say rh voice 2, over grand piano rh voice 1. they both get the same key strokes.

Very interesting topic.

Mike
© PG Music Forums