Re: [linux-audio-dev] Programming Synth Knobs?

From: peter <zenadsl6252@email-addr-hidden>
Date: Sun Feb 12 2006 - 05:24:57 EET

On Sat, 2006-02-11 at 02:29 +0100, krampenschiesser@email-addr-hidden wrote:
> Does anyone know a good way to write code that renders synth knobs/potis/controllers?
> I was looking around to rotate an image which only worked in opengl...

Assuming for a moment that you don't have strict memory requirements,
you might want to consider loading an animation and swapping the frames
when the controller is moved. There are a few implementations in qt and
gtk that use this method and i've created some animations in blender
( for one based on this
widget (from galan):

The benefits:

easy eye candy (pretty and complex prerendered knobs) with little or no
custom drawing code (depends on the toolkit your using)
easy to change the appearence by changing the animation
fairly easy on the cpu

The downsides:

static images == a finite step resolution
memory usage (probably >100K at least for a smoothly animated knob)
learning to use or finding someone to use a 3d modeller or animation

For example, this shot shows a work in progress interface for a DSSI
synth plugin. I rendered the knobs in blender with an alpha channel to
get translucent shadows. The widget uses generic gtk functions to
render each frame over the background as the knob is turned.
It looks pretty nice in action, even if it's an eye candy overdose
for some tastes.
(if you dispense with the alpha and transparency, it's naturally faster)

If you're holding out for an algorithmic solution of some kind..
..i just wasted your time ;)


paugh on in #sweep, #lad
Received on Sun Feb 12 08:15:05 2006

This archive was generated by hypermail 2.1.8 : Sun Feb 12 2006 - 08:15:05 EET