Re: [Tutor] call key on_press event multiple times when key is held down

2017-07-13 Thread Joel Goldstick
On Thu, Jul 13, 2017 at 3:36 AM, Carlton Banks wrote: > So i finally made it work.. > My error was caused in the callback function, which > aborted the stream, hence didn’t record. > > This was the solution I ended with: > > https://pastebin.com/isW2brW2 > > Carlto

Re: [Tutor] call key on_press event multiple times when key is held down

2017-07-13 Thread Carlton Banks
So i finally made it work.. My error was caused in the callback function, which aborted the stream, hence didn’t record. This was the solution I ended with: https://pastebin.com/isW2brW2 > Den 10. jul. 2017 kl. 11.10 skrev Alan Gauld via Tutor : > > On 04/07/1

Re: [Tutor] call key on_press event multiple times when key is held down

2017-07-10 Thread Carlton Banks
Thanks for the response :) > Den 10. jul. 2017 kl. 10.54 skrev Peter Otten <__pete...@web.de>: > > Carlton Banks wrote: > >> So i tried a different solution, introducing two threads one handling the >> keyboard, and the other one is a while true, that keeps running. >> >> https://pastebin.com/U0

Re: [Tutor] call key on_press event multiple times when key is held down

2017-07-10 Thread Peter Otten
Carlton Banks wrote: > So i tried a different solution, introducing two threads one handling the > keyboard, and the other one is a while true, that keeps running. > > https://pastebin.com/U0WVQMYP > > but for some reason, am I constantly running into IOerror, hen

Re: [Tutor] call key on_press event multiple times when key is held down

2017-07-10 Thread Carlton Banks
So i tried a different solution, introducing two threads one handling the keyboard, and the other one is a while true, that keeps running. https://pastebin.com/U0WVQMYP but for some reason, am I constantly running into IOerror, hence no frames is being recorded

Re: [Tutor] call key on_press event multiple times when key is held down

2017-07-04 Thread eryk sun
On Tue, Jul 4, 2017 at 8:50 AM, Carlton Banks wrote: > I am using pynput for keyboard events You could use an event that enables a recording loop. The on_press and on_release callbacks of the Listener [1] would set() and clear() this event, respectively. For

Re: [Tutor] call key on_press event multiple times when key is held down

2017-07-04 Thread Alan Gauld via Tutor
On 04/07/17 09:50, Carlton Banks wrote: > I am trying to record from my microphone while i press down a button, First question is which OS? That makes a big difference in this kind of scenario. > the library I am using is not able to detect on hold event. There isn't really any concept of a hol

[Tutor] call key on_press event multiple times when key is held down

2017-07-04 Thread Carlton Banks
I am trying to record from my microphone while i press down a button, problem is that the library I am using is not able to detect on hold event. It only detect on press, which happens once, which means that the microphone only records one sample.. import pyaudio import wave from pynput import