[linux-audio-dev] pulse gate and preset params => metronome! (fwd)

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: [linux-audio-dev] pulse gate and preset params => metronome! (fwd)
From: Kai Vehmanen (kaiv_AT_wakkanet.fi)
Date: Thu Nov 02 2000 - 00:09:02 EET


Here's a nice example of code reuse. By combining a generic LADSPA
plugin (sine osc from the SDK), a native ecasound effect (pulse gate) and
extending the preset system, ecasound just got a user-frienly
metronome feature. And not a single line of metronome-specific code. ;)

-- 
---------- Forwarded message ----------
Date: Wed, 1 Nov 2000 23:46:46 +0200 (EET)
From: Kai Vehmanen <k_AT_eca.cx>
To: ecasound-list_AT_wakkanet.fi
Subject: pulse gate and preset params => metronome!

I have some very exciting news this time. It seems it's good to complain once in a while. Not long after posting the todo list, Rob Coker posted the pulse gate patch, and a day later, Arto Hamara posted an implementation of preset parameter system! What can I say, whoah! :)

Ok, I just added something myself, a bpm-based wrapper to the pulse gate, and that's about all we need to have an easy to use metronome. I just added the following to 'effect_presets':

--cut-- metronome = -el:sine_fcac,880,1 -eemb:%bpm,10 -efl:2000 --cut--

You can use it like this:

ecasound -i:null -o:/dev/dsp -pn:metronome,120

... gives you a 120BPM metronome click! What can I say, works like a dream. Just spent half an around playing with my drum machine. It was quite easy to sync the internal metronome of the drum machines to ecasound's metronome.

And of course, like I said, ecasound preset system with parameter support is a killer combination. Let's try something weird:

ecasound -i:null -o:/dev/dsp -pn:metronome,120 -kos:1,50,500,0.2,0

Oh yeah, a metronome controlled by a 0.2Hz sine oscillator that varies the bpm from 50 to 500. :) Hmm, how about some parallel effect processing (try this with your average rack effect):

--cut-- paralmadness = -efb:0,2000 -kos:1,1,3000,%freq1,0 -ea:150 | \ -efb:0,2000 -kos:1,3000,5000,%freq2,0 -ea:150 | \ -efh:0 -kos:1,3000,5000,%freq3,0 -ea:200 --cut--

Ok, we have three parallel effect chains: 1. a) bandpass filter with 2000Hz width b) center freq of (a) controlled by a sine osc; varies between 1-3000Hz c) 150% amplify 2. a) bandpass filter with 2000Hz width b) center freq of (b) controlled by a sine osc; varies between 3000-5000Hz c) 150% amplify 3. a) highpass filter b) cutoff freq of (c) controlled by a sine osc; varies between 3000-5000Hz c) 200% amplify

Frequencies of our three sine oscillators are controlled by the new preset parameter system, so we can write something like:

ecasound -a:1 -i:shut_up.ogg -pn:paralmadness,2,0.5,0.5 \ -a:2 -i:smile.mp3 -pn:paralmadness,0.01,0.3,2 \ -a:1,2 -o:/dev/dsp

... not very useful I admit, but think about the possibilities! Hmm, what's next, how about controlling the parameters with MIDI-knobs, linear fadeins and outs, add a few LADSPA plugins to the mix, etc, etc!

You can try the above examples with current ecasound's CVS version.

-- . http://www.eca.cx ... [ audio software for linux ] /\ . . http://www.eca.cx/aivastus ... [ aivastus net radio ] /\ . . http://www.eca.cx/sculpscape [ my armchair-tunes mp3/ra/wav ]


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Thu Nov 02 2000 - 00:55:18 EET