|
From: Josh G. <jg...@us...> - 2003-03-18 08:50:01
|
On Mon, 2003-03-17 at 09:02, Steve Harris wrote: > > I've had a minor epiphany(sp?) having breifly used some subset of the > swami/fluidsynth combo I'd say we are stupid to go it out own way, we > should integrate with the existing stuff as far as possible. > > Using the swami UI made me realise just how much work has to go into it > and it appears (from a cursory glance) to be basicly generic, rather than > soundfont specific as I thought. > > - Steve > My thoughts as well :) Of course I'm a little biased in the whole thing, as Swami has been a hobby of mine for almost 4 years now (if including the Smurf SoundFont Editor). In that time I've re-written the API probably somewhere in between 2.5 to 3 times. I am starting to feel like the underlying architecture is quite good now and am looking forward to implementing more functionality on top of it. Keep in mind that I am speaking of the swami-1-0 CVS branch which has not yet been released (as in packaged, hasn't quite come together yet). I really think Swami could use some more developers, so if anyone is interested, please contact me or join the Swami mailing list. I now feel it appropriate to divulge in a more in depth description of the architecture here, forgive me if it seems lengthy or overwhelming. Although I am quite proud of this project, please try not to take my enthusiasm as overly bragging :) Swami is based on 2 support libraries libInstPatch and libswami with the GUI currently being built on top of these (although a good portion of it may turn into a library as well). These libraries use glib/GObject extensively (for those who aren't familiar with GObject its an object oriented library for C, it provides an extendable type system, inheritable classed objects with signals and properties). This means that the underlying libraries and the functionality they bring do not rely on GUI related libs (X, GTK, etc). The GUI uses GTK2 and is also very object oriented (well, its getting there). I chose this architecture because I wanted the underlying libraries to use C which I feel is the least common multiple when it comes to programming languages, and therefore would increase the scope of use, but also wanted the benefit of an object oriented system. There are also C++ bindings for GTK2 (which I'm sure includes GObject, although I have not researched this). libInstPatch - Instrument patch library --------------------------------------- The library that interfaces to patch files. SoundFont files are currently supported and DLS2/gig are just now being added. Patch files are loaded/saved from a child/parent tree structure of objects which can be easily manipulated using the GObject properties mechanism. The current focus is the object system, there is a little work that needs to be done to make the file parsers usable for those who don't want to use the runtime objects (say if just scanning a patch file for some specific info). This library also transparently manages sample data sources (file, RAM, ROM, swap file, etc) and different bit widths (some work will need to be done for bit width conversion). libswami - Everything else not directly part of the GUI or patch files --------------------------------------- - Maintains a master patch tree utilizing signals for change notification - GObject type based plugin system (GStreamer inspired) - XML save/restore state interface (also GStreamer inspired) - Wavetable and MIDI objects - event queues - Undo/Redo state history (tree based so no loss of actions will occur after an undo/do something else), also utilizes action dependency so arbitrary items can be undone (provided they don't depend on later actions). The GUI uses a master event queue (the same events that are logged to the state history) to track patch object changes and will update itself on regular intervals (necessary since GTK is not multi-threaded). This also means that changing an object property will cause any other GUI views to also be updated. Whats ahead (lots of things to do) --------------------------------------- Python support - pygtk has some nice scripts to generate python interfaces for GObject code. Using this, much of the API is generated, only some functions need to be manually written. With python I can see a powerful web based instrument database being created. Also a GUI embedded shell for doing complex editing tasks or creating scripts. Flexible object oriented GUI and session load/save state (utilizing XML). Much of this is already underway. Generic control interface (using GValue, a container for different data types, int, float, string, etc). This will be used for MIDI controls, instrument effects, any object property, and all other things that can be thought of as a control. The GUI will utilize this for flexible control layouts, etc. Currently in the works. Flexible canvas widget. Move sample waveform display (loop setting) to use canvas so effects (envelopes, LFOs etc) can be overlayed on top. Also allow any generic control to be controlled on a canvas. A segment based waveform modeller (also canvas based). Use lines, curves and freeform segments to create sample waveforms with loop support. A nice side effect is multiple samples can be created at different tones with high precision. Instrument patch conversion GUI hooks for DLS2/gig files Additional patch formats (Virtual banks, Akai, GUS, etc) Auto sample tuning with fftw (plugin already written, no GUI yet) Free compression standard created for patch files using FLAC (a simple proof of concept SoundFont compressor has already been written, I'd like to extend the format to include other patch formats like DLS2). I feel like the architecture is ready for all these features. Just needs to be coded :) If you are still reading this, are you interested? I keep feeling like there really isn't that much left for all this to be realized, but sometimes it seems like its taking so long too. If I get some expressed interest in helping with development, I'll be quick to update the API docs on the site, post directions for checking out the swami-1-0 branch, todo stuff, etc. Cheers. Josh Green |