Categories
Musikk

Itty, bitty track released

Categories
Musikk

New track released – Revival

Listen on

Categories
Musikk

Mo’ music – Ratio released

Categories
Musikk

I’m on Spotify

Categories
Musikk

Mutex

Categories
Musikk

…and now for my new time sink: feeble attempts at creating stuff resembling music

Categories
Dingser Diverse Musikk

Squeezebox Radio – et førsteinntrykk

Sparker rumpe. Enkel betjening, god lyd, ser helt ok ut.

Categories
Musikk programming ruby

personal ruby buddha machine

Some days ago I came across a post on the FM3 buddha machine. Finding it a fascinating concept, and being able to download their samples I sprinkled a few lines of ruby over them an stirred. Voilà – my own personal buddha machine playing wonderful ambient soundscapes in a random fashion. Using the sdl_ruby library, the whole thing became surprisingly simple:

#!/usr/bin/ruby -w
require 'sdl'
SDL.init(SDL::INIT_AUDIO)
SDL::Mixer.open(44100,SDL::Mixer::DEFAULT_FORMAT,2,4096)

clips = Dir.new('audio').entries.delete_if {|x| ! (x =~ /wav$/)}
while true
        for i in 1..SDL::Mixer.allocate_channels(4)
                        if not SDL::Mixer.play?(i)
                                SDL::Mixer.playChannel(i,SDL::Mixer::Wave.load("audio/"+clips[rand(clips.length)]),rand(30))
                        end
        end
        sleep 0.5
end