simple-carla 2.0.0__py2.py3-none-any.whl → 2.1.0__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
simple_carla/__init__.py CHANGED
@@ -234,7 +234,7 @@ from carla_backend import (
234
234
  )
235
235
 
236
236
 
237
- __version__ = "2.0.0"
237
+ __version__ = "2.1.0"
238
238
 
239
239
 
240
240
  # -------------------------------------------------------------------
@@ -1540,6 +1540,8 @@ class _SimpleCarla(CarlaHostDLL):
1540
1540
  """
1541
1541
  Returns Plugin.
1542
1542
  "plugin_id" is the integer plugin_id assigned by Carla.
1543
+
1544
+ Raises IndexError
1543
1545
  """
1544
1546
  if plugin_id in self._plugins:
1545
1547
  return self._plugins[plugin_id]
@@ -1556,12 +1558,19 @@ class _SimpleCarla(CarlaHostDLL):
1556
1558
  """
1557
1559
  Returns PatchbayClient, either a SystemPatchbayClient or Plugin.
1558
1560
  "client_id" is the integer client_id assigned by Carla.
1561
+
1562
+ Raises IndexError
1559
1563
  """
1560
1564
  if client_id in self._clients:
1561
1565
  return self._clients[client_id]
1562
1566
  raise IndexError()
1563
1567
 
1564
1568
  def named_client(self, client_name):
1569
+ """
1570
+ Returns the PatchbayClient (system or Plugin) with the given "client_name"
1571
+
1572
+ Raises IndexError
1573
+ """
1565
1574
  for client in self._clients.values():
1566
1575
  if client.client_name == client_name:
1567
1576
  return client
@@ -1578,10 +1587,12 @@ class _SimpleCarla(CarlaHostDLL):
1578
1587
  """
1579
1588
  Returns the PatchbayClient with the given client_name.
1580
1589
  "client_name" is the same value that JACK audio connection kit uses.
1590
+
1591
+ Raises IndexError
1581
1592
  """
1582
1593
  if client_name in self._sys_clients:
1583
1594
  return self._sys_clients[client_name]
1584
- return None
1595
+ raise IndexError
1585
1596
 
1586
1597
  def is_clear(self):
1587
1598
  """
@@ -1594,14 +1605,15 @@ class _SimpleCarla(CarlaHostDLL):
1594
1605
 
1595
1606
  def system_clients(self):
1596
1607
  """
1597
- Generator which yields SystemPatchbayClient
1608
+ Generator which yields SystemPatchbayClient - all system clients.
1598
1609
  """
1599
1610
  for client in self._sys_clients.values():
1600
1611
  return client
1601
1612
 
1602
1613
  def system_audio_in_clients(self):
1603
1614
  """
1604
- Generator which yields SystemPatchbayClient
1615
+ Generator which yields SystemPatchbayClient - system clients with at least one
1616
+ audio in port.
1605
1617
  """
1606
1618
  for client in self._sys_clients.values():
1607
1619
  if client.audio_in_count > 0:
@@ -1609,7 +1621,8 @@ class _SimpleCarla(CarlaHostDLL):
1609
1621
 
1610
1622
  def system_audio_out_clients(self):
1611
1623
  """
1612
- Generator which yields SystemPatchbayClient
1624
+ Generator which yields SystemPatchbayClient - system clients with at least one
1625
+ audio out port.
1613
1626
  """
1614
1627
  for client in self._sys_clients.values():
1615
1628
  if client.audio_out_count > 0:
@@ -1617,7 +1630,7 @@ class _SimpleCarla(CarlaHostDLL):
1617
1630
 
1618
1631
  def system_audio_in_ports(self):
1619
1632
  """
1620
- Generator which yields PatchbayPort
1633
+ Generator which yields PatchbayPort - all audio in ports of all system clients.
1621
1634
  """
1622
1635
  for client in self._sys_clients.values():
1623
1636
  for port in client.audio_ins():
@@ -1625,7 +1638,7 @@ class _SimpleCarla(CarlaHostDLL):
1625
1638
 
1626
1639
  def system_audio_out_ports(self):
1627
1640
  """
1628
- Generator which yields PatchbayPort
1641
+ Generator which yields PatchbayPort - all audio out ports of all system clients.
1629
1642
  """
1630
1643
  for client in self._sys_clients.values():
1631
1644
  for port in client.audio_outs():
@@ -1633,7 +1646,8 @@ class _SimpleCarla(CarlaHostDLL):
1633
1646
 
1634
1647
  def system_midi_in_clients(self):
1635
1648
  """
1636
- Generator which yields SystemPatchbayClient
1649
+ Generator which yields SystemPatchbayClient - system clients with at least one
1650
+ MIDI in port.
1637
1651
  """
1638
1652
  for client in self._sys_clients.values():
1639
1653
  if client.midi_in_count > 0:
@@ -1641,7 +1655,8 @@ class _SimpleCarla(CarlaHostDLL):
1641
1655
 
1642
1656
  def system_midi_out_clients(self):
1643
1657
  """
1644
- Generator which yields SystemPatchbayClient
1658
+ Generator which yields SystemPatchbayClient - system clients with at least one
1659
+ MIDI out port.
1645
1660
  """
1646
1661
  for client in self._sys_clients.values():
1647
1662
  if client.midi_out_count > 0:
@@ -1649,7 +1664,7 @@ class _SimpleCarla(CarlaHostDLL):
1649
1664
 
1650
1665
  def system_midi_in_ports(self):
1651
1666
  """
1652
- Generator which yields PatchbayPort
1667
+ Generator which yields PatchbayPort - all MIDI in ports of all system clients.
1653
1668
  """
1654
1669
  for client in self._sys_clients.values():
1655
1670
  for port in client.midi_ins():
@@ -1657,7 +1672,7 @@ class _SimpleCarla(CarlaHostDLL):
1657
1672
 
1658
1673
  def system_midi_out_ports(self):
1659
1674
  """
1660
- Generator which yields PatchbayPort
1675
+ Generator which yields PatchbayPort - all MIDI out ports of all system clients.
1661
1676
  """
1662
1677
  for client in self._sys_clients.values():
1663
1678
  for port in client.midi_outs():
@@ -1682,7 +1697,8 @@ class _SimpleCarla(CarlaHostDLL):
1682
1697
  port1 must be an PatchbayPort which is an output.
1683
1698
  port2 must be an PatchbayPort which is an intput.
1684
1699
  """
1685
- if not self.patchbay_connect(True, port1.client_id, port1.port_id, port2.client_id, port2.port_id):
1700
+ if not self.patchbay_connect(True, port1.client_id, port1.port_id,
1701
+ port2.client_id, port2.port_id):
1686
1702
  logging.error('Patchbay connect FAILED! %s -> %s', port1, port2)
1687
1703
 
1688
1704
  # -------------------------------------------------------------------
@@ -1690,11 +1706,17 @@ class _SimpleCarla(CarlaHostDLL):
1690
1706
 
1691
1707
  def autoload(self, plugin, filename, callback = None):
1692
1708
  """
1693
- liquidsfz does not have an input file parameter, but instead, requests the host to display an open file dialog from which the user may select an SFZ file to load. This function triggers the plugin's host gui display which will call __file_callback(). When there is a plugin to autoload on deck, __file_callback() will return the "autoload_filename" property of the plugin, instead of showing the file open dialog and returning the result.
1709
+ Tell Carla to load the given filename for the given plugin.
1694
1710
 
1711
+ Some plugins, (such as liquidsfz) do not have an input file parameter, but
1712
+ instead, requests the host to display an open file dialog from which the user
1713
+ may select an SFZ file to load. This function triggers the plugin's host gui
1714
+ display which will call Carla.file_callback(). When there is a plugin to autoload
1715
+ on deck, Carla.file_callback() will return the "autoload_filename" property of
1716
+ the plugin, instead of showing the file open dialog and returning the result.
1695
1717
  """
1696
1718
  if self._autoload_plugin is not None:
1697
- raise Exception("Cannot set autoload plugin as it is already used by " + self._autoload_plugin)
1719
+ raise Exception(f'Autoload already used by "{self._autoload_plugin}"')
1698
1720
  self._autoload_plugin = plugin
1699
1721
  self._autoload_filename = filename
1700
1722
  #logging.debug('Autoloading "%s"', filename)
@@ -1748,11 +1770,11 @@ class _SimpleCarla(CarlaHostDLL):
1748
1770
  filter = charPtrToString(filter)
1749
1771
  if action == FILE_CALLBACK_OPEN:
1750
1772
  if self._open_file_callback is None:
1751
- raise RuntimeError('Carla wants to open a file, but no callback function is defined')
1773
+ raise RuntimeError('No callback function defined')
1752
1774
  str_filename = self._open_file_callback(caption, filter)
1753
1775
  elif action == FILE_CALLBACK_SAVE:
1754
1776
  if self._save_file_callback is None:
1755
- raise RuntimeError('Carla wants to open a file, but no callback function is defined')
1777
+ raise RuntimeError('No callback function defined')
1756
1778
  str_filename = self._save_file_callback(caption, filter)
1757
1779
  else:
1758
1780
  return None
@@ -2336,21 +2358,13 @@ class PatchbayClient:
2336
2358
  # -------------------------------------------------------------------
2337
2359
  # Other port access funcs:
2338
2360
 
2339
- def midi_input_port(self):
2340
- """
2341
- Returns PatchbayPort;
2342
- the first midi input port owned by this client.
2343
- """
2344
- for port in self.ports.values():
2345
- if port.is_midi and port.is_input:
2346
- return port
2347
- return None
2348
-
2349
2361
  def named_port(self, port_name):
2350
2362
  """
2351
2363
  Returns PatchbayPort;
2352
2364
  the port owned by this client whose "port_name" matches exactly.
2353
2365
  Note that the name does NOT include the client_name portion.
2366
+
2367
+ Raises IndexError
2354
2368
  """
2355
2369
  for port in self.ports.values():
2356
2370
  if port.port_name == port_name:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: simple_carla
3
- Version: 2.0.0
3
+ Version: 2.1.0
4
4
  Summary: An easy-to-use, object-oriented interface to the carla plugin host.
5
5
  Author-email: Leon Dionne <ldionne@dridesign.sh.cn>
6
6
  Description-Content-Type: text/markdown
@@ -1,10 +1,10 @@
1
- simple_carla/__init__.py,sha256=d0coorjkbBI2rUidAfWvFtpz8-29N13jxKUnBZxfvkc,109341
1
+ simple_carla/__init__.py,sha256=cC30jlYVHbhsc8ki7zXf8XDDcOeUhbSn0yiQmSScKhg,109738
2
2
  simple_carla/plugin_dialog.py,sha256=uof7YSqVEjgUrWqF-bo76hegsecIOtu6aZr03kdNrKQ,1498
3
3
  simple_carla/qt.py,sha256=8J56Zagbh9ip_HGkhqcNQR36JC8YrUsR4H0QIlhPWIA,15636
4
4
  simple_carla/scripts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  simple_carla/scripts/sc_plugin_def.py,sha256=CVseichHuDCmGeD8v7CfHweeyHHXI60-RcvzU8OILqo,2214
6
- simple_carla-2.0.0.dist-info/entry_points.txt,sha256=oqJRVQXTCIUOmspGNnqDWq9mhz397uoRMQQOhBFbIcs,73
7
- simple_carla-2.0.0.dist-info/LICENSE,sha256=ljOS4DjXvqEo5VzGfdaRwgRZPbNScGBmfwyC8PChvmQ,32422
8
- simple_carla-2.0.0.dist-info/WHEEL,sha256=j3d_2VkBU36k09xOc4O9RZyJJ8uFqn4BR2AtKD7MOp8,99
9
- simple_carla-2.0.0.dist-info/METADATA,sha256=NzokJ7bUAv8bPRKMG2da6hFMrCXkI-radjyUa9yQmgw,1717
10
- simple_carla-2.0.0.dist-info/RECORD,,
6
+ simple_carla-2.1.0.dist-info/entry_points.txt,sha256=oqJRVQXTCIUOmspGNnqDWq9mhz397uoRMQQOhBFbIcs,73
7
+ simple_carla-2.1.0.dist-info/LICENSE,sha256=ljOS4DjXvqEo5VzGfdaRwgRZPbNScGBmfwyC8PChvmQ,32422
8
+ simple_carla-2.1.0.dist-info/WHEEL,sha256=j3d_2VkBU36k09xOc4O9RZyJJ8uFqn4BR2AtKD7MOp8,99
9
+ simple_carla-2.1.0.dist-info/METADATA,sha256=2yoTMG3nvSxsH0UrX5UxMk2jzEm5GDc_1QPdEpmweqg,1717
10
+ simple_carla-2.1.0.dist-info/RECORD,,