DIY Zynthian Prototype

Nikolaus Gradwohl2020-03-02T06:35:18+00:00

I started experimmenting with the Zynthian linux image for a spare Raspberry PI and a touch screen shield that have been sitting unused in my spares drawer. Now I finally managed to get some rotary encoders and a MCP1723 I2C IO-Expander. After some experimenting, sweating, swearing, more experimenting and finally replacing a broken pi I managed to get them running and now I have a super cool first working prototype of my DIY Zynthian

Now I need to create a more permanent solution for my mpc1723 circuit and a proper housing for the whole thing :-)

Zynthian Prototype

read more ...

connecting linux midi programs using alsa virtual midi

Nikolaus Gradwohl2018-11-10T17:21:31+00:00

alsa offeres a virutal midi device that can be used to connect several midi applications running on the same computer. This allows you to connect various standalone applications like DAWs, livecoding environments like sonic-pi, supercollider, pd, ... or visualization software and sending midi data between them.

alsa virtual midi

read more ...

how to connect additional soundcards to your jack setup

Nikolaus Gradwohl2017-11-29T07:55:13+00:00


Many hardware synthesizer come with an USB port these days and some of them even connect as a soundcard, allowing you to route the audio from the synth directly to your daw without wasting an input on your soundcard. And sometimes you want to record something using an USB microphone or USB Guitar cable.

To connect such devices to my DAW via jack on linux I created a little startup script that runs every time I start Bitwig Studio to make sure all the external devices are connected. I use alsa_in - a command line tool that allows you to connect an additional alsa sound card. a2jack needs some parameters like the device name, sampling rate or buffer size to use and starts a process. Then it starts a process that listens to the alsa device and forwards the input to jack by connecting as a jack client application with some inputports. These ports can be configured as input routes in your daw like Bitwig or ardor - just like you would do with an input channel on your main sound-card.

To route audio from your daw to the output of an second sound you can use alsa_out

My music startup script connects the audio interface of my Yamaha MX61 and an usb-soundcard, that is connected to my Korg KaosPad Mini, so I can use it as an external effects processor in bitwig-studio

alsa_in -j "MX61" -d hw:CARD=MX49MX61,DEV=0 -r 44100 -p 256 &
alsa_in -j "FX" -d hw:CARD=Device,DEV=0 -r 44100 -p 256 &
alsa_out -j "FX" -d hw:CARD=Device,DEV=0 -r 44100 -p 512

You can get a list of the available alsa device names by running the command

aplay -L

Unfortunately the USB soundcard I use always selects the microphone input when it is plugged in or my computer restarts. To fix this I use the amixer command to change the capture channel to line and mute it - so I don' t generate feedback loops (I spent hours finding out where that distortion came from :-/)

amixer -D "hw:CARD=Device" cset numid=11 on # Line capture on
amixer -D "hw:CARD=Device" cset numid=5 off # Line mute

you can get a list of supported controls and their id by a running

amixer -D "hw:CARD=Device" controls

just replace "hw:CARD=Device" with the device identifier of your sound interface.

read more ...

Using the terasic DE0-Nano on ubuntu

Nikolaus Gradwohl2011-09-25T08:19:01+00:00

A few days ago I got my DE0-Nano developmentboard (thank you adafruit-industries). Its cute litte development board for fpga n00bs like me :-)


I ordered it mainly because it supports linux but when I tried to install the software on my ubuntu-box it didn't work at all. The installer only supports RedHat and Suse distros and throws all sorts of missing symbol errors. So I got straight to the altera-download-site and downloaded the current version of the Quartus || Web Edition.

This took a while since the download package is about 3GB. After installing it took roughly 6GB on my harddisk.

The pdf handbook of the DE0-Nano has a tutorial-section where you will be guided through a first simple verilog hdl project step by step. I followed the tutorial but when I wanted to programm my board all it said was a jtag error (89).

After some googling and reading the altera-forum I added a udev rule for the usb device by adding a file named "40-altera-usbblaster.rules" to "/etc/udev/rules.d/" whith the following content

SUBSYSTEM=="usb", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6001|6002|6003", OWNER="root", GROUP="root", MODE="0666", SYMLINK+="usbblaster" 

I also had to kill "jtagd" and start the "jtagd"-daemon as root by running

sudo ./jtagd

from the quartus-bin directory

and then after hitting the start-button in the programmer app (*drum roll*) my first fpga programm ever started blinking on my DE0-Nano board.

Short Summary:

  • Don't try to install the quartus software from the cd - it's outdated and the installer doesn't like ubuntu - download it straigt from the altera site
  • add the udev rule
  • start the jtagd using sudo

This is at least what took me too get it work.