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.

39 lines
658B

  1. %module lilv
  2. %{
  3. #include "lilv/lilv.h"
  4. #include "lilv/lilvmm.hpp"
  5. %}
  6. %include "lilv/lilv.h"
  7. %include "lilv/lilvmm.hpp"
  8. namespace Lilv {
  9. %extend Plugins {
  10. %pythoncode %{
  11. def __iter__(self):
  12. class Iterator(object):
  13. def __init__(self, plugins):
  14. self.plugins = plugins
  15. self.iter = plugins.begin()
  16. def next(self):
  17. self.iter = self.plugins.next(self.iter)
  18. if not self.plugins.is_end(self.iter):
  19. return self.plugins.get(self.iter)
  20. else:
  21. raise StopIteration
  22. return Iterator(self)
  23. %}
  24. };
  25. %extend Node {
  26. %pythoncode %{
  27. def __str__(self):
  28. return self.get_turtle_token()
  29. %}
  30. };
  31. } /* namespace Lilv */