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_modgui.py 2.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. # Carla bridge for LV2 modguis
  4. # Copyright (C) 2015-2019 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 (Global)
  19. import os
  20. import sys
  21. # ------------------------------------------------------------------------------------------------------------
  22. # Imports (local)
  23. from carla_app import CarlaApplication, gCarla, getPaths
  24. from carla_shared import DLL_EXTENSION, setUpSignals
  25. from carla_utils import CarlaUtils
  26. from modgui.host import HostWindow
  27. # ------------------------------------------------------------------------------------------------------------
  28. # Main
  29. if __name__ == '__main__':
  30. # -------------------------------------------------------------
  31. # Read CLI args
  32. if len(sys.argv) < 2:
  33. print("usage: %s <plugin-uri>" % sys.argv[0])
  34. sys.exit(1)
  35. libPrefix = os.getenv("CARLA_LIB_PREFIX")
  36. # -------------------------------------------------------------
  37. # App initialization
  38. app = CarlaApplication("Carla2-MODGUI", libPrefix)
  39. # -------------------------------------------------------------
  40. # Init utils
  41. pathBinaries, pathResources = getPaths(libPrefix)
  42. utilsname = "libcarla_utils.%s" % (DLL_EXTENSION)
  43. gCarla.utils = CarlaUtils(os.path.join(pathBinaries, utilsname))
  44. gCarla.utils.set_process_name("carla-bridge-lv2-modgui")
  45. # -------------------------------------------------------------
  46. # Set-up custom signal handling
  47. setUpSignals()
  48. # -------------------------------------------------------------
  49. # Create GUI
  50. gui = HostWindow()
  51. # --------------------------------------------------------------------------------------------------------
  52. # App-Loop
  53. app.exit_exec()
  54. # ------------------------------------------------------------------------------------------------------------