Release notes for Csound 5.1.00.0 beta1 ======================================= (Note: the list of changes is against version 5.03.0 beta, as of 2006-06-25; some new features that are in 5.03.0, but not documented, are also listed here. Changes that are known to be missing from 5.03.0 are marked with a '+' instead of a '*'.) Language changes ---------------- + User defined opcodes can now take and return string arguments. These are passed at init time only, and are identified by the 'S' character in input/output type lists. Here is a simple example that reverses a string: opcode ReverseString, S, S S1 xin S2 strsub S1, -1, 0 xout S2 endop + Many opcodes that change their input arguments are handled better by the orchestra parser. For such arguments, constants, reserved symbols (sr, kr, etc.), and expressions are now rejected with a syntax error. Also, when input arguments are really only written, and not read at all, the variables need not be previously defined. Examples of changed opcodes include: fin, fini, fink, splitrig, timedseq, trigseq, denorm, vincr, clear, OSClisten, loop_lt, loop_le, loop_gt, and loop_ge. * Implemented #ifndef and #else preprocessing directives for the orchestra, and also nested #ifdef/#ifndef. New opcodes ----------- * pcount, pindex, moogvcf2 (by John ffitch) * flooper2, syncloop (by Victor Lazzarini) * vadd_i, vmult_i, vpow_i, vexp_i, vaddv_i, vsubv_i, vmultv_i, vdivv_i, vpowv_i, vexpv_i (by Andres Cabrera and Istvan Varga) * sndload, loscilx, midipgm (by Istvan Varga) New command line options ------------------------ * --midi-key=N, --midi-key-cps=N, --midi-key-oct=N, --midi-key-pch=N, --midi-velocity=N, --midi-velocity-amp=N: route MIDI key number and velocity to p-fields (by Michael Gogins) Bug fixes --------- + Files #included from a CSD are now found relative to the directory of the CSD file, if the #include file name does not specify a full path. + Fixed bug in sprintf, sprintfk, printf, and printf_i with string argument. + Fixed problems in vector opcodes with overlapping source and destination vectors. + Minor bug fixes in GEN32, logbasetwo, delay, comb, alpass, randi, partials, convolve, s32b14, randomh, randomi, dconv, vcomb, and a number of other opcodes. + Fixed phase interpolation bug in atsa utility. * Fixed incorrect parsing of .csoundrc with trailing whitespace. * Fixed several bugs in the VST host opcodes. * Fixed overwriting of constants by pconvolve in the case of default partition size. Also, the default partition size is now really the value set for the -b command line option, and not -b * nchnls. * Minor bug fixes in nestedap, prepiano, inh, and ino. Misc. changes ------------- + csound5gui can now open files specified on the command line. This allows for associating CSD files with the GUI frontend on Windows. + Optimizations in atssinnoi (can be almost twice as fast with large ksmps values), and a-rate arithmetic and assignment operations. * Assume 0dbfs as the scale parameter in moogvcf if it is set to zero. * Use double precision internally in some filter opcodes (bqrez, moogvcf, pareq, rezzy, and tbvcf). * --sched command line option no longer checks for being used as the root user. * Added new parameters (source and destination offset) to many of the vector opcodes, and some previously existing i-rate parameters have been changed to k-rate. * Minor optimizations in many opcodes. Internal changes ---------------- + The CSOUND structure was converted to a C++ class named 'Csound'. + Header files csound.h, csoundCore.h, and csdl.h are replaced with csound.hpp and csdl.hpp. Also, several other headers (e.g. cwindow.h) are now integrated into csound.hpp. + Use of setjmp() and longjmp() was replaced with C++ exceptions. + Opcode subroutines no longer return an error code to indicate errors, and throw C++ exceptions instead. Also, there are no separate InitError() and PerfError() methods: Csound::ThrowError() can be used to throw an exception with a message using printf-style formatting, at both init and performance time. + Several improvements to the OENTRY structure: + there are no separate a- and k-rate opcode subroutines (avoids some confusion and possibility for errors) + 'threads' bits no longer need to be set: these were redundant and a source of errors + constructor and destructor routines can be set for opcodes. These are called by Csound::instance(), and when freeing memory used by instrument instances, respectively. + 'not initialised' errors can be generated automatically, by setting a flag in OENTRY + variable number of arguments can be taken and returned using MYFLT** pointers to arrays of output/input arguments, rather than allocating a large (VARGMAX) static amount of space + opcode data structures can have a size of up to 2 GB, as opposed to the previous limit of 64 kB + better support for automatic generation of opcode names from argument types (e.g. 'oscil.akk'): a pattern of 28 bits can be used to generate an opcode name using the type of any of the first 6 output and first 8 input arguments + opcodes that modify their input arguments can indicate such behavior with setting flags in OENTRY; it is also possible to allow for the use of previously not defined variables + it is possible to set a 'user data' pointer when allocating new opcode entries: this pointer will be stored in the OPDS structure on instrument instance allocation, and can be used for any purpose + Removed INOCOUNT, OUTOCOUNT, and several other similar macros. Inline methods of OPDS should be used instead. See also ChangeLog, H/csound.hpp, and Engine/entry1.cpp for more details, and changes not listed here. Known incompatibilities with 5.03.0 ----------------------------------- - The API of Csound 5.xx.x and 5.1.xx.x is not compatible. Emulation of old functions like csoundCreate() etc. is planned in the future. - The following changes (both by John ffitch) were not ported from 5.03.0, because they are incompatible with previous versions 5.00.0 to 5.02.1: - exprand and bexprnd output zero with a negative range parameter, rather than inverting output - vstprogset limits program numbers to the range 1 to 16, replacing all other values with 1 - pv_export and pv_import utilities were implemented independently, and use a different (more detailed, but also larger) file format. - The MFDIR environment variable is not supported - use SSDIR instead. - New flags for vector opcodes were developed independently, so it is not guaranteed that the behavior of 5.1.00.0 beta1 and 5.03.0 is consistent in all cases. One area where differences are likely to be present is the default value assumed for out of range indexes in source tables. Also, the flags for printing warning messages are ignored. - Some changes related to making messages more verbose were not ported; these do not affect orchestra compatibility, though. - Support for static Csound library and Mac platforms was removed. - CsoundVST and Mac frontends were removed. To do ----- - clean up and improve the API: - improve interfaces for loading of plugin libraries - better classes for exception handling - create a namespace for the Csound API (should probably have the same name as the modules for Python etc., for consistency) - move interfaces for shared libraries, thread locks, mutexes, timers, random generators, files, etc. from class Csound to separate, smaller classes - create wrapper templates similar to the one in OpcodeBase.hpp, to improve support for opcodes implemented as C++ classes - more consistent style of interfaces: naming of types, functions, etc., error handling (return values vs. exceptions), use of pointers vs. references, use bool type for boolean arguments, and a number of other minor issues - implement new orchestra (maybe score too ?) parser, either independently from the ffitch version, or porting from there if that is a better option - restore language interfaces, csoundapi~, TclCsound, and Cscore to working status - implement C-style API functions like csoundCreate(), csoundCompile(), etc. - write detailed API documentation