Skip to content

Latest commit

 

History

History
275 lines (256 loc) · 9.54 KB

sc.org

File metadata and controls

275 lines (256 loc) · 9.54 KB

SuperCollider Patterns and Keys

This document is a listing of many of the pattern classes and event keys from standard SuperCollider/sclang and various quarks, and their implementation status and/or equivalent in cl-patterns. If a pattern you want is not yet implemented (or not listed here), feel free to open an issue requesting it (or if you’re feeling inspired, code it yourself and open a pull request!).

Note that this is just a simple rip of all the Pattern subclasses and that a pattern’s inclusion in this list doesn’t necessarily guarantee it will be implemented–or implemented exactly as it is in standard SC–in the future.

Treat this list as a “quick reference” for users familiar with SuperCollider’s patterns. For more in-depth information, have a look at the sc-differences.org file instead, which gives a more high-level overview of the ways cl-patterns differs from SuperCollider.

list patterns

  • Pseq - done as pseq.
  • Pser - done as pser.
  • Pshuf - done as pshuf.
  • Prand - done as prand.
  • Pxrand - done as pxrand.
  • Pwrand - done as pwrand.
  • Pwxrand - done as pwxrand.
  • Pfsm
  • Pdfsm
  • Ppar - done as ppar.
  • Pfpar
  • Pslide - done as pslide.
  • Ptuple
  • Pwalk - done as pwalk.
  • Pindex - done as pindex.
  • Place - done as place.
  • Ppatlace - done as ppatlace.
  • Pswitch - functionality covered by pindex.
  • PseqFunc - functionality covered by pfunc and pseq.
  • PserFunc - functionality covered by pfunc and pser.

filter patterns

  • Pavaroh
  • Pbus
  • Pclump - done as pclump. see also: paclump.
  • Pclutch
  • Pconst - functionality covered by pfindur.
  • Pdelay
  • Pdelta - done as pdelta.
  • Pdiff - done as pdiff.
  • Pdrop - done as pdrop.
  • PfadeIn
  • PfadeOut
  • Pfin - done as pfin. see also: pbind’s :pfin key.
  • PfinQuant
  • Pfindur - done as pfindur. see also: pbind’s :pfindur key.
  • Pfx
  • Pinterp
  • Plag
  • Pn - done as pn.
  • PpatRewrite
  • Pplayer
  • Pprotect - not implemented yet; in the future you will also be able to use pbind’s :cleanup key.
  • Prewrite
  • Prorate
  • Pscratch - done as pscratch.
  • Pseed
  • Pset
  • Psetpre
  • Pstretch
  • Pstutter - functionality covered by pr.
  • PdurStutter - done as pdurstutter. see also: pbind’s :pdurstutter key.
  • Psmartstutter
  • Psym - done as psym.
  • Psync - done as psync. see also: pbind’s :psync key.
  • Ptrace - done as ptrace.
  • Pwrap - see also: (pnary #'wrap).

math / randomness patterns

  • Punop - done as punop.
  • Pbinop - done as pbinop.
  • Pnaryop - done as pnaryop.
  • Pwhite - done as pwhite.
  • Pbrown - done as pbrown.
  • Pexprand - done as pexprand.
  • Pbeta
  • Pgbrown
  • Pcauchy
  • Pgauss - done as pgauss.
  • Pseries - done as pseries.
  • Pgeom - done as pgeom.
  • Phprand
  • Plprand
  • Pmeanrand
  • Ppoisson
  • Pprob
  • Paccum - done as paccum.

chaos patterns

  • Phenon
  • Platoo
  • Plorenz
  • Pquad
  • PlinCong
  • Pstandard
  • Pgbman
  • Pfhn

timing patterns

  • Pseg
  • Penv
  • Ptempo - see also: (pk :tempo).
  • Ptime - done as pbeat.
  • Pstep - done as prun.

ugen emulation patterns (maybe defer these to Pseg or Penv or the like?)

  • PSinOsc
  • POsc

other / unsorted patterns

  • Pbind - done as pbind.
  • Pbindf
  • Pbindef - functionality covered by pb.
  • Pmono - done as pmono.
  • PmonoArtic - functionality covered by pmono.
  • Pdef - done as pdef. see also: pbind’s :name / :pdef keys.
  • Pchain - done as pchain. see also: pbind’s :embed key.
  • Pdict
  • Penvir
  • Peventmod
  • Pif - done as pif.
  • Pkey - done as pk.
  • Plazy - done as plazy.
  • Plambda
  • Plet
  • Pget
  • Ppatmod
  • Pproto - functionality covered by pbind’s :init key.
  • Pvoss
  • Pfunc - done as pfunc.
  • Pfuncn - functionality covered by pfunc.
  • Prout
  • Pbjorklund - done as pbjorklund.
  • PS - done as ps.
  • Pspawn - functionality covered by pmeta.
  • Pspawner - functionality covered by pmeta.
  • Spawner - functionality covered by pmeta.

my custom patterns

  • Ctl
  • PnC - conditional looping, like Pn but with a condition instead of a number of repeats - functionality will be covered by pn, i.e. (pn repeat-this (lambda () (if my-condition 1 0))) - need to implement and add a test for it (FIX).
  • Ps - done as ps.
  • Prs - done as prs.
  • Ptrack - done as ptrack.
  • Pfuse
  • Pmix
  • Pline
  • Parp - done as pfor.
  • Parpf - parp (pfor) fork; not implemented yet.
  • Parpm - like Parp, but the pattern’s notes are subdivided without retriggering (a la Pmono).
  • Pf - filter a pattern based on the outputs of another pattern. done as pfilter.
  • Pg - “global” Pseries.
  • Pb - done as pb.
  • Pm - functionality covered by (pbind :type :mono).
  • Pinject - functionality covered by the :embed special key.
  • Psyncer - combine a list of patterns into one event stream; the rest are looped for the full duration of the first. functionality covered by pmeta’s :sync key.
  • Pcomp - functionality covered by pmeta.
  • Pfwd - sends copies of the outputs of a pattern to the specified function. functionality covered by *event*, i.e. (pbind :foo 1 :- (lambda () (print *event*) 1))
  • Ppar2
  • Pmod - play a modified copy of a stream in parallel.
  • PkEnv - start/control an EnvGen synth and yield the control bus it’s outputting to.
  • PkLFO - start/control an LFO synth and yield the control bus it’s outputting to.
  • Pfeed - after an initial value, a function is passed the previous output, to do “feedback”, within an optional set of bounds.

more (unsorted):

  • Pcbrown
  • Pevent
  • Pstep3add
  • PenvirGet
  • Pstep2add
  • PstepNfunc
  • Ppostln
  • PintC
  • PintN
  • PbindProxy
  • PintL
  • Phenon
  • PstepDur
  • PstepNadd
  • PTimePoints
  • PAbstractGroup
  • Paddpre
  • Pmulpre
  • Pselect
  • Pfset
  • Pwhile
  • Preject
  • Pcollect
  • Pwhile1
  • PcollectFinal
  • Psym1
  • Ptsym
  • Pnsym
  • Pnsym1
  • Pstretchp
  • Pfinval
  • Pfintime
  • Pflatten
  • Pmul
  • Padd
  • Psetp
  • Paddp
  • Pmulp
  • PparGroup
  • Pgroup
  • Pembedn
  • PnNilSafe
  • Pgate
  • Pfxb
  • Plimitsum
  • Pmcvoss
  • Pdefn
  • PdegreeToKey
  • Paccumbounce
  • Pvbrown
  • PbindMultiChan
  • PbindArrayDefault
  • Pwshuf
  • Phrand
  • Pfpar
  • Pgpar
  • Ptpar
  • Pgtpar
  • Pslide1
  • PslideNoWrap
  • Pswitch1
  • PlazyEnvir
  • PlazyEnvirN

Special keys

Many (but not all) of SuperCollider’s “special keys” are supported in cl-patterns. special-keys.org lists all of the supported keys in cl-patterns, but the implementation/equivalent status of all of the SuperCollider special keys are listed here for convenience.

serverEvent keys

  • server - not implemented; you probably want backend instead.
  • instrument - implemented.
  • group - implemented for the SuperCollider backend.
  • addAction - not implemented.
  • out - implemented.

ampEvent keys

  • amp - implemented.
  • db - implemented.
  • pan - implemented.
  • velocity - not implemented; just set :amp to N/127 instead.
  • trig - not implemented.

durEvent keys

  • tempo - implemented.
  • dur - implemented.
  • stretch - not implemented; just multiply the :dur key, i.e. :dur (p* (pk :dur) N)
  • legato - implemented.
  • sustain - implemented.
  • lag - not implemented; latency effectively provides this; just add your desired value onto it.
  • timingOffset - implemented but named timing-offset.
  • strum - not implemented; will likely be implemented as a pattern instead.
  • strumEndsTogether - not implemented; will likely be implemented as a pattern instead.
  • sendGate - not implemented; the system automatically detects whether to send a gate parameter based on whether the instrument definition has one. You should ensure your instrument metadata and/or synth definitions are correct if you’re having issues.

pitchEvent keys

  • freq - implemented.
  • midinote - implemented.
  • note - implemented.
  • degree - implemented.
  • scale - implemented.
  • octave - implemented.
  • root - implemented.
  • stepsPerOctave - not implemented; just set the scale key to a scale that has the number of steps you want to have per octave.
  • octaveRatio - not implemented; just set the scale key to a scale that has the octave ratio you need.
  • harmonic - not implemented; just multiply the freq key, i.e. :freq (p* (pk :freq) N)
  • detune - not implemented; just add to the freq key, i.e. :freq (p+ (pk :freq) N)
  • midiToCps - not implemented; pitch calculations are automatically done by the system; set your scale key to your desired scale and provide pitch information as additional keys and the system should calculate the frequency for you. It’s not recommended to attempt to use the midinote key to notate non-12-tone scale music. If the system’s built-in pitch functionality is not enough, you can specify frequencies directly with the freq key, or define your own scale or tuning and use the degree key to access its pitches.
  • mtranspose - not implemented; just add to the degree key instead, i.e. :degree (p+ (pk :degree) N)
  • gtranspose - not implemented; just ensure your scale is set correctly and add to the note key instead, i.e. :note (p+ (pk :note) N)
  • ctranspose - not implemented; just add to the note or midinote key instead, i.e. :midinote (p+ (pk :note) N)