diff --git a/dist/underbridge.exe b/dist/underbridge.exe new file mode 100644 index 0000000..65bc718 Binary files /dev/null and b/dist/underbridge.exe differ diff --git a/underbridge.py b/underbridge.py index 62825ab..4c65b3b 100644 --- a/underbridge.py +++ b/underbridge.py @@ -38,6 +38,13 @@ def getMIDIDevice(): except: displaymsg.set("CanĀ“t find OP-Z : MIDI Error") +def getAudioDevice(): + p = pyaudio.PyAudio() + info = p.get_host_api_info_by_index(0) + numdevices = info.get('deviceCount') + for i in range(0, numdevices): + if (p.get_device_info_by_host_api_device_index(0, i).get('maxInputChannels')) > 0: + print("Input Device id ", i, " - ", p.get_device_info_by_host_api_device_index(0, i).get('name')) def getBPM(): global op_device @@ -204,6 +211,7 @@ def sequenceMaster(): getMIDIDevice() time.sleep(1) + getAudioDevice() displaymsg.set("Sequence started") @@ -238,7 +246,7 @@ def sequenceMaster(): pattern_nr = 0 sequenceMaster() except: - displaymsg.set("OP-Z connection Problem :(") + displaymsg.set("OP-Z Audio Device Problem :(") def cancelRec(): global cancel