Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(6)  |  Call(6)  |  Derive(0)  |  Import(0)
Time() returns the current time in ms
of the PortMidi timer

        def Time():
    """
    Time() returns the current time in ms
    of the PortMidi timer
    """
    return lib.Pt_Time()
        


src/p/o/portmidizero-0.1/portmidizero/testportmidizero.py   portmidizero(Download)
  print "Midi Output opened with ",latency," latency"
  dummy = raw_input("ready to send program 1 change... (type RETURN):")
  MidiOut.Write([[[0xc0,0,0],pm.Time()]])
  dummy = raw_input("ready to note-on... (type RETURN):")
  MidiOut.Write([[[0x90,60,100],pm.Time()]])
  dummy = raw_input("read to note-off... (type RETURN):")
  MidiOut.Write([[[0x90,60,0],pm.Time()]])
  chord = [60, 67, 76, 83, 90]
  ChordList = []
  MidiTime = pm.Time()
  for i in range(len(chord)):
    ChordList.append([[0x90,chord[i],100], MidiTime + 1000 * i])
  MidiOut.Write(ChordList)
  while pm.Time() < MidiTime + 1000 + len(chord) * 1000 : pass