csoundengine 2.23.1__tar.gz → 2.24.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. {csoundengine-2.23.1 → csoundengine-2.24.0}/PKG-INFO +3 -3
  2. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine/csoundlib.py +10 -34
  3. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine/dependencies.py +7 -6
  4. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine.egg-info/PKG-INFO +3 -3
  5. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine.egg-info/requires.txt +2 -2
  6. {csoundengine-2.23.1 → csoundengine-2.24.0}/pyproject.toml +3 -3
  7. {csoundengine-2.23.1 → csoundengine-2.24.0}/.github/workflows/test2.yml +0 -0
  8. {csoundengine-2.23.1 → csoundengine-2.24.0}/.gitignore +0 -0
  9. {csoundengine-2.23.1 → csoundengine-2.24.0}/LICENSE.txt +0 -0
  10. {csoundengine-2.23.1 → csoundengine-2.24.0}/MANIFEST.in +0 -0
  11. {csoundengine-2.23.1 → csoundengine-2.24.0}/README.rst +0 -0
  12. {csoundengine-2.23.1 → csoundengine-2.24.0}/cmake/csound-custom-macos.cmake +0 -0
  13. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine/__init__.py +0 -0
  14. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine/_common.py +0 -0
  15. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine/_palette.py +0 -0
  16. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine/abstractrenderer.py +0 -0
  17. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine/baseschedevent.py +0 -0
  18. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine/busproxy.py +0 -0
  19. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine/config.py +0 -0
  20. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine/contants.py +0 -0
  21. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine/csd.py +0 -0
  22. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine/csounddefs.py +0 -0
  23. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine/csoundparse.py +0 -0
  24. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine/engine.py +0 -0
  25. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine/enginebase.py +0 -0
  26. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine/engineorc.py +0 -0
  27. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine/errors.py +0 -0
  28. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine/event.py +0 -0
  29. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine/instr.py +0 -0
  30. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine/instrtools.py +0 -0
  31. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine/interact.py +0 -0
  32. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine/internal.py +0 -0
  33. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine/jacktools.py +0 -0
  34. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine/jupytertools.py +0 -0
  35. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine/linuxaudio.py +0 -0
  36. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine/magic.py +0 -0
  37. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine/offline.py +0 -0
  38. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine/offlineengine.py +0 -0
  39. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine/offlineorc.py +0 -0
  40. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine/paramtable.py +0 -0
  41. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine/plotting.py +0 -0
  42. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine/py.typed +0 -0
  43. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine/renderjob.py +0 -0
  44. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine/schedevent.py +0 -0
  45. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine/session.py +0 -0
  46. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine/sessionhandler.py +0 -0
  47. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine/sessioninstrs.py +0 -0
  48. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine/sftools.py +0 -0
  49. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine/state.py +0 -0
  50. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine/synth.py +0 -0
  51. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine/tableproxy.py +0 -0
  52. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine/tools.py +0 -0
  53. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine.egg-info/SOURCES.txt +0 -0
  54. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine.egg-info/dependency_links.txt +0 -0
  55. {csoundengine-2.23.1 → csoundengine-2.24.0}/csoundengine.egg-info/top_level.txt +0 -0
  56. {csoundengine-2.23.1 → csoundengine-2.24.0}/docs/Builtin-Opcodes.rst +0 -0
  57. {csoundengine-2.23.1 → csoundengine-2.24.0}/docs/Installation.rst +0 -0
  58. {csoundengine-2.23.1 → csoundengine-2.24.0}/docs/Introduction.rst +0 -0
  59. {csoundengine-2.23.1 → csoundengine-2.24.0}/docs/Makefile +0 -0
  60. {csoundengine-2.23.1 → csoundengine-2.24.0}/docs/Reference.rst +0 -0
  61. {csoundengine-2.23.1 → csoundengine-2.24.0}/docs/_static/custom.css +0 -0
  62. {csoundengine-2.23.1 → csoundengine-2.24.0}/docs/_static/offlineengine-example1.mp3 +0 -0
  63. {csoundengine-2.23.1 → csoundengine-2.24.0}/docs/assets/config-edit.png +0 -0
  64. {csoundengine-2.23.1 → csoundengine-2.24.0}/docs/assets/eventui.png +0 -0
  65. {csoundengine-2.23.1 → csoundengine-2.24.0}/docs/assets/eventui2.png +0 -0
  66. {csoundengine-2.23.1 → csoundengine-2.24.0}/docs/assets/jupyter-config.png +0 -0
  67. {csoundengine-2.23.1 → csoundengine-2.24.0}/docs/assets/jupyter-plotTable.png +0 -0
  68. {csoundengine-2.23.1 → csoundengine-2.24.0}/docs/assets/jupyter-session-1.png +0 -0
  69. {csoundengine-2.23.1 → csoundengine-2.24.0}/docs/assets/offlineengine-example1.png +0 -0
  70. {csoundengine-2.23.1 → csoundengine-2.24.0}/docs/assets/select-preset.png +0 -0
  71. {csoundengine-2.23.1 → csoundengine-2.24.0}/docs/assets/synthui.png +0 -0
  72. {csoundengine-2.23.1 → csoundengine-2.24.0}/docs/assets/tableplot-sine.png +0 -0
  73. {csoundengine-2.23.1 → csoundengine-2.24.0}/docs/assets/tableplot-stereo.png +0 -0
  74. {csoundengine-2.23.1 → csoundengine-2.24.0}/docs/assets/tableproxy-plot.png +0 -0
  75. {csoundengine-2.23.1 → csoundengine-2.24.0}/docs/assets/tableproxy-plotspectrogram.png +0 -0
  76. {csoundengine-2.23.1 → csoundengine-2.24.0}/docs/assets/ui2.png +0 -0
  77. {csoundengine-2.23.1 → csoundengine-2.24.0}/docs/conf.py +0 -0
  78. {csoundengine-2.23.1 → csoundengine-2.24.0}/docs/config.rst +0 -0
  79. {csoundengine-2.23.1 → csoundengine-2.24.0}/docs/configkeys.rst +0 -0
  80. {csoundengine-2.23.1 → csoundengine-2.24.0}/docs/csoundengine.rst +0 -0
  81. {csoundengine-2.23.1 → csoundengine-2.24.0}/docs/csoundlib.rst +0 -0
  82. {csoundengine-2.23.1 → csoundengine-2.24.0}/docs/index.rst +0 -0
  83. {csoundengine-2.23.1 → csoundengine-2.24.0}/docs/instr.rst +0 -0
  84. {csoundengine-2.23.1 → csoundengine-2.24.0}/docs/jupyternotebook.rst +0 -0
  85. {csoundengine-2.23.1 → csoundengine-2.24.0}/docs/magics.rst +0 -0
  86. {csoundengine-2.23.1 → csoundengine-2.24.0}/docs/make.bat +0 -0
  87. {csoundengine-2.23.1 → csoundengine-2.24.0}/docs/offline.rst +0 -0
  88. {csoundengine-2.23.1 → csoundengine-2.24.0}/docs/offlineengine.rst +0 -0
  89. {csoundengine-2.23.1 → csoundengine-2.24.0}/docs/offlineengine_example.inc +0 -0
  90. {csoundengine-2.23.1 → csoundengine-2.24.0}/docs/offlineengine_example2.inc +0 -0
  91. {csoundengine-2.23.1 → csoundengine-2.24.0}/docs/offlinerenderer.rst +0 -0
  92. {csoundengine-2.23.1 → csoundengine-2.24.0}/docs/renderjob.rst +0 -0
  93. {csoundengine-2.23.1 → csoundengine-2.24.0}/docs/requirements.txt +0 -0
  94. {csoundengine-2.23.1 → csoundengine-2.24.0}/docs/schedevent.rst +0 -0
  95. {csoundengine-2.23.1 → csoundengine-2.24.0}/docs/session.rst +0 -0
  96. {csoundengine-2.23.1 → csoundengine-2.24.0}/docs/synth.rst +0 -0
  97. {csoundengine-2.23.1 → csoundengine-2.24.0}/docs/tables.rst +0 -0
  98. {csoundengine-2.23.1 → csoundengine-2.24.0}/notebooks/buses.ipynb +0 -0
  99. {csoundengine-2.23.1 → csoundengine-2.24.0}/notebooks/offlineengine-playback.ipynb +0 -0
  100. {csoundengine-2.23.1 → csoundengine-2.24.0}/notebooks/offlineengine.ipynb +0 -0
  101. {csoundengine-2.23.1 → csoundengine-2.24.0}/notebooks/snd/colours-german-male.flac +0 -0
  102. {csoundengine-2.23.1 → csoundengine-2.24.0}/notebooks/snd/piano-pitchtest-2.flac +0 -0
  103. {csoundengine-2.23.1 → csoundengine-2.24.0}/notebooks/snd/voiceover-fragment-48k.flac +0 -0
  104. {csoundengine-2.23.1 → csoundengine-2.24.0}/notebooks/test/plltrack.ipynb +0 -0
  105. {csoundengine-2.23.1 → csoundengine-2.24.0}/notebooks/test/test-bus.ipynb +0 -0
  106. {csoundengine-2.23.1 → csoundengine-2.24.0}/notebooks/test/test-dealloc-synth.ipynb +0 -0
  107. {csoundengine-2.23.1 → csoundengine-2.24.0}/notebooks/test/test-delay.ipynb +0 -0
  108. {csoundengine-2.23.1 → csoundengine-2.24.0}/notebooks/test/test-engine-params.ipynb +0 -0
  109. {csoundengine-2.23.1 → csoundengine-2.24.0}/notebooks/test/test-libcsound.ipynb +0 -0
  110. {csoundengine-2.23.1 → csoundengine-2.24.0}/notebooks/test/test-named-events.ipynb +0 -0
  111. {csoundengine-2.23.1 → csoundengine-2.24.0}/notebooks/test/test-new-named-params.ipynb +0 -0
  112. {csoundengine-2.23.1 → csoundengine-2.24.0}/notebooks/test/test-offline-render.ipynb +0 -0
  113. {csoundengine-2.23.1 → csoundengine-2.24.0}/notebooks/test/test-offlinesession.ipynb +0 -0
  114. {csoundengine-2.23.1 → csoundengine-2.24.0}/notebooks/test/test-params.ipynb +0 -0
  115. {csoundengine-2.23.1 → csoundengine-2.24.0}/notebooks/test/test-playsample.ipynb +0 -0
  116. {csoundengine-2.23.1 → csoundengine-2.24.0}/notebooks/test/test-stop.ipynb +0 -0
  117. {csoundengine-2.23.1 → csoundengine-2.24.0}/notebooks/test/test-tight-scheduling.ipynb +0 -0
  118. {csoundengine-2.23.1 → csoundengine-2.24.0}/notebooks/test/test-whenfinished.ipynb +0 -0
  119. {csoundengine-2.23.1 → csoundengine-2.24.0}/notebooks/voice-pitch-track.ipynb +0 -0
  120. {csoundengine-2.23.1 → csoundengine-2.24.0}/pyrightconfig.json +0 -0
  121. {csoundengine-2.23.1 → csoundengine-2.24.0}/readthedocs.yml +0 -0
  122. {csoundengine-2.23.1 → csoundengine-2.24.0}/scripts/download-plugins.py +0 -0
  123. {csoundengine-2.23.1 → csoundengine-2.24.0}/scripts/update-config-docs.py +0 -0
  124. {csoundengine-2.23.1 → csoundengine-2.24.0}/setup.cfg +0 -0
  125. {csoundengine-2.23.1 → csoundengine-2.24.0}/test/importtime.py +0 -0
  126. {csoundengine-2.23.1 → csoundengine-2.24.0}/test/libcsoundtest.py +0 -0
  127. {csoundengine-2.23.1 → csoundengine-2.24.0}/test/simple.py +0 -0
  128. {csoundengine-2.23.1 → csoundengine-2.24.0}/test/test1.csd +0 -0
  129. {csoundengine-2.23.1 → csoundengine-2.24.0}/test/test1.py +0 -0
  130. {csoundengine-2.23.1 → csoundengine-2.24.0}/test/test2.py +0 -0
  131. {csoundengine-2.23.1 → csoundengine-2.24.0}/test/testargs.py +0 -0
  132. {csoundengine-2.23.1 → csoundengine-2.24.0}/test/testdeps.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: csoundengine
3
- Version: 2.23.1
3
+ Version: 2.24.0
4
4
  Summary: An audio synthesis framework using csound
5
5
  Author-email: Eduardo Moguillansky <eduardo.moguillansky@gmail.com>
6
6
  License: GNU GENERAL PUBLIC LICENSE
@@ -695,12 +695,12 @@ Requires-Dist: ipywidgets
695
695
  Requires-Dist: xxhash
696
696
  Requires-Dist: docstring_parser
697
697
  Requires-Dist: typing_extensions
698
- Requires-Dist: libcsound>=0.17.0
698
+ Requires-Dist: libcsound>=0.17.1
699
699
  Requires-Dist: sndfileio>=2.1.1
700
700
  Requires-Dist: emlib>=1.20
701
701
  Requires-Dist: configdict>=2.10.0
702
702
  Requires-Dist: pitchtools>=1.14.0
703
- Requires-Dist: risset>=3.5.4
703
+ Requires-Dist: risset>=3.5.7
704
704
  Requires-Dist: sounddevice
705
705
  Dynamic: license-file
706
706
 
@@ -653,9 +653,9 @@ class CsoundProc:
653
653
  csdstr: str = ""
654
654
 
655
655
 
656
- def testCsound(dur=8., nchnls=2, backend='', device="dac", sr=0, ksmps=64,
657
- verbose=True
658
- ) -> CsoundProc:
656
+ def testCsound(dur=8., nchnls=2, backend='', device="", sr=0, ksmps=64,
657
+ opcodeDir='', verbose=True, options: list[str] | None = None
658
+ ) -> None:
659
659
  """
660
660
  Test the current csound installation for realtime output
661
661
 
@@ -668,38 +668,14 @@ def testCsound(dur=8., nchnls=2, backend='', device="dac", sr=0, ksmps=64,
668
668
  or a default sample rate otherwise
669
669
  verbose: if True, make csound display debugging and status information
670
670
 
671
- Returns:
672
- a :class:`CsoundProc`
673
671
  """
674
672
  backend = backend or getDefaultBackend().name
675
673
  if not sr:
676
674
  sr = getSamplerateForBackend(backend) or 44100
677
- printchan = "printk2 kchn" if verbose else ""
678
- orc = f"""
679
- sr = {sr}
680
- ksmps = {ksmps}
681
- nchnls = {nchnls}
682
- 0dbfs = 1
683
-
684
- instr 1
685
- iperiod = 1
686
- kchn init -1
687
- ktrig metro 1/iperiod
688
- kchn = (kchn + ktrig) % nchnls
689
- anoise pinker
690
- outch kchn+1, anoise
691
- {printchan}
692
- endin
693
- """
694
- sco = f"i1 0 {dur}"
695
- orc = _textwrap.dedent(orc)
696
- logger.debug(orc)
697
- csd = joinCsd(orc, sco=sco)
698
- tmp = _tempfile.mktemp(suffix=".csd")
699
- open(tmp, "w").write(csd)
700
- proc = runCsd(tmp, outdev=device, backend=backend)
701
- return CsoundProc(proc=proc, backend=backend, outdev=device, sr=sr,
702
- nchnls=nchnls, csdstr=csd)
675
+ import libcsound._util
676
+ libcsound._util.testCsound(module=backend, sr=sr, outdev=device, ksmps=ksmps,
677
+ nchnls=nchnls, dur=dur, opcodeDir=opcodeDir,
678
+ options=options)
703
679
 
704
680
 
705
681
  def installedOpcodes(cached=True, opcodedir: str = '') -> set[str]:
@@ -715,12 +691,12 @@ def installedOpcodes(cached=True, opcodedir: str = '') -> set[str]:
715
691
  Returns:
716
692
  a list of all available opcodes
717
693
  """
718
- #if not cached:
719
- # csoundGetInfo.cache_clear()
694
+ if not cached:
695
+ csoundGetInfo.cache_clear()
720
696
  return csoundGetInfo(opcodedir=opcodedir)['opcodes']
721
697
 
722
698
 
723
- # @_functools.cache
699
+ @_functools.cache
724
700
  def csoundGetInfo(opcodedir='') -> dict:
725
701
  """
726
702
  Returns a dict of {'opcodedefs': list[OpcodeDef], 'opcodes': set[str], 'versionTriplet': (major, minor, patch)}
@@ -240,13 +240,12 @@ def _checkDependencies(fix=False) -> str:
240
240
 
241
241
  if not pluginsInstalled():
242
242
  if fix:
243
- print("** csoundengine: Csound external plugins are not installed"
244
- " I will try to install them now")
243
+ print("** csoundengine: Csound external plugins not found, installing...")
245
244
  ok = installPlugins()
246
245
  if ok:
247
- print("** csoundengine: csound external plugins installed ok")
246
+ print("** csoundengine: ... plugins installed ok")
248
247
  else:
249
- print("** csoundengine: csound external plugins could not be installed")
248
+ print("** csoundengine: plugins could not be installed")
250
249
  return "csound external plugins could not be installed"
251
250
  else:
252
251
  return ("Some plugins are not installed. They can be installed via "
@@ -275,13 +274,15 @@ def installDependencies() -> bool:
275
274
  return not err
276
275
 
277
276
 
278
- def checkDependencies(force=True, fix=False) -> bool:
277
+ def checkDependencies(force=True, fix=False, timeoutDays=30) -> bool:
279
278
  """
280
279
  Check that all external dependencies are fullfilled.
281
280
 
282
281
  Args:
283
282
  force: if True, do not use cached results
284
283
  fix: if True, try to fix missing dependencies if needed
284
+ timeoutDays: if the last check was done less than this
285
+ number of days ago, skip the check
285
286
 
286
287
  Returns:
287
288
  True if all dependencies are fullfilled
@@ -294,7 +295,7 @@ def checkDependencies(force=True, fix=False) -> bool:
294
295
 
295
296
  now = datetime.now()
296
297
  timeSinceLastCheck = now - datetime.fromisoformat(state['last_check'])
297
- if not force and timeSinceLastCheck.days < 30:
298
+ if not force and timeoutDays > 0 and timeSinceLastCheck.days < timeoutDays:
298
299
  return True
299
300
  logger.info("Checking dependencies")
300
301
  errormsg = _checkDependencies(fix=fix)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: csoundengine
3
- Version: 2.23.1
3
+ Version: 2.24.0
4
4
  Summary: An audio synthesis framework using csound
5
5
  Author-email: Eduardo Moguillansky <eduardo.moguillansky@gmail.com>
6
6
  License: GNU GENERAL PUBLIC LICENSE
@@ -695,12 +695,12 @@ Requires-Dist: ipywidgets
695
695
  Requires-Dist: xxhash
696
696
  Requires-Dist: docstring_parser
697
697
  Requires-Dist: typing_extensions
698
- Requires-Dist: libcsound>=0.17.0
698
+ Requires-Dist: libcsound>=0.17.1
699
699
  Requires-Dist: sndfileio>=2.1.1
700
700
  Requires-Dist: emlib>=1.20
701
701
  Requires-Dist: configdict>=2.10.0
702
702
  Requires-Dist: pitchtools>=1.14.0
703
- Requires-Dist: risset>=3.5.4
703
+ Requires-Dist: risset>=3.5.7
704
704
  Requires-Dist: sounddevice
705
705
  Dynamic: license-file
706
706
 
@@ -10,10 +10,10 @@ ipywidgets
10
10
  xxhash
11
11
  docstring_parser
12
12
  typing_extensions
13
- libcsound>=0.17.0
13
+ libcsound>=0.17.1
14
14
  sndfileio>=2.1.1
15
15
  emlib>=1.20
16
16
  configdict>=2.10.0
17
17
  pitchtools>=1.14.0
18
- risset>=3.5.4
18
+ risset>=3.5.7
19
19
  sounddevice
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
5
5
 
6
6
  [project]
7
7
  name = "csoundengine"
8
- version = "2.23.1"
8
+ version = "2.24.0"
9
9
  license = { file = "LICENSE.txt" }
10
10
  description = "An audio synthesis framework using csound"
11
11
  authors = [
@@ -35,12 +35,12 @@ dependencies = [
35
35
  "docstring_parser",
36
36
  "typing_extensions",
37
37
 
38
- "libcsound>=0.17.0",
38
+ "libcsound>=0.17.1",
39
39
  "sndfileio>=2.1.1",
40
40
  "emlib>=1.20",
41
41
  "configdict>=2.10.0",
42
42
  "pitchtools>=1.14.0",
43
- "risset>=3.5.4",
43
+ "risset>=3.5.7",
44
44
  "sounddevice",
45
45
  ]
46
46
 
File without changes
File without changes
File without changes
File without changes
File without changes