pianobooster / PianoBooster

A MIDI file player/game that displays the musical notes and teaches you how to play the piano.
Other
397 stars 74 forks source link

A little high latency #310

Open huc-m opened 2 years ago

huc-m commented 2 years ago

It would be nicely if the "audio.alsa.device" option will be added to the FluidSynth settings because FluidSynth (at least my version) does not allow to cut down the buffers if the hardware device is not specified. Generally, I think it is serviceable to have a chance to set all settings of FluidSynth in some of the configuration files. Another "wish-list" issues:

  1. I noticed that PB overlooks some wrong notes. I fixed things for me by changing CConductor::validatePianistChord() as

if (m_piano->pianistBadNotesDown() > 0) return false; if (m_goodPlayedNotes.length() == m_wantedChord.length()) return true;

I do not know why this is in that way but if the idea is some error to be allowed maybe this should be in the configuration.

  1. I use sound file with only one piano and have troubles to distinct wrong notes. I think that "None" in configuration menu should mean "Nothing", i.e. silent. My fix is in CMidiDeviceFluidSynth::playMidiEvent(const CMidiEvent & event)

if (event.channel() == 3) velocity = 108; if (event.channel() == 3) note = 108;

I use two channels – one for the right hand and another for the left. Thus error notes go on the third channel. Actually I have two binaries. When I have a performance in front of an audience I use the binary with velocity=0;