Open kosirm opened 3 years ago
Oh sorry... I just found line 328 in pianoputer_stereo.py # todo if the window lost focus cant hear the SOUND
So it's on your todo list already 👍 , hopefully you will implement solution soon. Thanks!
I've found WINDOWEVENT_FOCUS_LOST event attribute on pygame.display.set_mode but I have no idea how to use it or if it is usable at all...
Hi Kosirm,
Yes you could do a fix with WINDOWEVENT_FOCUS_LOST, therefore there is an easier way. Use pygame.event.set_grab(True) just before the WHILE loop in the code.
The focus event allow pygame to control the keyboard and mouse directly, meaning that pygame will be the first to collect your keyboard/mouse inputs while the program is running
To switch between your windows, use ALT-TAB or exit pianocumputer. Kind Regards
Thank you so much! I will do this now... BR
Hi, thank you for this app, it is extremely useful, I like it very much! I would like to use it in "background" so I can create/use sounds(my piano) also when I'm typing in other windows (i.e. when pygame window is not focused...) Do you have idea if this is possible maybe? I'm really not much into python, that's why I ask. Thanks for any reply! BR, Milan