(bind-func rtmidi_print_ports (lambda (dev:RtMidiPtr) (let ((num_ports (rtmidi_get_port_count dev))) (doloop (i num_ports) (printf "port %d: %s\n" i (rtmidi_get_port_name dev i))) void)))