Sophie

Sophie

distrib > Mandriva > 8.0 > i586 > media > main > by-pkgid > 6a3ae4e037535c68bd8a5fcce387b3cb > files > 770

kdemultimedia-2.1.1-5mdk.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML
><HEAD
><TITLE
>Synthesis Modules Reference</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.61
"><LINK
REL="HOME"
TITLE="The aRts Handbook"
HREF="index.html"><LINK
REL="UP"
TITLE="aRts modules"
HREF="arts-modules.html"><LINK
REL="PREVIOUS"
TITLE="aRts modules"
HREF="arts-modules.html"><LINK
REL="NEXT"
TITLE="Visual Modules Reference"
HREF="visual-modules-reference.html"><META
HTTP-EQUIV="Content-Style-Type"
CONTENT="text/css"><LINK
REL="stylesheet"
HREF="common/kde-common.css"
TYPE="text/css"><META
HTTP-EQUIV="Content-Type"
CONTENT="text/html; charset=iso-8859-1"><META
HTTP-EQUIV="Content-Language"
CONTENT="en"><LINK
REL="stylesheet"
HREF="common/kde-localised.css"
TYPE="text/css"
TITLE="KDE-English"><LINK
REL="stylesheet"
HREF="common/kde-default.css"
TYPE="text/css"
TITLE="KDE-Default"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#AA0000"
VLINK="#AA0055"
ALINK="#AA0000"
STYLE="font-family: sans-serif;"
><DIV
CLASS="logoheader"
><A
HREF="http://www.kde.org/"
><IMG
SRC="common/logotp3.png"
BORDER="0"
ALT="The K Desktop Environment"
HEIGHT="62"
WIDTH="229"></A
></DIV
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>The <SPAN
CLASS="APPLICATION"
>aRts</SPAN
> Handbook</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="arts-modules.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 8. <SPAN
CLASS="APPLICATION"
>aRts</SPAN
> modules</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="visual-modules-reference.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="SYNTH-MODULES-REFERENCE"
>8.2. Synthesis Modules Reference</A
></H1
><P
></P
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="MCAT-SYNTH-ARITHMETIC-MIXING"
>8.2.1. Arithmetic + Mixing</A
></H2
><P
></P
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="MREF-SYNTH-ADD-SECT"
>8.2.1.1. Synth_ADD</A
></H3
><A
NAME="MREF-SYNTH-ADD"
></A
><P
><DIV
CLASS="MEDIAOBJECT"
><P
><IMG
SRC="images/Synth_ADD.png"
></IMG
></P
></DIV
></P
><P
>This adds two signals.</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="MREF-SYNTH-MUL-SECT"
>8.2.1.2. Synth_MUL</A
></H3
><A
NAME="MREF-SYNTH-MUL"
></A
><P
><DIV
CLASS="MEDIAOBJECT"
><P
><IMG
SRC="images/Synth_MUL.png"
></IMG
></P
></DIV
></P
><P
>This multiplies a signal by a factor. You can use this to scale signals
down (0 &#60; factor &#60; 1) or up (factor &#62; 1) or invert signals
(factor &#60; 0). Note that the factor may be a signal and don't has to
be constant (e.g. envelope or real signal).</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="MREF-SYNTH-MULTI-ADD-SECT"
>8.2.1.3. Synth_MULTI_ADD</A
></H3
><A
NAME="MREF-SYNTH-MULTI-ADD"
></A
><P
><DIV
CLASS="MEDIAOBJECT"
><P
><IMG
SRC="images/Synth_MULTI_ADD.png"
></IMG
></P
></DIV
></P
><P
>This adds an arbitary number of signals. If you need to sum up the
waveforms produces by four different oscillators, you for instance can connect
all their outputs to one Synth_MULTI_ADD module. This is more
efficient than using three Synth_ADD modules.</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="MREF-SYNTH-XFADE-SECT"
>8.2.1.4. Synth_XFADE</A
></H3
><A
NAME="MREF-SYNTH-XFADE"
></A
><P
><DIV
CLASS="MEDIAOBJECT"
><P
><IMG
SRC="images/Synth_XFADE.png"
></IMG
></P
></DIV
></P
><P
>This crossfades two signals. If the percentage input is -1, only the left
signal is heard, if it is 1, only the right signal is heard. When it is 0,
both signals a heard with the same volume.</P
><P
>This allows you to ensure that your signal stays in a well defined range.
If you had two signals that were between -1 and 1 before crossfading, they
will be in the same range after crossfading.</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="MREF-SYNTH-AUTOPANNER-SECT"
>8.2.1.5. Synth_AUTOPANNER</A
></H3
><A
NAME="MREF-SYNTH-AUTOPANNER"
></A
><P
>The opposite of a crossfader. This takes a mono signal and splits it into
a stereo signal: It is used to automatically pan the input signal between
the left and the right output. This makes mixes more lively. A standard
application would be a guitar or lead sound.</P
><P
>Connect a LFO, a sine or saw wave for example to inlfo.
and select a frequency between 0.1 and 5Hz for a traditional effect or even
more for Special FX.</P
></DIV
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="MCAT-SYNTH-BUSSES"
>8.2.2. Busses</A
></H2
><P
></P
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="MREF-SYNTH-BUS-UPLINK-SECT"
>8.2.2.1. Synth_BUS_UPLINK</A
></H3
><A
NAME="MREF-SYNTH-BUS-UPLINK"
></A
><P
><DIV
CLASS="MEDIAOBJECT"
><P
><IMG
SRC="images/Synth_BUS_UPLINK.png"
></IMG
></P
></DIV
></P
><P
>An uplink to a bus. Give signals to left and right, and the name of the bus
where the data should go on the "bus" port. The combined signal from all
uplinks with this name will appear on every downlink on that "bus".</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="MREF-SYNTH-BUS-DOWNLINK-SECT"
>8.2.2.2. Synth_BUS_DOWNLINK</A
></H3
><A
NAME="MREF-SYNTH-BUS-DOWNLINK"
></A
><P
><DIV
CLASS="MEDIAOBJECT"
><P
><IMG
SRC="images/Synth_BUS_DOWNLINK.png"
></IMG
></P
></DIV
></P
><P
>Gets (the sum of) all data that is put to a certain bus (with the name
you specify at the "bus" port).</P
></DIV
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="MCAT-SYNTH-DELAYS"
>8.2.3. Delays</A
></H2
><P
></P
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="MREF-SYNTH-DELAY-SECT"
>8.2.3.1. Synth_DELAY</A
></H3
><A
NAME="MREF-SYNTH-DELAY"
></A
><P
><DIV
CLASS="MEDIAOBJECT"
><P
><IMG
SRC="images/Synth_DELAY.png"
></IMG
></P
></DIV
></P
><P
>This delays the input signal for an amount of time. The time specification
must be between 0 and 1 for a delay between 0 seconds and 1 second.</P
><P
>This kind of delay <I
CLASS="EMPHASIS"
>may not be used</I
> in feedback structures. This
is because it's a variable delay. You can modify it's length while it is
running, and even set it down to zero. But since in a feedback structure
the own output is needed to calculate the next samples, a delay whose value
could drop to zero during synthesis could lead to a stall situation.</P
><P
>Use CDELAYs in that setup, perhaps combine a small constant delay (of 0.001
seconds) with a flexible delay.</P
><P
>You can also combine a CDELAY and a DELAY to achieve a variable length delay
with a minimum value in a feedback loop. Just make sure that you have a
CDELAY involved.</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="MREF-SYNTH-CDELAY-SECT"
>8.2.3.2. Synth_CDELAY</A
></H3
><A
NAME="MREF-SYNTH-CDELAY"
></A
><P
><DIV
CLASS="MEDIAOBJECT"
><P
><IMG
SRC="images/Synth_CDELAY.png"
></IMG
></P
></DIV
></P
><P
>This delays the input signal for an amount of time. The time specification
must be between 0 and 1 for a delay between 0 seconds and 1 second. The
delay is constant during the calculation, that means it can't be modified.</P
><P
>This saves computing time as no interpolation is done, and is useful for
recursive structures. See description above (Synth_DELAY).</P
></DIV
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="MCAT-SYNTH-ENVELOPES"
>8.2.4. Envelopes</A
></H2
><P
></P
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="MREF-SYNTH-ENVELOPE-ADSR-SECT"
>8.2.4.1. Synth_ENVELOPE_ADSR</A
></H3
><A
NAME="MREF-SYNTH-ENVELOPE-ADSR"
></A
><P
><DIV
CLASS="MEDIAOBJECT"
><P
><IMG
SRC="images/Synth_ENVELOPE_ADSR.png"
></IMG
></P
></DIV
></P
><P
>This is a classic ADSR envelope which means you specify:
<DIV
CLASS="VARIABLELIST"
><DL
><DT
>active</DT
><DD
><P
>whether the note is being pressed right now by the user</P
></DD
><DT
>invalue</DT
><DD
><P
>the input signal</P
></DD
><DT
>attack</DT
><DD
><P
>the time that should pass between the user presses the note and the signal
reaching it's maximum amplitude (in seconds)</P
></DD
><DT
>decay</DT
><DD
><P
>the time that should pass between the the signal reaching it's maximum
amplitude and the signal going back to some constant level (in seconds)</P
></DD
><DT
>sustain</DT
><DD
><P
>the constant level the signal is held at afterwards, until the user releases
the note</P
></DD
><DT
>release</DT
><DD
><P
>the time that should pass after the user has released the note until the
signal is scaled down to zero (in seconds)</P
></DD
></DL
></DIV
></P
><P
>You'll get the scaled signal at outvalue. If the ASDR envelope is finished,
it will set done to 1. You can use this to provide the "done" output of an
instrument (which will make the instrument structure be deleted by the midi
router object once the release phase is over).</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="MREF-SYNTH-PSCALE-SECT"
>8.2.4.2. Synth_PSCALE</A
></H3
><A
NAME="MREF-SYNTH-PSCALE"
></A
><P
><DIV
CLASS="MEDIAOBJECT"
><P
><IMG
SRC="images/Synth_PSCALE.png"
></IMG
></P
></DIV
></P
><P
>The Synth_PSCALE module will scale the audio stream that is directed
through it from a volume 0 (silent) to 1 (original loudness) back to
0 (silent). According to the position (get the position from Synth_SEQUENCE).
The position where the peak should occur can be given as pos.</P
><P
>Example:
Setting top to 0.1 means that after 10% of the note has been played, the
volume has reached its maximum, and starts decaying afterwards.</P
></DIV
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="MCAT-SYNTH-EFFECTS"
>8.2.5. Effects</A
></H2
><P
></P
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="MREF-SYNTH-FREEVERB-SECT"
>8.2.5.1. Synth_FREEVERB</A
></H3
><A
NAME="MREF-SYNTH-FREEVERB"
></A
><P
><DIV
CLASS="MEDIAOBJECT"
><P
><IMG
SRC="images/Synth_FREEVERB.png"
></IMG
></P
></DIV
></P
><P
>This is a reverb effect. In the current implementation, it is thought
to pass a stereo signal through the reverb, and it will -add- it's reverb
effect to the signal. (Note: this means that it can be used inside an
StereoEffectStack as well). The input signal should be connected to (inleft,
inright), the output signal will be (outleft, outright).</P
><P
>The parameters which you can configure are:
<DIV
CLASS="VARIABLELIST"
><DL
><DT
>roomsize</DT
><DD
><P
>the size of the room which the reverb simulates (range: 0..1, where 1 is
the largest possible room)</P
></DD
><DT
>damp</DT
><DD
><P
>this specifies a filter which will make the simulated room absorb high
frequencies (range 0..1, where 1 means absorb high frequencies quite
agressive)</P
></DD
><DT
>wet</DT
><DD
><P
>the amount of reverb-signal (that is, the amount of the signal that
should be modified by the filters, resulting in a "wet", that is "reverb
sound"</P
></DD
><DT
>dry</DT
><DD
><P
>the amount of pure signal passed through, resulting in an echo (or
combined delay) rather than reverb effect (range: 0..1)</P
></DD
><DT
>width</DT
><DD
><P
>the amount of stereo-magic the reverb algorithm adds to the reverb effect,
making the reverb sound wider in the stereo panorama (range: 0..1)</P
></DD
><DT
>mode</DT
><DD
><P
>[ TODO: I think if mode is 1, the reverb holds the current image of the
sound, whereas 0 is normal operation ]</P
></DD
></DL
></DIV
></P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="MREF-SYNTH-TREMOLO-SECT"
>8.2.5.2. Synth_TREMOLO</A
></H3
><A
NAME="MREF-SYNTH-TREMOLO"
></A
><P
><DIV
CLASS="MEDIAOBJECT"
><P
><IMG
SRC="images/Synth_TREMOLO.png"
></IMG
></P
></DIV
></P
><P
>The tremolo module modulates the amplitude according to a LFO-Wave.
Traditionally you would use a sine wave but why limit yourself?
What you get is a very intense effect that cuts through most
arrangements because of its high dynamic range.  The tremolo effect
is still one of guitarists favourite effects although it's not as
popular as in the 1960's.</P
><P
>[ TODO: currently this is implemented as invalue + abs(inlfo) - maybe it would
make more sense to implement it as invalue * (1+inlfo*depth), where depth
would be a parameter between 0..1 - decide this after KDE2.1 ; if you have
a comment, send a mail to the aRts list ;). ]</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="MREF-SYNTH-FX-CFLANGER-SECT"
>8.2.5.3. Synth_FX_CFLANGER</A
></H3
><A
NAME="MREF-SYNTH-FX-CFLANGER"
></A
><P
><DIV
CLASS="MEDIAOBJECT"
><P
><IMG
SRC="images/Synth_FX_CFLANGER.png"
></IMG
></P
></DIV
></P
><P
>A flanger is a time-varying delay effect. To make development of complex
flanger effects simpler, this module is provided, which contains the core
of a one-channel flanger.</P
><P
>It has the following ports:
<DIV
CLASS="VARIABLELIST"
><DL
><DT
>invalue</DT
><DD
><P
>The signal which you want to process.</P
></DD
><DT
>lfo</DT
><DD
><P
>Preferably a sine wave which modulates the delay time inside the
flanger (-1 .. 1).</P
></DD
><DT
>mintime</DT
><DD
><P
>The minimum value for the delay inside the flanger in milliseconds.
Suggested values: try something like 1 ms. Please use values &#60; 1000 ms.</P
></DD
><DT
>maxtime</DT
><DD
><P
>The minimum value for the delay inside the flanger in milliseconds.
Suggested values: try something like 5 ms. Please use values &#60; 1000 ms.</P
></DD
><DT
>outvalue</DT
><DD
><P
>The output signal. It is important that you mix that with the
original (unflanged) signal to get the desired effect.</P
></DD
></DL
></DIV
>

Hint: you can use this as a basis for a chorus effect.</P
></DIV
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="MCAT-SYNTH-FILTERS"
>8.2.6. Filters</A
></H2
><P
></P
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="MREF-SYNTH-PITCH-SHIFT-SECT"
>8.2.6.1. Synth_PITCH_SHIFT</A
></H3
><A
NAME="MREF-SYNTH-PITCH-SHIFT"
></A
><P
><DIV
CLASS="MEDIAOBJECT"
><P
><IMG
SRC="images/Synth_PITCH_SHIFT.png"
></IMG
></P
></DIV
></P
><P
>This pitch shifting effect changes the frequency of the input signal
without affecting the speed. An application for this is for instance changing
the pitch of your voice while you record (and replay) it in realtime</P
><P
>The <I
CLASS="EMPHASIS"
>speed</I
> parameter is the relative speed with
which the signal will be replayed. So a speed of two would make it sound
twice as high (i.e. an input frequency of 440 Hz would result in an output
frequency of 880 Hz).</P
><P
>The <I
CLASS="EMPHASIS"
>frequency</I
> parameter is used internally to
switch between different grains of the signal. It is tunable, and depending
on your choice, the pitch shifting will sound more or less realistic for your
use case. A good value to start with is something like 5 or 10.</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="MREF-SYNTH-SHELVE-CUTOFF-SECT"
>8.2.6.2. Synth_SHELVE_CUTOFF</A
></H3
><A
NAME="MREF-SYNTH-SHELVE-CUTOFF"
></A
><P
><DIV
CLASS="MEDIAOBJECT"
><P
><IMG
SRC="images/Synth_SHELVE_CUTOFF.png"
></IMG
></P
></DIV
></P
><P
>Filters out all frequencies over the cutoff frequency.</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="MREF-SYNTH-BRICKWALL-LIMITER-SECT"
>8.2.6.3. Synth_BRICKWALL_LIMITER</A
></H3
><A
NAME="MREF-SYNTH-BRICKWALL-LIMITER"
></A
><P
><DIV
CLASS="MEDIAOBJECT"
><P
><IMG
SRC="images/Synth_BRICKWALL_LIMITER.png"
></IMG
></P
></DIV
></P
><P
>This modules clips a signal to make it fit into the range of [-1;1]. It
doesn't do anything to prevent the distortion that happens when clipping loud
signals. You can use this as effect (for instance to create a slightly clipped
sine wave). However, it's probably a good idea to run the signal through a
lowpass filter afterwards if you do so, to make it sound less agressive.</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="MREF-SYNTH-STD-EQUALIZER-SECT"
>8.2.6.4. Synth_STD_EQUALIZER</A
></H3
><A
NAME="MREF-SYNTH-STD-EQUALIZER"
></A
><P
><DIV
CLASS="MEDIAOBJECT"
><P
><IMG
SRC="images/Synth_STD_EQUALIZER.png"
></IMG
></P
></DIV
></P
><P
>This is a nice parametric equalizer building block. It's parameters are</P
><P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
>invalue, outvalue</DT
><DD
><P
>The signal that gets filtered by the equalizer.</P
></DD
><DT
>low</DT
><DD
><P
>How low frequencies should be changed. The value is in dB, while 0 means
don't change low frequencies, -6 would mean take them out by 6dB, and +6
mean boost them by 6dB.</P
></DD
><DT
>mid</DT
><DD
><P
>How middle frequencies should be changed by the equalizer in dB (see low).</P
></DD
><DT
>high</DT
><DD
><P
>How high frequencies should be changed by the equalizer in dB (see low).</P
></DD
><DT
>frequency</DT
><DD
><P
>This is the center frequency of the equalizer in Hz, the mid frequencies
are around that spectrum, the low and high frequencies below and above.
Note that the frequency may not be higher than half the sampling rate,
usually that is 22050 Hz, and not lower than 1 Hz.</P
></DD
><DT
>q</DT
><DD
><P
>This influences how broad the mid spectrum is. It must be be a positive
number &#62; 0. A value of one is reasonable, higher values of q mean a
narrower spectrum of middle frequencies. Lower values than one mean a
broader sprectrum.</P
></DD
></DL
></DIV
></P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="MREF-SYNTH-RC-SECT"
>8.2.6.5. Synth_RC</A
></H3
><A
NAME="MREF-SYNTH-RC"
></A
><P
><DIV
CLASS="MEDIAOBJECT"
><P
><IMG
SRC="images/Synth_RC.png"
></IMG
></P
></DIV
></P
><P
>A damped resonator filter filtering all frequencies around some peak value.
There is no useful way of specifying middle frequency (that won't be cut),
since the input are two strange constants f and b. The code is very old,
from the first days of the synthesizer, and will probably replaced by a
new filter which will have a frequency and a resonance value as parameters.</P
><P
>Try something like b=5, f=5 or b=10, f=10 or b=15, f=15 though.</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="MREF-SYNTH-MOOG-VCF-SECT"
>8.2.6.6. Synth_MOOG_VCF</A
></H3
><A
NAME="MREF-SYNTH-MOOG-VCF"
></A
><P
><DIV
CLASS="MEDIAOBJECT"
><P
><IMG
SRC="images/Synth_MOOG_VCF.png"
></IMG
></P
></DIV
></P
><P
>Filters out all frequencies over the cutoff frequency (it's a 24db 4pole
filter, which filters -24db per octave above the cutoff frequency), but
offers an additional parameter for tuning the filter resonance, while 0
means no resonance and 4 means self oscillation.</P
></DIV
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="MCAT-SYNTH-MIDI-SEQUENCING"
>8.2.7. Midi + Sequencing</A
></H2
><P
></P
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="MREF-SYNTH-MIDI-TEST-SECT"
>8.2.7.1. Synth_MIDI_TEST</A
></H3
><A
NAME="MREF-SYNTH-MIDI-TEST"
></A
><P
><DIV
CLASS="MEDIAOBJECT"
><P
><IMG
SRC="images/Synth_MIDI_TEST.png"
></IMG
></P
></DIV
></P
><P
>This modules loads an instrument structure from a file, and registers
itself as midi output with the aRts midi manager. Notes sent to this output
will result in instrument voices being created. Note: you can setup something
like this more convenient in artscontrol than manually in artsbuilder.</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="MREF-SYNTH-SEQUENCE-SECT"
>8.2.7.2. Synth_SEQUENCE</A
></H3
><A
NAME="MREF-SYNTH-SEQUENCE"
></A
><P
><DIV
CLASS="MEDIAOBJECT"
><P
><IMG
SRC="images/Synth_SEQUENCE.png"
></IMG
></P
></DIV
></P
><P
>Will play a sequence of notes over and over again. The notes are given in
tracker notation, and are seperated by semicolons. An example is
<TT
CLASS="LITERAL"
>A-3;C-4;E-4;C-4;</TT
>. The speed is given as seconds per note, so if you
want to get 120 bpm, you will probably specify 0.5 seconds/note, as
60 seconds/0.5 seconds per note=120 bpm.</P
><P
>You can give each note an length relative to the speed by using a colon
after the note and then then length. <TT
CLASS="LITERAL"
>A-3:2;C-4:0.5;D-4:0.5;E-4;</TT
>
demonstrates this. As you see, midi composing programs tend to offer
more comfort ;)</P
><P
>The Synth_SEQUENCE gives additional information about the position of
the note it is playing right now, while 0 means just started and 1 means
finished. This information you can use with Synth_PSCALE (see below).</P
></DIV
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="MCAT-SYNTH-SAMPLES"
>8.2.8. Samples</A
></H2
><P
></P
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="MREF-SYNTH-PLAY-WAV-SECT"
>8.2.8.1. Synth_PLAY_WAV</A
></H3
><A
NAME="MREF-SYNTH-PLAY-WAV"
></A
><P
><DIV
CLASS="MEDIAOBJECT"
><P
><IMG
SRC="images/Synth_PLAY_WAV.png"
></IMG
></P
></DIV
></P
><P
>This will play a wav file. It will only be present if you have libaudiofile
on your computer. The wave file will start as soon as the module gets created.
It will stop as soon as it's over, then finished will be set to 1. The speed
parameter can be used to replay the file faster or slower, where 1.0 is the
normal (recorded) speed.</P
></DIV
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="MCAT-SYNTH-SOUNDIO"
>8.2.9. Sound IO</A
></H2
><P
></P
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="MREF-SYNTH-PLAY-SECT"
>8.2.9.1. Synth_PLAY</A
></H3
><A
NAME="MREF-SYNTH-PLAY"
></A
><P
><DIV
CLASS="MEDIAOBJECT"
><P
><IMG
SRC="images/Synth_PLAY.png"
></IMG
></P
></DIV
></P
><P
><I
CLASS="EMPHASIS"
>You will normally not need this module, unless you are writing
standalone applications. Inside artsd, there normally is already a Synth_PLAY module, and creating another one will not work.</I
>.</P
><P
>The Synth_PLAY-module will output your audio signal to the
soundcard. The left and right channels should contain the
<I
CLASS="EMPHASIS"
>normalized</I
> input for the channels.
If your input is not between -1 and 1, you get clipping.</P
><P
>As already mentioned, there may only be one Synth_PLAY module
used, as this one directly accesses your soundcard. Use busses if you want
to mix more than one audio stream together before playing. Use the
Synth_AMAN_PLAY module to get something like an output inside
artsd.</P
><P
>Note that Synth_PLAY also does the timing of the whole structure. This
means: no Synth_PLAY = no source for timing = no sound. So you absolutely
need (exactly) one Synth_PLAY object.</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="MREF-SYNTH-RECORD-SECT"
>8.2.9.2. Synth_RECORD</A
></H3
><A
NAME="MREF-SYNTH-RECORD"
></A
><P
><DIV
CLASS="MEDIAOBJECT"
><P
><IMG
SRC="images/Synth_RECORD.png"
></IMG
></P
></DIV
></P
><P
><I
CLASS="EMPHASIS"
>You will normally not need this module, unless you are writing
standalone applications. Inside artsd, there normally is already a Synth_RECORD module, and creating another one will not work.</I
>.</P
><P
>The Synth_RECORD-module will record a signal from the soundcard.
The left and right channels will contain the input for the channels (between
-1 and 1).</P
><P
>As already mentioned, there may only be one Synth_RECORD module
used, as this one directly accesses your soundcard. Use busses if you want
to use the recorded audio stream in more than one place. Use the
Synth_AMAN_RECORD module to get something like an input inside
artsd. For this to work, artsd must run <I
CLASS="EMPHASIS"
>with full duplex enabled</I
></P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="MREF-SYNTH-AMAN-PLAY-SECT"
>8.2.9.3. Synth_AMAN_PLAY</A
></H3
><A
NAME="MREF-SYNTH-AMAN-PLAY"
></A
><P
><DIV
CLASS="MEDIAOBJECT"
><P
><IMG
SRC="images/Synth_AMAN_PLAY.png"
></IMG
></P
></DIV
></P
><P
>The Synth_AMAN_PLAY-module will output your audio signal.
It is nice (but not necessary) if you output a normalized signal (between -1
and 1).</P
><P
>This module will use the audio manager to assign where the signal will
be played. The audio manager can be controlled through artscontrol. To make
it more intuitive to use, it is good to give the signal you play a name. This
can be achieved through setting <I
CLASS="EMPHASIS"
>title</I
>. Another feature
of the audio manager is to be able to remember where you played a signal the
last time. To do so it needs to be able to distinguish signals. That is why
you should assign something unique to <I
CLASS="EMPHASIS"
>autoRestoreID</I
>,
too.</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="MREF-SYNTH-AMAN-RECORD-SECT"
>8.2.9.4. Synth_AMAN_RECORD</A
></H3
><A
NAME="MREF-SYNTH-AMAN-RECORD"
></A
><P
><DIV
CLASS="MEDIAOBJECT"
><P
><IMG
SRC="images/Synth_AMAN_RECORD.png"
></IMG
></P
></DIV
></P
><P
>The Synth_AMAN_RECORD-module will record an audio signal
from an external source (i.e. line in/microphone) within artsd. The output
will be a normalized signal (between -1 and 1).</P
><P
>This module will use the audio manager to assign where the signal will
be played. The audio manager can be controlled through artscontrol. To make
it more intuitive to use, it is good to give the signal you record a name. This
can be achieved through setting <I
CLASS="EMPHASIS"
>title</I
>. Another feature
of the audio manager is to be able to remember where you recorded a signal the
last time. To do so it needs to be able to distinguish signals. That is why
you should assign something unique to <I
CLASS="EMPHASIS"
>autoRestoreID</I
>,
too.</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="MREF-SYNTH-CAPTURE-SECT"
>8.2.9.5. Synth_CAPTURE</A
></H3
><A
NAME="MREF-SYNTH-CAPTURE"
></A
><P
><DIV
CLASS="MEDIAOBJECT"
><P
><IMG
SRC="images/Synth_CAPTURE.png"
></IMG
></P
></DIV
></P
><P
>The Synth_CAPTURE-module will write an audio signal to a wave 
file on your hard disc. The file will always be called
/tmp/mcop-<TT
CLASS="REPLACEABLE"
><I
>usename</I
></TT
>/capture.wav</P
></DIV
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="MCAT-SYNTH-TESTS"
>8.2.10. Tests</A
></H2
><P
></P
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="MREF-SYNTH-NIL-SECT"
>8.2.10.1. Synth_NIL</A
></H3
><A
NAME="MREF-SYNTH-NIL"
></A
><P
><DIV
CLASS="MEDIAOBJECT"
><P
><IMG
SRC="images/Synth_NIL.png"
></IMG
></P
></DIV
></P
><P
>This just does nothing. It is only useful for test situations.</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="MREF-SYNTH-DEBUG-SECT"
>8.2.10.2. Synth_DEBUG</A
></H3
><A
NAME="MREF-SYNTH-DEBUG"
></A
><P
><DIV
CLASS="MEDIAOBJECT"
><P
><IMG
SRC="images/Synth_DEBUG.png"
></IMG
></P
></DIV
></P
><P
>You can use this for debugging. It will print out the value of the signal
at invalue in regular intervals (ca. 1 second), combined with the comment
you have specified. That way you can find out if some signals stay in
certain ranges, or if they are there at all.</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="MREF-SYNTH-MIDI-DEBUG-SECT"
>8.2.10.3. Synth_MIDI_DEBUG</A
></H3
><A
NAME="MREF-SYNTH-MIDI-DEBUG"
></A
><P
><DIV
CLASS="MEDIAOBJECT"
><P
><IMG
SRC="images/Synth_MIDI_DEBUG.png"
></IMG
></P
></DIV
></P
><P
>You can use this to debug how your midi events are actually arriving in aRts.</P
><P
>When a MIDI_DEBUG is running artsserver will print out a lines like
<TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="SCREEN"
> 201 100753.837585 on 0 42 127</PRE
></TD
></TR
></TABLE
>

<TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="SCREEN"
> 202 101323.128355 off 0 42</PRE
></TD
></TR
></TABLE
>

While the first line would be telling you that 100753ms (that is 100 seconds)
after the MIDI_DEBUG started, a midi on event arrived on channel 0. This
midi on event had the velocity (volume) of 127, the loudest possible. The
next line shows the midi release event. [ TODO: this does not work currently,
make it work, and do it via midi manager ].</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="MREF-SYNTH-DATA-SECT"
>8.2.10.4. Synth_DATA</A
></H3
><A
NAME="MREF-SYNTH-DATA"
></A
><P
><DIV
CLASS="MEDIAOBJECT"
><P
><IMG
SRC="images/Synth_DATA.png"
></IMG
></P
></DIV
></P
><P
>This creates a signal with a constant number. </P
></DIV
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="MCAT-SYNTH-OSC-MOD"
>8.2.11. Oscillation &#38; Modulation</A
></H2
><P
></P
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="MREF-SYNTH-FREQUENCY-SECT"
>8.2.11.1. Synth_FREQUENCY</A
></H3
><A
NAME="MREF-SYNTH-FREQUENCY"
></A
><P
><DIV
CLASS="MEDIAOBJECT"
><P
><IMG
SRC="images/Synth_FREQUENCY.png"
></IMG
></P
></DIV
></P
><P
>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.</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="MREF-SYNTH-FM-SOURCE-SECT"
>8.2.11.2. Synth_FM_SOURCE</A
></H3
><A
NAME="MREF-SYNTH-FM-SOURCE"
></A
><P
><DIV
CLASS="MEDIAOBJECT"
><P
><IMG
SRC="images/Synth_FM_SOURCE.png"
></IMG
></P
></DIV
></P
><P
>This is used for frequency modulation. Put your frequency to the frequency
input and put another signal on the modulator input. Then set modlevel to
something, say 0.3. The frequency will be modulated with modulator then.
Just try it. Works nice when you put a feedback in there, that means take
a combination of the delayed output signal from the Synth_FM_SOURCE
(you need to put it to some oscillator as it only takes the role of
Synth_FREQUENCY) and some other signal to get good results.</P
><P
>Works nicely in combination with Synth_WAVE_SIN oscillators.</P
></DIV
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="MCAT-SYNTH-WAVEFORMS"
>8.2.12. Wave Forms</A
></H2
><P
></P
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="MREF-SYNTH-WAVE-SIN-SECT"
>8.2.12.1. Synth_WAVE_SIN</A
></H3
><A
NAME="MREF-SYNTH-WAVE-SIN"
></A
><P
><DIV
CLASS="MEDIAOBJECT"
><P
><IMG
SRC="images/Synth_WAVE_SIN.png"
></IMG
></P
></DIV
></P
><P
>Sinus oscillator. Put a pos signal from Synth_FREQUENCY or Synth_FM_SOURCE
at the input. And get a sinus wave as output. The pos signal specifies the
position in the wave, the range 0..1 is mapped to 0..2*pi internally.</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="MREF-SYNTH-WAVE-TRI-SECT"
>8.2.12.2. Synth_WAVE_TRI</A
></H3
><A
NAME="MREF-SYNTH-WAVE-TRI"
></A
><P
><DIV
CLASS="MEDIAOBJECT"
><P
><IMG
SRC="images/Synth_WAVE_TRI.png"
></IMG
></P
></DIV
></P
><P
>Triangle oscillator. Put a pos signal from Synth_FREQUENCY or Synth_FM_SOURCE
at the input. And get a triangle wave as output. The pos signal specifies the
position in the wave, the range 0..1 is mapped to 0..2*pi internally. Be
careful. The input signal *MUST* be in the range 0..1 for the output signal
to produce good results.</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="MREF-SYNTH-NOISE-SECT"
>8.2.12.3. Synth_NOISE</A
></H3
><A
NAME="MREF-SYNTH-NOISE"
></A
><P
><DIV
CLASS="MEDIAOBJECT"
><P
><IMG
SRC="images/Synth_NOISE.png"
></IMG
></P
></DIV
></P
><P
>Noise generator. This generates a random signal between -1 and 1.</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="MREF-SYNTH-WAVE-SQUARE-SECT"
>8.2.12.4. Synth_WAVE_SQUARE</A
></H3
><A
NAME="MREF-SYNTH-WAVE-SQUARE"
></A
><P
><DIV
CLASS="MEDIAOBJECT"
><P
><IMG
SRC="images/Synth_WAVE_SQUARE.png"
></IMG
></P
></DIV
></P
><P
>Square oscillator. Put a pos signal from Synth_FREQUENCY or Synth_FM_SOURCE
at the input. And get a square wave as output. The pos signal specifies the
position in the wave, the range 0..1 is mapped to 0..2*pi internally. Be
careful. The input signal *MUST* be in the range 0..1 for the output signal
to produce good results.</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="MREF-SYNTH-WAVE-SOFTSAW-SECT"
>8.2.12.5. Synth_WAVE_SOFTSAW</A
></H3
><A
NAME="MREF-SYNTH-WAVE-SOFTSAW"
></A
><P
><DIV
CLASS="MEDIAOBJECT"
><P
><IMG
SRC="images/Synth_WAVE_SOFTSAW.png"
></IMG
></P
></DIV
></P
><P
>Softened saw wave, similar in look like the Synth_WAVE_TRI oscillator.
Put a pos signal from Synth_FREQUENCY or Synth_FM_SOURCE
at the input. You'll get a softened saw wave as output. The pos signal
specifies the position in the wave, the range 0..1 is mapped to 0..2*pi
internally. Be careful. The input signal *MUST* be in the range 0..1 for
the output signal to produce good results.</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="MREF-SYNTH-WAVE-PULSE-SECT"
>8.2.12.6. Synth_WAVE_PULSE</A
></H3
><A
NAME="MREF-SYNTH-WAVE-PULSE"
></A
><P
><DIV
CLASS="MEDIAOBJECT"
><P
><IMG
SRC="images/Synth_WAVE_PULSE.png"
></IMG
></P
></DIV
></P
><P
>Pulse oscillator - this module is similar in spirit like the rectangular
oscillator (Synth_WAVE_RECT), but it provides a configurable up/down ratio,
through the <I
CLASS="EMPHASIS"
>dutycycle</I
> parameter. Put a pos signal from
Synth_FREQUENCY or Synth_FM_SOURCE at the input. Get a
pulse wave as output. The pos signal specifies the position in the wave, the
range 0..1 is mapped to 0..2*pi internally. Be careful. The input signal
*MUST* be in the range 0..1 for the output signal to produce good results.</P
></DIV
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="arts-modules.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="visual-modules-reference.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><SPAN
CLASS="APPLICATION"
>aRts</SPAN
> modules</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="arts-modules.html"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Visual Modules Reference</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>