hydrogen-music / hydrogen

The advanced drum machine for Linux, macOS, and Windows
http://www.hydrogen-music.org
GNU General Public License v2.0
1.05k stars 174 forks source link

H2 UI freezes when receiving CC messages for more than 1 instrument #726

Open thijz opened 5 years ago

thijz commented 5 years ago

Hydrogen version * : 51cddb057bd59b5dbe5cbb809b8edd0a59241d9f Operating system + version : ubuntu 16.04 Audio driver + version : jackdmp


if you have a midi controller connected to H2 and you map the volume of 2 instruments to 2 different knobs on the controller (using CC messages) you can control the volume of both instruments individually > OK

now if you manipulate the 2 knobs simultaneously while the song is playing the volume of the instruments will still follow the midi controller, but the UI freezes completely until you stop manipulating the knobs (the freezing can sometimes last a couple of seconds after you stop manipulating the knobs)

at first i thought this was because H2 was unable to process the incoming midi message cue because of a 'flood' of messages, but if you continuously manipulate only 1 knob (also causing a 'flood' of midi messages) the UI keeps working just fine.

as stated above : this is a pure UI issue the audio engine keeps working fine

mauser commented 5 years ago

Hi,

what do you mean by "the gui freezes completely"?

I've did a small test and assigned the first four faders of my BCF 2000 to the volume of the first four instruments in hydrogen. I can move all faders in parallel and the change will be relfected in real time, both in the UI and the actual volume of the sound beeing played.

thijz commented 5 years ago

hi @mauser i just tried the same thing (BCF>H2) on my work laptop and i dont see the issue there either ... ? When i do this on my music laptop i can reproduce this 100% both laptops are running the same code so there must be something else happening here i will investigate further and run a midi dump on the midi signal that H2 receives

will update here when i have more info

thijz commented 5 years ago

just had another look at my music laptop setup and first i thought that maybe the freezing was caused by running H2 in debug mode (-VDebug) since this generates quite a lot of output when H@ receives midi input, but this makes no difference.

btw : what i mean with freezing is playhead stops moving, timecounter freezes, beatcounterfreezes and the midi input led stays ON

my midi config for my first 2 instruments looks like this : Event : CC, Param : 21, Action : STRIP_VOLUME_ABSOLUTE, Param : 0 Event : CC, Param : 22, Action : STRIP_VOLUME_ABSOLUTE, Param : 1 Midi driver : JackMidi Input : none Channel : 9 Ignore note-off is ticked (other options are not ticked)

using 'top' I also noticed that the H2 process jumps to 100% when i manipulate the 2 midi controllers simultaneously so maybe this is related to the available CPU power ? if your machine has a faster CPU you simply dont notice this issue ? My music laptop CPU is an intel core i7 running at 1.6GHz (and i always run with CPU scaling set to performance)

thijz commented 5 years ago

fyi : just upgraded my system to the latest ubuntu studio (18.04) and this problem still remains