Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.3KB

  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. # --------------------------------------------------------------------------------------------------------
  4. from carla_backend import *
  5. from signal import signal, SIGINT, SIGTERM
  6. from time import sleep
  7. # --------------------------------------------------------------------------------------------------------
  8. global term
  9. term = False
  10. def signalHandler(sig, frame):
  11. if sig in (SIGINT, SIGTERM):
  12. global term
  13. term = True
  14. # --------------------------------------------------------------------------------------------------------
  15. host = CarlaHostDLL("/home/falktx/FOSS/GIT-mine/falkTX/Carla/bin/libcarla_standalone2.so")
  16. if not host.engine_init("JACK", "Carla-uhe-test"):
  17. print("Engine failed to initialize, possible reasons:\n%s" % host.get_last_error())
  18. sys.exit(1)
  19. if not host.add_plugin(BINARY_NATIVE, PLUGIN_VST2, "/home/falktx/.vst/u-he/ACE.64.so", "", "", 0, None, 0):
  20. print("Failed to load plugin, possible reasons:\n%s" % host.get_last_error())
  21. host.engine_close()
  22. sys.exit(1)
  23. signal(SIGINT, signalHandler)
  24. signal(SIGTERM, signalHandler)
  25. while host.is_engine_running() and not term:
  26. host.engine_idle()
  27. sleep(0.5)
  28. host.engine_close()
  29. # --------------------------------------------------------------------------------------------------------