@@ -99,20 +99,20 @@ First, import the module:
9999
100100Then, you most likely want to create a new `jack.Client `:
101101
102- >>> client = jack.Client(" MyGreatClient" )
102+ >>> client = jack.Client(' MyGreatClient' )
103103
104104You probably want to create some audio input and output ports, too:
105105
106- >>> client.inports.register(" input_1" )
106+ >>> client.inports.register(' input_1' )
107107jack.OwnPort('MyGreatClient:input_1')
108- >>> client.outports.register(" output_1" )
108+ >>> client.outports.register(' output_1' )
109109jack.OwnPort('MyGreatClient:output_1')
110110
111111As you can see, these functions return the newly created port.
112112If you want, you can save it for later:
113113
114- >>> in2 = client.inports.register(" input_2" )
115- >>> out2 = client.outports.register(" output_2" )
114+ >>> in2 = client.inports.register(' input_2' )
115+ >>> out2 = client.outports.register(' output_2' )
116116
117117To see what you can do with the returned objects, have a look at the
118118documentation of the class `jack.OwnPort `.
@@ -130,9 +130,9 @@ information about these lists of ports.
130130If you have selected an appropriate driver in your JACK settings, you can also
131131create MIDI ports:
132132
133- >>> client.midi_inports.register(" midi_in" )
133+ >>> client.midi_inports.register(' midi_in' )
134134jack.OwnMidiPort('MyGreatClient:midi_in')
135- >>> client.midi_outports.register(" midi_out" )
135+ >>> client.midi_outports.register(' midi_out' )
136136jack.OwnMidiPort('MyGreatClient:midi_out')
137137
138138You can check what other JACK ports are available (your output may be
@@ -163,7 +163,7 @@ You can also be more specific when looking for ports:
163163
164164You can even use regular expressions to search for ports:
165165
166- >>> client.get_ports(" Great.*2$" )
166+ >>> client.get_ports(' Great.*2$' )
167167[jack.OwnPort('MyGreatClient:input_2'), jack.OwnPort('MyGreatClient:output_2')]
168168
169169If you want, you can also set all kinds of callback functions for your client.
@@ -177,27 +177,27 @@ Once you are ready to run, you should activate your client:
177177As soon as the client is activated, you can make connections (this isn't
178178possible before activating the client):
179179
180- >>> client.connect(" system:capture_1" , " MyGreatClient:input_1" )
181- >>> client.connect(" MyGreatClient:output_1" , " system:playback_1" )
180+ >>> client.connect(' system:capture_1' , ' MyGreatClient:input_1' )
181+ >>> client.connect(' MyGreatClient:output_1' , ' system:playback_1' )
182182
183183You can also use the port objects from before instead of port names:
184184
185- >>> client.connect(out2, " system:playback_2" )
186- >>> in2.connect(" system:capture_2" )
185+ >>> client.connect(out2, ' system:playback_2' )
186+ >>> in2.connect(' system:capture_2' )
187187
188188Use `jack.Client.get_all_connections() ` to find out which other ports are
189189connected to a given port.
190190If you own the port, you can also use `jack.OwnPort.connections `.
191191
192- >>> client.get_all_connections(" system:playback_1" )
192+ >>> client.get_all_connections(' system:playback_1' )
193193[jack.OwnPort('MyGreatClient:output_1')]
194194>>> out2.connections
195195[jack.Port('system:playback_2')]
196196
197197Of course you can also disconnect ports, there are again several possibilities:
198198
199- >>> client.disconnect(" system:capture_1" , " MyGreatClient:input_1" )
200- >>> client.disconnect(out2, " system:playback_2" )
199+ >>> client.disconnect(' system:capture_1' , ' MyGreatClient:input_1' )
200+ >>> client.disconnect(out2, ' system:playback_2' )
201201>>> in2.disconnect() # disconnect all connections with in2
202202
203203If you don't need your ports anymore, you can un-register them:
0 commit comments