diff --git a/manual.xml b/manual.xml index 116cf58e09..fb4e16712f 100644 --- a/manual.xml +++ b/manual.xml @@ -1026,6 +1026,7 @@ + @@ -1913,7 +1914,7 @@ - + ]> diff --git a/opcodes/opcode.xml b/opcodes/opcode.xml index 0fecd19742..1ff3e78000 100644 --- a/opcodes/opcode.xml +++ b/opcodes/opcode.xml @@ -18,7 +18,7 @@ - A user-defined opcode block must precede the instrument (or other opcode) from which it is used. But it is possible to call the opcode from itself. This allows recursion of any depth that is limited only by available memory. Additionally, there is an experimental feature that allows running the opcode definition at a higher control rate than the kr value specified in the orchestra header. + A user-defined opcode block must precede the instrument (or other opcode) from which it is used. But it is possible to call the opcode from itself. This allows recursion of any depth that is limited only by available memory. @@ -203,10 +203,6 @@ - - The maximum allowed number of input arguments is 256. - - outtypes -- list of output types. The format is the same as in the case of intypes. @@ -275,72 +271,7 @@ The maximum allowed number of output arguments is 256. - - iksmps (optional, default=0) -- sets the local - ksmps value. Must be a positive integer, and also - the ksmps of the - calling instrument or opcode must be an integer multiple of this value. - For example, if ksmps is 10 in the instrument from which - the opcode was called, the allowed values for iksmps - are 1, 2, 5, and 10. - - - - If iksmps is set to zero, the - ksmps of the caller instrument or opcode is used - (this is the default behavior). - - - - Note - - The local ksmps is implemented by splitting up - a control period into smaller sub-kperiods and temporarily modifying - internal Csound global variables. This also requires converting the - rate of k-rate input and output arguments (input variables receive - the same value in all sub-kperiods, while outputs are written only - in the last one). - - - - - Warning about local <emphasis>ksmps</emphasis> - - When the local ksmps is not the same as the - orchestra level ksmps value (as specified in the - orchestra header), global a-rate operations must not be used in the - user-defined opcode block. - - - - These include: - - - any access to ga variables - a-rate zak opcodes (zar, zaw, etc.) - tablera and tablewa (these two opcodes may in fact work, but caution is needed) - The in and out opcode family (these read from, and write to global a-rate buffers) - - - - - In general, the local ksmps should be used with - care as it is an experimental feature, although it works correctly in - most cases. - - - - - The setksmps - statement can be used to set the local ksmps value - of the user-defined opcode block. It has one i-time parameter specifying - the new ksmps value (which is left unchanged if zero - is used, see also the notes about iksmps above). - setksmps should be used before any other opcodes - (but allowed after xin), otherwise unpredictable - results may occur. - - + The input parameters can be read with xin, and the output is written by xout opcode. Only one instance @@ -350,13 +281,6 @@ as in the declaration of the user-defined opcode block (see tables above). - - The input and output arguments must agree with the definition both in - number (except if the optional i-time input is used) and type. - An optional i-time input parameter (iksmps) is - automatically added to the intypes list, and - (similarly to setksmps) sets the local ksmps value. - @@ -377,7 +301,7 @@ xinarg1 [, xinarg2] [, xinarg3] ... [xinargN] xin - [xoutarg1] [, xoutarg2] ... [xoutargN] name [xinarg1] [, xinarg2] ... [xinargN] [, iksmps] + [xoutarg1] [, xoutarg2] ... [xoutargN] name [xinarg1] [, xinarg2] ... [xinargN] diff --git a/opcodes/oversample.xml b/opcodes/oversample.xml new file mode 100644 index 0000000000..249fb39e82 --- /dev/null +++ b/opcodes/oversample.xml @@ -0,0 +1,69 @@ + + +oversample + Signal I/O:Software Bus + + oversample + + + + oversample + + Sets a local sampling rate based on an oversampling factor. + + + + + Description + + Sets the local ksmps value in an instrument or user-defined opcode block. + + + + + Syntax + oversample ifactor[,imode] + + + + Initialization + + ifactor -- sets the oversampling factor. It + needs to be a positive integer > 1. A factor of 1 is a non-op, + zero or negative factors are illegal. + + + imode -- oversampling mode: if Secret + Rabbit Code is used, then 0 - best quality sync (default); 1 - medium + quality sync; 2 - fast sync; 3 - zero-order hold; and 4 - linear. + + + If iksmps is set to zero, the ksmps of the caller instrument or opcode is used (this is the default behavior). + + + + Note + + Oversampling is not allowed with local ksmps. The opcode can + only be used in UDOs. Audio or control rate array arguments + are not allowed. Global variables or bus channels should not be used. + + + + + + See Also + + endop, + opcode, + xin, + xout + + + + + Credits + Author: Victor Lazzarini + New in version 7.0 + + diff --git a/opcodes/setksmps.xml b/opcodes/setksmps.xml index c82ad90c1a..08639144c9 100644 --- a/opcodes/setksmps.xml +++ b/opcodes/setksmps.xml @@ -65,7 +65,7 @@ - The setksmps statement can be used to set the local ksmps value of the instrument or user-defined opcode block. It has one i-time parameter specifying the new ksmps value (which is left unchanged if zero is used). setksmps should be used before any other opcodes (but allowed after xin in UDOs), otherwise unpredictable results may occur. + The setksmps statement can be used to set the local ksmps value of the instrument or user-defined opcode block. It has one i-time parameter specifying the new ksmps value. setksmps should be used before any other opcodes (but allowed after xin in UDOs), otherwise unpredictable results may occur. @@ -88,7 +88,7 @@ xinarg1 [, xinarg2] [, xinarg3] ... [xinargN] xin -[xinarg1] [, xinarg2] ... [xinargN] name [xoutarg1] [, xoutarg2] ... [xoutargN] [, iksmps] +[xinarg1] [, xinarg2] ... [xinargN] name [xoutarg1] [, xoutarg2] ... [xoutargN] diff --git a/opcodes/top.xml b/opcodes/top.xml index 127757bbc9..3e9a42d394 100644 --- a/opcodes/top.xml +++ b/opcodes/top.xml @@ -793,6 +793,7 @@ &opcodesoutvalue; &opcodesoutx; &opcodesoutz; + &opcodesoversample; &opcodesp5gconnect; &opcodesp5gdata; &opcodesp; diff --git a/preface/whatsnew.xml b/preface/whatsnew.xml index d41445c688..0dcf573db0 100644 --- a/preface/whatsnew.xml +++ b/preface/whatsnew.xml @@ -1,70 +1,9 @@
What's new in Csound &csoundversion; - + Major new version. + Release Notes for Csound 6.18 (2022 October)