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.

77 lines
2.4KB

  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. # Carla plugin host
  4. # Copyright (C) 2011-2015 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_control import *
  20. # ------------------------------------------------------------------------------------------------------------
  21. # Main
  22. if __name__ == '__main__':
  23. # -------------------------------------------------------------
  24. # Read CLI args
  25. initName = os.path.basename(__file__) if ("__file__" in dir() and os.path.dirname(__file__) in PATH) else sys.argv[0]
  26. libPrefix = None
  27. oscAddr = None
  28. for arg in sys.argv:
  29. if arg.startswith("--with-appname="):
  30. initName = os.path.basename(arg.replace("--with-initname=", ""))
  31. elif arg.startswith("--with-libprefix="):
  32. libPrefix = arg.replace("--with-libprefix=", "")
  33. elif arg.startswith("osc."):
  34. oscAddr = arg
  35. # -------------------------------------------------------------
  36. # App initialization
  37. app = CarlaApplication("Carla2-Control", libPrefix)
  38. # -------------------------------------------------------------
  39. # Set-up custom signal handling
  40. setUpSignals()
  41. # -------------------------------------------------------------
  42. # Init host backend
  43. host = initHost(initName, libPrefix, True, False, True, CarlaHostOSC)
  44. host.processMode = ENGINE_PROCESS_MODE_PATCHBAY
  45. host.processModeForced = True
  46. loadHostSettings(host)
  47. # -------------------------------------------------------------
  48. # Create GUI
  49. gui = HostWindowOSC(host, oscAddr)
  50. # -------------------------------------------------------------
  51. # Show GUI
  52. gui.show()
  53. # -------------------------------------------------------------
  54. # App-Loop
  55. app.exit_exec()