CPJKU / accompanion

An expressive accompaniment system for piano performances
Apache License 2.0
9 stars 1 forks source link

Choose midi port terminal GUI #7

Open manoskary opened 2 years ago

manoskary commented 2 years ago

A simple select menu for ports when starting the accompanion (with a skip possibility).

Maybe this could be a solution:

import inquirer

questions = [
    inquirer.List(
        "size",
        message="Please choose your MIDI input port",
        choices=mido.get_input_names(),
    ),
]
answers = inquirer.prompt(questions)
manoskary commented 2 years ago

Or maybe even simpler :

from simple_term_menu import TerminalMenu
import mido

terminal_menu = TerminalMenu(mido.get_input_names())
print("Please choose your MIDI input port!")
choice_index = terminal_menu.show()
nimrodVarga commented 1 year ago

I just wanted to add, once the clean_gui pull request goes through, the issue would be solved.