Reputation: 1031
I'm trying to output a note to my computers internal speakers using python with the mido library. I have a mac, and I've learned that by default you need to go through the IAC Driver to output any sound to the speakers. I enable the IAC Driver and searched for the correct output using the command:
>>> mido.get_output_names()
['IAC Driver Bus 1']
From there I created the simple script:
import mido
def main():
outport = mido.open_output('IAC Driver Bus 1')
outport.send(mido.Message('note_on', note=60, velocity = 100))
main()
note=60 should be outputting middle C and velocity is the volume.
However no sound is being produced at all. I'm assuming the port must be recognized as I get no errors but again there is no sound being output. Anyone have any idea what's going on?
Upvotes: 4
Views: 2396
Reputation: 8595
Now you should hear something when you run your code.
Upvotes: 5