Skip to content

03 Audio plugins

Alexandre Piel edited this page Feb 4, 2024 · 54 revisions

ZicHost take care to load and handle audio plugins. Each plugins have access to the 32 audio tracks buffer to manipulate them. Those plugins are called in loop in the same order as they have been instanciated. A plugin can be loaded multiple times under a different name, see AUDIO_PLUGIN configuration in previous section.

AudioInputAlsa

AudioInputAlsa plugin is used to read audio input from ALSA.

Value:

  • DEVICE: name to set input device name. If not defined, default device will be used.

AudioInputPulse

AudioInputPulse plugin is used to read audio input from PulseAudio.

Value:

  • DEVICE: name to set input device name. If not defined, default device will be used.

AudioOutputAlsa

AudioOutputAlsa plugin is used to write audio output to ALSA.

Value:

  • DEVICE: name to set output device name. If not defined, default device will be used.

AudioOutputPulse

AudioOutputPulse plugin is used to write audio output to PulseAudio.

Value:

  • DEVICE: name to set output device name. If not defined, default device will be used.

EffectDelay

EffectDelay plugin is used to apply delay or reverb effect on audio buffer.

Note

  • TODO load/save different kind of delay and reverb from a config file
  • TODO add lfo on time ratio

Values:

  • Delay has 8 voices

  • AMPLITUDE_0 to set amplitude on voice 0.

  • AMPLITUDE_1 to set amplitude on voice 1.

  • ...

  • FEEDBACK_0 to set feedback on voice 0.

  • FEEDBACK_1 to set feedback on voice 1.

  • ...

  • SEC_0 to set time ratio for voice 0.

  • SEC_1 to set time ratio for voice 1.

  • ...

  • TIME_RATIO to modulate time ratio for all voices.

  • MASTER_AMPLITUDE to set master amplitude.

  • CUTOFF to set cutoff on delay buffer.

  • RESONANCE to set resonance on delay buffer.

  • MODE to set filter mode.

EffectDistortion

EffectDistortion plugin is used to apply distortion effect on audio buffer.

Values:

  • DRIVE to set drive.

EffectFilterMultiMode

EffectFilterMultiMode plugin is used to apply filter effect on audio buffer. Cutoff frequency will switch from low pass filter to high pass filter when reaching 50%.

Values:

  • CUTOFF to set cutoff frequency and switch between low and high pass filter.

  • RESONANCE to set resonance.

EffectFilterMultiModeMoog

EffectFilterMultiModeMoog plugin is used to apply a simulation of the Moog filter on audio buffer. Cutoff frequency will switch from low pass filter to high pass filter when reaching 50%.

Values:

  • CUTOFF to set cutoff frequency and switch between low and high pass filter.

  • RESONANCE to set resonance.

EffectGainVolume

EffectGainVolume plugin is used to apply gain and volume on audio buffer.

Values:

  • VOLUME to set volume.

  • GAIN to set gain.

EffectSampleRateReducer

EffectSampleRateReducer plugin is used to reduce sample rate on audio buffer.

Values:

  • SAMPLE_STEP to set sample step reduction.

Mixer

Mixer audio plugin is used to mix tracks together.

  • Mixer4 is a 4-track mixer.
  • Mixer8 is a 8-track mixer.
  • Mixer12 is a 12-track mixer.

By default, the mixing output goes to track 0.

And input tracks start at 1, then 2, 3, ....

Value:

  • TRACK_1 to set volume on track 1, min = 0.0, max = 100.

  • TRACK_2 to set volume on track 2.

  • ...

  • MUTE_1 to mute track 1, 0.0 to unmute, 1.0 to mute.

  • MUTE_2 to mute track 2.

  • ...

Config:

  • TRACK_1: 1 to set track input 1 on track buffer 1.

  • TRACK_2: 2 to set track input 2 on track buffer 2.

  • ...

  • TRACK_TARGET: 0 to set output to track 0.

  • DIVIDER: 0.5 to set a custom divider. By default, divider equals 1 divided by the number of tracks.

  • VALUE_1: 0.5 to set track 1 volume to 50%.

Sequencer

Sequencer audio module can be used to sequence another audio plugin on 32 steps. Each step can be triggered by a condition:

  • --- - always
  • Pair - every second step
  • 4th - every fourth step
  • 6th - every sixth step
  • 8th - every eighth step
  • Impair - every impair step
  • 1% - 1% probability, meaning that it has 1 chance over 100 to be triggered
  • 2% - 2% probability
  • 5% - 5% probability
  • 10% - 10% probability
  • 20% - 20% probability
  • 30% - 30% probability
  • 40% - 40% probability
  • 50% - 50% probability
  • 60% - 60% probability
  • 70% - 70% probability
  • 80% - 80% probability
  • 90% - 90% probability
  • 95% - 95% probability
  • 98% - 98% probability
  • 99% - 99% probability

Values:

  • DETUNE detuning all playing step notes by semitones

  • PATTERN select the pattern to play

  • SELECTED_STEP select the step to edit

  • STEP_VELOCITY set selected step velocity

  • STEP_LENGTH set selected step length

  • STEP_CONDITION set selected step condition

  • STEP_NOTE set selected step note

  • STEP_ENABLED toggle selected step

SerializeTrack

SerializeTrack plugin is used to serialize track on disk. It will scan all the plugins on the given track and save them on disk.

Values:

  • VARIATION switch between different track serialization varaitions (clip).

  • EDIT_VARIATION toggle to enable variation edit mode. If set to false variation will be read only. If set to true, every changes will be save before to switch to the next variation. Default is true.

Config:

  • FILEPATH: filepath to set filepath. By default it is serialized/track.cfg.

  • MAX_VARIATION: 12 to set max variation. By default it is 12.

  • EDIT_VARIATION: true toggle to enable variation edit mode. If set to false variation will be read only. If set to true, every changes will be save before to switch to the next variation. Default is true`

SynthBass

Synth engine to generate bass sounds.

Values:

  • PITCH set the pitch.

  • DURATION set the duration of the envelop.

  • DECAY_LEVEL set the decay level.

  • DECAY_TIME set the decay time percentage base on the total duration.

  • CUTOFF to set cutoff frequency and switch between low and high pass filter.

  • RESONANCE to set resonance.

  • STEP_FREQ set how much the saw waveform ramp up increases on each sample.

  • STAIRCASE set how much the saw waveform morph to staircase.

  • NOISE set the noise level.

  • GAIN_CLIPPING set the clipping level.

SynthKick23

Synth engine to generate drum sounds using wavetables.

Values:

  • BROWSER Select wavetable.

  • MORPH Morhp over the wavetable.

  • PITCH Modulate the pitch.

  • DURATION set the duration of the envelop.

  • ENV_FREQ_START set the frequence value when the envelop start.

  • GAIN_CLIPPING set the clipping level.

SynthPd

SynthPd is a plugin to play puredata patches.

Patch use midi input notein to trigger notes. To modulate parameters, you can either use midi cc ctlin or float message r KEY_MSG.

Note

  • TODO process audio input, e.g. apply effect using PD
  • FIXME apt install libpd doesnt work on RPi. Need to embded libpd or to find a artifactory to download.

On Raspberry, libpd is not available out of the box, this is why SynthPd has been commented out from makefile. To use it, you need to install libpd manually.

On ubuntu, you can directly install it from the artifactory:

sudo apt-get install libpd-dev libpd0

Finally, you need to compile SynthPd:

make -C plugins/audio SynthPd

Config:

  • OPEN_PD: filename open puredata patch.

  • ASSIGN_CC: cc label default_val assign CC value to be sent to pd ctlin cc. To use value in the UI, use CC_1, CC_2, ...

  • ASSIGN_FLOAT: key label default_val assign float value to be sent to pd r key. To use value in the UI, use the key as reference. So if you pd receiver is r FREQ, then the config is ASSIGN_FLOAT FREQ Frequency 440 and the value key is FREQ.

SynthSample

SynthSample is a plugin to play samples.

Values:

  • START set the start position of the sample

  • END set the end position of the sample

  • SUSTAIN_POSITION set the position of the sustain

  • SUSTAIN_LENGTH set the length of the sustain

  • SUSTAIN_RELEASE set a delay before the sustain ends when note off is triggered

  • DENSITY set the density of the voice. Density is adding more voice (sub voice) with a little delay on each added sub voice

  • DENSITY_DELAY set the delay between each sub voice

  • DENSITY_RANDOMIZE set the density randomize. If randomize is set, the density starting delay is random and while change on each sustain loop.

  • BROWSER to browse between samples to play.

Config:

  • SAMPLES_FOLDER set samples folder path.

  • VOICE_ALLOW_SAME_NOTE: false toggle voice playing the same note. If true, same note can be played at the same time on different voices. Default is true.

  • BASE_NOTE: 52 set the base note. The base note is used to determine how many semitone must be added compare to the original sample. Default is 60 (middle C).

Tempo

Tempo audio module is responsible for clocking events. The main purpose is to send clock events to other plugins. A good example is the sequencer.

Note

  • TODO select between internal vs midi clock

Values:

  • BPM in beats per minute

Config:

  • BPM: 120.0 to set default beat per minute