AudioResearchBlog

Covering all audio related stuff with special focus on programming and digital signal processing

Archive for the 'effects' Category

Some experience with CLAM inside an audio club at FIUBA, Argentina

Posted by hordia on 11th March 2010

(Note: I wrote this as something to tell to the clam-devel mailing list about some of my source-code commits)

About eight months ago, there was a foundation of something like an “audio club” in my university [1]. As soon i learned about that, i quickly got in touch with them and noticed that there was a major interest in analog issues (the only audio area with at least elective, courses in the university). So i told them about all the cool things that are available and ready to do with digital audio, mostly signal processing related. I talked in general, but of course i also talked about clam, with all its prototyping, real-time and easy development of plugins features. Even many of them ended installing and using it, and some even developing with more or less help. One thing to notice is that most of them are students from first years and most (but not all) are students with a basic programming level (because they are from electronics) but strong dsp knowledge (behind this is an university with more emphasis in theory than practice)
We started specifying plugins from a more abstract level (inputs/outputs/controls) and generating the source code base using
CLAM’s Templated Plugins Code Generator [2] and prototyping some simple applications. But one of the things we ended up doing was to take advantage of clam as platform to prototype medic related applications like filter ECG signal from noise in realtime, and some like _vice-versa_, i mean applying some processing knowledge from that area to audio.

Some of that work (one hour per week average) it’s now in the repo, most remarkable i think are filters work, by above the adaptative notch one (which even was used as a demo of a talk of one of the members about the steepest descent algorithm and its application to filter ECG signals)

Some development screenshots:
http://clam-project.org/wiki/Image:FilterByCoefExample.jpg
http://clam-project.org/wiki/Image:FilterExample-LP-HP.jpg
http://clam-project.org/wiki/Image:ThreeBandFilterOutputWithWhiteNoiseAsInput.jpg
http://clam-project.org/wiki/Image:GaussianWhiteNoiseHistogram.jpg
http://clam-project.org/wiki/Image:UniformWhiteNoiseHistogram.jpg

[0] FIUBA: Engineering Faculty of Buenos Aires University
[1] Group: http://code.google.com/p/club-audio-fiuba
Source code repo: http://groups.google.com/group/club_de_audio_fiuba
[2] http://audiores.uint8.com.ar/blog/2009/08/17/showing-a-little-about-clam-as-a-prototyping-tool-at-the-audio-club-of-fiuba/


, , , , , , , , , , , , , , , , , , ,

Posted in audio, algorithms, effects, signal processing, free software, programming, matlab, GPL, c++, blog, noise, python, projects, math, English, CLAM, news, plugins, ideas, ClubAudioFiuba | No Comments »

Showing a little about CLAM as a prototyping tool at the Audio Club of FIUBA

Posted by hordia on 17th August 2009

Last week, at the recent ‘audio club’ of my university, I was showing how to work with the CLAM framework as a tool to prototype realtime audio signal processing applications in a simple and fast way.

We started with an example network to show some about the NetworkEditor capabilities: karaoke.clamnetwork
Karaoke

After that, we continue with a simple ‘diodo distortion’ plugin:

We specified and generated the source code base in this way:
Especificación de distorsión tipo diodo

We wrote this code:

bool Do()
        {
            bool result = Do( mEntrada.GetAudio(), mSalida.GetAudio() );
 
            mEntrada.Consume();
            mSalida.Produce();
 
            return result;
        }
   
        bool Do(const Audio& in, Audio& out)
        {
            int size = in.GetSize();
 
            const DataArray& inb = in.GetBuffer();
            DataArray& outb = out.GetBuffer();
 
            for (int i=0;i<size ;i++)
            {
                if ( fabs(inb[i])>0.8 )
                    outb[i] = inb[i]&lt;0.? -0.8:0.8;
                else
                    outb[i] = inb[i];
            }
            return true;
        }
</size>

And built this net to try it:
Red para probar distorsión de diodo

The source code of the plugin ready to be compiled is here: pluginDistorsiónDiodo_ClubAudioFiuba.tar.gz

As extra, I leave here pluginDistorsiónDiodoConControlDeClipping_ClubAudioFiuba.tar.gz the same diode distortion, but with a clipping control to set the threshold when playing.

They liked these kind of prototyping features a lot, so probably we’re going to keep using it at the club.


, , , , , , ,

Posted in audio, effects, signal processing, programming, English, CLAM, plugins, ClubAudioFiuba | 1 Comment »

Mostrando un poco de CLAM como herramienta para prototipar en el Club de Audio de la FIUBA

Posted by hordia on 14th August 2009

Ayer estuve mostrando un poco de como usar el framework CLAM para prototipar aplicaciones de procesamiento en tiempo real de audio de forma rápida y sencilla.

Empezamos con una red de ejemplo para mostrar un poco el NetworkEditor: karaoke.clamnetwork
Karaoke

Luego seguimos con el plugin “distorsión de diodo”.

Especificamos y generamos el código base asi:
Especificación de distorsión tipo diodo

Escribimos este código:

bool Do()
        {
            bool result = Do( mEntrada.GetAudio(), mSalida.GetAudio() );
 
            mEntrada.Consume();
            mSalida.Produce();
 
            return result;
        }
   
        bool Do(const Audio& in, Audio& out)
        {
            int size = in.GetSize();
 
            const DataArray& inb = in.GetBuffer();
            DataArray& outb = out.GetBuffer();
 
            for (int i=0;i<size ;i++)
            {
                if ( fabs(inb[i])>0.8 )
                    outb[i] = inb[i]&lt;0.? -0.8:0.8;
                else
                    outb[i] = inb[i];
            }
            return true;
        }
</size>

Y armamos una red para probarlo:
Red para probar distorsión de diodo

El código del plugin listo para compilar esta aca: pluginDistorsiónDiodo_ClubAudioFiuba.tar.gz

Como extra, en pluginDistorsiónDiodoConControlDeClipping_ClubAudioFiuba.tar.gz dejo la misma distorsión de diodo pero con un control para poder manejar el umbral de clipping mientras se reproduce.


, , , , , , ,

Posted in audio, effects, signal processing, programming, Castellano, CLAM, plugins, ClubAudioFiuba | No Comments »

La historia de Horgand (conversación con holborn)

Posted by hordia on 28th June 2008

Hace bastante tiempo que tenia archivada esta conversación sobre síntesis por FM y Horgand que quería publicar.

Qué es Horgand? un sintetizador por soft capaz de realizar sonidos de órgano y otros tipos de sonido como pianos eléctricos (Rhodes , Wurlitzer, DX E.Piano ), Jazz Guitar, Strings, Brass, Fretless Bass, Accordion etc. Esta basado en síntesis por FM, según su web:

“Is based on a FM audio synthesizer with twenty carriers (20) without modulators in a plain based algorithm.
each carrier frequency can be modified for construct complex sounds. The synthesizer incorporate also a LFO (Low frequency oscillator) for generate tremolo effects and detune effects applying LFO Pitch and Amplitude to the carrier frequency’s. Some synthesizer parameters can be edited for each sound including two ADSR, (Normal and Percussion), Fine Frequency, Attenuation, Rotary Amplitude, Transpose, etc. Four DSP effects are available for obtain more complex sounds, Rotary, Chorus, Delay and Reverberation. Sounds are stored in banks of 32 organ sounds and can be changed externally with MIDI program change (1-32).”

También incorpora reconocimiento de acordes para producir acompañamiento automático (bajo y bateria) y con líneas de bajo editables para cada ritmo.

Ejemplo de como suena: Horgand_demo.ogg

No conozco mucho de síntesis por FM y tenía curiosidad de como lograba el sonido y terminó saliendo una especie de entrevista improvisada, creo que puede ser interesante para quienes quieran adentrarse en este tipo de programación.

La conversación:

<hordia> despues me tenes que contar en que te basaste para conseguir el sonido de horgand digitalmente…
<holborn> pues en el DX7 …. tiene 32 algoritmos de colocacion de los operadores … pero si usas el plano (todos en linea)… todo lo que hagas suena a organo … a partir de ahi … pues añadirle los efectos … y claro en vez de 6 “osciladores” hay 10 … que en realidad son 20 … con lo cual pues es mas rico que un emulador de dx7 tipo hexter o en el dx7 mismo … en realidad .. para usar 20 osciladores no chupa CPU nada … otros porgramas usan 3 y ch
<holborn> claro que para ahorrar cpu .. tuve que limitar algunos parametros de edicion … pero bueno … yo lo que queria era que sonara … si nadie se pone a editar sonidos … ni dios vaya …
<hordia> que es el DX7? :P me suena a un teclado legendario pero no estoy seguro…

<holborn> el DX7 fue el primer sintetizador FM … es de yamaha .. y fue una revolucion porque era el primero que mas o menos imitaba bien sonidos reales … algunos mejor que otros …
<holborn> los vendieron todos y mas …
<holborn> yo realmente era un experto … en aquella epoca ni dios sabia nada de musica electronica … yo me hice un curso que daba un loco de la musica electronica .. y sabia programar sintes cosa que nadie sabia .. te estoy hablando de hace mil años …
<holborn> cuando salio el DX7 pues me tuve que empapar toda la info porque realmente es muy diferente a un sinte analogico tradicional … y bueno .. le pedi a un amigo que trabajaba en un distribuidor de yamaha .. que me consiguiera info de verdad … de hecho todavia la conservo ..por ahi ..
<hordia> :O
<holborn> yo llegue a trabajar programando sintes en un estudio de grabacion …. vaya no todos los dias pero me llamaban de vez en cuando
<holborn> haciendo presets … me refiero .. claro
<hordia> veo que horgand es el resultado de muchos años de experiencia…
<holborn> si … a ese nivel si … pero todo fue gracias a un ejemplo de la web de alsa .. .se llama fmminisynth.c … o lago asi … 100 lineas de codigo … entonces se me ocurrio … y empece ..

<holborn> luego buscando … encuentras mil ejemplos de codigo … en HArmony Central … no esta el codigo pero explican como funcionan los efectos … en cristiano .. sin mucha matematica … esta muy bien .. luego ya el implementarlo es cosa de uno … pero el mismo Paul Nasca dice por ahi (el del zyn) que se basa en esa explicaciones … y yo tambien claro :)
<holborn> ya te aseguro que su implementacion es mejor que la mia :)
<hordia> jeje
<holborn> ahora …la mia consume un tercio de cpu que la suya :)
<hordia> entonces hay que ver que parametros se toman para definir cual es mejor ;-)
<holborn> pues es un sinte … lo que suena … sus efectos suenan mejor …. pero … el usa 3 o 4 osciladores por sonido … yo uso 20 … con lo cual en algun lado hay que recortar …

El ejemplo que se menciona: miniFMsynth.c


, , , , , , , , , , ,

Posted in audio, algorithms, effects, free software, programming, instruments, GNU/Linux, GPL, c++, alsa, Castellano, sound | No Comments »

Distortion rack prototype

Posted by hordia on 5th January 2008

A nice prototype:

CLAM distortion rack prototype

 
 

And the net behind:

CLAM distortion rack prototype


, , , , ,

Posted in effects, English, CLAM, GUI, sound | No Comments »

LADSPA versions of my recent simple distortions

Posted by hordia on 17th December 2007

After prototype different kind of simple distortions in NetworkEditor i managed to port all them to ladspa plugins. Despite the fact that the task was less difficult than i had expected at first, prototype with CLAM first worth a lot. Probably, if i had begun coding directly to ladspa source, reach the same status would be taken to me 10 or more times more. I think also was very interesting as “development process”, instead of modeling for example with matlab, you could easy modeling (among other things) in CLAM, and then, if you want/need make your final product by your own.

More, the other day i learned that is already possible to compile ladspa plugins directly from CLAM networks… very cool! Though i think this feature is not completely ready yet and i’m still have to dig in it, i don’t think that i have lost time porting manually because now i have a better knowledge and understanding about ladspa specification that for sure will be useful to work with this (for me “new”) feature, that probably needs some fixes.

About the ladspa plugins programming, i just downloaded the sdk from ladspa.org, read some of the ladspa.h file and some basic examples (the ones from sdk) and that was enough to handle the basis. Ah, i had to ask for some ladspa ID’s for my plugins here: ladspa at muse.demon.co.uk

On the other hand i’ve forwarded my distortion examples to musix distro folks and some of them indeed have tried it and made a couple of jack-rack presets and audio demos. More info about this here: DSP-es#Presets, ogg demos and jack-rack presets, and patchs review.

Next step (in my TODO list): produce ladspa binaries directly from CLAM networks.

I have uploaded these plugins here: disthordian ladspa plugins.


, , , , , , , , , ,

Posted in audio, algorithms, effects, free software, programming, c++, libraries, English, CLAM, plugins, specifications | No Comments »

New CLAM plugin: (’very’ for now) simple guitar distortion

Posted by hordia on 9th December 2007

A week or more ago, Daniel Vidal Chornet (collaborator of Musix) asked me if i can develop guitar distortion effects, because he couldn’t find something decent that suits his needs, i said “sadly i have no idea about distortions effects and anyway i have no time right now to do that”, but then i remembered how useful could be the clam framework and i tried to do a little spike about. Results were better than i had expected at first (is not a super cool distortion, but at least sound like one).

Basically i merged and tweaked a couple of simple/base algorithms found in the web for distortion and compression and in less than 30 minutes i had something working and sounds like a guitar distortion (”clean” ones seems to sound better easily). I was amazed how fast and easy (develop and test in clam/networkeditor, once you get the basis) was. I think right now is far to be a good distortion, but as learning process and first demo seems very good.

Here some sound examples:

Original:
(dvlc-guitar.ogg)

With distortion:
(guitardist-ex1.ogg)

Test network looks like:

Distortion NE network

 

The source code is here (as NetworkEditor plugin): GuitarDistortion.tar.gz

Some optional tweaks could include add a three band filter but i’m still not sure if it’s better to put it at first or at the end.

Special thanks for testing and audio samples to Daniel Vidal Chornet. I should take from my closet my fender stratocaster and do my own samples :-D . OTOH, we already arrange to do a remote gig with this.

Another useful NetworkEditor processings plugins i had made during this “work”:

  • AutomaticGainControl: Adaptative automatic gain control. Given an output reference and step response adjusts the output volume to keep it constant (AutomaticGainControl.tar.gz)
  • AudioSwitch: Switchs between a configurable amount of inputs (like a multiplexer) (AudioSwitch.tar.gz)

 
Related: LADSPA versions of my recent simple distortions
Update: Distortion rack prototype


, , , , , , , , , ,

Posted in audio, algorithms, effects, free software, programming, GPL, c++, English, CLAM, plugins, library | 6 Comments »

TAPESTREA: Modelando la escena sonora a partir de ejemplos o muestras

Posted by hordia on 1st November 2007

Hoy vi el video demostración de TAPESTREA: Techniques And Paradigms for Expressive Synthesis, Transformation, and Rendering of Environmental Audio (también conocido como taps). Intenta ser un entorno para el diseño de sonido, pero desde un enfoque totalmente nuevo (lo mejor es ver el video para entender mejor de que se trata).

Me llamó la antención (además de la división del sonido entre sus componentes sinusoidales, transitorios y residuo), la interfaz gráfica intuitiva y sencilla y la manipulacíón de sonidos en el espectrograma.


TAPESTREA: Sound Scene Modeling By Example - For more funny movies, click here

 
El video completo esta disponible aca: http://soundlab.cs.princeton.edu/listen/taps/tapestrea.mov
 

Según su web, la idea es ser un framework unificado para analizar de forma interactiva sonidos complejos, transformarlos y sintetizarlos:

  • Identificar puntos de interés en el sonido y extraerlos para crear “templates” (una muestra/un sample) reusables
  • Transformar componentes de sonido de forma independiente a su entorno y otros eventos sonoros
  • Resintetizar continuamente las texturas de fondo de una forma perceptualmente convincente
  • Posicionamiento de eventos “templatizados” sobre la escena de fondo por medio de una novedosa interfaz de usuario o scripts escritos en Chuck (un lenguaje de programación orientado al audio)
  • Recuperación de componentes de sonidos basandose en la similaridad con otros.

TAPESTREA otorga una nueva forma de transformar dinámicamente una escena de sonido, permite generar puestas de cualquier duración, facilita la composición y el diseño de sonido combinando elementos de diferentes grabaciones de forma muy sencilla y ofreciendo miles de variantes para su manipulación (solo pensar en las posiblidades que otorga el solo hecho de poder manejar por separado sinusoides, transitorio y residuo).

Sin duda, una herramienta de trabajo interesante tanto para “diseñadores de sonido” como invesitigadores del audio, compositores y cualquier persona interesada en experimentar con el sonido.

Por si todo esto fuera poco, es Software Libre y multiplataforma. El código fuente y los binarios se consiguen aquí.

Más info:


, , , , , , , , , , ,

Posted in audio, effects, signal processing, music, free software, programming, GNU/Linux, GPL, noise, Castellano, sound, Chuck | 1 Comment »

My presentation at the “VI Jornadas de Acústica, Electroacústica y áreas vinculadas (CADAE)”

Posted by hordia on 27th October 2007

Yesterday I had the opportunity to give a talk about my recent work in the google summer of code at the VI Jornadas de Acústica, Electroacústica y áreas vinculadas (CADAE). The given time was short, so was a little hard to explain all in only 20 minutes, but seems that all went well (at least seemed like the people). Here my presentation (in Spanish):

 

Transformaciones espectrales en tiempo real para CLAM

 

Download: Transformaciones espectrales en tiempo real para CLAM.pdf

 


, , , , , , , , , , , , , , , , , ,

Posted in audio, acoustics, algorithms, effects, signal processing, free software, programming, GPL, c++, libraries, midi, English, CLAM, GSoC2007, GUI, talks, dissertation, events, conferences | No Comments »

Presentación en las VI Jornadas de Acústica, Electroacústica y áreas vinculadas (CADAE)

Posted by hordia on 27th October 2007

Ayer tuve la oportunidad de presentar mi trabajo realizado para el google summer of code en el marco de las VI Jornadas de Acústica, Electroacústica y áreas vinculadas (CADAE), les dejó la presentación de la misma:

 

Transformaciones espectrales en tiempo real para CLAM

 

Download: Transformaciones espectrales en tiempo real para CLAM.pdf


, , , , , , , , , , , , , , , , , , , , , ,

Posted in audio, acoustics, algorithms, effects, signal processing, music, free software, programming, GNU/Linux, GPL, open source, c++, libraries, midi, python, projects, Castellano, CLAM, GSoC2007, GUI, talks, dissertation, conferences | No Comments »

 
Cerrar
Enviar por Correo