I have a project about midi keyboard.
But I don't know how can I get inputs from it?
İs there a library or else?
(For example, getting information from user about pressing the DO note.)
Related
When I was programming in Mindstorms Robot Inventor, and decided to put an input in my code, I bumped into this NameErrorThis is the Error
Is it Even possible to put an input in Mindstorms??
The Python available isn’t the complete Python standard library. The terminal view in the code editor doesn’t provide for a way to put in input either, so unfortunately no.
What you can do instead is use the buttons on the hub as a type of input. This wouldn’t be free-form text, but if you’re using input() as a user-controlled wait before progressing, you can do that.
_ = hub.right_button.was_pressed() # clear out any button press
while not hub.right_button.was_pressed():
# do something
# do something after the button was pressed
You can string multiple of the above in a row if you want to do multiple actions separated by waiting for you to let it continue, or even take different actions based on which button was pressed.
Finally, you could do a very slow text input using the buttons and the display screen to scroll through the alphabet, confirm the letter, and finish the input.
I wanted to make a program that would pass some sound data to the system's microphone, imitating person's speech. Originally I wanted it to "talk" in a discord voice chat to other people, but I couldn't find any way to do so.
I tried libraries like SoundCard and PyAudio, but they seem to only have functions to either get the mic input from the user, or to output sound via speakers. However, I want it to simulate microphone input.
So, is there any way to do this with python (or any other language)?
Thanks in advance.
Hi,
I am working on a project and I am monitoring the keyboard with the keyboard module.
My application works in real-time (on-the-fly) and read strings entered from user (with the keyboard module as mentioned)
What I want to do is hide user input when some specific conditions are True.
I have searched all the web and didn't manage to find something that does what I want.
To give it a more detailed explanation lets say that the user enters some text and this text string-by-string is being checked for some condition from my program.
If everything is OK, then nothing happens but if not, then I want the next user input not to be shown in the position he is writing.
I found solutions that do exactly this in the terminal like the msvcrt module (How to temporarily disable keyboard input using Python ) or do the above functionality with the input() function.
Is there something that prevent the text ,entered from the keyboard, from showing to the screen, but send it to a buffer for editing first.
Thanks in advance.
! I am on windows
I am trying to write a macro using python.
I want it to do a repeated task within another program.
I believe the program that I am attempting write this macro only
accepts raw input from keyboard and mouse input stream.
Using python libraries such as pynput.mouse, mouse, pyautogui, so on
seem to be sending a different type of keyboard/mouse input that the program
will not recognize. (Those libraries do work to control and move the mouse
around my computer screen but do not work in the program)
It was suggested that the program accepts only input directly from the keyboard
and mouse (ports?).
How can I write code that sends data as "raw" to the program, or reroute it through the correct (port?) input stream so that the program reads it as "raw"
I hope I was able to explain this clearly.
Please see the following post: ctypes mouse_events
It explains how to do this with raw win32 messages which will do the trick.
I want to take a midi file as input in python or arduino and then decode it to generate keyboard press events to trigger actual keypress on a virtual keyboard like VMPK to understand/visualize how the keys are pressed.
I have built a big paino which currently reacts to button being pressed by sending keystrokes to the computer which plays music via VMPK which is a virtual keyboard. I want to be able to generate play music and simultaneously light up the corresponding keys on the keyboard so we can also see how an actual paino player has played the keys.
I currently have programmed 2 songs but it takes a while to get the timing right in code. I want to know if there is a way I can decode a Midi file and extract keystrokes and times they need to pressed and delays so I can emulate them.
I have read similar questions but they arent exactly what I am looking for.
Here is a picture of the setup