Dronetronics VJ Set, Taipei.

Here is a pic from my first VJ outing, for Dronetronics, in Taipei, back in December. IMG_0340_4-cropped Lars from Dronetronics got in contact 2 hours before the gig, to see if I had anything for a gig at a studio not far away.   I quickly repurposed my smilies test vis (see previous post) to be suitable for Drone Music.
  • Removing the smilies
  • Added functionality to change the graphic when a button was pressed
  • Removed the OSC control - due to how sensitive the APC Mini sliders were, it looked quite amateurish (as they pick up every jolt as you move).
  • Put in new graphics (here, I only had time to find some black and white ideograms of a skull and a 'warning') sign plus an "X" I drew in the two minutes before the gig.
  • Added an option for graphics to wrap around (in the taxi on the way to the gig).
In the end, it was a great learning experience VJing for the first time, from the tech through to the setup. With thanks to Dronetronics and the studio crew at UUMouth Studio.   Sourcecode for the vis will go up shortly.

Up to date on videos

Real lift has got in the way of doing much graphics work recently, however I've now caught up and uploaded a bunch of videos.. (it also took quite a while to get scripts for creating the same videos, with sound working).

Audio Reactive Critters

Graphics experiments

Rendering fat lines with Shoebot

Animating fat lines with Shoebot

Learning about 2D vectors

I have some basic code to find the length of a Bezier Curve and a point along it, I seem to have talked myself into implementing this in Cairo, so that's the next stage, from there path effects and text-on-a-path will be the next stage.

Progress so far

I've been pretty busy so far doing laying the groundwork for my audiovisual project. I've got the architecture worked out, so ones this stage 0 is complete I can start coding it. Uploaded, 2 videos using shoebot... 4 others waiting to be uploaded. Soft Released: vext https://github.com/stuaxo/vext This makes it easy to use things like wx, gtk, pyqt4 and other, mostly Gui and older Audio libraries in virtualenv. Have been using this successfully with Shoebot for a while. Python 3 support is still TODO, at which point can do a proper release. Working on: Finishing off a tool to make videos with 🙂 Learning About: Bezier Curves (have a Gtk demo app waiting to be uploaded) [Blocking on app to create videos] Cairo OpenGL PPA: Built a Docker Image that can build debian packages, this needs completing so they can be signed and uploaded to the PPA.

Daily graphic 2

Todays daily graphic I'm getting familiar with grids (in shoebot), Vector maths from the planar library .. this started from the grid example from shoebot / nodebox.

Shoebot Code Below the fold

Everyday graphic

Not sure how practical it is, but will try and upload a new graphic everyday .. to start with will probably be quite basic 🙂 Here is the first, some moving granular thingies..


Shoebot code:

import random
from math import sin, cos

size(800, 800)

def draw():
    scale(1, 1)
    fill(0.1, 0.2, 0.3)

    for y in xrange(0, HEIGHT, 80):
        wiggle = sin(FRAME * 0.1)
        xs = 2.0 + (cos(y * 0.1) + sin(y) * 8.1)

        distance = 1.0 / HEIGHT * y
        fill(1.0, 1.0-distance, 0, distance)
        for x in xrange(0, 60):
            xpos = ((xs * FRAME-x * 40) % (WIDTH + 40)) - 20
            circle(xpos, y + (wiggle * random.random() * 20.0), 20 + (wiggle * 2.0) * distance * 8.0)

        #xs = -sin(y) * 4.0
        #for x in xrange(0, 60):
        #    circle(WIDTH-xs * WIDTH - FRAME + x * 40, y+40, 20)

To run this, install shoebot and type: sbot -w granuals.sbot

Shoebot experiment – perlin noise..

Perlin noise is pretty cool, you can use it to generate realistic looking clouds or mountains. Here's a bot for shoebot I made a while back that uses perlin noise to generate some nice circles. You'll need shoebot and the lib "noise" installed into your environment for it to work;
# pip install noise
Then to run;
sbot -w perlin-circlescape1.bot
Here's a video of them in action - See below the break for the code - (more…)

Moving things in shoebot – simple particles…

OK, part 3 - now for something fun - extending parts 1 + 2 into a simple particle system.

Particles, generally means - a lot of things moving around (the particles) and a way to generate them, an "emitter"

Here we're going to take the code from the previous two parts and add a couple of things to make a basic particle system.
Note - shoebot, isn't the fastest; but we do get nice looking results.

Here's a video of our arrows as particles (arrowsplosion!):


Simple python spectrograph with shoebot

Seeing"Realtime FFT Graph of Audio WAV File or Microphone Input with Python..."  on python.reddit.com reminded me of one I'd built in python with shoebot.

While it works OK, I feel like I'm missing a higher level audio library (especially having seen Minim, for C++ and Java).



To run it in shoebot:

sbot -w audiobot.bot


# Major library imports
import atexit
import pyaudio
from numpy import zeros, short, fromstring, array
from numpy.fft import fft


def setup():
    size(350, 260)

_stream = None

def read_fft():
    global _stream
    pa = None

    def cleanup_audio():
        if _stream:

    if _stream is None:
        pa = pyaudio.PyAudio()
        _stream = pa.open(format=pyaudio.paInt16, channels=1,
                           input=True, frames_per_buffer=NUM_SAMPLES)

    audio_data  = fromstring(_stream.read(NUM_SAMPLES), dtype=short)
    normalized_data = audio_data / 32768.0

    return fft(normalized_data)[1:1+NUM_SAMPLES/2]

def flatten_fft(scale = 1.0):
    Produces a nicer graph, I'm not sure if this is correct
    for i, v in enumerate(read_fft()):
        yield scale * (i * v) / NUM_SAMPLES

def triple(audio):
    '''return bass/mid/treble'''
    c = audio.copy()
    c.resize(3, 255 / 3)
    return c

def draw():
    '''Draw 3 different colour graphs'''
    global NUM_SAMPLES
    audio = array(list(flatten_fft(scale = 80)))
    freqs = len(audio)
    bass, mid, treble = triple(audio)

    colours = (0.5, 1.0, 0.5), (1, 1, 0), (1, 0.2, 0.5)

    fill(0, 0, 1)
    rect(0, 0, WIDTH, 400)
    translate(50, 200)

    for spectrum, col in zip((bass, mid, treble), colours):
        for i, s in enumerate(spectrum):
            rect(i, 0, 1, -abs(s))
            translate(i, 0)

    audio = array(list(flatten_fft(scale = 80)))