|
|
Cumulus Doc English |
|
About & ContactNewsProjectsSoftwarePublicationsCollaborations
Photo GalleryMovie Gallery
Scheinwerfer Site
Mailing List
___________ |
Program DescriptionContents: * Program Start and General Background
o Program Arguments
* The Main Window
o Envelopes
o Tools for the construction of the envelopes
o Frequency Band / Shape of the Cloud
o The Waveform in the Grains
o The Controlpanel
o The Statuspanel
o Amplitude Envelope (ADSR) of a triggered Sound
* The Drehbank [MIDI Controller] Emulation
* Configuration
o Configuration of the Engine
o Configuration of the GUI - Parameters / MIDI
Program Start and General BackgroundCumulus consists of 3 executables / processes which can be found in bin:
They communicate with each other via UNIX sockets. The gui has to be started first because it opens the sockets and the other processes look for these. A script called start is provided which makes sure remaining sockets from previous sessions get deleted [in /tmp] and fires up the processes. Program ArgumentsThe Engine and the gui take parameters:
The Main WindowIf everything works fine you'll see something like this: This is the main control window for Cumulus. If the MIDI controller emulation switch for gui is on, there will be an additional window (it may be hidden behind the main one) , see The Drehbank [MIDI Controller] Emulation . EnvelopesFor each AGS parameter there is an envelope which defines the progression in time of the parameter. The picure below shows such an envelope: In the upper left corner you see the name of the parameter. In the white rectangle the control points can be set with the mouse: a click on the envelope selects it (the selected envelope is framed by a green rectangle), a left click into the rectangle adds a point or grabs an existing one which can be moved while the button is held down; a right click on a point removes it. The envelope is calculated through linear interpolation between these control points. The time axis is horizontal. The dimension and the value range of of the function value is dependent of the two variables Base and Range which are displayed on the right of the parameter name. The value f(t) of a point on the envelope lies in the range [0, 1], 0 is on the bottom and 1 on the top. Following formula maps the value into the desired range: f'(t) = Base + f(t) * Range The values Base and Range are, like all setable numeric parameters, controlled by MIDI controllers. The mapping to certain controllernumbers and the parameter ranges are defined in the file gui.config which has to be in the same directory as gui. Because most users won't have a MIDI controller box, a simple emulator is provided which can be controlled with the mouse. Note that MIDI controllers can send values from 0 to 127. In the line on the bottom you find the duration of the envelope in Milliseconds. This duration is fixed and is set while manipulating the envelope with the buttons Flat, Sine, Rect and Repeat (on the very bottom of the window). To manipulate the duration of the envelope all the same there is the Stretch factor. If this value is larger than 1.00 the envelope gets stretched, if it's smaller than 1.00 the envelope gets compressed. For each envelope there's an individually adjustable stretch factor as well as the possibility to use a global Master Stretch factor with which several envelopes can be stretched synchronously. On the very right is finally the duration of the stretched envelope. If the duration of a note is larger than the duration of an envelope that envelope is looped. Tools for the construction of the envelopesOn the bottom of the Main Window on the left are 4 functions for shaping the envelopes: On the right of each funtion, the function value is defined and with a click on the button the according action is executed:
Frequency Band / Shape of the CloudThe frequency band of the cloud is defined by two parameter:
This partitioning allows to use a MIDI-keyboard as a usefull input device: A pressed note defines the central frequency of the cloud. For this reason the value for Base of the central frequency can't be set: it's defined by the played note, using following formula: Base = frequency of note - (Range / 2) Note that Range depends on the frequency of the note too (see below). It means that the grey stressed line in the middle of the envelpe is exactly on the frequency of the note. Points above it let the frequency grow, points below let it fall. Because the information density of the audio decreases exponentially with increasing frequency (one octave comprises the double frequency range of its neighbouring lower occtave) this two parameters are not defined in Hertz but relative to the frequency of the pressed note. Thus the defined sound behaves the same for high and low notes. The Waveform in the GrainsThe waveform which is filled into the Grains is always a sine of a certain frequency F which can be enichened with its harmonics. The harmonics are sine oscilations whose frequency is a whole-numbered multiple of the fundamental frequency F. The 1st harmonic has the frequency 2F, the 2nd harmonic has 3F etc. Switches to control the Grain parameter With the checkboxes you can select if just the even (i.e. 2F, 4F, ...), just the odd (3F, ...) or all harmonics shall be added. Additionally the behaviour of the amplitudes of the harmonics can be selected, this is if it decreases proportionaly to the number of the harmony or proportional to its square. With this, following waveforms can be built: Waveform: | Harmonics: | Harm. Amplitute: Triangle odd 1/sqr(harm) Rectangle odd 1/harm Sawtooth both 1/harm Note that naturally only whole-numbered harmonics are possible. The progression of the envelope suggests a continuous transition from one value to the other, but in fact it's rounded to the next whole number. In the left part of the panel pictured above two other parameters can be adjusted:
Trapezoid Gaussian Note: The Pictures above show the influence of the Grain Envelope Attack parameter (Attack Time).
The Controlpanel The Controlpanel consists of a number of buttons with which the Engine can be controlled and sounds can be loaded from and stored to disk.
The Statuspanel The Statuspanel shows some important information. In the upper part the value of the MasterStretch, which can be used for all envelopes, can be found. Below the coordinates of the currently selected control point are shown. The 3 green LEDs in the lower part flash red on certain [undesired] events:
Amplitude Envelope (ADSR) of a triggered SoundBesides the parameter envelopes there is an envelope which shapes the amplitude of a triggerd sound [possibly a pressed key on the MIDI-keyboard]. This is a so called ADSR-Envelope and is usually used by synthesizers. A sound is divided in following phases:
On the Main Window the ADSR-Envelope is defined in the section on the bottom on the right: In the upper part hitting a key can be simulated ("loop with..." checkbox). The defined sound is played repeatedly with the central frequency defined on the right. In between 2 keystrokes there's a pause whose duration can be adjusted too. The Sustain Time can be adjusted below, on the right of it you see the total duration of the sound. With the "One Shot" checkbox checked, the set Sustain Time is used for real keystrokes, i.e. the Sustain Time doesn't depend on how long the key is pressed anymore. The Drehbank [MIDI Controller] EmulationThe original code just worked with a Drehbank [a specific MIDI-controllerbox, see www.doepfer.de ]. Because mose people don't have a MIDI-Controllerbox with 30 controllers lying around, I implemented a simple emulation. Below you see its window: So if you want to change one of the scalar values on the Main Window, you have to set its Controller Value in the emulation window. Note that the hardware controllers can have a value in the range [0, 127] which is mapped to the desired parameter range by the gui [see Configuration of the GUI-Parameters / MIDI ]. I'm aware that this solution is not very convenient, but Cumulus was designed to be controlled with hardware controllers which are much more fun that this damn mouse - and I don't have enough time to do major changes in the GUI.... ConfigurationConfiguration of the EngineThe configuration of the Engine is done in the file Engine.config which has to be in the same directory as Engine. An example: # Configurationfile for GSL-Engine
SAMPLINGRATE 44100
INTERNALSRFACTOR 1
CHANNELS 2
POLYPHONY 8
BLOCKLENGTH 650 # samples
MAXGRAINLENGTH 400 # ms
OSSBUFFERS 16
OSSBUFFERSIZE 512 # size of each buffer in bytes
Explanation of the different Entries:
The two OSS... parameters define the delaytime of the system. OSSBUFFERS x OSSBUFFERSIZE is the total buffersize in bytes [1 sample = 2 bytes, stereo = 2 samples]. A smaller buffer means lower delay [and higher risk of an underrun], a larger buffer imposes a higher delay but less underruns. The optimal values depend on the speed of your system - experiment! Configuration of the GUI-Parameters / MIDIThe MIDI implementation handles messages of two MIDI-devices:
If you want to change the channelnumbers [or the MIDI parsing in general], see the definitions in MIDIListener.cc. Of course you can use a Sequencer like Cubase instead. Never tried it though, tell me your results... :) MIDI ControllerboxEach controller on the box sends a Control Change Comand with the following format: Statusbyte Databyte 0 Databyte 1 0xB0 Controller-Nr. Position of the Controller [0 - 127] In the statusbyte you can see that the first MIDI channel is used. For a controller 128 different positions are possible. Because the parameters usually have a huge value range [e.g. the Central Frequency which ranges from ~20 Hertz to ~20'000 Hertz], a configurtain file is used in which for each value
Thyis gives you the power to change the layout of the used controllers in a easy way and define the value range for each parameter. For some sounds it might be necessary to e.g. adjust the Central Frequency in a very small range as exactly as possible whilst for other sounds a as-large-as-possible range is needed without a very fine granulation of the covered values. The configuration file gui.config must be in the same directory as gui and contains for each used parameter 1. The keywoard which identifies the parameter (see following example) 2. The number of the controller 3. The minimum value of the parameter 4. The maximum value of the parameter 5. The type [law] of the trandformation Controller Position -> Parameter Value (LIN, EXP or LOG) 6. The number of digits behind the decimal dot to display in the GUI Example: # add a line for each controller-defined value of the form:
# PARAMNAME CTRLR# MIN-VALUE MAX-VALUE TYPE DigitsAfterDot
AMPLITUDE_BASE 1 0.00 1.00 EXP 3
AMPLITUDE_RANGE 17 0.00 1.00 EXP 3
AMPLITUDE_STRETCH 33 0.02 10.0 EXP 2
PANING_RANGE 18 0.00 1.00 LIN 2
PANING_STRETCH 34 0.02 10.0 EXP 2
CENTRAL_FREQ_RANGE 19 0.0 4.0 EXP 3 # factor for
CENTRAL_FREQ_STRETCH 35 0.02 10.0 EXP 2 # pressed note
FREQ_WIDTH_BASE 4 0.0 2.0 EXP 3 # factor for
FREQ_WIDTH_RANGE 20 0.0 2.0 EXP 3 # central freq
FREQ_WIDTH_STRETCH 36 0.02 10.0 EXP 2
DENSITY_BASE 5 0.0 2000.0 EXP 1 # [grains/sec]
DENSITY_RANGE 21 0.0 1000.0 EXP 1 # [grains/sec]
DENSITY_STRETCH 37 0.02 10.0 EXP 2
GRAIN_ATTACK_BASE 6 0.00 0.50 LIN 3 # base + range < 0.5!
GRAIN_ATTACK_RANGE 22 0.00 0.50 LIN 3
GRAIN_ATTACK_STRETCH 38 0.02 10.0 EXP 2
GRAIN_HARMONY_BASE 7 0 10 LIN 1
GRAIN_HARMONY_RANGE 23 0 10 LIN 1
GRAIN_HARMONY_STRETCH 39 0.02 10.0 EXP 2
# LENGTH and GRAIN_PERIOD use the same controllers
LENGTH_BASE 8 1.0 200.0 EXP 1 # [ms]
LENGTH_RANGE 24 0.0 50.0 LIN 1 # [ms]
LENGTH_STRETCH 40 0.02 10.0 EXP 2
GRAIN_PERIOD_MULT_BASE 8 1.00 32.0 LIN 1
GRAIN_PERIOD_MULT_RANGE 24 0.00 32.0 LIN 1
MASTER_STRETCH 49 0.02 10.0 EXP 2
ATTACK_TIME 9 1.0 200.0 LIN 1 # [ms]
DECAY_TIME 25 1.0 300.0 LIN 1 # [ms]
RELEASE_TIME 41 1.0 500.0 LIN 1 # [ms]
SUSTAIN_LEVEL 57 0.0 1.0 LIN 3
PAUSE_TIME 10 0.0 500.0 LIN 1 # [ms]
NOTE_CENTRAL_FREQ 26 50.0 14000.0 EXP 1 # [Hz]
SUSTAIN_TIME 42 0.0 15000.0 EXP 1 # [ms]
MIDI KeyboardCumulus can play several voices which allows you to play melodies. However, this doesn't make much sense because the AGS typically creates inharmonic sounds which sound shitty in melodies. I implemented that because I needed something impressive to demonstrate which doesn't imply a lot of programming.... :) |