Various glitching pixel filters or functions
Use following filters with [[filter-channels]] function.
Short sketches operating on images/pixels.
All filters are equiped with random configuration generator.
Various glitching pixel filters or functions ### Filter Use following filters with [[filter-channels]] function. * Slitscan - x/y slitscan simulation based on wave functions * Shift-channels - just shift channels * Mirror - mirror image along different axes * Slitscan2 - slitscan simulation based on vector fields * Fold - apply vector field on the image * Pix2line - convert pixel into horizontal line ### Machines Short sketches operating on images/pixels. * Blend - compose two images in glitchy way All filters are equiped with random configuration generator.
(ABANDONED) Raymarching helper.
(ABANDONED) Raymarching helper. * http://www.iquilezles.org/www/index.htm * http://mercury.sexy/hg_sdf/
Segment image into parts.
Currently contains only quadtree segmentation.
Segment image into parts. Currently contains only quadtree segmentation.
Signal processing and generation.
Signal is array of doubles from range [-1.0.1.0]
packed into Signal
type.
Signal can be:
Pixels
with pixels->signal
function.load-signal
function. Signal should be encoded as 16-bit signed integer big endian.Pixels
(Image
) can be treated as Signal
. Conversion to Signal is based on strategies of converting image to RAW and then converting to audio. It includes channel data layout and packing into integer, encoding, endianess, etc.
To convert Pixels
to Signal
use pixels->signal
function. To convert back use signal->pixels
. signal->pixels
requires target Pixels
object to store result of conversion. Target is mutated then.
To filter Pixels
directly (without explicit conversion to and from Signals) you can use [[filter-channels]] with effects-filter
.
You can create wave
function from oscillator. You can also sum waves with sum-waves
.
To sample wave to signal, call wave->signal
with following parameters:
f
- wave functionsamplerate
- sample rate (samples per second)seconds
- how many seconds generateYou can save-signal
or load-signal
. Representation is 16 bit signed, big endian. Use Audacity or SoX to convert to/from audio files.
To process Signal use apply-effects
function on it.
Effect is signal filter, created with effect
multimethod. Effects can be composed with compose-effects
. Effect can be treated as function and can be called for given sample.
Each effect has it's own parametrization which should be passed during creation.
List of all available effects is under effects-list
value.
Each effect has its own parametrization
:rate
- sample rate (default 44100.0):cutoff
- cutoff frequency (default 2000.0)Biquad equalizer
:fc
- center frequency:gain
- gain:bw
- bandwidth (default: 1.0):fs
- sampling rate (defatult: 44100.0)Biquad highpass and lowpass shelf filters
:fc
- center frequency:gain
- gain:slope
- shelf slope (default 1.5):fs
- sampling rate (default 44100.0)Biquad lowpass, highpass and bandpass filters
:fc
- cutoff/center frequency:bw
- bandwidth (default 1.0):fs
- sampling rate (default 44100.0):high
- high frequency gain (10000Hz):mid
- mid frequency gain (1000Hz):low
- low frequency gain (100Hz):shelf-slope
- shelf slope for high frequency (default 1.5):peak-bw
- peak bandwidth for mid and low frequencies (default 1.0):rate
- sampling rate (default 44100.0):delay
- delay factor (default: 0.5):denom
(long, default 2.0)Modulate and demodulate signal using frequency
:quant
- quantization value (0.0 - if no quantization, default 10):omega
- carrier factor (default 0.014):phase
- deviation factor (default 0.00822)https://searchcode.com/file/18573523/cmt/src/lofi.cpp#
:rate
- sample rate (default 44100.0):freq
- cutoff frequency (default 1000.0):factor
- distortion factor (default 1.0)Fast overdrive
:drive
- drive (default 2.0):bits
- bit depth (default 2):fs
- decimator sample rate (default 4410.0):rate
- input sample rate (default 44100.0):bass
- bass gain (default 1.0):treble
- treble gain (default 1.0):gain
- gain (default 0.0):rate
- sample rate (default 44100.0):slope
- slope for both (default 0.4):bass-freq
- bass freq (default 250.0):treble-freq
- treble freq (default 4000.0):delay
- delay time in seconds (default 0.5):decay
- decay (amount echo in signal, default 0.5):rate
- sample rate (default 44100.0)Warning! Echo filter uses mutable array as a internal state, don't use the same filter in paraller processing.
:rate
- sample rate (default 44100.0):trigger
- boolean, trigger some action (default false
), set true when you reset filter every line:cutoff
- cutoff frequency (values 0-1, default 0.8):resonance
- resonance (values 0-1, default 0.8):env-mod
- envelope modulation (values 0-1, default 0.5):decay
- decay (values 0-1, default 1.0):gain
- gain output signal (default: 1.0)http://git.drobilla.net/cgit.cgi/omins.lv2.git/tree/src/slew_limiter.c
:rate
- sample rate:maxrise
- maximum change for rising signal (in terms of 1/rate steps, default 500):maxfall
- maximum change for falling singal (default 500):rate
- sample rate:speed
- effect rate:depth
:mix
:depth-mod
:feedback
Warning: like :echo
internal state is kept in doubles array.
Signal processing and generation. ## Signal Signal is array of doubles from range `[-1.0.1.0]` packed into `Signal` type. Signal can be: * obtained from `Pixels` with [[pixels->signal]] function. * generated by calling [[signal-from-wave]]. * loaded from file with [[load-signal]] function. Signal should be encoded as 16-bit signed integer big endian. ### Pixels as Signal `Pixels` (`Image`) can be treated as `Signal`. Conversion to Signal is based on strategies of converting image to RAW and then converting to audio. It includes channel data layout and packing into integer, encoding, endianess, etc. To convert `Pixels` to `Signal` use [[pixels->signal]] function. To convert back use [[signal->pixels]]. [[signal->pixels]] requires target `Pixels` object to store result of conversion. Target is mutated then. To filter `Pixels` directly (without explicit conversion to and from Signals) you can use [[filter-channels]] with [[effects-filter]]. ### Wave as Signal You can create [[wave]] function from oscillator. You can also sum waves with [[sum-waves]]. To sample wave to signal, call [[wave->signal]] with following parameters: * `f` - wave function * `samplerate` - sample rate (samples per second) * `seconds` - how many seconds generate ### File operations You can [[save-signal]] or [[load-signal]]. Representation is 16 bit signed, big endian. Use Audacity or SoX to convert to/from audio files. ## Signal processing To process Signal use [[apply-effects]] function on it. Effect is signal filter, created with [[effect]] multimethod. Effects can be composed with [[compose-effects]]. Effect can be treated as function and can be called for given sample. Each effect has it's own parametrization which should be passed during creation. List of all available effects is under [[effects-list]] value. ### Effects parametrization Each effect has its own parametrization #### :simple-lowpass, :simple-highpass * `:rate` - sample rate (default 44100.0) * `:cutoff` - cutoff frequency (default 2000.0) #### :biquad-eq Biquad equalizer * `:fc` - center frequency * `:gain` - gain * `:bw` - bandwidth (default: 1.0) * `:fs` - sampling rate (defatult: 44100.0) #### :biquad-hs, :biquad-ls Biquad highpass and lowpass shelf filters * `:fc` - center frequency * `:gain` - gain * `:slope` - shelf slope (default 1.5) * `:fs` - sampling rate (default 44100.0) #### :biquad-lp, :biquad-hp, :biquad-bp Biquad lowpass, highpass and bandpass filters * `:fc` - cutoff/center frequency * `:bw` - bandwidth (default 1.0) * `:fs` - sampling rate (default 44100.0) #### :dj-eq * `:high` - high frequency gain (10000Hz) * `:mid` - mid frequency gain (1000Hz) * `:low` - low frequency gain (100Hz) * `:shelf-slope` - shelf slope for high frequency (default 1.5) * `:peak-bw` - peak bandwidth for mid and low frequencies (default 1.0) * `:rate` - sampling rate (default 44100.0) #### :phaser-allpass * `:delay` - delay factor (default: 0.5) #### :divider * `:denom` (long, default 2.0) #### :fm Modulate and demodulate signal using frequency * `:quant` - quantization value (0.0 - if no quantization, default 10) * `:omega` - carrier factor (default 0.014) * `:phase` - deviation factor (default 0.00822) #### :bandwidth-limit https://searchcode.com/file/18573523/cmt/src/lofi.cpp# * `:rate` - sample rate (default 44100.0) * `:freq` - cutoff frequency (default 1000.0) #### :distort * `:factor` - distortion factor (default 1.0) #### :foverdrive Fast overdrive * `:drive` - drive (default 2.0) #### :decimator * `:bits` - bit depth (default 2) * `:fs` - decimator sample rate (default 4410.0) * `:rate` - input sample rate (default 44100.0) #### :basstreble * `:bass` - bass gain (default 1.0) * `:treble` - treble gain (default 1.0) * `:gain` - gain (default 0.0) * `:rate` - sample rate (default 44100.0) * `:slope` - slope for both (default 0.4) * `:bass-freq` - bass freq (default 250.0) * `:treble-freq` - treble freq (default 4000.0) #### :echo * `:delay` - delay time in seconds (default 0.5) * `:decay` - decay (amount echo in signal, default 0.5) * `:rate` - sample rate (default 44100.0) _Warning! Echo filter uses mutable array as a internal state, don't use the same filter in paraller processing._ #### :vcf303 * `:rate` - sample rate (default 44100.0) * `:trigger` - boolean, trigger some action (default `false`), set true when you reset filter every line * `:cutoff` - cutoff frequency (values 0-1, default 0.8) * `:resonance` - resonance (values 0-1, default 0.8) * `:env-mod` - envelope modulation (values 0-1, default 0.5) * `:decay` - decay (values 0-1, default 1.0) * `:gain` - gain output signal (default: 1.0) #### :slew-limit http://git.drobilla.net/cgit.cgi/omins.lv2.git/tree/src/slew_limiter.c * `:rate` - sample rate * `:maxrise` - maximum change for rising signal (in terms of 1/rate steps, default 500) * `:maxfall` - maximum change for falling singal (default 500) #### :mda-thru-zero * `:rate` - sample rate * `:speed` - effect rate * `:depth` * `:mix` * `:depth-mod` * `:feedback` _Warning: like `:echo` internal state is kept in doubles array._
Set of various utilities which can be used to display various objects.
Set of various utilities which can be used to display various objects.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close