Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 1.5.0 instead.
Reason given by maintainers: Deprecated

qt_liquid_pool

Manages port connections for instances of LiquidSFZ using JackConnectionManager.

Purpose

This library:

  1. Instantiates any number of instances of LiquidSFZ from the "liquiphy" package.

  2. Creates a connection to the JACK audio connection kit and monitors changes in clients and ports for the purpose of managing the ports created by the above-mentioned LiquidSFZ instances.

  3. Optionally fills and updates two instances of QComboBox, which may be used in your project for allowing a user to select input and output devices to connect to the LiquidSFZ instance(s).

Here's a screenshot of the test window, showing two combo boxes for source/sink selection, and a table displaying instantiated synth ports and their connections:

test-window

I found myself using the same blocks of code in several projects, and decided to break these out into a new project which could be generally reused.

Installation

Install from the pypi repository:

$ pip install qt_liquid_pool

Usage:

Import

from qt_liquid_pool import LiquidPool

Extending for custom features

You can write your own class which inherits from LiquidPool in order to provide additional features.

Additional devices

The following class connects and disconnects a soundfile player alongside the built-in instances of LiquidSFZ:

class Audio(LiquidPool):

	def __init__(self):
		super().__init__()
		self.audio_player = None

	def slot_jack_ready(self, state):
		if state:
			self.audio_player = JackAudioPlayer(AUDIO_PLAYER_CLIENT)

	def disconnect_audio_sinks(self, ports):
		super().disconnect_audio_sinks(ports)
		for src, tgt in zip(self.audio_player.output_ports, ports):
			self.conn_man.disconnect(src, tgt)

	def connect_audio_sinks(self, ports):
		super().connect_audio_sinks(ports)
		for src, tgt in zip(self.audio_player.output_ports, ports):
			self.conn_man.connect(src, tgt)

	def play_soundfile(self, soundfile):
		soundfile.seek(0)
		self.audio_player.play_python_soundfile(soundfile)

	def stop_playing(self):
		self.audio_player.stop()

Saved preferred connections

There is no persistent storage mechanism built in which can save and restore your preferred midi input and audio output devices. The following example shows you you can save and restore these values to a QSettings settings object:

class Audio(LiquidPool):

	def __init__(self):
		super().__init__()
		self.settings = QSettings('developer', 'app')

	def get_preferred_midi_source(self):
		return settings.value('MIDISource')

	def set_preferred_midi_source(self, value):
		settings.setValue('MIDISource', value)
		super().set_preferred_midi_source(value)

	def get_preferred_audio_sink(self):
		return settings.value('AudioSink')

	def set_preferred_audio_sink(self, value):
		settings.setValue('AudioSink', value)
		super().set_preferred_audio_sink(value)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qt_liquid_pool-1.2.0.tar.gz (17.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qt_liquid_pool-1.2.0-py2.py3-none-any.whl (17.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file qt_liquid_pool-1.2.0.tar.gz.

File metadata

  • Download URL: qt_liquid_pool-1.2.0.tar.gz
  • Upload date:
  • Size: 17.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for qt_liquid_pool-1.2.0.tar.gz
Algorithm Hash digest
SHA256 b4d129683daf7f96e83b62ccec903679851d0b8cc8d06f3e9981349b2e15860e
MD5 ffb9b7c2cc7c5183539e39e68d32f21e
BLAKE2b-256 7c1ac1219a538cde1bd760d7e3362a15d230336fad3af5447da3d0f62dadafd7

See more details on using hashes here.

File details

Details for the file qt_liquid_pool-1.2.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for qt_liquid_pool-1.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b9f9ccdcb94f32ae3f9e6e375cceeb5524ee9a4a73bb7b92ac5319bded04ac36
MD5 a89ee76c69d85e9d70edb693ac07633f
BLAKE2b-256 444d5c018a9f6a92747f47e3751a648ea861e0e94d69190cc7c4654d204c87d9

See more details on using hashes here.

Release history Release notifications | RSS feed

1.5.0

2 files

1.4.2

2 files

1.4.1

2 files

1.4.0

2 files

1.3.1

2 files

1.3.0

2 files

1.2.1

2 files

This release

1.2.0 This release

2 files

1.1.0

2 files

1.0.1

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page