Development log

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

Upgrading of mail server

Today I added an additional volume to the mailserver prefect, since it was running out of disk space for the mailboxes. I have now increased the space by adding a new ‘virtual’ block storage, mounted and some mailboxes have been moved to the new drive. This new drive can be resized as needed with the lowest cost possible. We don’t need more CPU or memory, just more disk space and this works with $0.10/GB per month. The only drawback is that these volumes cannot be automatically backed up.

I have transfered the files from /var/mail/vmail to /mnt/vmail1/vmail by using rsync like this:

This transfered whole folders preserving all permissions and ownerships.

Jit.log#190511

Came back to Jitakami research today. It was not easy to consolidate two+ missed months, to throw away a stale plan and try to understand what is realistically possible to do in 4 weeks left for the RAGLAIN/AUTOCOM installation that will be put on on 21th June at Kapelica Gallery.

I returned to some basic questions: what is A.I.?

I think that I made mistake by exploring artificial intelligence with a course in machine learning. Although currently that seems as one of more popular areas in industrial application of machine intelligence it’s by far not the only one. I actually have a bit of problem – I feel forced to work on intelligence of the input part of the system while output is not yet by far constructed. In that sense I am somehow concluding today that algorithmic nature of the system producing intelligent form of (musical/visual) output can easily be termed as some form of A.I.

What is a basic goal of Jitakami System? In essence it is to be a new kind of instrument, to produce music in form of songs, compositions, tracks in certain or different styles and aesthetics. Enough variables should be controlled by algorithms so to produce generative material which appears intelligently (with feeling and style) put together.

I think once I have that I can work on different ways of control: by a programmer via textual input, by an operator via graphical UI, by audience of an exhibition via touch screen, or by another A.I. which did some learning from different media: midi and/or recordings.

I studied all that and tried to discover a suitable map for the next month. I hope to layout a rudimentary specification for some kind of ‘playing’ system with which I can start and than iterate on in SuperCollider. Next week (in couple of days) I have to decide on physical form the installation will take. It’s difficult to think about that at this point. I feel I have nothing, no output or even concept to lean on.

There are also no news from Ministry of Culture on stipend. It would be good to get it, but that would mean the study plan outlined there should be changed. But even if the answer will be negative, this project has quite a decent budget between Emanat and Kapelica/Kersnikova.

Jit.log#190209 Machine Learning course starts

Yesterday I went through some basic introductory parts of the Machine Learning course at Coursera. Learned about unsupervised and supervised learning, classification and regression ML problems, clustering and non-clustering problems. There’s a lot left to do in the week 1 and I’m not sure if I’ll be able to finish that one till tomorrow. These deadlines can be extended as needed though.

So today I continued. Did another two or three hours on the course. It’s getting challenging in terms of math. I’ve never done that level of math, so it feels like covering a lot of new ground here, but so far I seem to understand enough. I also need to remind myself, that machine learning is just one of the areas that fall under A.I. umbrella.

I actually searched further on MOOCs – especially Coursera and edX on subjects about A.I., programming and music. And there’s a lot I want to learn… and so little time, it seems. There’s more books I want to read.

I want to do too many things in parallel.

Jitakami Research 2019: Hello World

Today starts the logging of research project called Jitakami Research 2019. Basicly it consists of three big blocks – two of them running serially, and one in parallel to the two. The research part, for which I applied to a work stipend on cultural ministry (still pending, and probably will continue to for some time) consists of study and research from now up until the summer. In parallel, the idea is to produce a perfomance/installation at BitShift program at Kapelica gallery sometime in April – currently called Raglain, and then work on the second phase (AUTOCOM) that would presumably be shown in Linz.

For the work stipend / research I wanted to focus on:

  • theoretical study of A.I., programming and computational creativity via some literature, reading and writing
  • practical work through online courses and self-directed exercises in programming and rapid prototyping
  • study visits of different A.I. research institutes and labs, to talk and learn through meeting researchers and seeing A.I. research in-person
  • interviews with artists and curators – those who work on the field of art, technology and science – I’m especially interested in artistic methodologies and how to concpetualize and ultimately present/situate/publish an artistic work – even if it’s processual or research-based.

I have created another post on here with slovene texts and timeline that went into the application: https://lukaprincic.si/development-log/jitakami-research-2019-working-plan

For Raglain I hope to arrive at a Jitakami prototype, small, quite basic, but working and conceptually clear and readable. To exhibit it in some way, and to perform with it too.

I’m not sure how far AUTOCOM phase will go, but I hope to incorporate more ideas dealing with instrument autonomy and just-in-time audio-visual composition. Perhaps there could be a third phase for 2019 where I strive for a milestone at the end of November, of release of actual Jitakami machine.

But, today I start with a book: “John R. Searle: Minds, Brains and Programs” and seeing if I can get into the Machine Learning course on coursera (it started last week – this is already week two).

I need to meet with people from Galerija Kapelica to discuss more precise details of Raglain and AUTOCOM timelines and budgets, so that’s a phone call I need to do today.


10:28 – Kapelica meeting setup for Monday. And coursera course can be moved to your own starting week.


I keep being distracted from reading John Searle’s article, so I have also found a course on edX by Columbia University on A.I. It seem to cover broader area of A.I., and it’s quite in-depth with a lot of reading suggestions. It’s archived and inactive tho – so it only has videos to watch, but quizes and project assignments are gone. I’m pondering the idea to just work through that course in parallel, just watch the videos: https://courses.edx.org/courses/course-v1:ColumbiaX+CSMM.101x+2T2017/course/

Jitakami Research 2019: working plan

This is the concept and plan for working stipend that I applied:

Predmet štipendije je raziskava na področju umetniškega pristopa k spoju glasbe in umetne inteligence.

Avtorja v to raziskavo žene predvsem vprašanje kako vzpostaviti umetniško situacijo (intermedijsko instalacijo in/ali performans), ki bi radikalno vstopila v gledalčevo/poslušalčevo dojemanje sodobnih tehnologij in z njimi povezanih fobij in fetišev. Za bližanje možnim odgovorom je nujna poglobljena raziskava.

Raziskava obsega področja in z njimi povezane vsebinske cilje:

  • filozofski in etični aspekti umetne intelligence
  • matematična in računalniška teorija, stanje področja umetne intelligence
  • zgodovina in primeri spoja zvočne umetnosti in umetne intelligence (1950-2018)
  • premisleki o umetniških pristopih in izrazih (zgodovina in futurologija)
    • pogovori (IRL in on-line): Maja Smrekar, Jurij Krpan, Igor Štromajer, Marko Peljhan
  • praktična raziskava in eksperimentiranje – programiranje (SuperCollider, Processing)
  • dokumentacija: spletni dnevnik & študijski zapisi
  • študijski obiski:
    • Inštitut Jožef Štefan
    • Artificial Intelligence Lab, JKU, Linz
    • Ars Electronica, Linz
    • IEM, Graz

Študij je razdeljen na 18 tednov – glavni sklopi so razdeljeni na daljše obdobje in omogočajo vzporedno delo na tekočih umetniških projektih. Spletne delavnice so proste plačila, programska orodja so odprto-kodna in dostopna vsakomur. Študij bo potekal v studiu zavoda Emanat, pogovori-intervjuji so vsi razen enega z akterji situiranimi v Ljubljani. Pogovor z Markom Peljhanom bo predvidoma preko Skype-a ali podobne video-konferenčne rešitve v primeru njegove odsotnosti. Študij poleg same poglobitve v materiale in vzdrževanja regularnosti in discipline ter rednih dnevniških zapisov projekt nima zastavljenega fiksnega končnega rezultata oziroma projekta/predstavitve, ki bi zahteval dodatne produkcijske pogoje in stroške.

Raziskava presečišča umetne inteligence in glasbe je po eni strani logični naslednji korak avtorjevega raziskovanja na področju intermedijske umetnosti saj je s serijo Razpoke vmesnika vzpostavil linijo njemu lastne estetske govorice digitalnih abstraktnih artefaktov in imerzivne zvočnosti. Nadaljni razvoj tega ustvarjalčevega poesisa v večjo udeleženost algoritmov, generativnih agentov in strojno-računalniške inteligence v procesu žive izvedbe že zastavljene estetike se zdi za v tem kontekstu naraven in organski. V slovenskem kulturnem prostoru pa je nujno (še) bolj pogosto izpostavljati umetniške projekte, ki skozi umetniško prakso preizprašujejo človekov odnos do tehnologije. Nekaj tega pri nas sicer že imamo, vendar glede na svetovne trende precej capljamo za globalno situacijo. V tem smislu je vnos visoko-tehnoloških inovacij (umetna inteligenca) v hibridne in intermedijske umetniške prakse lahko razumljen tudi kot pomemben korak za lokalni kulturni prostor.


Predmet štipendije je samo-izobraževanje, raziskava in nekaj končnih eksperimentov na področju umetniškega pristopa k spoju glasbe, zvočne umetnosti in umetne inteligence. Avtorja v to raziskavo žene predvsem vprašanje kako vzpostaviti umetniško situacijo (intermedijsko instalacijo in/ali performans), ki bi radikalno vstopila v gledalčevo oz. poslušalčevo dojemanje sodobnih tehnologij in z njimi povezanih fobij in fetišev. V jedru te radovednosti je odnos, ki ga vzpostavljamo do tehnologije. Kot avtorja in ustvarjalca me intrigirata dve točki:

  1. od kod izvira fascinacija nad možnim stvarjenjem umetnega življenja, takorekoč samostojne zavesti robotov, in tudi fobija pred temno, zlo stranjo te zavesti, ki bi se obrnila proti stvarniku in uničila človeško raso;
  2. kako vzpostavljati pogoje za odnos do tehnologije kot aktivno konstruktivega in kot naravno ekstenzijo narave – odnos, ki je hkrati kritičen do same rabe tehnologije, ki predvsem v človekovih rokah gradi boljši ali slabši svet;

Umetno inteligenco, in z njo povezane raznolike tehnologije, ki danes že in v prihodnosti lahko vse bolj pomagajo pri analizi in ustvarjanju glasbe, zvoka in umetnosti (algoritmic composition, computational creativity, itd) vidim kot odličen poligon za intenzivno preizpraševanje zgoraj opisane matrice kompleksnih odnosov in intenzitet med človekom in tehnologijo skozi estetsko polje hibridnih umetnosti. Za boljše razumevanja polja umetne inteligence – kakšno je stanje področja, katere so tehnologije, ki so bile razvite v zadnjih dveh desetletjih, in bližanje možnim odgovorom je nujna poglobljena študijska samo-vodena raziskava.

Delovni načrt vsebuje sledeče vsebinske sklope:

  1. teoretični študij vsebin vezanih na umetno inteligenco, glasbo, umetnost in filozofijo. Ta poteka preko branja specifične literature in pisanje kratkih dnevnih povzetkov ter končne recenzije posamezne knjige
  2. praktične delavnice programiranja na področju umetne inteligence: Machine Learning (programski jezik Octave, odprt ‘tečaj’ na coursera.org), Artificial Intelligence (programski jezik Python, samo-vodeno delo skozi 3 tedne s pomočjo knjige), končni eksperimenti in hitri prototipi (rapid prototyping, programski jezik SuperCollider, samo-vodeno)
  3. študijski obiski štirih institucij v regiji, ki se ukvarjajo z umetno inteligenco, računalniško glasbo in intermedijsko umetnostjo (Inštitut Jožef Štefan, Inštitut za elektronsko glasbo v Grazu, Laboratorij za umetno inteligenco na Johannes Kepler University, in Ars Electronica, oba v Linzu)
  4. neformalni pogovori-intervjuji v zasebnem okolju (ali preko spleta) s strokovnjaki in umetniki na področju intermedijske umetnosti (Maja Smrekar, Jurij Krpan, Ida Hiršenfelder, Marko Peljhan, Igor Štromajer)

Raziskava in študij bo dokumentiran na spletnem dnevniku in z občasnimi daljšimi povzetki in refleksijami, kar pa ne predstavlja umetniškega projekta.


DELOVNI NAČRT

teden vsebine
4/2 Umetna Inteligenca: filozofski in etični aspekti: “John R. Searle: Minds, Brains and Programs”
Machine Learning (Week1, Coursera.org)
11/2 Umetna Inteligenca: filozofski in etični aspekti: “John R. Searle: Minds, Brains and Programs”
Machine Learning (Week2, Coursera.org)
18/2 Umetna Inteligenca: filozofski in etični aspekti: “Anderson & Anderson, eds: Machine Ethics”
Machine Learning (Week3, Coursera.org)
25/2 Umetna Inteligenca: filozofski in etični aspekti: “Anderson & Anderson, eds: Machine Ethics”
Machine Learning (Week4, Coursera.org)
4/3 Umetna Inteligenca: teorija in praksa: “Russel & Norvig: Artificial Intelligence: A Modern Approach”
Machine Learning (Week5, Coursera.org)
11/3 Umetna Inteligenca: teorija in praksa: “Russel & Norvig: Artificial Intelligence: A Modern Approach”
Machine Learning (Week6, Coursera.org)
18/3 Umetna Intelligenca, kreativnost, in glasba: “Eduardo R. Miranda (Ed): Readings in Music and Artificial Intelligence”
Machine Learning (Week7, Coursera.org)
25/3 Umetna Intelligenca, kreativnost, in glasba: “Eduardo R. Miranda (Ed): Readings in Music and Artificial Intelligence”
Machine Learning (Week8, Coursera.org)
1/4 Umetna Intelligenca, kreativnost, in glasba: “Ras & Wieczorkowska (Eds): Advances in Music Information Retrieval”
Machine Learning (Week9, Coursera.org)
8/4 Umetna Intelligenca, kreativnost, in glasba: “Computational Intelligence in Music, Sound, Art and Design, EvoMUSART 2018”
Machine Learning (Week10, Coursera.org)
študijski obisk: Inštitut Jožef Štefan, Ljubljana, Slovenija
15/4 izbrani članki iz “Proceedings to International Conference on Computational Creativity 2015-2018”
Machine Learning (Week11, Coursera.org)
študijski obisk: Institute of Electronic Music and Acoustics – IEM, Graz, Avstrija
22/4 Umetna Inteligenca in sodobno-umetniški pristopi: “Stephen Wilson: Information Arts”
praksa, programiranje: Prateek Joshl: Artificial Intelligence with Python (1. teden, 8 ur)
študijski obisk: Artificial Intelligence Lab, JKU in Ars Electronica, Linz, Avstrija
29/4 praksa, programiranje: Prateek Joshl: Artificial Intelligence with Python (2. teden, 8 ur)
pogovor-intervju: Igor Štromajer
6/5 praksa, programiranje: Prateek Joshl: Artificial Intelligence with Python (3. teden, 8 ur)
pogovor-intervju: Marko Peljhan (skype)
13/5 praksa, programiranje: Prateek Joshl: Artificial Intelligence with Python (4. teden, 8 ur)
pogovor-intervju: Maja Smrekar
20/5 praksa: eksperimenti in prototipi v umetni inteligenci in glasbi: SuperCollider workshop
pogovor-intervju: Jurij Krpan
27/5 praksa: eksperimenti in prototipi v umetni inteligenci in glasbi: SuperCollider workshop
pogovor-intervju: Ida Hiršenfelder
3/6 zaključno poročilo

supercollider: deb package from git with checkinstall

Follow instructions how to build and install supercollider from git here: https://github.com/supercollider/supercollider/wiki/Installing-SuperCollider-from-source-on-Ubuntu, but instead of final make install, use checkinstall (apt install checkinstall):

$ sudo checkinstall -D -t=debian --install=no --pkgname=supercollider --pkgversion=3.10.0-0your_name make install

You’ll end up with a .deb file in that current build folder. Install it with gdebi:

$ sudo gdebi supercollider_3.10.0-0lallafa-1_amd64.deb

Prevent apt from ever upgrading your package by creating a file called “preferences” in /etc/apt folder, and put in:

Package: /supercollider/
Pin: release *
Pin-Priority: -1

From AwesomeWM to i3wm

I’ve decided to reinstall the GNU/Linux system on my old X220 ThinkPad and in 2018 finally move on from UbuntuStudio 14.04 (Trusty). In the process of also trying out new Lubuntu (which I didn’t like for some quite aesthetic reason and retried with Xubuntu – much better!) I also decided to finally try i3 window manager. So I wanted to quickly layout just some of the differences, that are quite subjective.

Enjoying:

  • windows grouped in a container with tabs
  • minimalist configuration
  • beautiful status/widgets bar
  • hiding screen-edge window borders
  • windows are actually fully using all pixels of the screen

Missing:

  • I keep hitting (awesomeWM) shortcut to maximize a window. There’s no maximise window in i3.
  • when there’s a floating window in otherwise tiled workspace, I cannot ‘hide’ that floating one
  • cannot switch away from fullscreen window within a workspace (to a window otherwise behind that window
  • There’s no minimize functionality
  • snap to screen-edge or other windows in floating mode

(I might update some of the points above in the next few days, as I become aware of what the muscle memory is telling me)

So I think there are number of limitations in i3wm – at least for somebody coming from AwesomeWM, which isn’t necessarily a bad thing. So these above are a moving target. I’m sure they will change as I will get used to features and non-features.

Credits

Huge thanks to Adhi Pambudi for sharing his setup as i3-starterpack!

Screenshot

i3wm, configuration in Emacs, URxvt

update #1

In order to use xbacklight to change brightness of your screen, you need to add

into your xorg.conf.

Since by default there’s no xorg.conf on ubuntu, instead of creating one, I went this way: in /etc/X11/xorg.conf.d/ folder I created a file called intel_backlight.conf and into it put the following:

Now, to use the Fn keys for brightness (on Home/End keys), into ~/.config/i3/config you put

Daily Beat: a simple 808 beat with an immature bass sound

Today I started to work on a simple project that I hope becomes a routine almost every day. I delved into Patterns in SuperCollider again and hacked together a simple beat with 808 samples and with very little time left today added a very simple broken bassline/synth line.

Two important aspects of this little endeavor, for now: a) making *something* everyday, and b) making open source music – well libre open source code that generates music.

Making (composing) something everyday is an important practice for every artist. I’m not sure if this is gonna work for me, as I frequently start something and then abandon it, but nothing will change if one doesn’t try it. I want to play with something everyday, even if it’s a short melody line in Renoise or something new in SuperCollider, I just want to spend minimum half an hour on it. Not everything will probably be SuperCollider (although I have a fantasy to switch completely to SC and compose everything there, including heavy club tracks!), and there will be days when I’ll not manage.

So, today’s project is obviously a beginning. The full code is below, with a link to a zip with scd and samples, and also on Gitlab (https://gitlab.com/lukap/DailyBeats2018/tree/master/180805). Personally it feels that this was an important little refreshing lesson to remember how to use Patterns, what Pbind does and how to put patterns running in parallel together with Ppar.

Continue reading

Stylish & Mastodon: fixed number of columns

How to have a fixed number of columns visible on your mastodon instance using stylish for Firefox or Chrome (or Chromium):

 

Install Stylish add-on/extension:

Chrome: https://chrome.google.com/webstore/detail/stylish-custom-themes-for/fjnbnpbmkenffdnngjfgmeleoegfcffe
Firefox: https://addons.mozilla.org/en-US/firefox/addon/stylish/

 

Add new style:

Find Stylish ‘manage styles/preferences/settings’ – in Ff’s Add-ons or Chrome’s Extensions. Click “Write a new style”, enter new name for your new style (name of your instance for example), then under “Mozilla format” click “Import”.

paste this into the wide white area (change toot.si into your instance domain):

Click “overwrite style”. Then click “Save” in the left column. You can then edit the number of your columns as desired in this code (see the comment in the code above). Always click save and check the site in the other tab.

 

 

 

ffmpeg: audio visualization tricks

Often one wants to share audio online, but it seems like video as a format has many more options: mastodon, twitter, facebook, youtube, all allow to upload video, but not only audio. Here are some ffmpeg tricks, how to add interesting video to your audio file, often autogenerated visuals. All the code is supposed to be used as one line without line-breaks.

 

Audio Vector Scope

The code above creates a mp4 video file with a vectorscope nicely centered inside a 854×480 (480p) video. If you need a 1:1 video, just exclude the pad part:

Documentation on ‘avectorscope’ filter is here: https://ffmpeg.org/ffmpeg-filters.html#avectorscope. One can play with zoom and other options to produce desired form.

 

Show waves

more options: http://www.ffmpeg.org/ffmpeg-filters.html#showwaves

Showspectrum

Above code will create almost completely desaturated spectrum of the audio sliding from right to left. Again, there are various options to tweak, see here: https://ffmpeg.org/ffmpeg-filters.html#showspectrum-1

 

Histogram

Documentation: https://ffmpeg.org/ffmpeg-filters.html#ahistogram

 

Static spectrogram

Sometimes you want to just create a static image.

Above one is in two steps. More info here: http://www.ffmpeg.org/ffmpeg-filters.html#showspectrumpic

 

Drawtext

Add text to any of the above with a “drawtext” filter. More options here: http://www.ffmpeg.org/ffmpeg-filters.html#drawtext-1

MikroTik RouterOS configuration for simple switch

My home network consist of:

  • little linux box acting as Media Server (to play videos off it and projector connected to it) and main routing and firewalling machine. it gets/sets an IP with our ISP and runs a DHCP server and DNS and IP masquerading and NAT-ing for the whole home LAN. The box itself has only one network port but I extended it with another USB network adapter – so, this box is connected to ADSL modem on one interface, and to another router (acting as a switch) on the other interface:
  • two SOHO consumer-level routers configured as simple switches/wireless bridges/AP with disabled DHCP and any routing – they just forward any connecting devices to DHCP on the main linux box.

I ordered a very cheap but seemingly powerful router by MikroTik “hAP lite RB941-2ND-TC” and configured it in the same way as other two routers – one of them of not both will need to be replaced by this new one. So, the configuration is as follows in the web interface – Quick Set:

  • set wireless Network Name if you want the way you want
  • under Internet set:
    • Address Acquisition to “Static”
    • IP address to 192.168.88.1
    • Netmask (leave at) 255.0.0.0 (/8)
    • Gateway to 192.168.88.1
    • untick Firewall Router
  • under Local Network:
    • IP Address: 192.168.88.1
    • Netmask: 255.255.255.0 (/24)
    • untick DHCP Server
    • untick NAT
    • leave UPnP unticked
  • VPN address should stay unticked
  • setup your new admin password, if you haven’t already, and Apply Configuration/Changes.

Now connect the (real) router – linux box to this MikroTik on non-internet port, either ports 1,2,3. You should now be able to connect via MikroTik either with a utp cable (again, not via port marked as internet) or wirelessly.

To go back to configuring your MikroTik, you need to connect to it with a cable and manually set your IP to something like 192.168.88.246 (disable your wifi etc..). Then you should be able to ping MikroTik or open the web interface at 192.168.88.1. Otherwise the MikroTik is somewhat invisible (apart from providing the AP – wifi access point name).