The Arts Builder Handbook | ||
---|---|---|
Prev |
Unfortunately, with all this rewriting going on for KDE2.0, I didn't have the time to get the documentation completely adapted. So for now, you'll have to live with a quick introduction how Arts Builder works, and then you are on your own.
First of all, when trying to run Arts Builder, you should also be running the sound server (artsd). Usually, when you use KDE2.0, this should already be the case. If not, you can configure the automatic sound server startup under KControl - Sound - Sound Server.
When you are running aRts, it always runs small modules. Arts Builder is now a tool to create new structures of small connected modules. You simply click the modules inside the grid. To do so, choose them from the "Modules" menu, and then click somewhere in the green-grey plane.
Modules usually have ports (where usually audio signals are flowing in or out). To connect two ports, click on the first, which causes it to turn orange, and then click on the second. You can only connect an input port (on the upper side of a module) with an output port (on the lower side of a module). If you want to assign a fixed value to a port (or disconnect it), do so by double clicking on the port.
So here is a very simple example to get you started.
Start artsbuilder.
You need a Synth_AMAN_PLAY-module to hear the output you are creating (when using artsd as audio server). So create a Synth_AMAN_PLAY-module by selecting Modules/Synthesis/Sound IO/Synth_AMAN_PLAY and clicking on the empty module space. Put it below the fifth line or so, because we'll add some stuff above.
To make it nicer, you can doubleclick on the first and second parameter (title and autorestoreid), and give your audio output a name (which will be visible later in artscontrol for instance). Doubleclick on them (the two leftmost ports of the module), select constant value and type "hello_arts" or something like this in the edit box. Click okay to apply.
Create a Synth_WAVE_SIN module and put it above the Synth_AMAN_PLAY module. (Leave one line space in between). As you see, it produces some output, but requires a "pos" as input. First lets put the output to the speakers. Click on the "out" port of the Synth_WAVE_SIN and then on the "left" port of Synth_AMAN_PLAY. Voila, you have connected two modules.
All oscillators in aRts don't require a frequency as input, but a position in the wave. The position should be between 0 and 1, which maps for a standard Synth_WAVE_SIN object to the range 0..2*pi. To generate oscillating values from a frequency, a Synth_FREQUENCY modules is used.
Create a Synth_FREQUENCY module and connect it's "pos" output to the "pos" input of your Synth_WAVE_SIN. Specify the frequency port of the FREQUENCY generator as constant value 440.
Hit File/Execute structure. You will hear a sinus wave at 440 Hz on one of your speakers. Guess what you need to do to get it on the other speaker as well? ;)