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.7KB

9 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. # Carla plugin host
  4. # Copyright (C) 2011-2021 Filipe Coelho <falktx@falktx.com>
  5. #
  6. # This program is free software; you can redistribute it and/or
  7. # modify it under the terms of the GNU General Public License as
  8. # published by the Free Software Foundation; either version 2 of
  9. # the License, or any later version.
  10. #
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU General Public License for more details.
  15. #
  16. # For a full copy of the GNU General Public License see the doc/GPL.txt file.
  17. # ----------------------------------------------------------------------------------------------------------------------
  18. # Imports (Custom Stuff)
  19. from carla_host_control import (
  20. ENGINE_PROCESS_MODE_BRIDGE,
  21. CarlaApplication,
  22. CarlaHostOSC,
  23. HostWindowOSC,
  24. handleInitialCommandLineArguments,
  25. initHost,
  26. loadHostSettings,
  27. setUpSignals,
  28. )
  29. import sys
  30. # ----------------------------------------------------------------------------------------------------------------------
  31. # Main
  32. if __name__ == '__main__':
  33. # ------------------------------------------------------------------------------------------------------------------
  34. # Read CLI args
  35. initName, libPrefix = handleInitialCommandLineArguments(__file__ if "__file__" in dir() else None)
  36. for arg in sys.argv:
  37. if arg.startswith("osc."):
  38. oscAddr = arg
  39. break
  40. else:
  41. oscAddr = None
  42. # ------------------------------------------------------------------------------------------------------------------
  43. # App initialization
  44. app = CarlaApplication("Carla2-Control", libPrefix)
  45. # ------------------------------------------------------------------------------------------------------------------
  46. # Set-up custom signal handling
  47. setUpSignals()
  48. # ------------------------------------------------------------------------------------------------------------------
  49. # Init host backend
  50. host = initHost(initName, libPrefix, True, False, True, CarlaHostOSC)
  51. host.processMode = ENGINE_PROCESS_MODE_BRIDGE
  52. host.processModeForced = True
  53. loadHostSettings(host)
  54. # ------------------------------------------------------------------------------------------------------------------
  55. # Create GUI
  56. gui = HostWindowOSC(host, oscAddr)
  57. # ------------------------------------------------------------------------------------------------------------------
  58. # Show GUI
  59. gui.show()
  60. # ------------------------------------------------------------------------------------------------------------------
  61. # App-Loop
  62. app.exit_exec()