PartikkelFLTK

Oeyvind Brandtsegg, 2007

obrandts@gmail.com

 

PartikkelFLTK is a FLTK gui for experimenting with the csound partikkel opcode.

To run, type:

 

Csound partikkelFLTK.csd

 

at the command line.

 

 

The zip file also includes a scriptable version of this orchestra, if you experience problems with FLTK or want to do (very simple) automation, see the description here.

 

Here's a brief introduction to what the GUI does:

 

Play button: 1

Sync button: 1

Sample: 1

SamNum: 1

RecToFile. 2

Disable faders. 2

Sliders: 2

Joystick, xyPlot: 3

Midi Control: 3

Scriptable version: 4

 

 

Play button:

Starts the csound partikkel instrument.

 

Sync button:

Restarts the particle generator clock. The clock will be paused for as long as the button is in the "on" position.

 

Sample:

Activate live sampling, writing to the sample slot selected by SamNum

 

SamNum:

Select sample slot for live sampling

 

 

To add your own samples from file, edit the file ftables_samples.inc,

adding your sample like this:

giZyne            ftgen 0, 0, 262144, 1, "Zyne1.wav", 0, 0, 1

 

You will also have to add the name of the sample ftable to the table giAudioTableMap

Like this:

giAudioTableMap   ftgen 0, 0, 16, -2, \         ; map of table numbers for named tables containing audio waveforms

giLive1, giLive2, giLive3, giLive4,\    

giZyne, giFlyndrSand, giVib_Eb, giVok1 

 

RecToFile

Enables recording your realtime session to file. The audio will be written as a stereo wav file with the name “demofile.wav”.

*** Warning *** Recording will always overwrite the existing file, so make sure you copy any recordings you want to save to another directory.

 

Disable faders

If this checkbox is checked, the GUI faders will not move when recalling presets (actually, moving the faders will not have any effect either until you uncheck the box). This might be needed when running under OSX, because the thread handling of the graphical user interface on OSX interferes with realtime audio generation. The “disable faders” feature is an ugly hack to enable using preset recall and interpolation under OSX. You would leave the box unchecked when making adjustments to the parameters, storing presets, and so on, in short, you only check this box when (before) you want to recall presets. There is no harm in recalling presets with the box unchecked, but you will most probably hear severe dropouts in the audio output, and the preset recall might take several seconds longer than expected.

On windows there is no need to disable the fader update, so leave the box unchecked at all times.

 

Sliders:

Many of the sliders correspond directly to partikkel parameters (see partikkel manual page).

 

GrFreq : Number of grains per second.

GfFmIndx : Frequency modulation index, modulating the grain rate.

GfFmFqRat : Frequency modulation frequency, as percentage of the grain rate.

GrDist : Grain distribution.

GrTransp : Transposition (pitch) scaling of all grains.

FqCenter : The end frequency for pitch sweeps of grains.

SweepShap : Shape of the curve for transposition sweeps

FmIndex : FM Modulation index, modulating the pitch of source waveforms.

FmFreq : Frequency of the FM oscillator, modulating the pitch of source waveforms. If Frequency is set to zero, audio feedback is used instead of an oscillator for the FM modulator signal.

GrDur : Grain duration, in percent of 1/grainrate, so e.g. a value of 400 gives a grain overlap of 4.

GrAttack: Balance between attack time and decay time for grain enveloping, 0 = zero attack time and full decay time.

GrShape: Amount of grain (attack and decay) enveloping. This can also be described as balance between enveloped time(attack+decay) and sustain level time, 0 = no time at sustain level.

TimePos : Time position offset, reading of source grain waveforms start from this position in the waveform. Scaled as percentage of the waveform length. For example, setting this to 50 will let new grains start reading from halfway through the source waveform. For single cycle waveforms it would make sense to call this "phase", but for sampled sounds it makes more sens to name it "time position".

timLfoFq : LFO frequency, modulating the time pointer offset (see TimPosOff).

timLfoAm : LFO amount, modulating the time pointer offset (see TimPosOff).

Grain Amp : The master amplitude.

GainMsk1 : Start (loop start) index for reading gain mask values. Gain masks specify gain per grain.

GainMsk1 : End (loop end) index for reading gain mask values.

RandMask : Amount of random masking (muting) of grains.

ChMask1 : Start (loop start) index for reading channel mask values. Channel masks specify which audio output grains are routed to, per grain.

ChMask2 : End (loop end) index for reading channel mask values.

width : Stereo spread of partikkel audio outputs 1 and 2.

displDly2 : Delay time for partikkel audio output 2, in percent of 1/grainrate.

chorusAmt : Chorus effect send amount for partikkel audio output 3.

reverbAmt : Reverb effect send amount for partikkel audio output 4.

chRewrit : Rewrite LFO speed. This controls a continuous rewriting of the channel masks ftable, similar to a panning LFO. Since some partikkel audio outs are used for stereo positioning and other outputs are used for effect sends, this control enables a sort of sonic animation. When setting the control to zero, the original contents of the channel mask table is restored.

TrnAmp : Amplitude for trainlets. This is implemented so that increasing trainlet amplitude automaticcally decreases amplitude for waveform grains. The decreasing of amp for waveform grains is written as values to the wave mix ftable at the index currently selected in the gui control WavMaskEdit.

TrnCps : The fundamental frequency of the trainlets.

TrnPart : Number of harmonics for the trainlets.

TrnChrom : Trainlet chroma. Harmonic balance of the trainlets.

nFmIndx : Frequency modulation index for a noise modulator signal added to the FM modulator (FmIndex,FmFreq controls) modulating the pitch of source waveforms.

nFmDist : Random distribution for the noise FM modulator signal. See csound opcode rnd31. Gui values are scaled * 0.01.

nFmFreq : Lowpass filter frequency for the noise FM modulator signal.

 

Joystick, xyPlot:

wave mix : X and Y axis used to control the mix of 4 source waveforms.

The number boxes in each corner of the joystick selects the current sample slot used for each of the 4 source waveforms.

 

The rest of the widgets are related to storing and recalling presets.

When recalling presets, a crossfade time can be set to interpolate from the current parameter values to the recalled preset values.

It is possible to exclude selected parameters from preset recall, and it is possible to use a slider to manually control the interpolation between two presets.

Presets can be read from or written to file by using the buttons f-Write and f-Read

 

Midi Control:

A selection of the parameters can be controlled via midi. Use midi channel 9, controller number 1 to 16.

controller number       parameter

1                       GrAmp

2                       GrFreq

3                       FqCenter

4                       GrDur

5                       GrAttack

6                       FmIndex

7                       FmFreq

8                       SweepShap

9                       ChMask2

10                      GainMask2

11                      width

12                      displDly2,chorusAmt,reverbAmt(all together)

13                      waveMix X value

14                      waveMix Y value

15                      preset Xfade

16                      timePos

 

Note number 64 can be used to start live sampling. Sampling stops when a note off with the same note number is received.

Live sampling can have a maximum sound length of 5.4 seconds at 44.1 kHz

 

Scriptable version:

To run the scriptable version, type:

 

Csound partikkel_noGUI.csd

 

at the command line.

 

 

You will find the names of the available chn channels in the file partikkel_noGUI.inc, have a look at the description of the parameters earlier in this file. To set parameter values, use instrument 99 with chn name as p4 and parameter value as p5.