pysynth/temp.py
def old_keyboard_input():

    """
    Maps certain keys to a keyboard,
    and adding the notes as we press/release keys.
    """

    oscs = gen_oscs(SineOscillator)

    print(oscs)

    # Create AudioCollection for output

    collec = AudioCollection()
    collec.add_module(ZeroOscillator())

    # Create KeyBoardHandler:

    hand = KeyboardHandler(collec, oscs)

    # Start streaming the AudioCollection:

    start_stream(collec)

    # Disabling continuous keypresses:

    os.system("xset r off")

    # Creating TKinter data:

    root = Tk()
    f = Frame(root, width=100, height=100)
    f.bind("<KeyPress>", hand.add_key)
    f.bind("<KeyRelease>", hand.remove_key)
    f.pack()
    f.focus_set()
    root.mainloop()

    os.system("xset r on")

    Maps certain keys to a keyboard,
    and adding the notes as we press/release keys.
    
Maps certain keys to a keyboard,
and adding the notes as we press/release keys.
Maps certain keys to a keyboard and adding the notes as we press / release keys .
def old_keyboard_input():
    oscs = gen_oscs(SineOscillator)
    print(oscs)
    collec = AudioCollection()
    collec.add_module(ZeroOscillator())
    hand = KeyboardHandler(collec, oscs)
    start_stream(collec)
    os.system("xset r off")
    root = Tk()
    f = Frame(root, width=100, height=100)
    f.bind("<KeyPress>", hand.add_key)
    f.bind("<KeyRelease>", hand.remove_key)
    f.pack()
    f.focus_set()
    root.mainloop()
    os.system("xset r on")
def old_keyboard_input ( ) : oscs = gen_oscs ( SineOscillator ) print ( oscs ) collec = AudioCollection ( ) collec . add_module ( ZeroOscillator ( ) ) hand = KeyboardHandler ( collec , oscs ) start_stream ( collec ) os . system ( "xset r off" ) root = Tk ( ) f = Frame ( root , width = 100 , height = 100 ) f . bind ( "<KeyPress>" , hand . add_key ) f . bind ( "<KeyRelease>" , hand . remove_key ) f . pack ( ) f . focus_set ( ) root . mainloop ( ) os . system ( "xset r on" )
Maps certain keys to a keyboard,
and adding the notes as we press/release keys.
Maps certain keys to a keyboard and adding the notes as we press / release keys .
"""
    Maps certain keys to a keyboard,
    and adding the notes as we press/release keys.
    """ # Create AudioCollection for output
 # Create KeyBoardHandler:
 # Start streaming the AudioCollection:
 # Disabling continuous keypresses:
 # Creating TKinter data:
