-
-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chooseMidiPort method from utils.hpp does not work as intended #114
Comments
That's strange, what terminal / shell / environment is this with ? I don't see this behaviour here under linux with any terminal (ubuntu 24.04) |
to be honest I'd like more to have these utilities read their argument from the command line instead, what'd you think ? |
I am using the default bash terminal in ubuntu 23.04. I can also see the same behavior when I run this snippet in an online editor (https://www.programiz.com/online-compiler/2nScotIFIm64b). I totally agree command-line arguments would be better. |
Ok, in this example it is not so obvious but I believe the keyHit variable is empty if you type just one character. You see "y" printed on the output when you type it but for me it is the terminal acting like a passthrough (midi through is an even better analogy) If I typed a long word like "guacamole", I would see the variable is set to "uacamole", skipping the first character. I slightly modified the snippet to make it clearer what is the value of keyHit variable after calling getline: https://www.programiz.com/online-compiler/8HdmFdxe6L8ci |
implemented in master ; I've looked into it but it's a bit too much work to backport to 4.x though |
I have tested the midiout example on master and can confirm it is working with command-line arguments. It could be useful to document that the value for the input/output port is the 0-based index as returned by midiprobe. In my case, "-p 1" means the 2nd output for alsa_seq:
|
Added indexes to the midiprobe output so that it is less confusing |
When running examples like midiout or midiclock_out, I am prompted to choose to open a virtual port or not and later to choose which port to open. In both cases, I have to type two characters and press enter to get my input read problem like demonstrated below:
$ ./build/midiout
Would you like to open a virtual output port? [y/N] NN
Output port #0: Midi Through Port-0
Output port #1: Synth input port (60756:0)
Output port #2: input
Output port #3: input
Choose a port number: 11
Then a sound is produced by virtual port 1 (fluidsynth)
The text was updated successfully, but these errors were encountered: