[ardour-users] Tempo controled tremolo plugin

Tom Szilagyi st444 at hszk.bme.hu
Tue Apr 26 11:03:54 PDT 2005

On Tue, Apr 26, 2005 at 11:13:08AM -0400, Paul Davis wrote:
> LADSPA contains no mechanism to relay tempo information to the plugin.
> i would be willing to work with any LADSPA plugins on a hack similar
> to the one we adopted for relaying latency values *from* plugins. if
> the plugin has a port called "tempo", we could write the current tempo
> in BPM (more in a second) to the plugin at the start of every
> process() cycle.

I would be happy to support such a convention. As I already have a
tremolo plugin, it would be fairly easy to extend it.

> however, you have to define BPM as well. the simplest definition is
> quarter notes (crotchets to my fellow brits) per minute. 

Yes, but we won't necessarily have to set this in stone. Maybe we
could define another "port" that would publish information about the
'bars:beats' setting in Ardour. I guess there's more than one way to
pack two integers (with values plausibly smaller than 16 bits) into a
float (or LADSPA_Data) value... [1] This way the plugin could maintain
intimate knowledge of the tempo settings of Ardour. This is just a
wild idea, so tell me if you think it's useless.

[1] An ugly hack. Better ideas, please!

	// from bars:beats to float (inside host)
	int bar, beat;
	float f;
	bar &= 0xffff;
	beat &= 0xffff;
	*((int *)(&f)) = (bar << 16) + beat;

	// convert back (inside plugin)
	bar = *((int *)(&f)) >> 16;
	beat = *((int *)(&f)) & 0xffff;


More information about the Ardour-Users mailing list