Repository navigation
v0.9.0 redesigned architecture
TL;DR: Glicol is a graph-oriented live coding language and audio DSP library written in Rust. try the latest version: https://glicol.org
there are a lot of updates in this release. I basically rewrote all the rust part from scratch. now the source code is much easier to read. the error handling is also more robust. just pick some highlights:
rewrite the parser
- the parser is now very strict and can catch almost all the errors in parsing
- the parser can report the error with
expecting...orunexpected...and pos - the parser now provide a
get_astfunction for parsing which will return aHashMap
make glicol_synth a standalone rust library that is ready to publish at crates.io
glicol_synth begins with a fork of the dasp_graph crate, written by @mitchmindtree.
many features and contents are added:
- use
const genericsfeature of rust for a customisable buffer size - replace the input from
VectoHashMap, so users can use a node id to select input - users can send
Messageto each node in real-time for interaction - add a higher level
AudioContextfor easier APIs - many useful audio nodes from oscillators, filters, etc.
rewrite the engine
- the live coding engine takes some code for updating and always yield new blocks with
next_block()method - some new mechanism for parsing and audio graph building and updating
- we get the
HashMapast first and compare it with the old ast - there are some tracks that are completely new, deleted or modified; then further compare those modified tracks
- get list of
node_to_add,node_to_updateandnode_to_remove - check if it is possible to make the update, such as whether samples exist, and refs exist
- not update the graph until every check is passed, else clean up the mess, and the graph is unchanged
rewrite the wasm-binder
- some new sample adding mechanism
- some more error reporting mechanism for the js side
- updating is simplified to one single function with
sharedarrarybuffer
js
- automatically load samples
- support stereo samples
- better organise the commands into
addSampleFiles,addSampleFolder,showAllSamples,getRandSample