code: def frames2tick(frames, samplerate=samplerate):
      sec = frames / float(samplerate)
      return int(second2tick(sec, ticks_per_beat, tempo))
  
imports: import sys
  from aubio import source, notes
  from mido import Message, MetaMessage, MidiFile, MidiTrack, second2tick, bpm2tempo
label_desc: Use image node_id 1 for calling a global function with example usage: frames2tick(frames, samplerate) and returns: int