Skip to content

jzu/slab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SLug Audio Blaster

Version 1.0

Real-time audio processing

Copyright (C) Jean Zundel jzu@free.fr 2010

slab is an evolutive guitar effect designed for the Linksys NSLU2 running GNU/Linux, but it works on any ALSA-based architecture. It is licensed under the GNU GPL v3.

COMPILATION

Just type make and you're done. You'll need libasound2 and libpthread libraries (+devel), and gcc.

TESTING

Running it as root allows to use the Slug's LEDs.

This program needs an USB joystick - or something similar, like a converted wah controller - to operate. It currently manages two potentiometers and four switches, but there's room for easy expansion. You will need to tinker with #defines to map the physical controls with the desired effects.

The -d option ouputs debug messages (ALSA errors and joystick events).

RUNNING

Once you're all set, you want to edit /etc/inittab to insert this line:

sl:23:respawn:/[PATH_TO]/slab

(obviously replacing [PATH_TO] with its actual path) which will ensure that init(8) restarts the program when it is stopped.

telinit q will re-read the inittab file.

Mounting the / filesystem read-only prevents data corruption, but you have to create ramdisks for /tmp and /var/run directories in /etc/fstab.

/dev/sda2  /         ext3    ro         0 0
(...)
none       /tmp      ramfs   size=512k  0 0
none       /var/run  ramfs   size=512k  0 0

Activating eth0 mysteriously fails with readonly filesystems, so this kludge in /etc/rc.local temporarily switches to rw, ifconfigs eth0, then switches back to ro.

mount /dev/sda2 / -o rw,remount
ifconfig eth0 192.168.0.106
sleep 1                         # Yes, you really need it. Whatever.
mount /dev/sda2 / -o ro,remount

CAVEAT

Enormous hiss! The el-cheapo USB soundcard I used for my tests is to blame. The "noise gate" effect helps only to a point.

When the program starts, it doesn't know the position of pots, since they cannot be read: events are pushed from the controller to the computer. Since this kind of device is seldom restarted during a session, this behaviour is minor, but sometimes surprising.

Any external process/event affects ALSA management and creates an unwanted delay. You have to stop the program, which will be restarted by init if /etc/inittab is set up accordingly.

Hence, Debian is perfect for programming/compiling/debugging, but a stripped-down distro might be more adequate for everyday use. See OpenEmbedded (http://wiki.openembedded.net/) and others.

Packages

No packages published

Languages