how to connect additional soundcards to your jack setup

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

alsa_in

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 ...

new Track: Glipse of worlds that might be

Nikolaus Gradwohl2017-11-28T07:13:51+01:00

a mix of analog and digital synths, plugins, samples, passion, fragments of half remembered dreams and an arpeggiator.

and yes - I'm in a slightly wired mood today

and also yes - this is the blender default cube - with beveled edges, floating slightly above a plane with a diffuse shader and a sun light with a size of 0.8 rendered in cycles

glimpse of worlds that might be

read more ...

Calculating Euclidean Rhythmns using the Bresenham Algorithm

Nikolaus Gradwohl2017-11-24T06:43:52+01:00

Recently I started playing with euclidean rhythms and implemented the bjorklund algorithm shown in the paper by Godfired Toussaint in ruby. The implementation isn't really rocket science (actually it's ring accelerator science :-)) but it uses recursive function calls, two arrays, multiple stages, ... and I had the feeling that this is far more complicated than it needs to be. After reading several posts, blogs and papers about the implementations of the algorithm I read somewhere that the algorithm produces the same result as the bresenham algorithm - at first I ignored the sentence and unfortunately I have no idea anymore where I read it but today I implemented a simple version of it an the results I get are the same as my recursive version - or rotations, which is fine because you usually loop over the sequences and are free to choose a starting point - so in case anyone is interested here is my bresenhamish method for calculating euclidean rhythms in ruby - shouldn't be too complicated to port it to different languages

def eucledean(k,n)
    f = 1.0*n/k
    res = Array.new(n,0);
    a = 0
    k.times do |i|
        res[a.to_i] = 1
        a += f
    end
    return res
end

(1..8).each do |i|
print eucledian(i,8)
print "\n"
end

and this are the results I get for the 8 possible rhythms with 8 steps

[1, 0, 0, 0, 0, 0, 0, 0]
[1, 0, 0, 0, 1, 0, 0, 0]
[1, 0, 1, 0, 0, 1, 0, 0]
[1, 0, 1, 0, 1, 0, 1, 0]
[1, 1, 0, 1, 1, 0, 1, 0]
[1, 1, 1, 0, 1, 1, 1, 0]
[1, 1, 1, 1, 1, 1, 1, 0]
[1, 1, 1, 1, 1, 1, 1, 1]
read more ...

AnimationNodes2 Experiment - balls and sticks

Nikolaus Gradwohl2017-11-23T08:35:19+01:00

I finally managed to solve all the cython issues and install version 2 of the animation nodes addon on my linux machine, and rendered a first experiment with the new vectorized nodes - the nodes setup is much simpler than the loop version of 1.6 and i really like the new syntax.

you can download the blend file here

sticks and balls

hint: if you get a "cannot import name X" errors - try to delete the _pycache_ folder in ~/.config/blender/2.79/scripts/addon - this solved the problem for me

read more ...

Layered Boxes

Nikolaus Gradwohl2017-11-22T07:27:03+01:00

I created a small processing sketch this morning. I started by drawing slowly rotating boxes and then added a little transparency to the fill color to create a pseudo 3D layering effect. To spice things up a little bit I added a random function that replaces a box with a new one at a chance of 1/2000 after it gets drawn.

click here to start the sketch or download the sourcecode.

LayeredBoxes

I tried different render modes in Processing and was pretty surprised how different transparency is handled in different render modes - in P3D for example the outlines of the boxes aren't affected by the transparent fill at all - so I switched back to P2D - transparency works the way I expected it but the transparency values differ from the default render. I will read the doku this weekend and see what other unexpected behaviors I can uncover :-)

read more ...

new Song: Walk in the Rain

Nikolaus Gradwohl2017-11-21T09:23:38+01:00

A first electronic, ambient track recorded with my new Waldorf Blofeld with a little help from the Moog Mother32 and the Novation MiniNova.

Oh! And did I mention? I got a new Synthesizer... :-)

walk in the rain

read more ...

guess who got some new macro-lenses

Nikolaus Gradwohl2017-11-14T05:43:23+01:00

hmmmm - I think ... - Oh! Yes! Thats meeeee :-) expect some macro photos

Macro Lens

read more ...

Processing and Blender Sound Visualizer for Magical Dreams

Nikolaus Gradwohl2017-09-29T07:51:40+02:00

I finally managed to finish a project where I could combine most of the tools I love and use. I created a processing sketch to visualize the stereo correlation of my song "Magical Dreams", exported the frames and used blender to create an animated highfield based on the brightness of the images. Then I rendered these frames and combined them to a video with the original track exported from bitwig.

Hmmm ... maybe a bit more complicated than needed, but that's one of advantage of a hobby project - you don't have to justify yourself for inefficient processes and toy around as long as you want to :-)

Magic Dreams

read more ...

new Song: Still Awake

Nikolaus Gradwohl2017-09-27T07:14:31+02:00

I finally found the time to sit down and arrange and mix one of the song fragments that are waiting on my harddisk. I'm currenly very tired after a week full of nightshifts, overtime and bughunting but I'm still awake ... (ok not the best song title ever, but my thoughts are still a bit fuzzy - did I mention sleep deprivation?)

Still awake

read more ...

How to modulate Midi-CC values in Bitwig Studio

Nikolaus Gradwohl2017-09-15T06:26:53+02:00

to make a synth line played on a hardware synth more interesting you can modulate some parameters like filter cutoff, decay time, etc using a midi cc value. This can be done using bitwig studio by either using a automation lane sending the cc value or by using the cc device.

To use an automation lane simply click on the "Show automation lane" icon and select the controller value you want to send in the "midi" section

bitwig cc lfo modulation

then draw the cc values in the lane you just created. I used this technique in my latest song to create the filter cutoff of the highpass filter on my moog mother32 for example

bitwig cc lfo modulation

The second version uses the "Midi CC" device. With this device you can use bitwig's brilliant modulation sources to create the cc you want do send. You could combine several modulation sources like lfos step sequencers etc to influence your sounds.

read more ...