Repository navigation
Release 7.0.0 - #64
Merged
Merged
Conversation
Builds the 7.x plugins on ubuntu, macos and windows runners against a Csound 7 development install built from source. Also track the missing 7.x/CMakeLists.txt needed by the build.
Add the chua and linear_algebra plugins under 7.x/src and wire them into the 7.x CMake build. Adapted for Csound 7: OENTRY/AppendOpcode no longer take a thread argument, opcode methods return int32_t, deinit is passed in the registration instead of RegisterDeinitCallback, and MYFLT is replaced by cs_float. The removed CSOUND table accessors are replaced with csound->FTFind() in the table conversion opcodes.
Port the fluidsynth opcodes to the Csound 7 API (cs_float, OENTRY/AppendOpcode, StringArg2Name, GetEngineSr, tabinit, noteoff deinit), vendor gmm for linear_algebra, and set up vcpkg (submodule, vcpkg.json, overlay triplet) for macOS/Windows release packaging in CI.
Detect the host architecture with uname before project() (CMAKE_HOST_SYSTEM_PROCESSOR is empty there) so Apple Silicon runners use arm64-osx. Bump vcpkg submodule/baseline to 2026.07.29 to fix the portable 7zip download (404) on Windows.
Link fluidOpcodes against the FluidSynth CMake target so transitive deps (macOS CoreAudio/CoreMIDI frameworks) propagate, and drop the hardcoded Csound6 include hint that clobbered the CI-provided CSOUND_INCLUDE_DIR_HINT on Windows.
Only use the FluidSynth CMake config under vcpkg (Debian ships an incomplete config), and set EIGEN3_FOUND after the Eigen3 config package so chua is not silently disabled under vcpkg.
Add CI workflow to build Csound 7 plugins
Make engine creation and SoundFont loading idempotent across header re-evaluations (e.g. rt recompiles via csoundCompileOrc). Keep per-instance state keyed in Csound global memory and reuse a matching existing engine, and deduplicate SoundFont loads per engine. Fixes #5
Gate engine reuse on the global-code INSDS identity so two fluidEngine calls with identical settings in the same compile still receive distinct engines (instead of being merged, which broke program/channel assignments and corrupted audio). Each engine records the compile that last claimed it; only a later compile may claim it again.
- Key engine reuse on the fluidEngine opcode's ordinal within the global opcode chain instead of the INSDS address, which Csound may recycle between compiles (CodeRabbit 4240985883). - Reuse the string buffer in SetStringData when capacity suffices, else free the old buffer before reallocating (CodeRabbit 4240985871). - Report wrong-type/invalid settings via Message rather than InitError so a non-fatal lookup does not abort the compile (CodeRabbit 4240985891). - Guard fluid_free behind a version check; earlier fluidsynth releases use free() (CodeRabbit 4240985896).
Add the libwebsockets-based websocket opcode to the Csound 7 plugin tree, updating it to the 7.x plugin API: cs_float, LINKAGE registration with the deinit in the OENTRY slot, GetTypeForArg/GetInput/OutputArgName/GetLocalKsmps, and LWS_PRE instead of the removed send-buffer padding macros. Wire up the build (CMakeLists, vcpkg.json, CI dependencies/staging) and document the plugin in the 7.x README.
- Link the imported libuv target under vcpkg instead of the bare uv_a name
- Derive the input index from protocol->id so multiple input protocols
each drain their own buffer
- Reject oversized received strings and zero-pad short ones so they stay
NUL-terminated
- Request writable callbacks for every input protocol
- Cancel the service and guard NULLs before joining/destroying in deinit
- Bound INOCOUNT+OUTOCOUNT (arguments[20]); make intypes variadic ('i*')
so multiple inputs are actually accepted
- Adapt string output allocation to the 7.x pre-allocated STRINGDAT
- Lower the libwebsockets log level to errors and warnings
Port websocket opcode to Csound 7 plugins
- Port HDF5IO.c/h from 6.x to the Csound 7 module API: cs_float, positional OENTRY with deinit slot, GetLocalKsmps, GetInputArgName, GetTypeForArg and GetOParms; allocate array outputs via csound_array_ensure_capacity. - Drop the redundant control-counter guard in HDF5Read_readData. The per-dataset offset checks already bound every read, and the guard compared the engine/local kcounter against the dataset length, truncating reads in any instrument not starting at beat 0. - Add 7.x/src/hdf5/CMakeLists.txt and wire the subdirectory, vcpkg dependency, CI staging and README entry.
- Link only hdf5::hdf5-static under vcpkg; the config package does not provide an hdf5_hl target and the opcodes do not use the HL API. - Remove the unused H5Oget_info query in HDF5IO_readStringAttribute. Its result was never used, and the H5Oget_info/H5Oget_info1 signature changed in HDF5 1.12/2.x (H5Oget_info now needs a fields argument), breaking the build against HDF5 2.1 on Windows.
Support gmm++ 5.4.3 in linear algebra opcodes
Port the image opcodes (imageload, imagesave, imagecreate, imagesize, imagegetpixel, imagesetpixel, imagefree) from the 6.x tree, updating API usage (FindInputFile/FindOutputFile + fopen, NotifyFileOpened, LINKAGE, cs_float) and the OENTRY layout. Wire the plugin into the 7.x build (CMake, vcpkg, CI, README).
hdf5::hdf5-static is not exported when the vcpkg triplet builds HDF5 as a shared library. Choose hdf5::hdf5-static, hdf5::hdf5-shared or hdf5::hdf5 depending on which target the package provides.
Port the faustcsound opcodes (faustgen, faustcompile, faustaudio,
faustdsp, faustplay, faustctl) from 6.x to the Csound 7 plugin API.
- Use cs_float/FAUSTFLOAT, the new OENTRY deinit field, and
csoundModuleInit registration.
- Add a CMake build supporting both a dynamic libfaust and a static
libfaustwithllvm archive (-DFAUST_STATIC=ON) with symbol hiding.
- Install and auto-locate the Faust standard library so
import("stdfaust.lib") works without a separate Faust install.
- Add CI steps to download the Faust release binaries and build/stage
the plugin and stdlib on Linux, macOS and Windows.
Add STK to the WASM package with embedded samples
Add Faust opcodes for Csound 7
- faustgen: terminate control label strings with NUL instead of newline - faustcompile: pass the LLVM target as a real string argument, with overloads for the 4- and 5-argument forms; guard factory creation and the shared factory/DSP registries with a mutex - faustdsp: free the controls object on deletion - faustplay: null-check the DSP registry, validate channel counts before using the engine, do not re-initialise or delete the borrowed engine, and clear all outputs on the early-exit path - faustaudio/faustgen: validate channel counts before registering the DSP instance, and fix the instance counter increment - faustcompile: fix a crash at teardown caused by the reset callback and the asynchronous compilation thread referring to per-note opcode memory; keep their state in a persistent heap object and snapshot the code, args and target before spawning the thread
Including <mutex> after csdl.h pulled in <chrono> after Csound's interlocks.h had defined macros such as _CR and TR, which clash with identifiers used by <chrono> in libstdc++ and the MSVC STL. Include the C++ standard headers before csdl.h.
Serialising createDSPFactoryFromString with the registry mutex allowed a long async LLVM compile to block factory lookups on the performance thread in faustdsp/faustaudio, defeating the purpose of asynchronous compilation. Add faust_compile_mutex for factory creation and keep faust_registry_mutex for the short ::factory list operations.
The asynchronous compilation worker wrote the resulting handle (or error code) through p->hptr, which init_faustcompile had stored in persistent state. For a note-local destination that memory is reclaimed when the instrument ends, so a compile that outlived the note wrote to freed memory. Reserve the ::factory registry slot during init and publish the handle synchronously, while the opcode is still alive. The worker now only fills in the reserved slot (NULL = pending, (void*)-1 = failure, otherwise the factory); faustdsp/faustaudio resolve the slot and wait for it through a new resolve_factory() helper. This removes the use-after-free for local and global handles alike, and hdata no longer carries p->hptr.
Address review findings in Faust opcodes for Csound 7
Add faustgen/faustcompile/faustaudio/faustdsp/faustplay/faustctl to the plugin list, document their call syntax and arguments, the libfaust requirements and CMake hints, the FAUST_STATIC option and the BUILD_FAUST_OPCODES build switch, mirroring the other ported plugins.
Document the Faust opcodes in the 7.x README
Document the WASM plugins in the 7.x README
MYFLT is no longer a public Csound 7 type. Update the python opcode sources and the pycall/pyx generators and generated headers to use cs_float, so the py plugin builds against the Csound 7 SDK.
Migrate the dssi4cs opcodes (dssiinit, dssiactivate, dssiaudio, dssisynth, dssictls, dssiget, dssinote, dssievent, dssinrpn, dssiprogram, dssiconfigure, dssiprograminfo, dssiinfo, dssilist) from the Csound 7 core (Opcodes/dssi4cs) into the plugins tree. - Use the plugin LINKAGE macro for the opcode table. - Add a CMake build (BUILD_DSSI_OPCODES): Linux-only, needs the system ALSA headers, silently disabled elsewhere or when they are missing. - Vendor the DSSI 1.1.1 and LADSPA 1.17 API headers under include/, with their licenses, provenance and update scripts. - Register the plugin, document it in the 7.x README, exclude the vendored headers from CodeRabbit review, and stage the plugin in the Linux CI job.
The pycall generator emitted the terminating semicolon after the newline, producing a malformed 'cs_float oresult\n;}' in the generated struct. Move the semicolon before the newline and update the generated header to match the generator output.
Two issues inherited from the migrated upstream sources: - dssiaudio/dssisynth declared their audio inputs with the 'M' vararg type, which also accepts i-rate and k-rate arguments. The opcode always reads ksmps samples from each input, so an i- or k-rate argument led to out-of-bounds reads. Use 'y' (a-rate only) instead. - DSSI4CS_DEFAULT_PATH omitted the multiarch library directories used on Debian/Ubuntu, so plugins installed under /usr/lib/<triplet>/dssi and /usr/lib/<triplet>/ladspa were not found unless DSSI_PATH or LADSPA_PATH was set. The build now prepends the detected CMAKE_LIBRARY_ARCHITECTURE directory.
Add DSSI/LADSPA opcodes for Csound 7
* Add DSSI host regression tests and allow omitting audio inputs
Move the DSSI/LADSPA host regression test and its fixture plugin out of
the Csound core tree into the plugin that they exercise. The fixture is
built from the vendored DSSI/LADSPA headers so its ABI matches the host,
and the suite now talks to Csound through the public API (csound.h)
instead of the private csoundCore.h internals.
Register the tests with CTest: enable_testing() at the top level, a
GoogleTest-gated target in dssi4cs/CMakeLists.txt (C++14, as required by
recent GoogleTest), and a "Run plugin tests" step in the 7.x build
workflow.
While adapting the tests, replace the single variable-argument OENTRY for
dssiaudio/dssisynth ("iyyyyyyyyy") with one entry per input count
("i".."iaaaaaaaaa"). The parser only treats the M/N/m/W lists as
omittable, so the previous entry made every audio input mandatory even
though the manual documents them as optional. Fixed a-rate inputs are
still a-rate only, so the opcode can never read past a scalar, and the
matching entry is selected by argument count.
* Cover zero-input dssiaudio and reset audio between runs
Address review feedback: exercise dssiaudio with all audio inputs omitted
(only dssisynth was covered), guarding the optional-input behaviour, and
clear the captured audio at the start of run() so a future test that calls
it twice cannot read stale samples.
* fix(wasm): build npm plugins for the shared-memory runtime * fix(wasm): pass exception mode to C++ plugin links
* fix: support the Csound 7 plugin API Keep the const type descriptor returned by GetTypeForArg in Fluid. Export csoundModuleInfo from Chua and linear algebra so Csound 7 can validate their ABI and load them. Add native loader tests and update Csound 7 CI to the stable release. Assisted-by: Codex (GPT-6) * test: verify the requested Csound plugin loads Quote opcode library paths so build directories can contain spaces. Check the exact load message as well as orchestra compilation: an rc file can load an installed copy and hide a failed load of the build artifact. Assisted-by: Codex (GPT-6)
Flatten Csound 7 plugin tree to repository root
fix(ci): release plugins from explicit versions and labelled merges
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is for Release 7.0.0