Client that dumps samples directly to the jack client with the
JackClient– After initializing, JackClient will register itself with this variable.
int – Sampling rate of the active server
int – Blocksize, or the amount of samples processed by jack per each
multiprocessing.Queue– Queue to be loaded with frames of BLOCKSIZE audio.
multiprocessing.Event– Event used to trigger loading samples from QUEUE, ie. playing.
multiprocessing.Event– Event that is triggered on the end of buffered audio.
NOT an event used to stop audio.
multiprocessing.Lock– Lock that enforces a single writer to the QUEUE at a time.
Client that dumps frames of audio directly into a running jackd client.
When first initialized, sets module level variables above.
- name (str) – name of client, default “jack_client”
- q (
Queue) – Queue that stores buffered frames of audio
- q_lock (
Lock) – Lock that manages access to the Queue
- play_evt (
multiprocessing.Event) – Event used to trigger loading samples from QUEUE, ie. playing.
- stop_evt (
multiprocessing.Event) – Event that is triggered on the end of buffered audio.
- quit_evt (
multiprocessing.Event) – Event that causes the process to be terminated.
- client (
jack.Client) – Client to interface with jackd
- blocksize (int) – The blocksize - ie. samples processed per
- fs (int) – Sampling rate of client
- zero_arr (
numpy.ndarray) – cached array of zeroes used to fill jackd pipe when not processing audio.
JackClient.run()to boot the server upon starting the process.
Activates the client and connects it to the number of outports determined by prefs.NCHANNELS
jack.Clients can’t be kept alive, so this must be called just before processing sample starts.
Start the process, boot the server, start processing frames and wait for the end.
Process a frame of audio.
JackClient.play_evtis not set, fill port buffers with zeroes.
Otherwise, pull frames of audio from the
JackClient.quntil it’s empty.
When it’s empty, set the
JackClient.stop_evtand clear the
Handling multiple outputs is a little screwy right now. v0.2 effectively only supports one channel output.
Parameters: frames – Unused - frames of input audio, but there shouldn’t be any.