From d00ead38597780a620014d9aaa854edf85cb2e2e Mon Sep 17 00:00:00 2001 From: John ffitch Date: Tue, 31 Jan 2017 14:47:22 +0000 Subject: [PATCH 1/3] document ftgen with array --- misc/examples.xml | 13 ++++++++++ misc/quickref.xml | 60 +++++++++++++++++++++++++++++++++-------------- opcodes/ftgen.xml | 7 +++++- opcodes/top.xml | 4 ++-- 4 files changed, 63 insertions(+), 21 deletions(-) diff --git a/misc/examples.xml b/misc/examples.xml index a439709e50..f6fcafbb61 100644 --- a/misc/examples.xml +++ b/misc/examples.xml @@ -91,6 +91,7 @@ hvs3.csd Signal Generators:Linear and Exponential Generators +bpf.csd cosseg.csd cossegb.csd cossegr.csd @@ -103,6 +104,7 @@ expsegr.csd gainslider.csd line.csd +linlin.csd linseg.csd linsegb.csd linsegr.csd @@ -116,6 +118,7 @@ transeg.csd transegb.csd transegr.csd +xyscale.csd Signal Generators:Envelope Generators adsr.csd @@ -161,6 +164,7 @@ Signal Generators:Phasors phasor.csd phasorbnk.csd +sc_phasor.csd syncphasor.csd syncphasor-CZresonance.csd @@ -570,6 +574,9 @@ portk.csd resonk.csd resonxk.csd +sc_lag.csd +sc_lagud.csd +sc_trig.csd tlineto.csd tonek.csd @@ -600,6 +607,7 @@ powershape.csd Signal Modifiers:Comparators and Accumulators +cmp.csd max.csd max_k.csd maxabs.csd @@ -925,12 +933,17 @@ cpsmidinn2.csd cpsoct.csd cpspch.csd +mtof-ftom.csd +mtof-ftom.csd +mton-ntom.csd +mton-ntom.csd octave.csd octcps.csd cpsmidinn.csd octpch.csd cpsmidinn.csd pchoct.csd +pchtom.csd semitone.csd Pitch Converters:Tuning Opcodes diff --git a/misc/quickref.xml b/misc/quickref.xml index 6a13d41b7f..fe9a352d0e 100644 --- a/misc/quickref.xml +++ b/misc/quickref.xml @@ -163,6 +163,7 @@ Signal Generators:Linear and Exponential Generators +ky bpf kx, kx1, ky1, kx2, ..., kxn, kyn ares cosseg ia, idur1, ib [, idur2] [, ic] [...]kres cosseg ia, idur1, ib [, idur2] [, ic] [...] ares cossegb ia, itim1, ib [, itim2] [, ic] [...]kres cossegb ia, itim1, ib [, itim2] [, ic] [...] ares cossegr ia, idur1, ib [, idur2] [, ic] [...], irel, izkres cossegr ia, idur1, ib [, idur2] [, ic] [...], irel, iz @@ -175,6 +176,7 @@ ares expsegr ia, idur1, ib [, idur2] [, ic] [...], irel, izkres expsegr ia, idur1, ib [, idur2] [, ic] [...], irel, iz kout gainslider kindex ares line ia, idur, ibkres line ia, idur, ib +kout linlin kin, ksrclo, ksrchi, kdstlo, kdsthi ares linseg ia, idur1, ib [, idur2] [, ic] [...]kres linseg ia, idur1, ib [, idur2] [, ic] [...] ares linsegb ia, itim1, ib [, itim2] [, ic] [...]kres linsegb ia, itim1, ib [, itim2] [, ic] [...] ares linsegr ia, idur1, ib [, idur2] [, ic] [...], irel, izkres linsegr ia, idur1, ib [, idur2] [, ic] [...], irel, iz @@ -194,6 +196,7 @@ ares transeg ia, idur, itype, ib [, idur2] [, itype] [, ic] ...kres transeg ia, idur, itype, ib [, idur2] [, itype] [, ic] ... ares transegb ia, itim, itype, ib [, itim2] [, itype] [, ic] ...kres transegb ia, itim, itype, ib [, itim2] [, itype] [, ic] ... ares transegr ia, idur, itype, ib [, idur2] [, itype] [, ic] ...kres transegr ia, idur, itype, ib [, idur2] [, itype] [, ic] ... +kout xyscale kx, ky, k00, k10, k01, k11 Signal Generators:Envelope Generators @@ -262,6 +265,7 @@ ares phasor xcps [, iphs]kres phasor kcps [, iphs] ares phasorbnk xcps, kndx, icnt [, iphs]kres phasorbnk kcps, kndx, icnt [, iphs] +aindex sc_phasor xtrig, xrate, kstart, kend [, kresetPos] kindex sc_phasor xtrig, xrate, kstart, kend [, kresetPos] (end - start) * freq / sr aphase, asyncout syncphasor xcps, asyncin, [, iphs] @@ -828,6 +832,9 @@ kres portk ksig, khtim [, isig] kres resonk ksig, kcf, kbw [, iscl] [, iskip] kres resonxk ksig, kcf, kbw[, inumlayer, iscl, istor] +aout sc_lag ain, klagtime [, initialvalue=0]kout sc_lag kin, klagtime [, initialvalue=0] +aout sc_lagud ain, klagup, klagdownkout sc_lagud kin, klagup, klagdown +aout sc_trig ain, kdurkout sc_trig kin, kdur kres tlineto ksig, ktime, ktrig kres tonek ksig, khp [, iskip] @@ -872,6 +879,7 @@ Signal Modifiers:Comparators and Accumulators +aout cmp aL, S_operator, aR amax max ain1, ain2 [, ain3] [, ain4] [...]kmax max kin1, kin2 [, kin3] [, kin4] [...]imax max iin1, iin2 [, iin3] [, iin4] [...] knumkout max_k asig, ktrig, itype amax maxabs ain1, ain2 [, ain3] [, ain4] [...]kmax maxabs kin1, kin2 [, kin3] [, kin4] [...] @@ -1321,35 +1329,46 @@ Mathematical Operations:Mathematical Functions -abs(x) (no rate restriction) -ceil(x) (init-, control-, or audio-rate arg allowed) -exp(x) (no rate restriction) -floor(x) (init-, control-, or audio-rate arg allowed) -frac(x) (init-rate or control-rate args; also works at audio rate in Csound5) +abs(x) (no rate + restriction)abs(k/i[]) (k- or i-arrays ) +ceil(x) (init-, control-, or audio-rate arg allowed)ceil(k/i[]) (k- or i-arrays ) +exp(x) (no rate + restriction)exp(k/i[]) (k- or i-arrays) +floor(x) (init-, control-, or audio-rate arg allowed)floor(k/i[]) (k- or i-arrays ) +frac(x) (init-rate or control-rate args; also works at audio rate in Csound5)frac(k/i[]) (k- or i-arrays ) int(x) (init-rate or control-rate; also works at audio rate in Csound5) -log10(x) (no rate restriction) -log2(x) (no rate restriction) +log10(x) (no rate restriction)log10(k/i[]) (k- or i-arrays ) +log2(x) (no rate + restriction)log2(k/i[]) (k- or i-arrays ) logbtwo(x) (init-rate or control-rate args only) powoftwo(x) (init-rate or control-rate args only) qinf(x) (no rate restriction) qnan(x) (no rate restriction) -round(x) (init-, control-, or audio-rate arg allowed) -sqrt(x) (no rate restriction) +round(x) (init-, control-, or audio-rate arg allowed)round(k/i[]) (k- or i-arrays ) +sqrt(x) (no rate restriction)sqrt(k/i[]) (k- or i-arrays ) Mathematical Operations:Trigonometric Functions -cos(x) (no rate restriction) -cosh(x) (no rate restriction) -cosinv(x) (no rate restriction) +cos(x) (no rate + restriction)cos(k/i[]) (k- or i-arrays ) +cosh(x) (no rate + restriction)cosh(k/i[]) (k- or i-arrays ) +cosinv(x) (no rate + restriction)cosinv(k/i[]) (k- or i-arrays ) signum(x) (no rate restriction) -sin(x) (no rate restriction) -sinh(x) (no rate restriction) -sininv(x) (no rate restriction) -tan(x) (no rate restriction) -tanh(x) (no rate restriction) -taninv(x) (no rate restriction) +sin(x) (no rate restriction)sin(k/i[]) (k- or i-arrays ) +sinh(x) (no rate + restriction)sinh(k/i[]) (k- or i-arrays ) +sininv(x) (no rate + restriction)sininv(k/i[]) (k- or i-arrays) +tan(x) (no rate + restriction)tan(k/i[]) (k- or i-arrays ) +tanh(x) (no rate + restriction)tanh(k/i[]) (k- or i-arrays ) +taninv(x) (no rate + restriction)taninv(k/i[]) (k- or i-arrays ) Mathematical Operations:Amplitude Functions @@ -1389,12 +1408,17 @@ cpsmidinn (MidiNoteNumber) (init- or control-rate args only) cpsoct (oct) (no rate restriction) cpspch (pch) (init- or control-rate args only) +imidi ftom ifreqkmidi ftom kfreq +ifreq mtof imidikfreq mtof kmidi +Snote mton kmidiSnote mton imidi +kmidi ntom Snoteimidi ntom Snote octave(x) octcps (cps) (init- or control-rate args only) octmidinn (MidiNoteNumber) (init- or control-rate args only) octpch (pch) (init- or control-rate args only) pchmidinn (MidiNoteNumber) (init- or control-rate args only) pchoct (oct) (init- or control-rate args only) +imidi pchtom ipchkmidi pchtom kpch semitone(x) diff --git a/opcodes/ftgen.xml b/opcodes/ftgen.xml index 0ccc937b4e..f62a0e142e 100644 --- a/opcodes/ftgen.xml +++ b/opcodes/ftgen.xml @@ -21,6 +21,7 @@ Syntax gir ftgen ifn, itime, isize, igen, iarga [, iargb ] [...] + gir ftgen ifn, itime, isize, igen, iarray @@ -48,7 +49,11 @@ iarga, iargb, ... -- function table arguments. Correspond to p5 through pn of the score f statement. - + + + iarray -- ane dimensionl array holding the function table arguments. Correspond to p5 through pn of the score f statement. + + Performance diff --git a/opcodes/top.xml b/opcodes/top.xml index 6100708057..f432240e97 100644 --- a/opcodes/top.xml +++ b/opcodes/top.xml @@ -14,7 +14,6 @@ &opcodesgreaterequal; &opcodeslessthan; &opcodeslessequal; - &opcodeslinlin; &opcodesmultiplies; &opcodesadds; &opcodessubtracts; @@ -249,7 +248,7 @@ &opcodesfilelen; &opcodesfilenchnls; &opcodesfilepeak; - &opcodesfilescal; + &opcodesfilescal; &opcodesfilesr; &opcodesfilevalid; &opcodesfillarray; @@ -497,6 +496,7 @@ &opcodeslinen; &opcodeslinenr; &opcodeslineto; + &opcodeslinlin; &opcodeslinkbeatforce; &opcodeslinkbeatget; From 7e5e89a3177c6587a7a9c21761340aab499aaa45 Mon Sep 17 00:00:00 2001 From: fggp Date: Tue, 31 Jan 2017 16:45:19 +0100 Subject: [PATCH 2/3] Minor fixes --- opcodes/mton.xml | 2 +- opcodes/ntom.xml | 2 +- opcodes/pchtom.xml | 4 ++-- opcodes/pvsgain.xml | 29 ++++++++++++++--------------- opcodes/sc_lag.xml | 2 +- opcodes/sc_lagud.xml | 2 +- opcodes/sc_phasor.xml | 12 ++++++++++++ opcodes/sc_trig.xml | 2 +- 8 files changed, 33 insertions(+), 22 deletions(-) diff --git a/opcodes/mton.xml b/opcodes/mton.xml index 88453b4b6d..f0215bbb64 100644 --- a/opcodes/mton.xml +++ b/opcodes/mton.xml @@ -48,7 +48,7 @@ Example of note names: - midi note number + midi note name ------------------- 60 4C 60.4 4C+40 diff --git a/opcodes/ntom.xml b/opcodes/ntom.xml index f3118bf875..c7d9ab9611 100644 --- a/opcodes/ntom.xml +++ b/opcodes/ntom.xml @@ -47,7 +47,7 @@ Example of note names: - midi note number + midi note name ------------------- 60 4C 60.4 4C+40 diff --git a/opcodes/pchtom.xml b/opcodes/pchtom.xml index 073676b6d3..fef41d92fd 100644 --- a/opcodes/pchtom.xml +++ b/opcodes/pchtom.xml @@ -23,8 +23,8 @@ pitchclass being a number between 00 and 12. - pch midi notename - --------------------------- + pch midi note name + ---------------------------- 8.09 69 4A 8.00 60 4C diff --git a/opcodes/pvsgain.xml b/opcodes/pvsgain.xml index 17f77c2e27..e04ad7d1b4 100644 --- a/opcodes/pvsgain.xml +++ b/opcodes/pvsgain.xml @@ -1,29 +1,28 @@ - -pvstrace + +pvsgain Spectral Processing:Streaming - pvstrace + pvsgain - pvstrace + pvsgain - Retain only the N loudest bins. + Scale the amplitude of a pv stream. Description - Process a PV stream by retaining only the N bins with the - highest amplitude, zeroing the others. + Scale the amplitude of a pv stream. Syntax - fsig pvstrace fsigin, kn + fsig pvsgain fsigin, kgain @@ -37,7 +36,7 @@ - kn -- number of bins to be retained + kgain -- amplitude scaling (defaults to 1). @@ -49,11 +48,11 @@ Examples - Here is an example of the use of the pvstrace opcode. It uses the file pvstrace.csd. + Here is an example of the use of the pvsgain opcode. It uses the file pvsgain.csd. - Example of the <emphasis>pvstrace</emphasis> opcode. + Example of the <emphasis>pvsgain</emphasis> opcode. See the sections Real-time Audio and Command Line Flags for more information on using command line flags. - + @@ -72,11 +71,11 @@ Author: &namevictor; - 2017 + 2011 - New plugin in version 6 - 2017 + New plugin in version 5 + 2011 diff --git a/opcodes/sc_lag.xml b/opcodes/sc_lag.xml index 3203ce16c8..ed426540a7 100644 --- a/opcodes/sc_lag.xml +++ b/opcodes/sc_lag.xml @@ -65,7 +65,7 @@ Examples - Here is an example of the delay opcode. It uses the file sc_lag.csd. + Here is an example of the sc_lag opcode. It uses the file sc_lag.csd. Example of the sc_lag opcode. See the sections Real-time Audio and Command Line Flags for more information on using command line flags. diff --git a/opcodes/sc_lagud.xml b/opcodes/sc_lagud.xml index afb5706f44..586ce78c7f 100644 --- a/opcodes/sc_lagud.xml +++ b/opcodes/sc_lagud.xml @@ -65,7 +65,7 @@ Examples - Here is an example of the delay opcode. It uses the file sc_lagud.csd. + Here is an example of the sc_lagud opcode. It uses the file sc_lagud.csd. Example of the sc_lagud opcode. See the sections Real-time Audio and Command Line Flags for more information on using command line flags. diff --git a/opcodes/sc_phasor.xml b/opcodes/sc_phasor.xml index 5bc3077719..5516ccce3a 100644 --- a/opcodes/sc_phasor.xml +++ b/opcodes/sc_phasor.xml @@ -77,4 +77,16 @@ phasor + + + + Credits + By: &nameeduardo; 2017 + + + + + + + diff --git a/opcodes/sc_trig.xml b/opcodes/sc_trig.xml index 6a9673fb49..111787a980 100644 --- a/opcodes/sc_trig.xml +++ b/opcodes/sc_trig.xml @@ -62,7 +62,7 @@ Examples - Here is an example of the delay opcode. It uses the file sc_trig.csd. + Here is an example of the sc_trig opcode. It uses the file sc_trig.csd. Example of the sc_trig opcode. See the sections Real-time Audio and Command Line Flags for more information on using command line flags. From bd5c1e0d782b2a739114eeca0a15b6108a887a3b Mon Sep 17 00:00:00 2001 From: fggp Date: Tue, 31 Jan 2017 17:10:40 +0100 Subject: [PATCH 3/3] Minor fix --- opcodes/sc_lag.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opcodes/sc_lag.xml b/opcodes/sc_lag.xml index ed426540a7..1cd2532d3c 100644 --- a/opcodes/sc_lag.xml +++ b/opcodes/sc_lag.xml @@ -65,7 +65,7 @@ Examples - Here is an example of the sc_lag opcode. It uses the file sc_lag.csd. + Here is an example of the sc_lag opcode. It uses the file sc_lag.csd. Example of the sc_lag opcode. See the sections Real-time Audio and Command Line Flags for more information on using command line flags.