home - plugins - tutorials - showcase - history - manual - design


dublang tutorial

how to install dublang and Sardine on Debian 13

tutorial on how to install dublang on Debian 13 (Trixie) with Sardine and SuperDirt

first, install the Debian packages below

sudo apt update
sudo apt install -y \
  curl \
  g++ \
  gettext-base \
  git \
  lua5.1 \
  lua-luv \
  luarocks \
  neovim \
  sc3-plugins \
  supercollider \
  python3-pip \
  python3-venv \
  python3-rtmidi \

create a python virtual env and install sardine inside it

python3 -m venv ~/bin/sardine-system
cd ~/bin/sardine-system
./bin/pip install sardine-system

create a new file ~/bin/sardine with the content below

#!/bin/sh
cd ~/bin/sardine-system
./bin/sardine $@

set this file as executable

chmod +x ~/bin/sardine

tell sardine to not start supercollider

sardine config
sardine config wizard animation

install dublang

sudo luarocks install dublang --deps-mode=none --lua-version=5.1

install vim-plug

curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
  https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

create file $HOME/.config/nvim/init.vim and paste the code below

call plug#begin()
Plug 'https://codeberg.org/joenio/dublang-nvim.git', { 'branch': 'main' }

" rcarriga/nvim-notify provides a fancy way to display user messages
Plug 'rcarriga/nvim-notify'

" supercollider/scvim is needed for syntax highlight
Plug 'supercollider/scvim'
call plug#end()

open NeoVim (nvim) and run :PlugInstall to install dublang-nvim

start the supercollider and sardine services

dublang enable supercollider sardine
dublang start supercollider sardine

create a new file sardine.dub

nvim sardine.dub

inside this file add the Sardine code below

#!sardine

Pa >> d('cp')

with the cursor under the line Pa >> d('cp') hit "CTRL + e", you migh listen the clap sound

to mute you can use the Sardine silence() function

#!sardine

Pa >> d('cp')

silence()

to stop the Sardine and SuperCollider services close the NeoVim and run the commandline below

dublang stop supercollider sardine

see below an video demonstration


home - plugins - tutorials - showcase - history - manual - design