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

home - plugins - tutorials - history - manual


dublang plugins

dublang plugins adds new languages, new services and new tools

plugins are composed by

plugin architecture

   _____________
  |             | --> eg: supercollider, obs
  | LIVE CODING |         lebiniou, tidalcycles,
  |    TOOL     |         festival, espeak, ...
  |_____________|

     |      ^
     |      |
     V      |
   ____________                     ____________
  |            |  <--------------  |            |
  | TCP SERVER |                   | TCP CLIENT |
  | (systemd)  |  -------------->  |  (neovim)  |
  |____________|                   |____________|

available plugins

Plugin name TCP port Shebang
dublang no server #!dublang
echo 42000 #!echo
espeak 42006 #!espeak
festival 42007 #!festival
fudi 42008 #!fudi
git 42013 #!git
gource 42011 #!gource
lebiniou 42003 #!lebiniou
mpv 42012 #!mpv
obs 42005 #!obs
puredata 42009 #!puredata
sardine 42004 #!sardine
sm 42014 #!sm
supercollider 42001 #!supercollider
tidalcycles 42002 #!tidalcycles

dublang

this plugin is an exception among all others plugins

it doesn't connect to any external live coding tool but provides access to dublang api itself and to neovim api

the code evaluated by "CTRL + e" is executed by lua 5.1 embedded in neovim

example (random change vim colorsheme)

#!dublang

local schemes = { 'blue', 'matrix', 'dante', 'neon', 'pablo' }
if math.random(1000) >= 500 then
  vim.cmd('colorscheme ' .. schemes[math.random(#schemes)])
else
  vim.cmd('colorscheme default')
end

echo

echo plugin is used to test dublang

usually it is a good idea to try this in the first dublang usage, if it fails likelly that others plugins will fails too

basically it works sending the code evaluated by "CTRL + e" to the script echo-repl installed by dublang, read the response and notify it on nvim

example

#!echo

Hello world!

espeak

plugin for the eSpeak speech synthesizer

example

#!espeak

I might not be the right one
But there's something about us I want to say
'Cause there's something between us anyway

festival

plugin for the Festival Speech Synthesis System

example

#!festival

(SayText "I might not be the right one
But there's something about us I want to say
'Cause there's something between us anyway")

fudi

plugin for FUDI (Fast Universal Digital Interface), the Pure Data networking protocol

git

plugin for Git version control system

auto commit dublang file when code is evaluated by "CTRL + e" with the following commit message

[dublang commit] shebang=<STR> shebang_line=<NUM> cursor_line=<NUM>

dependencies:

example

commit 4822c81be40fe1122a734f529c054c766aefbfb3
Author: Joenio Marques da Costa <joenio.marquesdacosta@u-pem.fr>
Date:   Thu Jul 6 16:41:47 2023 -0300

    [dublang commit] shebang=dublang shebang_line=1 cursor_line=3

gource

plugin for Gource version control visualization tool

this plugin captures any successfully evaluation event (when "CTRL + e" is pressed) by others plugins and send to Gource

dependencies:

example

#!gource

1275543595|dublang|A|gource.dub
1275543596|echo|M|gource.dub
1275543597|tidalcycles|M|gource.dub

output (Gource screenshot) gource screenshot

lebiniou

plugin for the Le Biniou music visualization tool

the link between dublang and Le Biniou is made by lebiniou-repl

example

#!lebiniou

seq?

mpv

plugin for the mpv media player

example

#!mpv

loadfile ${HOME}/movie.mp4
vf set "cas:strength=1"
seek 10 absolute

obs

plugin for the OBS Studio screencasting and streaming app

the link between dublang and OBS Studio is made by obs-repl

puredata

plugin for Pure Data (Pd) visual programming language

the link between dublang and Pure Data is made by puredata-repl

example

#!puredata

open ${HOME}/src/dublang-dev/puredata-repl/test/echo-msg.pd

send ${HOME}/src/dublang-dev/puredata-repl/test/echo-msg.pd bang Hello World

sardine

plugin for Sardine, the Python musical instrument

example

#!sardine

Pa >> d('cp')

silence()

sm

plugin for sm tool to displays multi-line text message fullscreen as large as possible

example

#!sm

hello world!

output (sm screenshot)

supercollider

plugin for SuperCollider real-time audio synthesis and algorithmic composition environment

example

#!supercollider

{ SinOsc.ar(440) }.play;

s.freeAll;

tidalcycles

plugin for Tidal Cycles live coding environment and algorithmic patterns

example

#!tidalcycles

d1 $ sound "cp"

hush

home - plugins - tutorials - history - manual