Ejemplo n.º 1
0
    def __init__(self, target=MIDIOUT_DEFAULT):
        self.midi = None
        self.debug = False
        ports = mido.get_output_names()
        if len(ports) == 0:
            raise Exception("No MIDI output ports found")

        for name in ports:
            if name == target:
                isobar.log("Found MIDI output (%s)" % name)
                self.midi = mido.open_output(name)

        if self.midi is None:
            print "Could not find MIDI target %s, using default" % target
            self.midi = mido.open_output()
Ejemplo n.º 2
0
    def __init__(self, target=MIDIOUT_DEFAULT):
        self.midi = None
        self.debug = False
        ports = mido.get_output_names()
        if len(ports) == 0:
            raise Exception("No MIDI output ports found")

        for name in ports:
            if name == target:
                isobar.log("Found MIDI output (%s)" % name)
                self.midi = mido.open_output(name)

        if self.midi is None:
            print "Could not find MIDI target %s, using default" % target
            self.midi = mido.open_output()
Ejemplo n.º 3
0
    def __init__(self, target=MIDIOUT_DEFAULT):
        self.midi = rtmidi.MidiOut()

        ports = self.midi.get_ports()
        if len(ports) == 0:
            raise Exception, "No MIDI output ports found"

        for index, name in enumerate(ports):
            if name == target:
                isobar.log("Found MIDI output (%s)" % name)
                self.midi.open_port(index)

        if self.midi is None:
            print "Could not find MIDI target %s, using default" % target
            self.midi.open_port(0)
Ejemplo n.º 4
0
	def __init__(self, target = MIDIOUT_DEFAULT):
		self.midi = rtmidi.MidiOut()

		ports = self.midi.get_ports()
		if len(ports) == 0:
			raise Exception, "No MIDI output ports found"

		for index, name in enumerate(ports):
			if name == target:
				isobar.log("Found MIDI output (%s)" % name)
				self.midi.open_port(index)

		if self.midi is None:
			print "Could not find MIDI target %s, using default" % target
			self.midi.open_port(0)
Ejemplo n.º 5
0
    def __init__(self, target=MIDIOUT_DEFAULT):
        self.midi = None
        # don't ignore MIDI clock messages (is on by default)
        # TODO: check
        # self.midi.ignore_types(timing=False)
        self.clocktarget = None

        ports = mido.get_input_names()
        if len(ports) == 0:
            raise Exception("No MIDI output ports found")

        for name in ports:
            if name == target:
                isobar.log("Found MIDI input (%s)", name)
                self.midi = mido.open_input(name, callback=self.callback)

        if self.midi is None:
            isobar.log("Could not find MIDI source %s, using default", target)
            self.midi = mido.open_input(callback=self.callback)
Ejemplo n.º 6
0
    def __init__(self, target=MIDIOUT_DEFAULT):
        self.midi = None
        # don't ignore MIDI clock messages (is on by default)
        # TODO: check
        # self.midi.ignore_types(timing=False)
        self.clocktarget = None

        ports = mido.get_input_names()
        if len(ports) == 0:
            raise Exception("No MIDI output ports found")

        for name in ports:
            if name == target:
                isobar.log("Found MIDI input (%s)", name)
                self.midi = mido.open_input(name, callback=self.callback)

        if self.midi is None:
            isobar.log("Could not find MIDI source %s, using default", target)
            self.midi = mido.open_input(callback=self.callback)
Ejemplo n.º 7
0
    def __init__(self, target=MIDIOUT_DEFAULT):
        self.midi = rtmidi.MidiIn()

        #------------------------------------------------------------------------
        # don't ignore MIDI clock messages (is on by default)
        #------------------------------------------------------------------------
        self.midi.ignore_types(timing=False)
        self.clocktarget = None

        ports = self.midi.get_ports()
        if len(ports) == 0:
            raise Exception, "No MIDI output ports found"

        for index, name in enumerate(ports):
            if name == target:
                isobar.log("Found MIDI input (%s)", name)
                self.midi.open_port(index)

        if self.midi is None:
            isobar.log("Could not find MIDI source %s, using default", target)
            self.midi.open_port(0)
Ejemplo n.º 8
0
	def __init__(self, target = MIDIOUT_DEFAULT):
		self.midi = rtmidi.MidiIn()

		#------------------------------------------------------------------------
		# don't ignore MIDI clock messages (is on by default)
		#------------------------------------------------------------------------
		self.midi.ignore_types(timing = False)
		self.clocktarget = None

		ports = self.midi.get_ports()
		if len(ports) == 0:
			raise Exception, "No MIDI output ports found"

		for index, name in enumerate(ports):
			if name == target:
				isobar.log("Found MIDI input (%s)", name)
				self.midi.open_port(index)

		if self.midi is None:
			isobar.log("Could not find MIDI source %s, using default", target)
			self.midi.open_port(0)