FUBAR

Trouble with Synthesia, your keyboard, or adapter? Think you found a bug?
When describing problems, always mention your OS and game version (shown at the bottom of the title screen).

If your keyboard has USB or MIDI ports, there is a tremendously high chance (>99%) it will work with Synthesia. See what you'll need on the keyboards page.
Post Reply
MulleDK19
Posts: 16

Post by MulleDK19 »

I've been on 10.4 since 2017 and have had some issues that I did have workarounds for.
But recently decided to update to 10.6 to see if the issues were fixed.

And now it's a hundred times worse, the issues are more frequent, and the workarounds no longer work.

1. I have a Kawai CN-34, and from time to time while playing, Synthesia will randomly start to hang. In 10.4, I could just turn off the piano, that would unhang Synthesia and pop up the disconnection error, and I could then just start the piano again and keep playing. Annoying, but playable.

But with 10.6 things are now completely FUBAR. Not only is looping broken (The move Start and End loop buttons don't work (one button does nothing, the other sets the loop to the entire song)), but now the hang seems not only more frequent but now when the disconnection message pops up, Synthesia isn't even processing input from the piano, so I can't use the keys I've bound to shortcuts to close the popup and have to go to my computer to hit escape.

Not only does it not process the input from the piano when the message is showing, but it buffers every single key press from the piano, so if I play a hundred keys on my piano with the message popped up, and then hit escape to close it, Synthesia will then tell the piano to play those 100 keys at the same time.
Nicholas
Posts: 13135

Post by Nicholas »

Which platform? PC, Mac, Android, or iPad?

(If Windows 10, are you using the WinRTMidi backend?)
(If Android, which of the two MIDI backends do you have selected on the Settings screen?)

I'll start looking into each one of these. Sorry for the trouble.
MulleDK19
Posts: 16

Post by MulleDK19 »

I'm on Windows 10.
Nicholas wrote: 12-21-19 2:58 pm (If Windows 10, are you using the WinRTMidi backend?)
No idea what that is, so probably not.
Nicholas
Posts: 13135

Post by Nicholas »

Alright, sorry for the wait on this. Between the holidays and tracking down other also-critical fixes, it's been busy around here!

The keyboard disconnect screen is always an indication that there is a problem somewhere between the keyboard and your OS. Synthesia can't make a keyboard disconnect, even if it wanted to. It looks like the CN-34 has both MIDI ports and a USB port. Which are you using to connect it? If it's a MIDI adapter, hopefully it's not any of the bad ones. If it's a USB cable, check that it's not too long, that it isn't running parallel with any power cables, and that it's a nice, shielded cable.

I can confirm the "it buffers every single key press from the piano" bug. It looks like that was introduced in the code accidentally during a related change in Apr-2018. I'll get that fixed before the next (nearly imminent) update.

I can also confirm that shortcuts aren't registered by re-plugged devices until backing out of the "device disconnected" screen. That one is a little more mysterious. I'll try to track that down for the next update, too.

Regarding the Loop Start/End buttons, would you happen to have measure lines hidden? (F4 is the default shortcut to toggle them.) Those buttons adjust the loop to the nearest next/prev measure. With measure lines hidden, there is essentially just a single, large measure, so "one button does nothing, the other sets the loop to the entire song" is "correct" in this case, for better or worse. There is some real utility for having it behave that way: the buttons also snap to the nearest bookmark. So by hiding measure lines, you can use those buttons to quickly set loops around entire sections of a song. (This goes nicely in tandem with the related shortcuts under the Settings --> Shortcuts --> "Loops" subheading.)
MulleDK19
Posts: 16

Post by MulleDK19 »

Thanks for looking into it, and happy new year!

I'm using a quite thick, high quality USB cable.

It's not that Synthesia disconnects the piano, it's that I have to disconnect the piano. From time to time, at seemingly random, Synthesia just locks up. Then I have to turn off the piano (which of course disconnects it) and Synthesia resumes. Once it does, I can then turn the piano back on and resume playing (after closing the disconnect popup that appears after Synthesia resumes). It's like Synthesia gets stuck in a deadlock or something. This has been an issue I've been having in all the time I've been using Synthesia. I can provide dumps for these moments, if that's helpful.


I also have another issue where from time to time at random, Synthesia will stop playing notes on the piano, until I restart the piano (it registers my presses, but the piano plays no notes (unless local control is on, but that won't play the notes from the tracks I'm not playing)).


I did indeed have measure lines hidden. Didn't know that was a feature. That's gonna make it a whole lot easier to set up loops, which has been like my biggest hindrance for learning.


Also, I'd also like to request a feature to not use the damper. I have this issue with a lot of songs where all the notes are overlapping because for some reason the piano is told to hold the damper down through the entire song. It becomes difficult distinguishing the notes, and I have to basically tap the damper pedal myself to hear it proper.
Nicholas
Posts: 13135

Post by Nicholas »

MulleDK19 wrote: 01-02-20 11:39 amThis has been an issue I've been having in all the time I've been using Synthesia. I can provide dumps for these moments, if that's helpful.
Did you mean a dump created using something like Microsoft's procdump tool? That may actually be very helpful if it's something hanging up the app. (I just wrote instructions for that process a few weeks ago.)
MulleDK19 wrote: 01-02-20 11:39 amI also have another issue where from time to time at random, Synthesia will stop playing notes on the piano, until I restart the piano (it registers my presses, but the piano plays no notes).
It definitely sounds like something... hectic is happening on that MIDI connection. Have you ever taken a look at the types of things your Kawai is sending through a utility like MIDI-OX?
MulleDK19 wrote: 01-02-20 11:39 amAlso, I'd also like to request a feature to not use the damper.
If you disable Settings --> Advanced --> Pedal Messages, does that solve the problem?
MulleDK19
Posts: 16

Post by MulleDK19 »

Nicholas wrote: 01-04-20 2:51 am Did you mean a dump created using something like Microsoft's procdump tool? That may actually be very helpful if it's something hanging up the app. (I just wrote instructions for that process a few weeks ago.)
Yea.. Well, actually, I was thinking just right clicking Synthesia.exe in task manager > Create dump file. Don't know if that's a complete dump, but it's over 200MB, so probably. I only have one for when I exit Synthesia at the moment (at which point it also hangs, and becomes unterminable until I turn off the piano). I'll try to get a dump when it hangs in the middle of playing.
Nicholas wrote: 01-04-20 2:51 amIt definitely sounds like something... hectic is happening on that MIDI connection. Have you ever taken a look at the types of things your Kawai is sending through a utility like MIDI-OX?
Nope, I haven't. Maybe I'll try that.
Nicholas wrote: 01-04-20 2:51 am If you disable Settings --> Advanced --> Pedal Messages, does that solve the problem?
Cool, that seems to have done it. Cheers!
Nicholas
Posts: 13135

Post by Nicholas »

Oh, hey, I hadn't seen that Task Manager choice. At 200MB, that sounds like a full process dump (vs. a "minidump" which is closer to ~10MB and what the instructions on the other page will generate). Either should work fine. If you can come up with a way to get 200MB here (email and this forum don't like attachments that large, but something like a public link from a cloud storage service should do), then that works.
Nicholas
Posts: 13135

Post by Nicholas »

Thanks for the crash dump!

The "AtExit" part of the file name is referring to this being captured while the app was attempting to close but hung instead? That appears to be the current state, at any rate.

The main thread is in the middle of trying to clean up and close all open MIDI devices. It has to wait for an opening when that output device isn't being used to send MIDI messages... but the MIDI output thread looks like it's just sitting there trying to send without making any progress.

It appears to be in the middle of a midiOutShortMsg call, which is Microsoft code (that eventually makes it way out to the MIDI driver). That call... doesn't usually hang.

The message itself looks completely typical (a 3-byte controller message, just like any other), so there isn't anything strange there.

Do you remember if you installed any sort of USB MIDI driver? I have a lot less experience with Kawai, but I know at least on the Yamaha side, their own driver causes more trouble than just using the generic Microsoft driver. If you've got a driver installed (which is rare, but just in case) giving it another try with that uninstalled might be worth a shot.

If you're using a (blue) USB 3.0 port, maybe try a (usually black) USB 2.0 port instead. They're supposed to be 100% backward compatible, but sometimes aren't.

If none of the above helps, you could always try switching connection methods. If Kawai's MIDI hardware/driver is getting hung up for whatever reason, the MIDI ports on the keyboard provide a nice, universal language to work around these sorts of problems (if only because there are a half-dozen reputable MIDI-to-USB brands out there that may not suffer from this problem).
MulleDK19
Posts: 16

Post by MulleDK19 »

Pretty sure I haven't installed any drivers at all, other than what Windows installed automatically.
Don't really have any USB 2.0 ports, except possibly a couple on the top of my case, so that'd be annoying. But I'll try, and see if it makes any difference.

The remarks for midiOutShortMsg says:
This function might not return until the message has been sent to the output device. You can send short messages while streams are playing on the same device (although you cannot use a running status in this case).
I don't know much about MIDI, but perhaps you're using running statuses?
Nicholas
Posts: 13135

Post by Nicholas »

I think the distinction they're making there is that the function is synchronous (waiting for completion) instead of asynchronous (firing the request on a background thread). In either case, sending three bytes at MIDI's standard data rate of 31250bps should take ~800 microseconds. Assuming the OS adds 10x that amount in overhead for every message, we're still at less than a hundredth of a second.

In this case we're seeing behavior closer to "the function may never return," which is definitely not the intent.
MulleDK19
Posts: 16

Post by MulleDK19 »

Well, if for some reason it's waiting for something preventing it from sending the message, "This function might not return until the message has been sent to the output device." would also mean it'd never return. Just not sure what it'd be waiting for. But as soon as the device is disconnected, the message returns.
Nicholas
Posts: 13135

Post by Nicholas »

MulleDK19 wrote: 01-07-20 7:28 pmJust not sure what it'd be waiting for...
Me either. In 14 years and ~50,000 emails and forum posts answered, this is not something that usually (ever?) happens. Some piece of hardware doesn't like some other piece of hardware.

If it were my keyboard, my next troubleshooting step would be to try a USB-MIDI adapter instead of a direct USB cable. And after that, it would be to get in touch with Kawai support to ask why their keyboard is freezing up the Windows MIDI driver.
Nicholas
Posts: 13135

Post by Nicholas »

For what it's worth, the two problems (notes being queued up and shortcuts being ignored) on the device disconnect screen should now be fixed in the 10.6.5425 update that just went live.

Thanks again for the bug report!
MulleDK19
Posts: 16

Post by MulleDK19 »

Thanks. Will check it out.
FYI, since I switched to USB 2.0, I haven't encountered the freezing issues.
Nicholas
Posts: 13135

Post by Nicholas »

That's good to hear! For as backward compatible as 3.0 was supposed to be, "they" (and I don't even know which "they") seem to have messed something up somewhere.

The scariest part is that almost all laptops and even some desktops are being made now without a 2.0 port anywhere on them. :?
MulleDK19
Posts: 16

Post by MulleDK19 »

Nicholas wrote: 01-27-20 8:24 amThe scariest part is that almost all laptops and even some desktops are being made now without a 2.0 port anywhere on them. :?
Yea. The only reason I have ports is because my case has a couple. Which is really annoying, since I only have 2, and I need those for other stuff like my headset, so I have to switch the cables every time I want to practice on my piano. But better than constant freezes, I guess. Time will tell if the freezing has truly stopped or if I've just been lucky so far.
Post Reply