User-Defined Opcode Database

Opcodes

This is a repository of User-Defined Opcodes for the Csound music synthesis software. User-Defined Opcodes are opcodes for Csound created using Csound orchestra text. More information about how to create a User-Defined Opcode can be found here. This database was edited by Steven Yi.

Signal Generators

ADSD – An envelope generator modelling the classic analogue ADSD envelopesBufFiPl1 – Plays a mono sample from a GEN01 function table, including sample rate conversionBufFiPl2 – Plays a stereo sample from two GEN01 function tables, including sample rate conversionBufFiPl4 – Plays a four channel sample from four GEN01 function tables, including sample rate conversionBufFiPl8 – Plays an eight channel sample from eight GEN01 function tables, including sample rate conversionBufPlay1 – Plays audio from a mono buffer (function table), with different optionsBufPlay2 – Plays audio from a stereo buffer (two function tables), with different optionsFilePlay1 – Plays a mono signal from a mono or stereo soundfileFilePlay2 – Plays a stereo signal from a mono or stereo soundfilefootarray – Interface for a foot array which outputs program change MIDI messages. Can be used with any MIDI program change capable device.GaussTrig – Outputs a-rate impulses around a certain frequency.Linek – performs a linear interpolation from one value to another value in a certain time whenever a trigger is receivedLpPhsr – creates a time pointer for loopsmsrOsc – Simple Generatorp5glove – Unit generator for P5 data glovePartikkelSimpA – A simplified version of the Partikkel opcode, but with some additional parametersPartikkelSimpB – The same as PartikkelSimpA, but with a time pointer inputpgmin – Read program change messages from MIDI inputRandomWalkA – Generate random walk at a-rateRandomWalkK – Generate random walk at k-raterbatonPercPad – Senses trigger/whack strength as well as X and Y coordinates of the two batons in a Max Mathew’s Radio Baton systemrbatonPot – Implements a sensor for the 4 pots, 2 footswitches and B15+ button on the Max Mathew’s Radio Baton unitrbatonXYZ – polls X, Y, and Z coordinates of a Max Mathew’s Radio BatonstereoGrain – Granular synthesis similar to granule but in stereo with control rate parameters and unlimited transpositionsTransGen – Transient envelope generator, pulse divider, and/or LFO.vowgen – fof-based vocal generator with morfable vowels

~ Filters ~

Fofilter – A formant filter version of the FOF opcodeMoogladder – An improved implementation of the Moog ladder filterStatevar – A digital version of the analogue state variable filtertap_tubewarmth – tap_tubewarmth – A port of Tom Szilagyi’s TAP TubeWarmth LADSPA plugin to a Csound User-Defined OpcodeVocoder – channel vocoder with user-specified number of bandsvowel – vowel filter with morfable vowels

Utilities

ampdbN – Normalized conversion from db to amplitudeampSlider – Converts a scaled (0-1) value to a value resembling a hardware mixer sliderBufCt1 – creates a function table of ilen seconds for recordingBufCt2 – creates two function tables of ilen seconds for recordingBufFiCt1 – creates a gen01 function table from a mono soundfileBufFiCt2 – creates two gen01 function table from a stereo soundfileBufFiCt4 – creates fout gen01 function table from a four channel soundfileBufFiCt8 – creates eight gen01 function table from an eight channel soundfileBufFiCtNd1 – creates a non deferred function table from a mono soundfile and returns its lengthBufFiCtNd2 – creates two non deferred function tables from a stereo soundfile and returns the lengthBufRec1 – Records in a mono buffer (function table)BufRec2 – Records in a stereo buffer (= two function tables)Counter – Step counterdeclick – removes clicks from signal start and enddeflutter – deflutter k-rate input (data smoothing)ExpCurve – Normalised exponential curve with variable steepnessF2M – Comverts a frequency to the next possible MIDI note numberF2MC – converts a frequency to a MIDI.Cent note numberFilDir – Returns the directory in a given pathFilDirUp – Returns the directory above the current directoryFileToPvsBuf – Writes an audio file to a pvs bufferFilNam – Returns the file name in a given pathFilSuf – Returns the suffix of a filename or path, optional in lower casefindPowerOfTwo – Given a value in seconds, finds a power of two size equal to or greater than it in samplesflip – Flips an incoming floating point value at k-rateFracLen – Returns the real length of the fractional part of a numberFreqByCentTab – frequency calculation of a step of a scale which is defined by a list of cent valuesFreqByEqScale – frequency calculation for one step of an equal tempered scaleFreqByRatioTab – frequency calculation of a step of a scale which is defined by a list of proportionsftreverse – reverses an ftable’s contents in place at k-rategainslider – Logarithmic gain slidergetFrequency – Returns frequency whether being passed in pch or frequencyhysteresis – Implements classic 2-threshold hysteresis. Useful for performance controllersKeyOnce – Returns ‘1’ once if a certain key has been pressed or releasedKeyStay – Returns ‘1’ as long as a certain key is holdLogCurve – Normalised logarithmic curve with variable steepnesslowpass – A k-rate smoothing UDO that is useful for averaging performance controller datamidiMonitor – Displays midi channel and control number informationMS2S – Converts a floating point number in the format min.sec to secondsPfieldsToTable – Transfers score parameter fields to a function tablePhsEdge – Reports whether the upper or lower border of a phasor has been reachedPrint_a – Prints an audio signal (vector) every kPeriod secondsResidual – extracts stochastic components (transients etc) from a sound (using csound 5 opcodes)Scala – Scales an incoming a-signal from a certain range to another rangescale – Scales incoming value to user-definable range. Similar to scale object found in popular dataflow languagesScali – Scales an incoming i-variable from a certain range to another rangeScalk – Scales an incoming k-signal from a certain range to another rangeSinesToSSTI – returns a function table with one of the four standard waveforms, produced by the addition of harmonicsStayed – Reports if a control signal has stayed at the same value for a certain timeStrayElMem – Tests whether a string is contained as an element in an array-stringStrayGetEl – Gets one element from a string-arrayStrayGetNum – Gets one number from a string-arrayStrayLen – Returns the length of an array-stringStrayNumLen – Returns the length of numerical elements in an array-stringStrayNumMem – Tests whether a number is a member of an array-stringStrayNumSum – Adds the elements in a numerical array-stringStrayNumToFt – Converts a string-array which just consists of numbers or simple math expressions to a function tableStrayRemDup – Removes duplicates in an array-stringStrayRev – Reverses the elements of an array-stringStraySetEl – Inserts an element in an array-string at a certain positionStraySetNum – Inserts a number in an array-string at a certain positionStraySub – Returns a subset of elements in an array-stringStrExpr1 – Calculates a simple binary expression in a string and returns the result as a numberStrExpr2 – Calculates a binary numerical expression in a string and returns the result as a number. One of the elements can be itself a binary expression, in which case it must be set in parentheses. Requires the UDO StrExpr1StrNumP – tests whether a string is a numerical stringTbDmp – Prints a function table at i-timeTbDmpk – Prints a function table at k-timeTbDmpS – Prints a table with an introducing string at i-timeTbDmpSk – Prints a table with an introducing string at k-timeTbMem – Looks whether a number is in a function tableTbPrmRnd – Permutes the values of a function table randomly, at i-timeTbPrmRndk – Permutes the values of a function table randomly, at k-timeTbRmDp – Removes duplicates from a function tableTbToLin – Reads a table in the same way as a linseg opcodeTbToSF – writes the content of a table to a soundfiletieStatus – Returns the status of a note in a group of tied notesTuner – Tunes a given fundamental to a user-provided scaleY_x4p_i – Calculates a Y value from a given X and 2 pairs of X/Y points, at init-timeY_x4p_k – Calculates a Y value from a given X and 2 pairs of X/Y points, at k-time

Uncategorized

boomerangPointer – Pointer to read a function table forwards then backwards or vice versafilterBank – Defines a bank of bandpass filters in parallel whose outputs can be scaled using a function tablelinearPointer – Pointer to read a function table linearly, forwards or backwardspvshift – Pitch shifting and spectral stretching with pvs streamsRecursiveDiskin – Alters kpitch and iskiptime each time it calls itself to create a little bit of texturesampleSlicer – Reads a function table in incremental slicessittinginaroom – A simple,recursive opcode that has pleasant effects. The name pretty much describes what it does.