Releases: cmajor-lang/cmajor
1.0.2738
1.0.2724
Web Audio Module support
There is now an additional genererator option, wam
which supports building a web audio module. This is a web audio plugin standard, see https://www.webaudiomodules.com/ for details.
Improved endpoint hoisting support for renaming
Previously, it was possible to rename a hoisted endpoint by providing a new name. This support has been extended to provide a wildcard name which allows multiple endpoints to be hoisted and renamed.
graph Test
{
input child.in child_in; // Specifies hoisting child input in, but renamed to child_in
output child.* child_*; // Hoists child.out and child.gain as child_out and child_gain
node child = Child;
}
graph Child
{
input stream float in;
output stream float out;
output stream float gain;
}
Bug fixes
Fixed the bundled windows LLVM libraries for static runtime.
Fixed an issue where graph connections could incorrectly trigger a duplicate node error.
Fixed a bug where constant ifs were not being handled correctly within parameterised namespaces which could lead to incorrect compile errors.
Resolved an issue on linux that was causing some WebView components to not load correctly.
Improved the performance of some value classes which could cause long load times for patches with many endpoints.
Fixed a problem where wrap types could sometimes be left by the compiler and cause code generation to fail.
Fixed inplace operators which caused problems when compiling to wasm.
Improved performance of the compiler by simplifying the state size calculation logic.
Fixed an issue with unused intermediate processors when hoisting endpoints that could cause compilation failure.
1.0.2656
SubtractOne example
The examples folder now includes a plugin with a UI build using React.
Improved error reporting from the C++ backend
In some situations, the C++ backend did not correctly report errors. This lead to an apparent successful run, but no C++ output for the patch. This has been resolved, and the backend now correctly reports the error.
Bug fixes
Fixed an issue which caused patch workers to often hang on windows, due to a race condition in the initialiser.
Oversanpled nodes now correctly handle forwarding for event array endpoints.
Ensured that the C++ backend casts ints correctly to resolve possible issues with function overloading.
Resolved issue where the plugin was not running correctly on some windows hosts.
Resolved an issue where the clap wrapper had problems with mono endpoints.
Linux plugin wrapper now builds correctly.
Resolved a problem with patches using floating point modulo not running with wasm.
1.0.2616
This release includes various updates related to the audio runtime and midi classes
API Updates
The API has been updated to return result codes from various methods on the Performer. The result indicates success, or specific error conditions. Previously these conditions would trigger an assert within the implementation, which was unhelpful when considering wrapping the library into other languages.
Updated LLVM
LLVM has been updated to version 18, which brings some performance benefits when running with the JIT.
Added SourceTransformer
A new beta capability has been added which allows a patch to modify source code before compilation. This can be used to inject user generated source code into a patch, or to transform source code in other ways. An example,FaustFM
is included in the examples which uses both Faust and Cmajor source code, and uses a Faust to Cmajor transpiler to allow support mixing source within one patch, using a wasm build of the Faust compiler suite to transpile.
This feature is new and the API is likely to change over time as it stabilises, so expect some churn if you use this feature.
Bug fixes
There were issues in the previous release which caused compilation failures when using certain intrinsic functions. This has been resolved
Resolved a compile error related to unresolved types triggering errors when checking function return types
Resolved a problem when returning void events from a patch, which previously returned the incorrect type
1.0.2562
This release includes a major rewrite of how the application discovers audio and midi devices, removing the dependency on JUCE. The library and application builds of Cmajor do not use JUCE, although the project is capable of generating a JUCE project as an export target.
The Cmajor plugin is however a JUCE project. If building from source, the plugin is not built by default, and the -DBULD_PLUGIN=ON
option must be specified to cmake. If the plugin is being built, a path to JUCE must be specified using -DJUCE_DIR=...
option
General code tidy up
We have found that some uses of the library with stricter warnings enabled lead to warnings about unreachable statements, and issues around const char *
conventions for string literals. We've resolved these issues, and updated our build settings to catch regressions in this area in future.
Drop binaryen support
The codebase had two ways of generating web assembly - via the LLVM backend, or using a custom web assembly generator. The LLVM backend produced superior code, but there were concerns the library would be too large to support Cmajor JIT in the browser. We have now completed this work, and determined that the LLVM backend is suitable for browser based compilation, and so have removed the custom web assembly generator.
Various CLAP export changes
The CLAP exporter now defaults to using a webview for the patch worker. In addition, the exporter now uses bigobj
on windows platforms.
Updates for the default GUI to support non-linear parameter scaling
Parameters can now specify a mid
value in their annotations. This specifies the value of the parameter in the central position of the knob. The default knob value is now scaled in a power series so that it passes through the mid value at the middle of it's travel. If no mid
value is specified, the knob defaults ot the previous linear behaviour.
Changed type rules around wrap<> and clamp<> types
Previously, wrap
and clamp
types could not automatically converted to float
, unlike int
. This lead to some confusion when migrating algorithms from int
to wrap
. This change will mean some situations where previously an explicit cast was required is no longer needed.
Bug Fixes
Resolved a problem with the new audio interface failing to update the sample rate correctly
Resolved a problem where certain data types were not being correctly transformed into and out of the runtime. This mainly affected the C++ translation (JUCE plugin builds for example). Issues were fixed related to bool
vectors with the JIT backend, and with void
events with web assembly.
Solved a problem where output midi events were not being correctly timestamped when running with large block sizes within a plugin context.
1.0.2462
This release has various improvements to the web assembly generation, and how webaudio is supported.
SIMD support for wasm generator
The wasm generator now supports SIMD code generation, which gives significantly improved performance on wasm runtimes which support this. By default, the wasm generator generates both SIMD and non-SIMD code and switches between them based on whether the platform includes support. The generator has options to switch between this default and --no-simd
and --simd-only
modes for situations where the benefits of smaller generated files outweights the performance and compatibility benefits of supporting both.
Changes to the patch connection object to avoid javascript imports
The javascript helper classes have been refactored and are now provided via the patchConnection
. The avoids the need to import cmaj_api
files, as they are available via the patchConnection
.
Updated patch worker runtime
The patch worker by default now runs using the native webview on the host. It can optionally be switched back to using the previous quickjs javascript interpreter, by adding --worker=quickjs
as an option.
Added reset() method to the Performer API
We've added the ability to reset a Performer to the initial state. Previously a performer could not be reset and would have to be deleted and replaced with a new instance if a reset was required.
Bug Fixes
Various performance issues were identified which were triggered by having a large number of graph nodes. The fixes introduced improved algorithms and a reduction in the compilation time for these graph structures.
wasm output will now be correctly displayed when using the --debug
option from the command line.
Some confusing error messages have been fixed which gave incorrect endpoint types in some error messages.
The on-screen keyboard now correctly ignores key modifiers (e.g. control) which could cause hanging notes on some platforms
modifications to the source code of a patch were no longer triggering reload of the patch - this was disabled inadvertently, and has been re-enabled in this release.
Resolved an issue which caused the --dry-run
mode to fail.
Fixed an issue where the JIT plugin did not correctly restore state in some situations.
Fixed a conditional connection issue which could trigger a compilation failure when unused nodes were removed.
Fixed a problem with the JUCEPlugin
helper which caused the patch to fail to reload in some situations.
Fixed a problem with hoisted endpoint arrays which lead to a failure to compile
1.0.2397
This release includes many new example projects, including Pro54 - a Cmajor implementation of the Pro53 synthesiser, showcasing how to build instruments and web GUIs using the runtime.
Code refactoring
Some of the helper functions have been refactored, especially in the clap plugin. We have also resolved some issues with warnings from more modern compiler suites, and fixed warnings when more stringent warnings are enabled in the compiler.
Pro54 improvements
We have fixed the GUI to correctly show the HPF mode on the GUI - it previously indicated this was a bandpass mode.
The program state saving wasn't implemented correctly, so restoring state when built as a VST plugin was incorrect. This should now function correctly.
CmajPlugin updates
The plugin was incorrectly storing it's state, and hence was unable to restore the plugin when reloading a saved DAW project.
Bug Fixes
The processor.id
allocation strategy has been updated, so that all instances of a processor array are given unique ids, so now all processor instances in the graph have unique ids.
The load and link times in test output were being incorrectly calculcated, this has been fixed.
1.0.2375
Improvements to the html exporter
The patch worker is now supported in exported javascript/html. In addition, some paths have been fixed which previously lead to issues with publishing js/html patches to non-root URLs. The html panel now supports start/stop logic, and displays information from the original patch, including optional links to the patch source. In addition, the generated panels include an on-screen keyboard allowing simple testing of midi instruments.
Bug Fixes
Resolved a problem with drop down lists not being displayed correctly in the default GUI.
Resolved an issue with constant folding which could trigger an error with unresolved types.
The webaudio implementation had a limitation where it only supported a single input and output endpoint - this has now been resolved.
1.0.2367
Improvements to the html exporter
The patch worker is now supported in exported javascript/html. In addition, some paths have been fixed which previously lead to issues with publishing js/html patches to non-root URLs.
Bug Fixes
Resolved a problem with drop down lists not being displayed correctly in the default GUI.
Resolved an issue with constant folding which could trigger an error with unresolved types.
1.0.2358
Improved wasm generation support
The wasm generation code has been significantly updated, giving a significant improvement to the runtime performance. In addition, a new generator mode, (--target=webaudio-html) can be used to automatically generate the wrapping html to support a web audio implementation of the patch. For example:
cmaj generate --target=webaudio-html cmajor/examples/patches/HelloWorld/HelloWorld.cmajorpatch --output=HelloWorld
Will generate a directory containing an html file which implements the HelloWorld patch
Added support for resetting nodes
When composing processors, it is sometimes useful to be able to communicate that a node has not been used for a number of frames, to clear internal state for example. A typical situation this occurs is if a processor is being bypassed, and then is re-activated. A special void reset()
function can now be added to a processor, and this can be called from the wrapping processor on the node directly.
If the processor is oversampled, the state of the oversampler is also automatically reset in this case.
Reduced memory use
Work has been undertaken to reduce the memory use, and compile time for large static arrays within the source. Further work is likely to be undertaken in this area.
Simplified command line tool arguments
The cmaj command line tool has updated arguments for the generate, with additional targets for juce and clap. Check out the command line help to see the new options.
Bug fixes
Resolved a problem with the web aseembly wrapper not correctly handling value endpoints
Improved memory use and compile time for large multi-dimensional arrays
Added support for oversampled node arrays