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.

carla-control 2.2KB

9 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #!/usr/bin/env python3
  2. # SPDX-FileCopyrightText: 2011-2024 Filipe Coelho <falktx@falktx.com>
  3. # SPDX-License-Identifier: GPL-2.0-or-later
  4. # ----------------------------------------------------------------------------------------------------------------------
  5. # Imports (Custom Stuff)
  6. from carla_host_control import (
  7. ENGINE_PROCESS_MODE_BRIDGE,
  8. CarlaApplication,
  9. CarlaHostOSC,
  10. HostWindowOSC,
  11. handleInitialCommandLineArguments,
  12. initHost,
  13. loadHostSettings,
  14. setUpSignals,
  15. )
  16. import sys
  17. # ----------------------------------------------------------------------------------------------------------------------
  18. # Main
  19. if __name__ == '__main__':
  20. import resources_rc
  21. # ------------------------------------------------------------------------------------------------------------------
  22. # Read CLI args
  23. initName, libPrefix = handleInitialCommandLineArguments(__file__ if "__file__" in dir() else None)
  24. for arg in sys.argv:
  25. if arg.startswith("osc."):
  26. oscAddr = arg
  27. break
  28. else:
  29. oscAddr = None
  30. # ------------------------------------------------------------------------------------------------------------------
  31. # App initialization
  32. app = CarlaApplication("Carla2-Control", libPrefix)
  33. # ------------------------------------------------------------------------------------------------------------------
  34. # Set-up custom signal handling
  35. setUpSignals()
  36. # ------------------------------------------------------------------------------------------------------------------
  37. # Init host backend
  38. host = initHost(initName, libPrefix, True, False, True, CarlaHostOSC)
  39. host.processMode = ENGINE_PROCESS_MODE_BRIDGE
  40. host.processModeForced = True
  41. loadHostSettings(host)
  42. # ------------------------------------------------------------------------------------------------------------------
  43. # Create GUI
  44. gui = HostWindowOSC(host, oscAddr)
  45. # ------------------------------------------------------------------------------------------------------------------
  46. # Show GUI
  47. gui.show()
  48. # ------------------------------------------------------------------------------------------------------------------
  49. # App-Loop
  50. app.exit_exec()