BPM counter writte in C and Gtk