alert!!! site for the old dublang version 0.4.x, see the latest version here

home - plugins - tutorials - history - manual


dublang manual

this reference manual describes the core dublang ideas and concepts

services

services handles live coding servers and tools, it is built on top of systemd, the dublang command-line interface can be used to install (enable), remove (disable), start and stop services

filters

filters are Lua functions executed each time a code block is evaluated by "CTRL + e"

for example if the SuperCollider code below is evaluated

~dirt.loadSoundFiles("${HOME}/samples/*")

then the envsubst filter will replace "${HOME}" for "/home/joenio" (in my case), before the code is sent to SuperCollider

filters are executed before the block itself and multiple functions can be combined in a pipeline of filters, each plugin defines a different pipeline but the envsubst is enabled by default in all plugins

filter: envsubst

the filter envsubst expands environment variables in the format ${NAME} before execution, it works like the unix command-line tool envsubst

example

#!dublang

return ${HOME}

this example will return "/home/joenio" for my user

the envsubst filter is enabled by default for all plugins

example using it to load samples with SuperDirt for Tidal Cycles

#!supercollider

~dirt.loadSoundFiles("${HOME}/samples/*")

triggers

triggers are methods to modify code block evaluation defined on shebang level, added below the shebang line in the format "|trigger [args]"

trigger: |repeat [n]

the trigger repeat schedule the last block execution to be re-executed in a infinite loop every [n] seconds

example

#!dublang
|repeat 5

return 'hello world'

after the code above be executed it be re-executed every 5 seconds

hooks

hooks are points of communication among plugins where events generated by one plugin can be captured by others plugins

one example is the gource plugin that uses hooks to update the gource graph each time a block is executed by others plugins

another example is the git plugin that saves and commits the dublang file .dub each time a block is evaluated by others plugins


home - plugins - tutorials - history - manual