|
From: Josh G. <jg...@us...> - 2003-07-20 21:21:32
|
I've also been thinking more about Swami/libInstPatch and Linuxsampler.
I realized that there really is no reason for me to push
Swami/libInstPatch for the Linuxsampler project, in fact when I started
to think of the modular nature that Linuxsampler aims to be it occured
to me that it shouldn't matter.
If Linuxsampler can be thought of as a network of synthesis modules then
couldn't it be possible to have an API for creating a synthesis model
for a particular instrument format? So say for a SoundFont one would do
something like (sudo code follows):
/* streams and interpolates audio data, loop and tuning parameters */
add_wave_table ("Wavetable")
add_lowpass_filter ("Filter")
add_envelope ("VolumeEnv")
add_envelope ("ModEnv")
add_lfo ("ModLFO")
add_lfo ("VibratoLFO")
add_pan ("Panning")
etc.. I am still of the opinion that the instrument patch objects should
be decoupled from the synthesis engine, due to its real time nature. So
a handler for a particular instrument format would then setup the
synthesis model (perhaps the network would be compiled or optimized in
some way). A note on handler would then be written which might look
like:
voice = new_synthesis_voice ("SoundFont")
voice.Wavetable.set_sample_callback (my_sample_callback)
voice.Wavetable.set_pitch (midi_note)
voice.Filter.set_Q (soundfont Q)
..
I'm not sure how efficient this would be in practice but it does fit the
modular goal. The nice thing about this is that other projects could
take direct advantage of Linuxsampler (such as Swami).
If anyone cares to check out whats currently happening with the
development version of Swami I put up a screenshot.
http://swami.sourceforge.net/images/swami_devel_screenshot.jpg
You'll notice a few gigasampler files open as well as one DLS file and a
SoundFont. Only sample info and splits are viewable with DLS2 files at
the moment, and there is still quite a lot of work to do before I would
consider it a working instrument editor, but things are progressing
quite nicely now :) Of note is that the piano, splits and sample view
are now implemented with the GnomeCanvas (of additional note is that
GnomeCanvas 2.x is not dependent on Gnome). This means piano and splits
can be scaled and controls can be overlayed onto the same canvas. If you
would like to try out the development version, let me know. This stuff
is so new it hasn't been checked into CVS yet. Cheers.
Josh Green
|