# Path: camp/playback/realtime.py
# def get_ports():
#     midi_out = rtmidi.MidiOut(b'out')
#     available_ports = midi_out.ports
#     return available_ports
# 
# def get_bus():
#     ports = get_ports()
#     port_num = os.environ.get("CAMP_MIDI_BUS", len(ports) -1)
#     return int(port_num)


from camp.playback.realtime import get_ports, get_bus


INSTRUCTIONS = """

To get MIDI realtime output in CAMP to work, you must select an appropriate MIDI bus.
This will be the bus that will drive instruments in your DAW, VST host, or externally.
Currently, only one bus can be used at a time with CAMP.

In the list below, the LAST bus will be selected unless the environment variable
CAMP_MIDI_BUS is set to a different number. For instance, at a bash prompt:

    # export CAMP_MIDI_BUS=1

OR:

    # CAMP_MIDI_BUS=1 PYTHONPATH=. python3 examples/01_minimal.py

In the future the bus choice may also be selectable using the Conductor() object.

If you happen to be using OS X, you probably want to create, and then select, an IAC bus.
Consult README.md in the source distribution for tips.

Available MIDI buses are:

"""

def play():

    print(INSTRUCTIONS)


# Path: camp/playback/realtime.py
# def get_ports():
#     midi_out = rtmidi.MidiOut(b'out')
#     available_ports = midi_out.ports
#     return available_ports
# 
# def get_bus():
#     ports = get_ports()
#     port_num = os.environ.get("CAMP_MIDI_BUS", len(ports) -1)
#     return int(port_num)


# Path: examples/00_ports_and_setup.py
from camp.playback.realtime import get_ports, get_bus



INSTRUCTIONS = """

To get MIDI realtime output in CAMP to work, you must select an appropriate MIDI bus.
This will be the bus that will drive instruments in your DAW, VST host, or externally.
Currently, only one bus can be used at a time with CAMP.

In the list below, the LAST bus will be selected unless the environment variable
CAMP_MIDI_BUS is set to a different number. For instance, at a bash prompt:

    # export CAMP_MIDI_BUS=1

OR:

    # CAMP_MIDI_BUS=1 PYTHONPATH=. python3 examples/01_minimal.py

In the future the bus choice may also be selectable using the Conductor() object.

If you happen to be using OS X, you probably want to create, and then select, an IAC bus.
Consult README.md in the source distribution for tips.

Available MIDI buses are:

"""

def play():

    print(INSTRUCTIONS)


    ports = get_ports()