Next Previous Table of Contents
GUI elements should be used to allow synthesis structures to interact with the user. In the simplest case, the user should be able to modify some parameters of a structure directly (such as a gain factor which is used before the final play module).
In more complex settings, one could imagine the user modifying parameters of groups of structures and/or not yet running structures, such as modifying the ADSR envelope of the currently active midi instrument. Another thing would be setting the filename of some sample based instrument.
On the other hand, the user could like to monitor what the synthesizer is doing. There could be oscilloscopes, spectrum analyzers, volume meters and "experiments" that figure out the frequency transfer curve of some given filter module.
Finally, the GUI elements should be able to control the whole structure of what is running inside Arts and how. The user should be able to assign instruments to midi channels, start new effect processors, configure his main mixer pult (which is built of aRts structures itself) to have one channel more and use another strategy for its equalizers.
You see - the GUI elements should bring all possibilities of the virtual studio aRts should simulate to the user. Of course, they should also gracefully interact with midi inputs (such as sliders should move if they get midi inputs which also change just that parameter), and probably even generate events themselves, to allow the user interaction to be recorded via sequencer.
Well, compared to what I have described above, it's not much. Just the first things have been tried, the first experiments been done.
There are currently two GUI elements, a panel, and a slider. First of all, they are treated just like normal modules. You simply put a Gui_PANEL into your structure and assign the properties. The with/height are measured in units of 20 pixels. There is an optional background pixmap (try ebg).
You need a panel to place sliders on it. If you have one, just place Gui_SLIDERs on it, and give them sliderb as background pixmap and slider as pixmap. Then you may assign min and max values, and finally connect it to something inside your synthesizer, e.g. the cutoff frequency of some filter.
Note that dynamically created structures (such as instruments which are used via midirouter) would require the GUI to pop up on demand, which does not work (yet?). Another trap are structures which are used as modules. Inside a structure and all its substructures only one should carry GUI elements.
That will be better as soon as panels can be embedded in other panels, ...
As you see, this is experimental, and just there to give you a first impression, encourage you to first experiments, and - more important - get your feedback! ;) So don't hesitate to throw your ideas/code into the development process...
... can be found under the name examples/midi_main_gui_saturate.arts - it shows what you need to get a slider on the screen.
Next Previous Table of Contents