Development log

Code, tricks, quick technical ideas, recipes, progress reports, bash, ffmpeg and more…

Line of purples – Wikipedia, the free encyclopedia

In color theory, the line of purples or the purple boundary is the locus on the edge of the chromaticity diagram between extreme spectral red and violet. Except for the endpoints, colors on the line of purples are not spectral. Line-of-purples colors and spectral colors are the only ones which are considered fully saturated in the sense that for any given point on the line of purples there exists no color involving a mixture of red and violet that is more saturated than it. There is no monochromatic light source able to generate a purple color. Instead, every color on the line of purples is produced by mixing a unique ratio of fully saturated red and fully saturated violet, at the extreme points of visibility on the spectrum of pure hues.

Unlike spectral colors (which may be implemented, for example, by nearly monochromatic light of laser, with precision much finer than human chromaticity resolution), colors on the line of purples are more difficult to implement practically. Cones’ sensitivity to both of the spectral colors at the opposite extremes of what the human eye can see is quite low (see luminosity function), so commonly observed purple colors do not achieve a high level of brightness.

The line of purples, a theoretical boundary of chromaticity, should not be confused with “purples“, a more general color term which also refers to less than fully saturated colors (see variations of purple and variations of pink for possible examples) which form an interior of a triangle between white and the line of purples in the CIE chromaticity diagram.

Source: Line of purples – Wikipedia, the free encyclopedia

processing applet on desired monitor

An example how to control on which monitor does processing applet (sketch output window) appear if you’re using multi-head setup:

multitouch with dual head/monitor Xorg

Having a multi-touch monitor (DELL P2314T) together with another non-multi-touch output confuses (in my case) the pointer maping – in other words, the pointer (mouse) is not where you touch the screen.

1) Make sure the touch screen is the leftmost monitor. Seems like offset-ing the pointer with xinput does not work (and something is buggy here), but scaling does. Actually that is not entirely true: offseting works with xinput, but in the case of multi-touch screen not being left-most the pointer is thrown to the rightmost pixel on X-axis the moment it’s supposed to appear on the multi-touch screen (this is true only for MT input, not for the actual mouse). If the touch-screen the leftmost, there’s no need to do offset, just proper scaling.

2) use xinput’s “Coordinate Transformation Matrix” to ‘remap’ it correctly:


and here’s a simple /etc/X11/xorg.conf:

SuperCollider GUI – tabs proof of concept

These are very newbie baby steps in the construction of a something bigger, a powerful flexible interface for a touch-screen device. Novels are being written one word at the time, right?

The following is a snippet of code that I needed to write in order to test a TABs-like behaviour in SuperCollider QT GUI system. Essentially, I was curious if it’s possible to show and hide whole windows/areas of different widgets using a tabs-like paging system – something we’re all used to now from browsers, for example.

SC GUI TABs proof of concept anim gif

Processing: slice and blend

Here’s a little sketch in Processing that does the following: loads an image, takes a horizontal and vertical 1px slice, multiplies each slice into an image off-screen, and blends the two images together and displays the original and blended one side by side. Each frame this is calculated dynamicaly, the slices are determined by the position of the mouse.

Note: the image must be in the folder where your sketch is saved and it must be in dimension of 300×300 pixels.

Processing: slice and blend screeshot

I still need to test this in a fullHD/1080p situation. I wonder if the CPU can take it at 60 frames per second. I actually suspect not. So many pixels and not on the GPU.

Granular synthesis in SC

This morning I started to work on a granular machine in SuperCollider. This is what I got so far:

Interface Fractures III: Silicon log #1

These days I started some work on a new chapter of my audio-visual series called “Interface Fractures”.

Bought a new graphic card – Nvidia-based GTX960.
Also a fullHD multitouch screen is here for exploitation in next couple of years.

SuperCollider for multitouch

Somebody (Scott Cazan) on the supercollider-users list mentioned a fork of SuperCollider with multitouch support (which will be included in main with 3.8 release). I cloned git fork from Cazan’s github, installed build dependencies, couple of twiddles, and compilation went through.


Continue reading

Garmin Nüvi 255 on Linux

Was asked by my family if I can update their Garmin device, so I searched the net how to do it without getting into buying much software and possibly work with free maps.

Get the maps

Go to and select what data you want on your map.

Start by choosing a type of map – for example “Generic Routable” (seems good for this model of Garmin), then select a predefined country from a dropdown menu (for example in a dropdown “Europe” you can choose Austria, or Slovenia).

If you want more territories add some additional tiles, click “Enable manual selection” checkbox and click around the map to select or deselect tiles. You can also click+drag to select multiple tiles. Once you are done, add your email address above the map and click “Build my maps” and follow instructions.

When you open the link in the second email, download the “Compressed file that contains a single image that can be placed directly onto the SD-card of the GPS.“, usually called something like

Add the maps to your Garmin

Plug your Garmin Nüvi 255 to your computer using a simple mini-usb cable (it looks like this).

Wait till it ‘boots’ – wait for progress bar and a beep.

After that there should appear two possibilities to mount in your Nautilus. One of them is the Garmin device itself and the other is the microSD card plugged into the Garmin. If names of devices don’t give enough clues about which one is which one, you can recognise them by their contents if you mount them. The microSD card will have only one folder called ‘garmin’ while Garmin device will have more folders and files. Mount the microSD card. (Alternatively, you can take the microSD card out of Garmin and mount it on computer using an SD card reader).

Backup (copy) the file or the ‘garmin’ folder from microSD card onto your computer just in case something goes wrong.

Unzip the contents of the zip file you downloaded from OpenStreetMap – this will give you a single file: gmapsupp.img. Copy it to the microSD card into folder ‘garmin’, overwriting the file that is there.

Wait for the transfer to complete and properly unmount the microSD card and the Garmin device. Once you are sure they are unmounted you can unplug the Garmin device from your computer.

That’s all. When Garmin starts it will include the new data together with old data for areas that you didn’t choose (or so it seems – untested yet). If you want to use just the new map, and not the old data (or just to test if the new map is installed), go to Tools > Settings > Map > Map Info where you can turn on and off maps as desired.

Alternative method: replace the maps

The above method seems to “add” new data for selected areas. In other words, what you put on the microSD card is then used in addition to the maps that are already on the device.

It seems that it is possible to replace the maps that are already on the device by actually replacing gmapprom.img file on folder ‘Garmin’ on the device (not on microSD card!) with the contents of gmapsupp.img. That is, rename gmapsupp.img to gmapprom.img and with it overwrite the file on the device (do not forget to backup anything you will override).


Ubuntu Studio 14.04 (Trusty Tahr) on ThinkPad X220

I went and installed a fresh install from the USB: first I downloaded a DVD image of Ubuntu Studio 14.04.1 and then used UNetBootin to create a bootable USB stick. I was able to boot into live version (Try Ubuntu Studio without installing) and then installed directly from that session.

I was able to shrink the root partition from existing install (also Ubuntu Studio, 12.04) which was 28 GB into 14GB and that left me with new 14GB space for a new install. This way I could dual boot and boot back into old system in case of emergency.

After install I had a problem connecting to my home WiFi with the default NetworkManager. I’m already used to using WICD network manager, so I booted back into old system and downloaded packages: python-urwid_1.1.1-1build2_amd64.deb, wicd-curses_1.7.2.4-4.1ubuntu1_all.deb, python-wicd_1.7.2.4-4.1ubuntu1_all.deb and wicd-daemon_1.7.2.4-4.1ubuntu1_all.deb into a fresh empty folder, booted back into new system and installed them with

Then you can control your wifi in terminal with wicd-curses

It’s cool to stop NetworkManager (first) and remove it after wicd is working ok (sudo apt-get remove network-manager) and possibly restart wicd with

Window Manager

I use awesome window manager

and enable text-only login by setting in /etc/default/grub:

don’t forget to

start your awesome WM with startx (part of xinit package), with your ~/.xinitrc containing something like

audio setup

a jackd instance in a terminal (jackd -d alsa -d hw:0 -r 44100 -p 512 -n 3 -i 2 -o 2)
pulseaudio (currently not autospawned – echo "autospawn = no" > ~/.pulse/client.conf)
jack-module for pulse audio

in fact a big problem was an old ~/.asoundrc file. once removed, jack was easy to start. jack_control still not behaving right, but i wrote a little script to start jackd and pulseaudio:, put it in ~/bin and make it executable:

Firewire (using an ExpressCard) sound card (Edirol FA-101) works out of the box. Just use:

Also, EchoAudio Indigo xDJ express-card works out of the box. After pluging it in it’s usually found as hw:1, so:

more system tweaking

Some necessary tools:

I (quite haphazardly by opinion of some) turn of sudo password check, by adding the following into /etc/sudoers file:

Suspend through xfce4-power-manager does not work. the solution with installing pm-utils as per makes this problem go away. So,

Returning from suspend sometimes makes certain programs lagging in display updates (Chromium browser and Renoise, observed). This can be eliminated by simply switching to text console (Ctrl+Alt+F1) and back to Xorg (Alt+F7).

audio/video stuff

install renoise

install SuperCollider:

Click [Configure] and then [Generate]. You might get some submodules via git (git submodule update, +..)

quirky Pure Data

If your PD patches use [plugin~], nothing will be shown. This can be avoided by starting PD with a unset LANG. This means that before you run pure data (pd-extended), you first do

Gtk grey/green theme is not applied well to all different widgets

the main culprit is the gtk3.
everything is solved if one takes a good theme that includes gtk2 and gtk3 themes, download and extract into ~/.themes/ and creates symlinks like this:

one can fix font size using lxappearance and qt/kde apps using qtconfig

suspending from within LightDM doesn’t work. Reports “No kernel support”

my workaround is not using lightdm at all. i turn it off with wajig stop lightdm and start my awesomeWM session using startx. Fonts seem nicer (more correct to my eyes). I don’t know exactly why is the font different tho. However, this brings some other problems, usually connected to permissions – especially sudden inablity to mount usb keys through nautilus for example (pmount works) and scanning.

Slovene keyboard

My custom slovene/en keyboard layout – see slovenian keyboard layout.

other software checklist


  • dropbox: just apt-get install nautilus-dropbox. It includes an autodownload of dropbox from their site.
  • mega client:
  • nautilus-open-terminal
  • pidgin
  • skype

    Things to fix:

    * permissions to be able to mount usb keys via nautilus
    * permission to be able to scan

What If SenseStage notes/log [sept 2014]

With a new system (Ubuntu Studio 14.04.1, 64bit) suddenly the SenseStage didn’t want to run. Especially the ./ script was giving me pain. It turned out the culprit was virtualenv which had to be setup anew. Since I’m not fluent in python and/or virtualenv it took me a while, but thanks to online community (, I managed to fix it:

backup old virtualenv:

install a systemwide virtualenv tool:

create a new virtual environment:

copy some packages into new environment:

don’t forget to re-install pyOSC:

plug the controler bee, make it (/dev/ttyUSB0) accessible:
either add user to group dialout

or change permissions (temporarily):

run the controller script in ~/src/SenseStageLeben/transmittance/minibee

Troubles with SuperCollider

Due to change of system, a LADSPA plugin for SC was not found. Had to compile it.