Re: [linux-audio-dev] Simple music sequencer/sample player (drummmachine?)

From: David Olofson <david@email-addr-hidden>
Date: Fri Jan 05 2007 - 04:28:01 EET

On Thursday 04 January 2007 23:30, Frank Neumann wrote:
>
> On Thu, 4 Jan 2007 15:47:40 +0100
> David Olofson <david@email-addr-hidden> wrote:
>
> > Well, it's not a single file, it's got a very minimalistic tracker
> > style GUI, and it's using SDL, but it does what it does in about
> > the
> > simplest but (hopefully) correct way:
> >
> > http://olofson.net/mixed.html (DT-42)
> > http://olofson.net/download/DT-42-0.1.0.tar.gz
>
> [..]
>
> > Way ahead of you...! :-D I wrote DT-42 almost exactly a year ago.
>
> Hey, that's a *nice* little app :-).

Thanks! :-)

> What about adding JACK audio&transport control? Ah, it's in the Todo
> already :-).

That, and maybe DSSIfying the audio and/or sequencer part. Dunno... I
suppose it would make it possible to load and play songs without the
GUI, which might be handy. OTOH, it would add overhead to the
GUI<->engine communication, and the audio and sequencer parts aren't
really all that interesting in their own right anyway. (Incredibly
simple sampleplayer and 2 operator FM synth with D envelope. The
sequencer is like a very simple tracker format with something like 3
commands and no pitch control. :-D)

Besides, I have other projects in the pipe, including some DSSI
synths, a reimplementation of Audiality (actually more like an
audio/music toolkit for EEL) and some other stuff.

I'm thinking that the ideas might be more useful than the actual DT-42
code. After all, it was intended as a pure C + SDL example with a
minimum of libs and build tools required. The GUI is probably better
done in some higher level language and/or using a proper toolkit (now
it's plain low level SDL rendering), and the engine could use some
refactoring.

Then again, there is something about GUI applications written entirely
in minimalistic low level code... Reminds of the good old days, when
real trackers were implemented in 100% assembly language, and audio
and video was done to the metal. ;-)

> No, honestly - I enjoyed toying around with it for a while just now.
> Ok, the waveform display appears rather heavy on the CPU, but it
> looks so beautifully retro, and you even honoured the golden rule
> of "thou shalt enclose some good examples with your application".
> Luv it :)

Well, it turned out ok for a "few days" hack, eh? ;-)

As to the CPU load, I suspect that the main offender here is actually
the song editor, as it lacks "smart refresh" and similar
optimizations. IIRC, it pretty much redraws itself completely
whenever anything changes, including moving the cursor.

Oh, and the FM synth isn't exactly optimized either, float<->int
casts, sin() and whatnot... Plenty of cycles to save there.

//David Olofson - Programmer, Composer, Open Source Advocate

.------- http://olofson.net - Games, SDL examples -------.
| http://zeespace.net - 2.5D rendering engine |
| http://audiality.org - Music/audio engine |
| http://eel.olofson.net - Real time scripting |
'-- http://www.reologica.se - Rheology instrumentation --'
Received on Fri Jan 5 08:15:01 2007

This archive was generated by hypermail 2.1.8 : Fri Jan 05 2007 - 08:15:01 EET