What's new in Csound 6.13.0
Prev | Preface | Next

## What's new in Csound 6.13.0

### Release Notes for Csound 6.13 (2019 July)

Not many new opcodes but there are a significant number of opcodes being extended to use arrays in a variety of ways, widening the options for users. There have been many fixes to the core code as well as opcodes.

- New opcodes:

  - string2array is a variant of fillarray with the data coming from a string of space separated values.
  - nstrstr returns the name string of an instrument number or an empty string if the number does not refer to a named instrument.
  - ntof converts notename to frequency at i- and k-time.
  - ampmidicurve is a new opcode that maps an input MIDI velocity number to an output gain factor with a maximum value of 1, modifying the output gain by a dynamic range and a shaping exponent.

- Orchestra:

  - The consistency of kr, sr and ksmps reworked especially when there is overriding.
  - Corrected default 0bdfs usage.
  - Resolving the path for #include files reworked to be more liberal.
  - Reading and writing to multidimensional arrays was very wrong. This is now correct.
  - Better checking for unknown array types (issue #1124)
  - In all array operations the size of an array is determined at init time and no allocation happens at perf time.
  - Array arithmetic now respects --sample-accurate.

- Score:

  - The characters n and m could erroneously get ignored in scores.
  - Resolving the path for #include files reworked to be more liberal.
  - After an error the backtrace of files and macros incorrectly read the information for orchestra rather than scores; fixed.
  - The end of an r (repeated) section was not always correct.
  - Nested {} parts of a score could lead to errors.
  - After an s statement a newline was required; no longer needed.
  - The {} score loops have been reworked to allow macros and expressions in the loop count.

- Options:

  - The new option --use-system-sr set the sample rate to the hardware/system value.

- Modified Opcodes and Gens:

  - Sending failure in OSC is now a warning rather than an error.
  - passign can now have an array as the target.
  - Version of bpf/bpfcos added to allow points defined via arrays.
  - grain can now use tables of any size, which was only a power of 2.
  - Changing colours in FL widgets now works (it previously did not redraw the colour).
  - fillarray can read from a file of values overcoming the argument limit.
  - sumarray now works for audio arrays as well as for scalar values.
  - Assignment of an audio value to an audio array now works.
  - monitor was broken in the array form.
  - gendyc now respects sample-accurate mode.
  - mtof and ftom now have array versions.
  - sc_lag and sc_lagud now use the first k- or a-rate input when no initial value is given.
  - printarray now works for string arrays.
  - changed2 now works for strings.
  - diskgrain, syncgrain and syncloop now can do sample rate scaling.
  - GEN01 correctly reads raw audio files when requested.
  - ftaudio can now take two additional optional arguments for the start and end of the table data being written to file.
  - sensekey recoded in the 'key down' mode.
  - loscilx can return an audio array.
  - schedule opcode reports undefined instruments in all cases.
  - event_i now accepts tagged instrument numbers.
  - printarray treats %d correctly.
  - beadsynt now works with i arrays as well as k arrays as in the manual.

- Utilities:

  - hetro had a number of fixes and improvements.

- General Usage:

  - There have been a number of improvements in the semantics for multicore; most of these are corrections with a few efficiency gains.
  - There is a maximum number of arguments for an opcode which was neither explicit nor policed. Attempts to use too many arguments now gives a syntax error.

- Bugs Fixed:

  - FLgetsnap fixed.
  - directory fixed regarding file extensions.
  - FLsetText reused a string incorrectly which led to incorrect values.
  - fmb3 failed to initialise the lfo rate in some cases.
  - ftaudio at i-rate was totally broken.
  - Following a reinit printks could be skipped; fixed.
  - printks fixed so it prints at correct times.
  - tabrowlin and getrowlin would calculate wrong size under certain conditions.

- System Changes:

  - Hash Table implementation modified to expand on load for better performance when map contains large number of entries.
  - Plugin GEN functions can have a zero length, but the code must check for this and act accordingly. This allows for deferred allocations.
  - schedule reports undefined instr numbers/names and continues, rather than causing an error.
  - Allow multiple calls to midi out controls.

- API:

  - find_opcode_new and find_opcode_exact now exposed in API.
  - After a reset a default message string callback handle is configured.
  - New function csoundSystemSr added to the API to read hardware-imposed sample rate.

- Platform Specific:

  - WebAudio: libsndfile now compiled with FLAC and OGG support.
  - In both orchestra and score the path tracking of #include expects a \ separator.
  - Haiku port now available.
  - Allow analog in and out with different channel numbers.

### Release Notes for Csound 6.12 (2018 November)

Many changes including the removal of vst2cs functionality due to a copyright issue.

The changes made in 6.11 to raw format reading have been modified so gen1 and diskin ignore positive file formats and use the file header, unless the format is negative when it uses the absolute value in a raw audio file. This should preserve most compatibility issues.

There are a number of new and improved opcodes, new facilities in scores and many bug fixes.

- New opcodes:

  - fluidInfo retrieves program information from a currently loaded soundfont.
  - New opcode ftaudio writes a ftable to an audio file; irate and triggered k-rate version exist and k-rate version supports sync or async writing.
  - Version of OSClisten that writes the data to a k-rate array now exists.
  - OSCcount returns the number of OSC incoming messages pending.

  - faustplay

    and

    faustdsp

    are new opcodes splitting the faust DSP instantiation and performance.
  - OSCbundle sends a collection of similar OSC messages as a single packet for efficiency.

  - beosc

    and

    beadsynt

    are band enhanced oscillator and oscillator bank.

    bpfcos

    is for breakpoint files with interpolation. Similarly

    lincos

    adds cosine interpolation to

    linlin

    .

  - printarray

    and

    reshapearray

    act on arrays.

  - trim

    and

    trim_i

    adjust the size of a 1 dimensional array, either bigger or smaller, preserving data and/or padding with zeros.

- Orchestra:

  - New preprocessor option #includestr. This is like #include but has macro expansion in the double-quote delimited string.
  - Use of tied notes in subinstr fixed.
  - Nesting macro calls more than about 10 caused a crash; now unlimited nesting works.
  - Runtime error message now (usually) include a line number and a file/macro trace.
  - Multiple assignments such as ka, kb = 1,2 are again supported by the parser; it had inadvertently got lost.
  - The problematic use of i() with an array element directy is now flagged as an error.
  - If an included file name has a "/" in it then any nested include is relative to that directory. (Issue #973).
  - Redefinition of UDOs with zero output arguments fixed.
  - A very obscure bug in running sub-instruments, which has been in the code for nearly a year, was fixed.

- Score:

  - New preprocessor option #includestr. This is like #include but has macro expansion in the double-quote delimited string.
  - 'd' score opcode for real-time performance. This was issue #966.
  - Bug in np operation fixed.
  - Use of [] syntax in a score could lead to a loss of precision for numbers over about 1 million; older version restored.
  - Nesting macro calls more than about 10 caused a crash; now unlimited nesting works.
  - The forms for delayed ending of sections (e 5 or s 5) now work with fractional delays; previously only read the integer part.
  - If an included file name has a "/" in it then any nested include is relative to that directory. (Issue #973).

- Modified Opcodes and Gens:

  - Add optional argument to ftom for rounding answer to integer.
  - flooper2 and syncgrain etc now allow resampling.
  - chnclear can now take a list of channels to clear instead of just one.
  - printf and printf_i now are like the manual: all arguments beyond the format and trigger are optional.
  - prints and printks can take string arguments printed with %s.
  - GEN2 can now take a size of zero, which is interpreted as size sufficient for the number of values provided.
  - faustcompile now includes a new optional parameter to allow it to be run in a blocking mode. Defaults (as before) to non-blocking.
  - fillarray can be run at k-rate if any of the argument/values are k-rate.
  - slicearray for other than i-rate arrays runs at k-rate only.
  - pvstrace now has the option also to return an array containing the bin numbers.

- Utilities:

  - A coding error in mixer was fixed. It was very broken.

- Bugs Fixed:

  - A typo in p5glove meant that the command to read the button status as a bitmap only returned state of button A.
  - diskin to array fixed and also use with small ksmps.
  - In loscil it sometimes failed to deal with the ibas argument; this has now been reworked to be correct.
  - madsr could overflow an internal counter when given a negative p3.
  - Fixed mapping from threads to lua_States (issue #959).
  - The time calculation in flooper2, flooper, and syncgrain was corrected.
  - Resampling and pitch fixed in pvstanal
  - Rare buffer overflow case in faust opcodes fixed.
  - pvsftw had an incorrect check for fft format which led to incorrect claim of bad format; fixed.
  - If ksmps was 1 the opcode linenr at arate failed to work; fixed.
  - window opcode fixed.
  - The test for compatible subtypes of f-values in a number of pvs opcodes was wrong, causing spurious error messages.
  - cosseg was broken for more than one segment; now OK.
  - monitor opcode did not work correctly when using multiple processes; fixed.
  - in the linenr opcode if the release stage was entered before the end of the rise the output value jumped to the end value and then decayed, causing a glitch. This is fixed. (#1048)

- System Changes:

  - The various -zN options now reports the number of opcodes for the request, so differs with respect to deprecated and polymorphic opcodes.
  - Recompilation of named instruments totally reworked to avoid errors and memory leaks.
  - The allocation of instrument names to internal numbers has been rewritten and should now be usable with replacements in live coding.
  - Printing the number allocated to a named instrument now behaves the manual, not just for debug.
  - If liblo version 0.29 is available csound can be built to use it (with a compiler flag LIBLO29) and this fixes some bugs related to heavy/complex use of OSClisten. Unfortunately the older 0.28 version is being distributed by some Linux distros.
  - The orchestra compiler has a number of new optimisations, avoiding unnecessary assignments and doing some more expression optimisations.

- API:

  - csound->ReadScore was changed so it behaves the same as a score in a csd or sco file. This could incorrectly give an infinite score or not in unexpected cases.

- Platform Specific:

  - Bela: allow analog in and out with different channel numbers.

### Release Notes for Csound 6.11 (2018 May)

There has been a great amount of internal reorganisation, which should not affect most users. Some components are now independently managed and will eventually be installable via a new package manager. The realtime option is now considered stable and has the "experimental" tag removed. Special support for the Bela platform has been introduced. There have been more steps towards completing the arithmetic operations involving a-arrays.

| Note
Note that changes to GEN01 and diskin2 may not be backward compatible if a non zero value is given for the format.

- New opcodes:

  - loscilphs, loscil3phs are like loscil but return the phase in addition to the audio.

  - More arithmetic between a-rate arrays and a-rate values; this completes the arithmetic where one or more argument is an audio array.

  - balance2 is like balance but scales the output at a-rate, rather than k-rate.

- Score:

  - Characters following a \ in a score string are treated as escaped, so \n is a newline rather than two characters. It handles escaped a, b, f, n, r, t and v. Other characters following a \ ignore the backslash.

- Modified Opcodes and Gens:

  - print, printk2 now take an additional optional argument which if non-zero causes the k-variable name to be printed as well as the value.
  - getrow, setrow, getcol, and setcol can now act on i-rate arrays.
  - diskin2 was incorrectly described in the manual with respect to the iformat parameter. Now if iformat is zero the file is expected to have an audio header; if in the range 1-10 (rather than 0-9 as before) then it is opened as raw with the specified sample format. THIS MAY BE INCOMPATIBLE. For most users the value of zero will be correct.
  - GEN01 now uses format 0 to get the file type from the header; any other value indicates a raw file. THIS MAY BE INCOMPATIBLE. For most users the value of zero will be correct.
  - GEN01 was incorrectly documented with respect to the format argument. There are 9 raw formats whereas the earlier manual stated 6.
  - Small change in slicearray should allow it to be used in functional form in most cases.
  - The family of opcodes tb0 to tb15 and their initialisation opcodes tb0_init to tb15_init are deprecated as multi-argument functions are allowed.
  - The mode filter now does not allow a frequency in the unstable region.
  - In scanu and xscanu the value of kpos is supposed to be in the range [0,1]. This is now enforced by treating all negative values as 0 and all values bigger than 1 as 1.

- Utilities:

  - src_conv is now available on Windows and MacOS.

- Frontends:

  - Belacsound: a new frontend specific for the Bela platform is introduced in this version.

- Bugs Fixed:

  - linen was reworked to allow for long durations and overlaps.
  - Resetting csound caused a crash if Lua opcodes were used; fixed.
  - The poscil family of opcodes could give incorrect results if used in multi-core orchestras AND another instrument changed the f-table. This is now corrected.
  - Use of out with an audio array did not check that the array dimension was not greater than the number of channels, which caused a crash. It is now checked and truncated if too large with a warning.
  - Bug in stereo versions of loscil introduced distortion; now fixed.
  - Fencepost error in phs fixed.
  - gen49 read deleted memory if the file was not found; fixed.
  - Loading of LADSPA plugins when relying on search paths was wrong and mangled the name; now fixed.

- System Changes:

  - OPCODE6DIR{64} now can contain a colon-separated list of directories.
  - The somewhat curious distinction between k-rate and a-rate perf-time has been removed throughput, so only threads 1, 2 and 3 are used, the s-type output is not used, and some x-type inputs have been changed for direct polymorphism. This only matters for opcode writers as the s, and x codes and threads 4, 5, 6 and 7 will be removed in a while.

- Translations:

  - As ever the French translations are complete.

- API:

  - No changes to the API.

- Platform Specific:

  - WebAudio: from this release onwards, the Csound port for the web platforms has been merged into a single package henceforth called 'WebAudio Csound'. There are many internal changes to this, the AudioWorklet interface is employed wherever supported, with a fallback to ScriptProcessorNode elsewhere. Csound is also available in the form of independent Nodes, in addition to the original CsoundObj API. The csound.js frontend, originally designed for PNaCl Csound, is also ported to WebAudio Csound, following the deprecation of that port of Csound.

### Release Notes for Csound 6.10 (2017 December)

This is mostly a bugfix release, including a major bug introduced in loscil recently. New and improved opcodes and a long orphaned GEN (53) are here, as well as many small internal improvements. Internal changes have removed a number of memory leaks.

- New opcodes:

  - midiout_i which is like midiout, but works at i-rate.
  - chngetks and chnsetks -- versions of chnget and chnset for string channels that only run at perf-time.
  - squinewave, a mostly bandlimited shape-shifting square-pulse-saw-sinewave oscillator with hardsync.

- New Gen and Macros:

  - GEN53 (which has been in the code but not documented for years) is now acknowledged. It creates a linear-phase or minimum-phase impulse response table from a source table containing a frequency response or an impulse response.

- Orchestra:

  - Incorrect use of k-rate if..then.. in instrument 0 is now treated as i-rate.
  - Incorrect use of k-rate operations in instrument 0 are no longer treated as an error but a warning.
  - In a csd file commented-out tags were acted upon in some cases, leading to truncated orchestras. This is now fixed.
  - Arrays can be assigned from i-rate and k-rate to krate and i-rate; previously rates had to match.
  - The use of ! as a Boolean operation (meaning negation) is now supported, where previously the parser accepted it but did not use it.
  - Constant folding now implemented on a wide range of arithmetic.
  - Attempts to use an undefined macro produce a syntax error now.
  - Missing " (or other terminator) in #include is noticed and the #include is ignored.

- Score:

  - In a csd file commented-out tags were acted upon in some cases, leading to truncated scores. This is now fixed.
  - The evaluation form [..] can now be nested.
  - The extract feature (-x from command line) now works.
  - Use of the score opcode x could cause spurious error messages which are now suppressed.
  - After calling a undefined macro the rest of the line is ignored.
  - A couple of bugs in repeated sections (r opcode) have been removed.
  - Missing " (or other terminator) in #include is noticed and the #include is ignored.

- Options:

  - The --tempo (and -t) option now can be fractional; was previously limited to an integer.
  - new option: --udp-console=address:port redirects console to a remote address:port.
  - new option: --udp-mirror-console=address:port mirrors the console to a remote address:port.
  - new option: --udp-echo echoes messages sent to the UDP server.

- Modified Opcodes and Gens:

  - loscil/loscil3 accept floating point increment.
  - OSCraw closes socket after use.
  - fout can now generate ogg format, as well as accepting -1 to mean the same format as -o uses.
  - bitwise and opcode (&) at a-rate corrected for sample-accurate mode.
  - slicearray has an optional additional argument to give a stride to the slice.
  - chnset now can have variable channel names.
  - a-rate arrays may be added, subtracted, multiplied and scaled. This is a start on a-rate array arithmetic.
  - dssiinit improved removing some crashes.
  - partials improved to remove a fencepost issue.
  - vco2ift fixed when an existing table is used.

- Frontends:

  - Emscripten: Now compiled as WebAssembly (runs in all major browsers). API now somewhat more conformed to other HTML5 APIs.
  - CsoundQT: Now built from master branch for improved stability.

- Bug fixed:

  - The optionality of the last argument in sc_phasor now works.
  - Freezing in dconv fixed.
  - looptseg no longer crashes if presented with too few arguments.
  - schedule etc now work correctly with double-quoted strings within {{ }} strings.
  - problem with CLI frontend interrupt handler fixed.
  - outs2 was broken (always wrote to channel 1 like outs1).
  - Various errors in the DSSI/ladspa system fixed.
  - vbap was broken in all cases except 4-speakers, now corrected.
  - Live evalution of Csound Orchestra code code could result in hard to diagnose, odd errors (e.g., crashes, division by zeros, NaNs). This was due to a bug in merging of newly found constants into the global constant pool.

- System Changes:

  - UDP Server now accepts some new commands, which are prefixed by an opcode. These include support for events (&) and scores ($); setting control channels (@ ); setting string channels (% ); getting control channel values via UDP (:@ ) and string channel contents (:% ).

- Translations:

  - As ever the French translations are complete.
  - The Italian translations of messages are greatly improved in scope; about a half of error and warning messages are now done.
  - Some progress as been made in German translations.

- API:

  - CompileCsdText now always returns a value indicating success/failure.
  - Eight new asynchronous versions of API functions now available: csoundCompileTreeAsync(), csoundCompileOrcAsync(), csoundReadScoreAsync(), csoundInputMessageAsync(), csoundScoreEventAsync(), csoundScoreEventAbsoluteAsync(), csoundTableCopyOutAsync(), and csoundTableCopyInAsync().
  - For server use, three new API functions: csoundUDPServerStart, csoundUDPServerStatus and csoundUDPServerClose.

- Platform Specific:

  - Windows

    - Now compiled with Microsoft Visual Studio 2017 or later.
    - Continuous integration for Windows with AppVeyor.

  - GNU/Linux

    - GNU/Linux ALSA MIDI backend now ignores some spurious ENOENT error codes.

### Release Notes for Csound 6.09 (2017 May)

A mixed bag of new opcodes and many fixes and improvements.

Also as usual there are a number of internal changes, including many memory leaks fixed and more robust code.

- New opcodes:

  - select -- sample-by-sample comparison of audio selecting the output.
  - midiarp -- generates arpeggios based on currently held MIDI notes.
  - hilbert2 -- a DFT-based implementation of a Hilbert transformer.
  - Ableton Link opcodes -- for synchronizing tempo and beat across local area networks.
  - pvstrace -- retain only the N loudest bins.
  - several new unary functions/opcodes for k-rate and i-time numeric arrays: ceil, floor, round, int, frac, powoftwo, abs, log2, log10, log, exp, sqrt, cos, sin, tan, acos, asin, atan, sinh, cosh, tanh, cbrt, limit1.
  - several new binary functions/opcodes for k-rate and i-time numeric arrays: atan2, pow, hypot, fmod, fmax, fmin.
  - limit -- numeric limiting within a given range (for arrays).
  - tvconv -- a time-varying convolution (FIR filter) opcode.
  - liveconv -- partitioned convolution with dynamically reloadable impulse response.
  - bpf, xyscale, ntom, mton -- (from SuperCollider?).
  - OSCsend -- now implemented directly using system sockets. Old version using liblo has been kept as OSCsend_lo.
  - OSCraw -- to listen for all OSC messages at a given port.
  - sorta and sortd-- sort elements of an array.
  - dot -- calculates the dot product of two arrays.
  - zero delay filters -- zdf_1pole_mode, zdf_2pole_mode, zdf_ladder, zdf_1pole and zdf_2pole, diode_ladder, K35_hpf and K35_lpf.
  - product -- takes a numeric array (k or i-rate) and calculates its product.
  - supercollider ugens -- sc_phasor, sc_lag, sc_lagud, sc_trig.

- Orchestra:

  - Including a directory of UDO files no longer fails if more than about 20 entries.
  - It was possible for kr, sr, and ksmps to be inconsistent in one case, no more.
  - Macro names better policed and bracket matching.
  - Octal values as \000 can be in strings.
  - (from 6.09.1) In a UDO the out* opcodes now work, where before it was working only sometimes.

- Score:

  - Improved line number reporting in r opcode and case with no macro implemented.
  - m and n opcodes fixed.
  - Expansion of [...] corrected and improved.
  - Strings in scores improved.
  - The ) character can be in a macro argument if it is escaped with \.
  - Use of the characters e or s could lead to errors; now fixed.
  - Macro names better policed, and bracket matching.
  - p2 and p3 are now at higher precision, no longer truncated to 6 decimal places.
  - new opcode d to switch off infinite notes (denote); same as i with negative p1.
  - named instruments can be turned off with i if a - follows the ".
  - (from 6.09.1) if an r-opcode section ended in e-opcode it used to stop early.

- Options:

  - jack midi module now can report available devices under --midi-devices.
  - (from 6.09.1) defining smacros and omacros on command line only happens once.
  - (from 6.09.1) defining smacros from command line now works.

- Modified Opcodes and Gens:

  - ftgentmp improved string arguments.
  - hdf5read opcode now reads entire data sets when dataset name string is suffixed with an asterisk.
  - use of non power-of-two lengths now acceptable where before it was inconsistent.
  - ampmidid optionally can be aware of 0dbfs.
  - dust and dust2 at k-rate now conform to the manual (NOTE: this is an incompatible change).
  - In prints the format %% now prints one %.
  - OSClisten can be used with no data outputs.
  - GEN18 corrected to write to requested range.
  - sockrev now can read strings.
  - vbap system can in some cases allow arbitrary number of speakers via arrays (work in progress).
  - Websocket server can only accept one protocol output, so limiting intype to just a single argument.
  - sum opcode will also sum elements of an array.
  - Overloaded pvs2tab and tab2pvs now can create and use split magnitude and phase arrays.

- Utilities:

  - dnoise fixed.

- Frontends:

  - Removed HTML5 Csound editor which has quit working.
  - Emscripten: Emscripten Csound (asm.js) now requires sourcing in CsoundObj.js and FileList.js separately from libcsound.js. This is to accommodate using the same JS API with either asm.js or wasm backends.
  - CsoundQT: CsoundQt 0.9.4 is announced: https://github.com/CsoundQt/CsoundQt/blob/develop/release_notes/Release notes 0.9.4.md.
  - Windows installer with CsoundQt includes PythonQt.

- Bugs Fixed:

  - pwd works on OSX.
  - Fencepost error in sensLine fixed.
  - OSCsend corrected for caching of host name.
  - Bug in push/pop opcodes fixed (this opcode is now a plugin and deprecated).
  - Bug in sprintf removed.
  - Bug in soundin removed.
  - losci/losci3 fixed in case of long tables.
  - inrg was broke for a while.
  - Partikkel channelmask panning laws had an indexing error, now fixed.
  - jack audio module now allows for independent numbers of in and out channels.
  - Bug in string copying fixed.
  - Bug in hdf5read where if two hdf5read opcodes were placed in series in an instrument, the argument names of the second opcode instance would be incorrect due to directly changing the last string character of the first when reading an entire dataset.
  - Memory leaks fixed in some plugin opcodes.

- System Changes:

  - soundin now uses the diskin2 code.
  - out family of opcodes reworked to reduce interleaving costs and to take proper regard if nchnls value.
  - (from 6.09.1) a crash on Linux i386 removed relating to server mode.

- API:

  - New csound_threaded.hpp header-only facility, obviating need for csPerfThread.cpp object in some projects.
  - Added GetA4 function.
  - New framework for plugin opcode development in C++ using Csound's allocator.
  - Added StrDup function.
  - Boost dependencies removed from Csound interfaces and CsoundAC.
  - (from 6.09.1) Two new API function, csoundSetSpinSample and csoundClearSpin.

- Platform Specific:

  - iOS

    - iPad portrait SplitView fix+animation, info popover resizing, stop button fix in Soundfile Pitch Shifter.
    - Csound-iOS API updates; Examples cleaned up, enhanced/expanded, and reordered. Manual revised, expanded, updated. Updates to API and examples support iOS 10 and Xcode 8.

  - Android

    - Multichannel input and output allowed.

  - Windows

    - csound64.lib import library added to Windows installer.

### Release Notes for Csound 6.08 (2016 November)

As usual there are a number of opcode fixes and improvements, but the major changes are in the language structures. First the score language has all-new treatment of macros and preprocessing, bringing it in line with those of the orchestra. The parsing of the orchestra has had a number of fixes as outlined below.

A major, and not totally compatible change as been made in reading and writing array elements. The rate of the index now often determines the time of processing; check the entry below under Orchestra. This simplifies much code and seems to capture expectations; the earlier ad hoc code had many anomalies.

Also as usual there are a number of new opcodes and internal fixes to memory leaks and more robust code.

- New opcodes:

  - dct: Discrete Cosine Transform of a sample array (type-II DCT).
  - getftargs: copy arguments of a gen to an S-variable.
  - mfb: implements a mel-frequency filterbank for an array of input magnitudes.

- New Gen and Macros:

  - quadbezier: generating Bezier curves in a table.

- Orchestra:

  - The character ¬ is now correctly treated as a variant of ~ for bitwise not.
  - Lexing bug which could corrupt strings fixed.
  - Ensure no newlines in string-lexing.
  - Small improvement in reported line numbers.
  - Better checking of macro syntax.
  - Improved parsing of setting of labels.
  - Added error handling for unmatched brackets for UDO arg specification.
  - Check that #included file is not a directory.
  - Deeply nested macro calls better policed.
  - For years Csound has fixed the pitch of A4 at 440Hz. Now this can be set in the header using the new r-variable A4, and also read with that variable.
  - Floating point values can use e or E for exponent.
  - Array access semantics have been clarified:
    - i[i] => reading at i-time and perf-time, writing at i-time only.
    - i[k] => reading at perf-time, writing yields a runtime error.
    - k[i], k[k] => reading at perf-time, writing at perf-time.
    - a[i], a[k] => reading at perf-time, writing at perf-time.
    - other (S[], f[]) => reading and writing according to index type (i,k).
    In particular, i(k[i]) will continue not to work, as before, but the new operator i(k[],i) is provided to cover this case.
  - xout validation no longer fails when constants are given.

- Score:

  - New code to handle macros and other preprocessor commands. Brings it into line with orchestra code.
  - New score opcode C introduced as a way of switching automatic carry off (C 0) or on (default) (C 1).

- Options:

  - The tempo setting can now be a floating point value (previously fixed to integer).
  - New option --version prints version information and exits.

- Modified Opcodes and Gens:

  - Problems in centroid fixed.
  - Better treatment of rounding in printks.
  - OSC extended to include multicast.
  - Faust opcodes brought up to date with faust.
  - oscil1 and oscili can take a negative duration.
  - fout opcode documentation clarified.
  - Release time in mxadsr fixed.
  - centroid opcode extended to take array inputs in addition.
  - ptable opcodes are now identical to table family.
  - ftgen now as array input option.
  - subinstr can now have string arguments.
  - the i() format is extended to work on k-rate arrays with the first argument being an array, followed by the indices.

- Utilities:

  - pvlook now always prints explicit analysis window name.

- Frontends:

  - HTML5
    - csound.node: Implemented for Linux, minor API fix.
    - pnacl: Added compileCsdText method to csound object.

- General Usage:

  - Checking of valid macro names improved.
  - #undef fixed.

- Bugs Fixed:

  - Fixes to prints in format use.
  - jitter2 reworked to make it more like the manual.
  - oscbank has had multiple fixes and now works as advertised.
  - bformdec1 with arrays and type 4 fixed.
  - Bug in pvsceps fixed.
  - In various formatted print opcodes extra trash characters might appear -- fixed.
  - Assigning variables with --sample-accurate could give unexpected results; this is believed fixed now.
  - padsynth square profile fix, and opcode prints less depending on warn level.
  - gen31 fixed.
  - gen41 fixed.
  - Bug in sensekey fixed.
  - A number of issues in centroid fixed.

- System changes:

  - New score lexing and preprocessor.
  - MAC line endings now work again.
  - System information messages (system sampling rate, etc) are now directed to stdout.
  - rtjack reworked to deal with names and numbers.
  - The version printing now includes the commit as so the developers know which patches have been applied.

- API:

  - API version now 4.0.
  - Now supports named gens.
  - fterror now in API.
  - API functions SetOutput and GetOutputFormat fixed.
  - Many API functions now use const where appropriate.
  - Messages can now be directed to stdout from the API by using CSOUNDMSG_STDOUT attribute.
  - New Lisp CFFI and FFI interfaces tested with Steel Bank Common Lisp (64 bit CPU architecture), runs in separate thread.
  - ctcsound.py, a new FFI interface for Python was introduced in version 6.07. It is now the recommanded interface for Python, csnd6.py being deprecated.

- Platform Specific:

  - Android.

    - Multichannel input and output allowed.

  - Windows.

    - csound64.lib import library added to Windows installer.

### Release Notes for Csound 6.07 (2016 March)

A large number of bug fixes, some quite major, some internal are included, as well as some new facilities and extensions. As ever there are coding improvements as well.

- New opcodes:

  - compress2: like compress but using a more normal use of dB (0.0 for full scale).
  - (Experimental, source code-only) New cuda opcodes: cudasynth2 and cudanal2.
  - directory opcode: reads a directory and outputs to a string array a list of file names.
  - ftsamplebank: to load a sample library from a directory.
  - mvclpf1, mvclpf2, mvclpf3, mvclpf4, mvchpf: Moog voltage-controlled filter emulations from Fons Andriaensen.
  - S() converter from k-rate and i-time number to a string.
  - cepsinv opcode to calculate the inverse cepstrum of an array.
  - moogladder2, is a faster, less accurate implementation of moogladder.
  - paulstretch opcode is a lightweight implementation of the PaulStretch time-stretching algorithm by Nasca Octavian Paul. It is ideal for timestretching a signal by very large amounts.
  - mp3scal implements phase-locked vocoder processing from mp3-format disk files, resampling if necessary.
  - filescal implements phase-locked vocoder processing from disk files, resampling if necessary.

- Orchestra:

  - The boolean ? .. : .. construction can now have string results, while previously it only allowed numbers.
  - The line number reported when an error is detected at the end of a line is now correct. Also more improvements in line numbers for complex syntax.
  - while loop improved/fixed.
  - Better and consistent reading of comments.
  - Continuation lines handled better, especially respecting line numbers.
  - opcode: S(.) syntax now allowed.

- Score:

  - The list of tempo points in score opcode t is now arbitrarily long.
  - A stupidity in r and { opcodes fixed.

- Options:

  - The -z option now suppresses deprecated opcodes, unless given a 2 or 3 argument.
  - The new option --fftlib controls which real fft library to use internally (FFTLIB = 0, PFFFT = 1, vDSP = 2)

- Modified Opcodes and Gens:

  - In OSC opcodes it is now possible to send and receive arrays, tables and audio.
  - Better diagnostic if diskin2 fails.
  - rezzy now checks for unstable filter and modifies to close stable version.
  - adsr rewritten so it gives an error if the segments are longer than p3.
  - Use of diskin to an array now resizes the output array if necessary.
  - chnget now checks for a change in channel name as well as data.
  - interp can take an optional extra argument to give an initial value.
  - oscilikts uses a more liberal table lookup.
  - opcode in can read mono or stereo, obviating the in/ins distinction.
  - sensekey rewritten to provide better diagnostics and fixes a minor bug.
  - Fix to a case of defining a macro with arguments.
  - sockrecv now works at a and k rate.
  - GEN49 now works from ftgen calls.
  - GEN34 liberalised in tables it accepts.
  - chnget now allows channel names to be changed at perf time.
  - iceps has been renamed cepsinv to avoid name clashes.
  - mp3 support improved in a number of minor ways.
  - A minor fix to allow a ladspa plugin to be re-loaded by the host.

- Frontends:

  - csdebugger:

    - Some memory issues fixed.

  - HTML5:

    - CsoundQT has its own notes at https://github.com/CsoundQt/CsoundQt/blob/develop/release_notes/Release%20Notes%200.9.2.1.md.

- General usage:

  - The multicore options somewhat improved.
  - When replacing instruments the new version inherits maxalloc and active flags.
  - Multicore code now works with midi instruments.
  - MIDI operations now available via a new rtmidi jack module (-+rtmidi=jack).

- Bugs fixed:

  - Fix to trigseq.
  - Major error in rezzy fixed.
  - p() fixed for high numbers of p-arguments.
  - p() now works from MIDI events.
  - The 31-bit random number generator could give a very short loop if seeded with zero; fixed.
  - Macros in .orc files now work.
  - A long-standing bug in display of graphs fixed.
  - Fixes to the envelope opcodes linen, expsegr, linsegr, cossegr, transegr, envlpx, including new warnings.
  - Many fixes in string opcodes (strsub, strcpy and others).
  - Fixed bugs in print formats (sprintf, printf, prints).
  - pvsmooth had a missing initialisation.
  - Array initialisation now robust.
  - Bug in copya2ftab fixed.
  - Fix in cudapvsanal (EXPERIMENTAL).
  - partikkel fix to subsample grain placement.
  - Opcodes that require an odd number of arguments are now properly checked.
  - pvswrite now takes proper notice of 0dbfs.
  - GEN34 now allowing non-power-of-two source tables.
  - strcat mended.
  - nstance mended.
  - fixed small issues in rtauhal module.
  - Windows installer for 64 bit CPU architecture now sets environment variables on system level as it should.
  - transeg at k-rate with itype non-zero had an initial delay if one cycle.
  - log function on arrays fixed.
  - Rescaling of named GENs fixed.
  - A fencepost error in reading ATS files believed fixed; it generated spurious errors about file finishing early.
  - Initialisation error in pvbandp fixed.
  - readfi string allocation fixed.

- System changes:

  - Extensive use made of in-memory files. Orc and sco are always thus, as are .csound6rc. This simplifies much internally.
  - Nested longjmps fixed which affected some API use.
  - If a non-existent .csd file is presented Csound no longer crashes.
  - The kcounter value is now consistently an unsigned 64bit value, allowing for long performances.

- API:

  - csoundCompileCsdText: New function to compile a CSD from a string of text.
  - The function call csound->GetKcounter(csound) now returns an unsigned 64 bit integer. Previously it returned a long which is unclear.
  - ctcsound.py is a new wrapper file to the Csound API for the Python language. It is a pure Python file using the FFI (Foreign Function Interface) module ctypes. It does not depend on Swig, and it works with Python2 and Python3 as well. It uses numpy for its data structures, numpy being the fundamental package for scientific computing with Python.

- Platform Specific:

  - Windows.

    - The Windows installer for Csound now contains all executables built for 64 bit CPU architecture.
    - The Windows installer for 64 bit CPU architecture now provides NW.js "out of the box." It runs all features of Csound, as well as all features of HTML5, in a browser-like runtime with JavaScript scripting, and includes a Csound editor implemented in HTML. The editor will run pieces either as .csd files with embedded <html> or as .html files calling the csound object, and includes JavaScript debugging.
    - A new simplified build system has been implemented in the csound/mingw64 directory for building Csound using the MSYS2/mingw64 toolchain.
    - Linking to pthreads and other libraries now static.
    - Some limited support for non-ASCII characters in file names.

  - OSX.

    - Installer fixed for link names for _csnd6 and _CsoundAC.

  - GNU/Linux.

    - date opcode more accurate.

### Release Notes for Csound 6.06 (2015 September)

A number of bug fixes, some quite major, are included, as well as some new facilities and extensions.

- New opcodes:

  - getseed reads the state of the PRN generator; opposite of seed opcode.
  - tabifd — Instantaneous Frequency Distribution, magnitude and phase analysis.
  - websocket — Read and write signals and arrays using a websocket connection.
  - framebuffer — Read audio signals into 1 dimensional k-rate arrays and vice-versa with a specified buffer size.
  - olabuffer — Sum overlapping frames of audio as k-rate arrays and read as an audio signal

- Orchestra:

  - Labels are allowed in instrument 0.

- Score:

  - Maximum string length in scores increased to 1024.

- Modified Opcodes and Gens:

  - diskin2 array version uses array size to give number of channels in raw file form.
  - diskin2 now has the kpitch parameter defaulting to 1 for simple use.
  - Vibrato f-table in wgflute and wgcar optional, defaulting to sine wave.
  - schedule now accept string arguments.
  - urandom now available on OSX platforms.
  - GEN18 had fencepost problem; largely rewritten.
  - In poscil family of opcodes it is possible to skip initialisation of phase.
  - svfilter now can skip initialisation.
  - When opening an input file nchncls_i is used rather than nchnls. This is a change that should have followed the existence of nchnls_i
  - rtjack module now reports the sampling rate.
  - The opcodes rfft, rifft, fft, fftinv, r2c and c2r now have i-rate array versions.
  - New optional threshhold parameter in opcodes tradsyn, sinsyn and resyn.
  - New thresholding option for partials.

- Utilities:

  - extract fixed.
  - src_conv improved and integrated with -U options.
  - fixes in atsa, and heti.

- Frontends:

  - pnacl:

    - Support for 48000 sample rate fixed.

  - csound~:

    - Changes to the threading system. String channel initialisation fixed. A number of other bugs were fixed.

  - Emscripten:

    - Csound Javascript object can now receive data from the outvalue opcode.

  - HTML5:

    - Integrate HTML, JavaScript, and other features of HTML5 with Csound, either by embedding a Web page as an <html> element in the CSD file for CsoundQt or Csound for Android, or by hosting Csound in the JavaScript context of a standalone Web browser (Emscripten, PNaCl) or embedded Web browser (csound.node).

- General usage:

  - Ill-formatted macros in the orchestra now trapped.

- Bugs fixed:

  - Use of Windows-style environments for INCDIR etc now works with device numbers.
  - vibrato opcode fixed.
  - Clicking in real-time sample accurate case fixed.
  - Copying of strings now correct; did confuse memory sometimes.
  - Bug in pvstanal fixed.
  - Rounding error in cpspch fixed.
  - Removed crash on recompiling a named instrument.
  - Fix interpolation bug in tablexkt.
  - Fix to plltrack when ksmps is 1.

- System changes:

  - The "error" message from STK plugin is now a warning.

- API:

  - Redefinition of opcodes and UDOs fixed.

- Platform Specific:

  - OSX.

    - csnd6.jar link installed in the correct location.
    - Java JNI linking issues solved.
    - fixed link name for libpng in libfltk_image.

### Release Notes for Csound 6.05 (2015 April)

As ever there are new facilities and numerous bug-fixes. A major part of this release is the removal of a number of memory leaks and over use of memory. Naturally these changes are all but invisible, just a smaller memory foot-print. Note that we track bugs and requests for enhancements via the github issues system, and these had a significant affect on this release.

- Opcodes :

  - The opcode sndload is now deprecated.

- New Gen and Macros:

  - Paul Octavian Nasca's padsynth algorithm implemented as a gen.

- Score:

  - Fixed string location calculation bug when processing score lines [fixes #443]

- Options:

  - A short-format copyright option is available, with a fixed number of well-known licences (CC, etc)
  - New command-line option to report MIDI devices in simple format
  - New command-line option to set ksmps

- Modified Opcodes and Gens:

  - adsynt handles amplitude changes better
  - sfont has better checking for corruptions
  - better checking in physical models for out-of-range frequencies
  - ftgenonce and others allows string parameters
  - gausstrig reworked and extended with new features
  - use of p() function no longer complains overrides the pcnt warning
  - fix to midirecv
  - OSCsend cleans up after use improved
  - fillarray is limited to 1 or 2 dimensional arrays; in fact it failed silently previously for 3D and higher.
  - oscbnk now works when the equaliser is used.
  - mp3in now works with both mono and stereo input files
  - flooper & flooper2 now allow stereo tables
  - Release phase of expsegr fixed
  - f-tables created by a large number of arguments could overwrite memory, now fixed
  - performance of plltrack improved
  - init of arrays clarified and checked
  - gen23 corrected to stop an infinite loop
  - alwayson now starts from score offset.
  - invalue now checks for output string size and reallocates memory if smaller than default string size (set at 256 bytes for backwards compatibility)

- Utilities:

  - The srconv utility has been improved but it does not work well, with groups of noise in otherwise good output. We recommend the use of Erik de Castro Lopo's Secret Rabbit Code (aka libsamplerate) as providing sample rate conversion at high quality. srconv will be removed shortly possibly to be replaced by an SRC-based utility.

- Frontends:

  - pnacl

    - Added interface to allow the use of Csound's MIDI input system.
    - Fixed audio input to conform to the latest Pepper API spec.

- Bugs fixed:

  - bugs in fastabi,oscktp, phasorbnk, adsr, xadsr, hrtfer fixed.
  - bugs in the harmon. harmon2, harmon3 and harmon4 fixed.
  - Csound could crash after a parsing error, a case now removed.

- System changes:

  - There are now checks that xin/xout types match those defined as part of UDO definition.
  - jack now has a timeout.

- Internal Changes:

  - Many defects indicated by coverity fixed or code changed. Should make csound more robust in edge cases.
  - Parser-related changes simplifies allocation of temporary variables, with some new optimisations.
  - code for multi-thread rendering improved and stablised vis-a-vis redefinition of instruments.

- Platform Specific:

  - iOS.

    - Fixed audio callback to work correctly with lightning output and Apple TV.

  - Android.

    - New experimental audio IO mode: csoundPerformKsmps() is called from the OpenSL ES output callback. This mode can be optionally enabled by passing a value of "false" to a new second parameter to the CsoundObj constructor (bool isAsync). The default constructor and the one-parameter sets this to "true" (keeping backwards compatibility with existing code).
    - The OSC opcodes are included in distribution.

    - Android app

      - There are new file open and save dialogs that permit the user to access the SD card on the device, if there is one, in addition to internal storage.
      - There is a new "Save as..." button that permits the user to save the csd as a new file with a new name.
      - Many of the examples in the archive of Android examples are now built into the app and can be run from the app's menu.
      - Includes now the exciter opcode.

  - OSX.

    - Installation now places csladspa.so rather than csladspa.dylib on disk.

  - Linux.

    - Linux is now build without FLTK threads. This removes system hangs and is in line with other builds.

### Release Notes for Csound 6.04 (2014 November)

This new version has many extensions and fixes; many new opcodes and significant numbers of internal reworking. There is a new frontend and iOS and Android version have seen many improvements.

As ever we track bugs and requests for enhancements via the github issues system. Already proposals for the next release are being made but the volume of changes require a release now.

- New opcodes:

  - pinker generates high quality pink noise.
  - power opcode ^ now works with array arguments.
  - exciter opcode, modelled on the calf plugin.
  - vactrol opcode simulates an analog envelope follower.
  - family of hdf5 opcodes to handle hdf5 format files.
  - (experimental undocumented) buchla opcode models the lowgate filter of Buchla.
  - New k-rate opcodes acting on arrays:
    - transforms: rfft, rifft, fft, fftinv
    - complex product: complxprod
    - polar - rectangular conversion: rect2pol, pol2rect, mags, phs
    - real - complex: r2c, c2r
    - windowing: window
    - cepstrum: pvscpes, iceps, ceps
    - column / row access: getrow, getcol, setrow, setcol
    - a-rate data - k-array copy: shiftin, shiftout
    - phase unwraping: unwrap

- New Gen and Macros:

  - Line numbers corrected in instr statements.
  - New control operation, while, for looping.
  - A long-standing bug with macros which use the same name for an argument has been corrected.
  - Redefinition of an instrument in a single call to compile is flagged as an error.
  - ID3 header skip for mp3 files now properly implemented.
  - Errors induced by not defining the location of STK's raw wave files has been removed.
  - bug fixed where UDO's could not read strings from pfields.

- Modified Opcodes and Gens:

  - stackops opcodes deprecated.
  - lenarray extended to handle multi-dimensional arrays.
  - ftgenonce accepts string arguments correctly and multiple string arguments.
  - max and min now have initialisation-time versions.
  - gen23 improved regarding comments and reporting problems.
  - in OSCsend the port is now a k-rate value.
  - socksend now works at k-rate.
  - a number of envelope-generating opcodes are now correct in sample-accurate mode.
  - faust compilation is now lock-protected.
  - mp3 fixed to allow reinit to be used with it.
  - In remote opcode the name of the network can be set via the environment variable CS_NETWORK. Defaults to en0 (OSX) or eth0.

- Frontends:

  - icsound: New frontend icsound is now ready for general use. icsound is a python interface for interactive work in the ipython notebook.
  - csdebugger: A number of changes and improvements have been made, like stepping through active instruments, better line number use.

- General usage:

  - Jack module now does not stop Csound if autoconnect fails.

- Bugs fixed:

  - atsinnoi fixed.
  - ftsavek fixed.
  - sprintf fixed.
  - gen27 fixed, especially with extended arguments, as well as fixed a number of errors in extended score arguments.
  - Physem opcodes (guiro cabasa, sekere) fixed so second call works.
  - flooper fixed in mode 2.
  - OSCsend multiple fixes.
  - UDO fix for case of local ksmps of 1.
  - More changes/fixes to dssi code.
  - xscanu and scanu fixed.
  - temposcal and mincer fixed.
  - crash in ftload fixed.

- System changes:

  - In server mode exit is now clean.
  - Fixes to rtalsa module.
  - Pulseaudio rt module fixes.
  - Fix to remove fluidEngine entries for csound instance (prevents crash on moduleDestroy).
  - Opcodes called through function calls that returned arrays did not correctly synthesize args as array types due to not converting the arg specifier to the internal format.
  - fixed crashing issue during note initialization for tied notes due to goto skipping over code.
  - fixed incorrect initialization of pfields when note's pfields length were less than instrument expected (off-by-one).

- Internal Changes:

  - Added Runtime Type Identification for instrument variables; removed use of XINCODE/XOUTCO.
  - fix malloc length in negative number parsing, and improved handling of negative numbers.
  - writing to circularBuffer is now atomic.
  - a number of memory leaks and potential dangerous code have been fixed.
  - type-inference has been extensively reworked, as have a few parsing areas.

- API:

  - Added API function for retrieving GEN parameters used for creating a table.

- Platform Specific:

  - iOS.

    - API Refactored for clearer method names and abstraction names (i.e. CsoundBinding instead of CsoundValueCacheable).
    - Updated to remove deprecated code.
    - A significant amount of reworking has been done on the code.

  - Android.

    - API Refactored for clearer method names and abstraction names (i.e. CsoundBinding instead of CsoundValueCacheable).
    - Changes to enable HTML 5 with JavaScript and it is to be hoped WebGL in the Csound6 Android app.
    - Enabled change of screen orientation in the Csound6 app without forcing a restart of the app.
    - Enabled local storage (useful for saving and restoring widget values, etc.).

  - Windows.

    - fixed pointer arithmetic that caused crashing on Windows.
    - pyexec changed to use python's file opening functions to prevent crash on Windows.

  - OSX.

    - CsoundAC now compiles.

  - Linux.

    - threadlocks bug fix on linux.

### Release Notes for Csound 6.03 (2014 May)

This new version has a large number of bug fixes (including clearing many tickets on SourceForge and GitHub) as well internal changes to improve performance.

- New opcodes:

  - prinks2: prints a new value every time a control variable changes using a printf() style syntax
  - mp3sr, mp3bitrate, and mp3nchnls to get information on mp3 files
  - EXPERIMENTAL: CUDA opcodes for partitioned convolution direct convolution and sliding phase vocoding; OpenCL opcode for additive synthesis
  - compilecsd to compile instruments from a standard CSD file

- Orchestra:

  - The argument for i() is supposed to be a variable not an expression. This is now enforced. (bug #90)

- Score:

  - New score opcode y sets the random seed (for ~) at read time

- Options:

  - There was a bug in CsOptions; the last argument was missed being read(issue #296)
  - As command-line options expression-opt and no-expression-opt do nothing in Csound6 a warning is printed

- Modified Opcodes and Gens:

  - For ogg output it is possible to specify a VBR (variable block rate) quality.
  - dssi4cs code has been extensively reworked to avoid potential memory faults.
  - Many array operations now available for i-arrays as well as k-arrays.
  - fillarray will work for string arrays
  - Displays of FFT (via dispfft) improved with scaling/zooming options
  - Signal flow graph opcodes are now working with a-rate array signals.
  - In alsa RT code the sample rate is taken from the device
  - Faust opcode system updated to latest faust API

- Utilities:

  - fixed bug in lpanal

- csound~:

  - OSX - fix for running with 32-bit cpu architecture
  - Windows - csound~ now available for Windows

- Emscripten:

  - This is now generally merged into the code-base

- General usage:

  - --displays now switches graphs on, as expected
  - New commandline option --get-system-sr added to obtain the machine's sample rate
  - New command-line option --devices[=in|out] gives a list of available audio devices and then exit

- Bug fixes:

  - fixed the bug when tables were replaced but the size did not change
  - A number of bugs in --sample-accurate have been detected and fixed. This includes opcodes out, outn, and line
  - A number of bugs in grain3 were fixed
  - Bug in str_chanel could cause a crash; fixed
  - Small bug in rtjack fixed
  - Error in resize opcode corrected
  - Fixed an unlikely bug in atsa
  - Fixed rtauhal pause issue
  - A number of bugs/untidiness fixed in GEN23
  - Array bound checks fixed
  - strings channels were not correctly set for dynamic-size strings, now fixed
  - memory allocation for string formatting in printfsk was fixed, stopping string truncation
  - strcat safe against overflow
  - error in compilation of arrays fixed (issue #293)
  - GetPvsChannel fixed against a crash

- System Changes:

  - turnoff opcode now checks that the instrument being affected is active
  - lenarray can accept any array type
  - the way of rounding a table number to an integer was changed and is now more as expected
  - there is a new possible section in a csd file called <CsFile...> which is like csFileB but with unencoded text.
  - UDO compilation now uses the type system. This means that UDOs now allow any array type to be used
  - Improved orchestra parsing speeds with better algorithms

- Internal Changes:

  - The whole system has been checked by the Coverity static checker which identified a number of (mainly minor) problems. These have been reviewed and checked. In particular better use of printing and string copying should prevent overflows
  - The type and variable system has been extensively rewritten; this allows better array and UDO support
  - Alignment of variables got right in all cases
  - Array copying is now using the type system to copy values; fixes issues with copying string arrays, f-sigs, etc
  - Always reset Csound when stopping to ensure state is clean; was not being reset when there was a compile error, so that next successful run would start with an invalid Csound engine (issue #305)

- API:

  - All opcodes etc now use the API memory allocation operations, so it is possible to replace the whole memory allocator
  - Added csoundCompileCsd to API and associated new compilecsd opcode
  - Protected csoundGetStringChannel against null and short strings and added a check for string size
  - A number of API functions have had char* changed to const char* which reflect the usage

  The performance engine now includes debugging capabilities to allow interrupting rendering and providing introspection into the engine's state and instrument variables. The following new functions are available by including the csdebug.h header:

      void csoundDebuggerInit (CSOUND *csound);
      void csoundDebuggerClean (CSOUND *csound);
      void csoundSetInstrumentBreakpoint (CSOUND *csound, MYFLT instr, int skip);
      void csoundRemoveInstrumentBreakpoint (CSOUND *csound, MYFLT instr);
      void csoundClearBreakpoints (CSOUND *csound);
      void csoundSetBreakpointCallback (CSOUND *csound, breakpoint_cb_t bkpt_cb, void *userdata);
      void csoundDebugContinue (CSOUND *csound);
      void csoundDebugStop (CSOUND *csound);
      debug_instr_t *csoundDebugGetInstrInstances(CSOUND *csound);
      void csoundDebugFreeInstrInstances(CSOUND *csound, debug_instr_t *instr);
      debug_variable_t *csoundDebugGetVariables(CSOUND *csound, debug_instr_t *instr);
      void csoundDebugFreeVariables(CSOUND *csound, debug_variable_t *varHead);

- Windows:

  - Soundfonts in Windows had an internal alignement problem which is fixed

### Release Notes for Csound 6.02

This new version has a large number of bug fixes (including clearing all general tickets on SourceForge). It also introduces some major new facilities such as use as a server, code to run Csound in a browser and a large generalisation of filter opcodes to have parameters changeable at audio rate.

- New opcodes:

  - nstance opcode schedules a new instrument instance, storing the instance handle.
  - turnoff nw variant to stop a given instrument instance.
  - strfromurl to set a string from a URL.

- Orchestra:

  - If building supports it, a #include string can be a URL or a file.
  - A space is again permitted between a function name and the opening bracket for all functions allowed in Csound5 (but not in general).
  - The Csound command can start with an empty CSD in daemon mode (--daemon): do not exit if CSD/orchestra is not given, is empty or does not compile).

- Score:

  - If building supports it, a #include string can be a URL or a file.

- Modified Opcodes and Gens:

  - Many filters generalised to allow k- or a-rate parameters. In particular it includes these:

    areson | atonex
    butterworth filters | fofilter
    lowres | lowresx
    lpf18 | mode
    moogladder | moogvcf
    reson | resonr
    resonx | resonz
    statevar | tonex

  - The maximum number of presets in sfont increased to 16384.
  - cpsmidinn is now more accurate.
  - max_k now behaves like the documentation. There were cases when it gave strange results.
  - In alwayson opcode changes for better handling of pfields, more reliable insert of an instrument instance for repeating or re-started score sections.
  - The signal flow graph opcodes have replaced OpenMP multi-threading with pthreads, using one-time initialization of static structures.

- Frontends:

  - PNaCl is now supported as a platform, allowing Csound to run under the Chrome browser in all enabled operating systems.

- Bugs fixed:

  - adsynt2 opcode fixed.
  - ftgentmp opcode fixed.
  - dates opcode fixed.
  - fixed a bug in pvsfilter.
  - fixed stereo out in temposcal and mincer.
  - pan2 opcode fixed.
  - index overflow in randh and randi fixed.
  - fixed pycalln for no inputs.
  - fixed/revised setting and use of ksmps and kr in UDOs.
  - fixed problem in sending a score event from max to csound via csound~ (Ticket #58).
  - If itype in chn_k was set to 3 and values are set less than 1, Csound6 used to give an INIT Error. (Ticket #67).
  - A number of reported seg faults have been dealt with.
  - xtratim opcode was using incorrect ekr value from csound instead of from instance; when used in conjunction with setksmps, was causing notes to have very long xtratim set and thus notes were effectively not getting turned off

- System changes:

  - A server mode is now available, accepting input via UDP (with --port option).
  - A longstanding bug in extract was detected and fixed. It does suggest that this facility is little used!
  - The way the external score generator was coded is substantially changed. In particular this should fix a very strange bug in Windows.
  - Fixed crashing bug with invalue channel callback due to wrong data object being pulled from csound host data.
  - Fixed bug in UDOs with no local ksmps where kcounter was being used incorrectly.
  - Better checking in channels.
  - (Experimental) If the environment variable CS_UDO_DIR is set then any files in the directory that have an .udo extension are automatically included at the start of the orchestra. This facility needs review to see if it is what is required.
  - (Experimental) There are new cuda GPGPU opcodes (source only): cudasynth (3 versions for additive synthesis, additive synthesis of fsigs and phase vocoder resynthesis) and cudanal (a GPGPU version of pvsanal).

- Internal changes:

  - Many attempts at faster code.
  - Type inference and parsing still improving.

- iOS:

  - Fixed crash where no csoundSetHostImplementedMIDIIO is used on iOS and no _RTMIDI value is set.

- OSX:

  - Fixed input device name for auhal.

### Release Notes for Csound6

Csound6 is a significant rewrite of much of the code. In particular the API is not compatible, although all orc/sco/csd works should still run.

There are new facilities, like sample accuracy and realtime mode, described below.

IMPORTANT: The environment variable to find plugins are called OPCODE6DIR64 or OPCODE6DIR (note the 6) so it can co-exist with Csound5.

Similarly .csoundrc is renamed .csound6rc.

Arrays are now mainstream, with syntax and opcode support. They also exist in multidimensional format. They are created (usually) with init opcode or fillarray.

      k1[]  init 4

generates a k-rate 1-D array of length 4. Similarly

      a2[][] init 4, 4

creates a square 4x4 a-rate array.

      k2[]  fillarray 1, 2, 3, 4

creates a 4-element vector filled with 1,..4, which also defines the length.

Elements are used via indexing in [] such as k1[2] or a2[2][3]. One dimensional arrays replace tvars, and can be used in opcodes like maxtab, mintab and sumtab (see below). Array setting can be done in left-hand side of opcodes, i.e.:

      aSigs[0] vco2 .1, 440
      aSigs[1] vco2 .1, 880

The new realtime priority mode can be switched on with by passing the --realtime or setting the CSOUND_PARAMS field realtime_mode to 1. This has the following effects:

1. all opcode audio file reading/writing is handled asynchronously by a separate thread.
2. all init-pass operations are also performed asynchronously.

Multicore support is totally rewritten using a different algorithm for task-dispatch, which should use less memory and fewer locks.

- New opcodes:

  - faustgen
  - array -- many new or revised opcodes -- see Array Opcodes.
  - compileorc takes a filename containing a collection of instrument definitions and compiles them, replacing existing versions. It returns 0 on success.
  - compilestr is like compileorc but takes a string.
  - readscore runs the score preprocessor on a string and then schedules new events via the RT event mechanism, returning 0 if successful.

- Orchestra

  - Note events can start and end in mid-kcycle. As this is an incompatible change it is only invoked when the command-line option --sample-accurate is specified. Note that this does not work for tied notes, and use of skipping initialisation has questionable use.
  - Instruments can run at local ksmps values using `setksmps iksmps` as in Csound 5 UDOs.
  - Compilation can be done at any stage, new instruments are added or replace old ones. Running instances of old instrument definitions are not affected. Only limitation is that header constants in instr 0 are read only once at the time of the first compilation. Init-time code can be placed outside instruments in the global space, and this will be executed once-only following the compilation. In this case, score event generation can be completely replaced by orchestra code. See also new opcodes compileorc and compilestr.
  - New syntax operators +=, -=, *= and /=. These are more than syntactic sugar; please use += and -= for accumulating reverbs as it gives better multicore behaviour.
  - The opcodes add, sub, mul and div have been deleted; use the forms + - * /. Not many people were aware of these opcodes.
  - Any opcode with a single output or with no outputs can be used as a function. Some opcodes might require type annotation to resolve ambiguities, more details on the Function syntax in Csound 6.
  - A statement can be broken across lines after a , = or arithmetic operation.
  - There are a range of new or recoded operations on k-valued arrays, most restricted to 1 dimensional arrays (vectors):

         kans minarray ktab       returns the smallest value in the
                                  (possibly) multidimensional array
         kans maxarray ktab       is like mintab
         kabs sumarray ktab       returns sum of all values in the array
         ktab genarray imin, imax[, inc]
                                  generates vector of values from imin
                                  to imax by increments of inc (default 1)
         ktab2 maparray ktab1, "sin" maps the k-rate 1-arg function in
                                  the string to every element of the vector
         ktab2 maparray_i ktab1, "sin" maps the i-rate 1-arg function
                                  in the string to every element of the vector
         ktab2 slicearray ktab1, istart, iend
                                  returns a slice of ktab1 from ktab1[istart]
                                  to ktab1[iend]
         copyf2array ktab, kfn    copies data from an ftable to a vector
         copya2ftab  ktab, kfn    copies data from a vector to an ftable

    Arithmetic on arrays is allowed. In particular addition, subtraction, multiplication, division on a element-by-element version is provided in arithmetic format. Similar operations between an array and a scalar are allowed.
  - Each instance of any instrument has a scratchpad of 4 values that persist; allows values to carry to next use of the instrument; hope it may be useful in legato etc.
  - If a table number is given as -1 then an internal sine wave equivalent to `f. 0 16382 10 1` is used. Attempts to write to this table will give unpredictable results, but is not policed. The 16382 can be change by command line option --sine-size=# where the # is rounded up to a power of two.
  - A number of oscil opcodes now have the f-table parameter as optional, defaulting to the internal sine wave. (oscil1, oscil1i, oscil, oscil3, oscili, foscil, foscil1, loscil, loscil3).

- Score:

  - Score lines can have multiple strings.
  - Change to escape characters in score strings -- they do not happen.
  - Also note the readscore opcode.

- Modified Opcodes and Gens:

  - The k() function can take an a-rate argument in which case it is a call to downsamp.

- Utilities

  - Hetro/adsyn analysis files can be machine byte-order independent if created with -X. Down side is a longer file and a little slower loading. The het_export utility will create the independent format from the old, and het_import is no longer necessary.
  - cvanal and lpanal will produce machine independent files if -X option is used. The convolve and lpread etc opcodes will accept either format. You are encouraged to use the machine independent form. Analysis files produced with -X can be used on other systems.

- Frontends

- Bugs fixed:

- System Changes:

  - In Linux and OSX the treatment of locales is now thread-safe and local.

- Platform Changes:

- API:

  New API functions...

  - new configuration/parameter setting functions

                PUBLIC int csoundSetOption(CSOUND *csound, char *option);
                PUBLIC void csoundSetParams(CSOUND *csound, CSOUND_PARAMS *p);
                PUBLIC void csoundGetParams(CSOUND *csound, CSOUND_PARAMS *p);
                PUBLIC void csoundSetOutput(CSOUND *csound, char *name, char *type,
                                            char *format);
                PUBLIC void csoundSetInput(CSOUND *csound, char *name);
                PUBLIC void csoundSetMIDIInput(CSOUND *csound, char *name);
                PUBLIC void csoundSetMIDIFileInput(CSOUND *csound, char *name);
                PUBLIC void csoundSetMIDIOutput(CSOUND *csound, char *name);
                PUBLIC void csoundSetMIDIFileOutput(CSOUND *csound, char *name);

  - new parsing/compilation functions

                PUBLIC TREE *csoundParseOrc(CSOUND *csound, char *str);
                PUBLIC int csoundCompileTree(CSOUND *csound, TREE *root);
                PUBLIC int csoundCompileOrc(CSOUND *csound, const char *str);
                PUBLIC int csoundReadScore(CSOUND *csound, char *str);
                PUBLIC int csoundCompileArgs(CSOUND *, int argc, char **argv);

  - new function for starting csound after first compilation

                PUBLIC int csoundStart(CSOUND *csound);

  - new software bus threadsafe getters/setters

                PUBLIC MYFLT csoundGetControlChannel(CSOUND *csound, const char *name);
                PUBLIC void csoundSetControlChannel(CSOUND *csound, const char *name, MYFLT val);
                PUBLIC void csoundGetAudioChannel(CSOUND *csound, const char *name, MYFLT *samples);
                PUBLIC void csoundSetAudioChannel(CSOUND *csound, const char *name, MYFLT *samples);
                PUBLIC void csoundSetStringChannel(CSOUND *csound, const char *name, char *string);
                PUBLIC void csoundGetStringChannel(CSOUND *csound, const char  *name, char *string);

  - new table threadsafe copy functions

                PUBLIC void csoundTableCopyOut(CSOUND *csound, int table, MYFLT *dest);
                PUBLIC void csoundTableCopyIn(CSOUND *csound, int table, MYFLT *src);

  API has been made threadsafe so that performance and control can occur in separate threads (after a call to csoundStart() or csoundCompile()). Threadsafety is ensure by

  1. use of atomic read/writing to control channels
  2. spinlocks in audio and string channels
  3. mutexes protecting compilation, score events and table access.

- Internal:

  - The build system is now cmake (and not scons as in Csound5).
  - A number of table access opcodes have been rewritten but should behave the same. Similarly diskin and diskin2 now use the same code and so diskin should be more stable.
  - The old parser is completely removed.

- New internal functions in Csound

          void (*FlushCircularBuffer)(CSOUND *, void *);
          void *(*FileOpenAsync)(CSOUND *, void *, int, const char *, void *,
                                 const char *, int, int, int);
          unsigned int (*ReadAsync)(CSOUND *, void *, MYFLT *, int);
          unsigned int (*WriteAsync)(CSOUND *, void *, MYFLT *, int);
          int  (*FSeekAsync)(CSOUND *, void *, int, int);
          char *(*GetString)(CSOUND *, MYFLT);
                   Extract a string originating from a score-event argument.

- Functions removed

          void *(*FileOpen)(CSOUND *, void*, int, const char*, void*, const char*);

- The "private" parts of the API have been changed considerably. Also structures like EVTBLK have changed.

- The LINKAGE1/FLINKAGE1 macros are renamed as LINKAGE_BUILTIN/FLINKAGE_BUILTIN.

- Template for a-rate perf-pass opcodes is

      int perf_myopcode(CSOUND *csound, MYOPCODE *p)
      {
          uint32_t offset = p->h.insdshead->ksmps_offset;
          uint32_t early  = p->h.insdshead->ksmps_no_end;
          uint32_t nsmps = CS_KSMPS;
          ...
          if (UNLIKELY(offset)) memset(p->res, '\0', offset*sizeof(MYFLT));
          if (UNLIKELY(early))  {
            nsmps -= early;
            memset(&p->res[nsmps], '\0', early*sizeof(MYFLT));
          }
          for (n=offset; n<nsmps; n++) {
              .....
              p->res[n] = ....
          }
          return OK;
      }

- String variables re-implemented

- OENTRY structure has changed and has a new dependency field; please use this field as it is required for multicore semantics. You could set it to -1 and disallow all parallelism, but at least it is safe.

- All opcodes that touch audio should take note of sample-accurate code.

- A number of previous API functions are removed; OpenFile and OpenFile2 both replaced by new OpenFile2 with additional argument.

- Additions have been made for arg type specifications for opcodes.

  - Any-types have been added, as follows:
    - '.' signifies a required arg of any-type
    - '?' signifies an optional arg of any-type
    - '*' signifies a var-arg list of any-type
  - Arrays are now specified using "[x]" where x is a type-specifier. The type-specifier can be any of the of the current specifiers, including any-types. See Opcodes/arrays.c for example usage.

- New Type System

  A new type system has been added to Csound6, and significant changes have been made to the compiler. The previous system for handling types involved depending on the first-letter of a variable's name every time it was used to determine type. This meant there was a lot of re-checking of types. Also, adding new types was difficult, as there was a lot of custom code that had to be updated to check for new type letters.

  In Csound6, a separate system of types was added. Types are defined as CS_TYPE's. The creation of variables from types and the initialisation of memory has been encapsulated within the CS_TYPE's. This change allows easier addition of new types, as well as generic calculations of memory pools, amongst other things.

  The compiler has been modified since Csound5 to now use the type system as an integral part of its semantic checking phase. Variables are now registered into a CS_VAR_POOL when they are first defined, with the CS_VARIABLE having a reference to its CS_TYPE. After first time definition within the pool, the type information is then looked up in consequent variable lookups, rather than re-calculated from the variable name. This opens up possibilities for new variable naming and typing strategies, i.e. using "myVar:K" to denote a k-rate arg. This also opens up possibilities for user-defined types, such as "data myType kval, aval", then using "myVar:myType" to define a var of that type. (The previous is speculative, and is not an active proposal at this time.)

  The addition of the type system has formalised the static type system that has existed in Csound prior to Csound6. It has, arguably, simplified the code-base in terms of type handling, as well as laid the ground work for future type-related research to be integrated into Csound.

### New in Version 5.19 (2013 January 7)

This is mainly a bug-fixing release but with a number of new opcodes and enhanced features.

- New opcodes:

  - ipmidi module for MIDI over network.

  - ppltrack opcode.

  - combinv opcode.

- New Gen and Macros:

  - Better checking in GEN28.
  - Check range in outrg, and optionally allow wrapping.

- Orchestra:

  - Change empty statement to a warning.
  - Added line numbers to many input args message (new parser).

- Modified Opcodes and GENs:

  - Better error and warning messages.
  - loopseg now checks argument count.
  - harmon2/3/4 improved.
  - active: added the option to skip the instances in release phase.
  - New and more tested implementation of ChordSpace.

- Bug fixed:

  - Fix botched optimisation in lowpass filters.
  - Chn opcodes fixed in Linux.
  - Fix bug in loscil with silence.
  - Correct GEN23 when comment does not end in newline.
  - Correcting loopseg.
  - Number of input and output channels fixed in new parser.
  - Fixed GEN43 issue.
  - Fixed fout.
  - centroid was likely to crash.
  - Minor bug in printing which lost %.
  - An uninitialised value in fold fixed.
  - Uninitalised values in dconv fixed.
  - Assignment of fsigs now works.

- System Changes:

  - Avoid seg fault on some user errors.
  - Faster modal4 opcodes.
  - Allow cabbage compilation.
  - Made pfield size dynamic in event message csoundapi~.
  - The default output format with pipe and double float is AU.
  - Change to ircam with default format, '-o stdout' and pipe.
  - Added double float precision for output format.

- Platform Changes:

  - Linux:

    - Spinlocks initialised (fixes bug in chn opcodes).

  - OSX:

    - Improved selection of devices in rtauhal module.
    - Added a circular buffer interface and lock-free operation to rtauhal.
    - Fixed MacOSX installer (creating symlinks to lib_csnd.dylib).

  - Haiku:

    - New platform

  - Android:

    - Using -B now in android to set circular buffer size.
    - Added fluid synth opcodes for android.
    - Added inputMessage method to CsoundObj.
    - Allow CSDPlayer to be installed on SD Card.

  - iOS:

    - Improved audio routing.
    - Bottom speaker the default for iOS.

- API:

  - Added new API function csoundCompileFromStrings().

### New in Version 5.18 (2012 August 29)

This is mainly a bug-fixing release but with a number of new opcodes and enhanced features.

- New opcodes:

  - centroid opcode like pvscent but acting on audio signals
  - cosseg like linseg but with cosine interpolation
  - cossegb like linsegb but with cosine interpolation
  - cossegr like linsegr but with cosine interpolation
  - joystick to read input values from an external joystick (Linux only)
  - log2 function for logarithms base 2
  - platerev opcode to model a reverberating square plate
  - pwd opcode to determine the current working directory
  - readf opcode to read strings from a file
  - readfi opcode to read strings from a file on initialisation
  - vbap opcode like other vbap family but flexible about number of speakers and choice of layouts.
  - vbapg opcode like vbap but only calculate the gains on the channels.

- New functionality

  - Changes to <CsOptions> to allow spaces between words, and escaped characters.
  - fout and fin use a better buffering strategy, and so are faster
  - It is possible to specify just an orchestra with the --orc flag. This is useful when a score is not needed.
  - A new command-line flag --ogg flag has been added for easy use of ogg/vorbis output.
  - Added alsaseq real-time midi

- Bug fixes and improvements:

  - dates opcode could crash on 64bit architecture; this is fixed
  - Some multicore interlocks were wrong. It is believed that this was not actually a problem, but would be in the future.
  - There were cases when a file was double closed, leading to a crash on exit.
  - Two new features added in partikkel. Panning law for channelmasks can now be set using a function table (second optional argument to partikkel) and new support opcodes partikkelget and partikkelset, to access and modify the internal mask indices of partikkel.
  - follow2 was reworked do the i-rate and k-rate calculations are the same.
  - pvscent is corrected as it returned half the correct value.
  - vbaplsinit can create more than one speaker layout which vbap/vbapg can use. Also much better diagnostics on incorrect layouts.

- Internal Changes:

  - Code changed so bison 2.6 can be used.
  - It is assumed that libsndfile version 1.0.19 or later is available.
  - If the score is omitted a near-infinite wait is generated.

### New in Version 5.17 (March 2012)

This is mainly a bug-fixing release with no major changes, but the number of fixes warrants a release.

- New opcodes:

  - cell opcode, for cellular automata

- Modified Opcodes and Gens:

  - active now will report total number of active or allocated instruments if argument in zero
  - stsend and strecv the TCP socket opcodes reworked to a logical design
  - DSSI system now will take up to 9 channels
  - FLsavesnap works with other widgets where imin > imax

- Utilities:

  - csbeats better documented and built by default; also more note lengths available
  - Some security holes in utilities fixed

- Bug fixes:

  - unirand opcode at a-rate fixed
  - Locale fix for floating point literals in orchestra
  - transegr fixed

- System Changes:

  - Score can now last longer (change to size of time variable)
  - An empty score gives a very long performance time (years and years)
  - Android code released
  - Changes to use of tmp files; now all are deleted at end of run (previously some were left) and the environment variable TMPDIR is used.
  - interaction between Comments, end of line and end of file fixed
  - Hexadecimal numbers now allowed in orchestra
  - Empty orchestra now not a crash
  - change to macro expansion inside a string
  - avoid infinite loop when eof in malformed score macro
  - fixed macroname-with-args diagnostics and memory leak
  - change to preprocessor: {{ }} inside "..." and better diagnostics
  - fix windows installer so it removes full $INSTDIR\bin from PATH during uninstall: this cleans up the PATH environment variable when uninstalling on Windows. Previously, it was leaving a trailing "\bin" on the PATH.
  - CsoundAC MusicModel class more usable by C++ programs
  - ftcps had been missed as a function

- Internal Changes:

  - Many! Some messages quietened, code improvements etc

### New in Version 5.16 (February 2012)

The major change is that the new parser is now the default. The old parser is still available in case of difficulty but the new has been given extensive testing since the start of the year, including complete restructuring of macro expansion. A side effect is that the runtime of most orchestras is faster, although parsing is slower. There are a few optimisations implemented like constant folding in simple cases. Line numbers and file names are traced better than before.

Some memory leaks also fixed.

- New opcodes:

  - Opcodes adapted from SuperCollider by Tito Latini: dust, dust2, gausstrig, gendy, gendyc, and gendyx.
  - Fractal noise generator by Tito Latini: fractalnoise.
  - Opcodes for accessing table values by direct indexing, by John ffitch: ptable, ptablei, ptable3, and ptablew. These opcodes are respectively like table, tablei, table3, and tablew, but they do not require a power-of-2 table size.

- Modified Opcodes and Gens:

  - There was a fence post problem in tab opcode that could falsely report a reference out of range.
  - GEN15 mis-called gens 13 and 14 internally, using uninitialised values voice amplitude. Problem fixed.
  - fmbell now takes an optional argument to control the sustain time.
  - Change to pvsbasic for tab to table conversions.
  - poscil is now polymorphic, allowing k- or a-rate amplitude and frequency.
  - p() and i() changed when argument at k-rate.
  - gen49 deferred now works.
  - gen23 now available deferred.

- Utilities:

  - Checked for use with the new parser in memory files.

- Frontends:

  - Table access added to csoundapi~ via new get/set methods.

- Bug fixes and improvements:

  - Many in new parser related to precedence and multicore.
  - Better diagnostics when orchestra file/csd is missing.
  - csd file: fix CsFileB and CsSampleB.
  - Fixed score statement 'n'.
  - Fixed bug in diskin2 leading to infinite loop.
  - Fixed bug causing crossfade noise in hrtfmove.
  - Fixed unlikely buffer overflows in some utilities.
  - Avoid segfault in midicN.
  - Bug in mp3in in skip=0 case fixed.
  - 'r' score statement fixed with respect to macros.
  - sndwarp could segfault.

- System Changes:

  - Preprocessor #if #else #endin working.
  - #includes depth now limited rather than infinite recursion.
  - Really turn off all displays if --nodisplays or -d is used; fixes bug where using -d or --nodisplays would still cause the winFLTK.c csoundModuleInit to setup display callbacks; bug caused with python TK apps and CsoundYield_FLTK being called.
  - Memory leak in mp3in and mp3len fixed.

- Internal Changes:

  - Very, very, very many! And the new parser...

### New in Version 5.15 (December 2011)

- New opcodes:

  - ftab2tab opcode.
  - tab2pvs opcode.
  - pvs2tab opcode.
  - cpumeter opcode, (not really new but now available in OSX)
  - minmax opcode.
  - (EXPERIMENTAL) ftresize opcode.
  - (EXPERIMENTAL) ftresizei opcode.
  - hrtfearly opcode.
  - hrtfreverb opcode.

  New Gen and Macros

  - Code to allow GEN49 to be deferred [NB does not seem to work]

- Modified Opcodes and Gens

  - socksend and sockrecv no longer uses MTFU check and work on Windows
  - mpulse changed so if next event is at negative time use the absolute value
  - serial opcode now runs on Windows as will as Un*x
  - out, out2, outq, outh, outo outx and out32 are now identical opcodes and will take up to as many arguments as nchnls. This replaces the current remapping of opcodes
  - turnoff2 now polymorphic wrt S and k types (ie accepts instrumnet names)

- Bugs fixed:

  - GEN42 fixed
  - jacko: fixed a segfault removing the unused JackSessionID option
  - doppler memory leak fixed
  - transegr fixed in release mode when skipping most of envelope
  - FLPack now agrees with manual
  - max_k now agrees with manual
  - hrtfreverb fixed
  - atsa code now works on Windows in more cases
  - tabmorph bug fixed
  - fixed problem with user-defined opcodes having no outputs
  - Various fixes to * ... */ comments

- System Changes:

  - Various licence issues sorted
  - Loris is no longer part of the Csound tree
  - Memory leaks fixed
  - If no score is given a dummy that runs for over 100 years is created
  - All score processing takes place in memory without temporary files
  - String memory now expandable and no size limitation
  - #if #else #end now in new parser
  - Adjustments to MIDI file precision in output
  - On OSX move from Coreaudio to AuHAL
  - Multicore now safe for ZAK, Channels and modifying tables
  - New coremidi module
  - Virtual Keyboard improved: 1) Dropdown for choosing base octave (the one that starts with the virtual key mapped to physical key Z). Default value is 5 which is backwards compatible. 2) Shift-X mappings which add two octaves to X mappings for a total of 4 octaves playable from the physical keyboard (starting from selected base octave). 3) Control-N / Control-Shift-N mappings to increment / decrement slider for control N. 4) Mouse wheel now controls sliders.
  - tsig type for vectors
  - tsigs and fsigs allowed as arguments in UDOs
  - API: Minor version upped

- Internal Changes:

  - Very, very, very many!

### New in Version 5.14 (October 2011)

- New opcodes:

  - mp3len opcode.
  - qnan opcode.
  - qinf opcode.
  - exprandi opcode.
  - cauchyi opcode.
  - gaussi opcode.
  - cpumeter opcode.
  - linsegb opcode.
  - expsegb opcode.
  - transegb opcode.
  - expsegba opcode.
  - pvsgain opcode.
  - pvsbufread2 opcode.
  - serial opcodes.
  - lua opcodes.
  - plustab opcode.
  - multtab opcode.
  - maxarray opcode.
  - minarray opcode.
  - sumarray opcode.
  - scalearray opcode.

- New functionality

  - beats processor renamed to csbeats and distributed
  - mkdb utility to provide a catalogue of plugin libraries/opcodes
  - ladspa library build in default system
  - macros are now expanded inside string in the score
  - there in an until .. do .. od looping syntax (in the new parser only)
  - SIGPIPE signals are ignored rather than causing Csound to exit
  - It is possible to use vectors of k-rate values, named t-variable. They are initialised to a fixed sizw with init adncan be read with a simple [] syntax. assignment to elements is only via =. There are also a few new opcodes that provide wider functionality.

- Bug fixes and improvements:

  - reading values to fill tables was broken with respect to comments
  - internal error in wii_data fixed
  - pvsshift fixed
  - jacko fixed
  - gen23 minor fixes
  - wiimote fixed
  - atsaadd fixed
  - compress fixed to work with 0dbfs
  - pvsbufread corrected with respect to position counting
  - tempo opcode fixed
  - CsFileB section in .csd files had a bug, now fixed
  - deferred gen01 tables could have wrong size
  - vbap_zak made to work(!)
  - fixed memory issue in ATSsinoi
  - various fixes to cscore
  - various fixes to partials and tradsyn
  - transegr could crash in some cases
  - loris opcodes updated to latest version
  - date opcode has new base in some platforms to avoid overflow
  - pvsblur now works over reinit
  - diskin, diskin2 and soundin now can read up to 40 channels
  - prints behaves better with rounding
  - fmpercfl now has working vibrato
  - atreson now has gain parameter at k-rate
  - comb opcode made safe if in and out arguments the same
  - better accuracy in line and expon
  - OSCsend recovers space previously lost
  - OSCsend can send a table as a blob with the T tag -- experimental and untested.
  - lpf18 now has an optional iskip argument
  - i() will also accept an i-rate value in which case it is a no-op
  - makecsd revised and extended to have options for MIDI and score processing and licenses
  - lpanal reworked to remove bugs and oddities
  - an issue with noise in alsa fixed and a click in portaudio fixed
  - portaudio driver changed to be more robust on stop/exit

- Internal Changes:

  - Many many changesto the new parser so it is now operational, but should be used with care
  - The multicore system is distributed in an experimental mode and should be used with great care.

### New in Version 5.13 (January 2011)

- New opcodes:

  - median opcode.
  - filevalid opcode.
  - pvstanal, pvswarp, temposcal, pvslock spectral processing opcodes.
  - mincer opcode
  - fareylen sequence opcodes.

- New functionality

  - Real random number generators using /dev/random (Linux only).
  - INF macro added to orchestras; z read as infinity in scores
  - init changed to allow multiple inits in on statement
  - GEN for support of farey sequences
  - maxalloc,cpuprc, active now accept named instruments.
  - If normalisation in pow opcodes is zero treat as 1
  - inch can take upto 20 inputs and outputs.
  - pvscale, pvsvoc and pvsmix now have very good spectral envelope preservation modes (1 = filtered cepstrum, 2 = true envelope).
  - oscil1 could be static if the duration was long; now there is a positive minimum increment.
  - GEN49 now uses search paths.

- Bug fixes and improvements:

  - Count of lines fixed in orchestras, and \ inside strings
  - Fast tab opcodes made safe from crashes
  - % in formated printing could crash
  - Double free in fgen fixed
  - sndwarp quietened (gave too many messages)
  - gen41 deals with positive probabilities
  - adsynt reworked removing many bugs
  - adsynt2 phase error fixed
  - Bug in max number of gens fixed
  - Better checking in grain4
  - Better checking in adsyn
  - modulus was wrong in new parser
  - atonex/tonex did wrong operation
  - mp3in could repeat sound at end of file
  - changed opcode initialised to zero
  - Serious bug in tabmorpha fixed
  - GEN49 has serious bug removed, so no longer incorrect silences.
  - partikkel opcode: fixed bug in sub-sample grain placement when using grain rate FM

- Internal Changes:

  - In the new parser only there are operator @ and @@ to round up the next integer to a power of 2 or powerof2+1
  - Score sorting made much faster
  - lineto improved
  - Named gens allowed
  - Various printing include instrument name if available
  - Command option to omit loading a library
  - Number of out channels no longer constrained to be number of in
  - Many fixes to new parser
  - More use of Warnings than Messages (allows for them to be switched off)
  - csoundSetMessageCallback reset if callback set to null

### New in Version 5.12 (January 2010)

- New opcodes:

  - transegr is a version of the transeg opcode which has a release section which is triggered by midi, a turnoff2 opcode or a negative instrument number i score event.
  - ftgenonce generates a function table from within an instrument definition, without duplication of data.
  - passign allows quick initialization of i-rate variables from p-fields
  - crossfm implements crossed fm synthesis.
  - loopxseg is like loopseg but with exponential envelope.
  - looptseg is like loopseg but with a flexible envelope like transeg

- Bug fixes and improvements:

  - pvshift would overwrite in double mode.
  - pan2 case 3 fixed.
  - clockon and clockoff now work again.
  - cross2 and interp could have divided by zero
  - linecount for error messages no longer includes text from .csoundrc
  - p5gconnect changed to use a separate thread to avoid timeout problem.
  - transeg checks argument count.
  - sfload used to be limited to 10 sound fonts and was not policed. Now open-ended.

- Internal Changes:

  - \" allowed as an escape in orchestral strings
  - New parser fixed on optional arguments
  - Better checking of f statement with negative number
  - Soundfonts only initialise pitches array once, in the soundfont opcodes.
  - Usual collection of gratuitous minor changes, layout and comments

### New in Version 5.11 (June 2009)

- New opcodes:

  - mp3in allows reading of mp3 files directly in the orchestra.
  - wiiconnect, wiidata, wiisend, wiirange opcodes by john ffitch to receive and send data to a wiimote controller.
  - New opcodes to receive data directly from a p5glove by john ffitch p5gdata
  - tabsum sums sections of ftables
  - MixerSetLevel_i an init-time only version of MixerSetLevel
  - doppler implements a simulation of the doppler effect.
  - filebit reports the file depth of a file.
  - The new Signal Flow opcodes enable the usage of signal flow graphs in Csound.

- New functionality

  - New panning type for pan2 opcode
  - New csd score tag <CsExScore>.
  - New -Ma option for ALSA RT MIDI module which listens to all devices.
  - There is a gen49 to read mp3 files
  - Added rounding bin code to pvscale
  - Added non-power-of-2 table support for ftload and ftsave
  - GEN23 totally rewritten to be more consistent in what constitutes a separator and comments. (Still no /* */ comments)

- Bug fixes and improvements:

  - New examples for pvs opcodes by Joachim Heintz: pvsarp, pvscent, pvsbandp, pvsbandr, pvsbufread, pvsadsyn, pvsynth, pvsblur, pvscale, pvscross, pvsfilter, pvsfreeze, pvshift, pvsmaska, pvsmorph
  - Use of automatic numbering of ftables reuses table numbers
  - seed with positive argument was wrong
  - sprintf with an empty string printed wrong data
  - mute now works with both numeric and named instruments
  - Small fixes in diskin, and in tablexkt

- Internal Changes:

  - SConstruct now builds completely independent shared libraries for Python, Lua, and Java wrappers.
  - New Parser almost usable
  - Redrawing of graphs fixed so that only selected ones get redrawn.
  - RT-alsa more forgiving on near sample rates
  - It is possible to have the score generated by an external program rather than using standard score format using <CScore bin="translater"> to call the program translater on the score data
  - lpc_export fixed
  - Removed limit on macro names length
  - PMAX, the number of arguments to a score event has been reduced by 2, and an overflow system introduced so GENs can have arbitrary numbers of arguments.
  - Increased API version to 2.1.
  - New API function pointer ldmemfile2withCB() which is a version of ldmemfile() allowing a callback to be set and called exactly once to process the MEMFIL buffer after it is loaded.
  - csound->floatsize set; zero in earlier versions
  - GetChannelLock added

### New in Version 5.10 (December 2008)

- New functionality

  - New option to listen to all MIDI devices using the portmidi realtime module. To enable listening to all devices use "-+rtmidi=portmidi -Ma".
  - Dither on output implemented; rectangular and triangular dither available in some cases
  - GEN20 type 6 now has option to set variance

- Bug fixes and improvements:

  - Locale set to C numeric to avoid , versus . problems.
  - diskin fixed
  - outo was broken regarding channel 6
  - pitchamdf fixed
  - zfilter2 intialization fixed
  - s32b14 fixed
  - Fixed other bugs fixed that have not been reported publicly.

- Internal Changes:

  - The major version of the Csound API is increased to 2; affected csound.so as well. This means that Csound 5.10 is incompatible with applications ("front ends", "clients", or "hosts") that were built for Csound 5.08 and earlier and that use API version 1.x. These applications will need to be rebuilt to work with the current and future versions of Csound. Csound front ends written in interpreted languages such as Python or Java may continue to work without modification. It may also be possible to keep both an earlier version of the Csound library and an API 2.0 version on the same machine together so that new and old Csound-based applications can run side-by-side. These changes do not in any way affect the compatibility of Csound orchestras and scores: all old documents should continue to work as before.
  - Time now counted internally in samples, overcoming a longstanding bug with rounding of time to k-rate.
  - Many internal changes related to branch prediction. Some opcodes are substantially quicker.

### New in Version 5.09 (October 2008)

- New opcodes:

  - New vosim opcode by Rasmus Ekman which recreates the historic VOSIM (VOcal SIMulator) technique.
  - New dcblock2 opcode by Victor Lazzarini.
  - New Chua's oscillator model: chuap by Michael Gogins.
  - New Linear Algebra opcodes by Michael Gogins. Standard Linear algebra over real and complex vectors and matrices: elementwise arithmetic, norms, transpose and conjugate, inner products, matrix inverse, LU decomposition, QR decomposition, and QR-based eigenvalue decomposition. Includes copying vectors to and from a-rate signals, function tables, and f-signals.
  - New ambisonic opcodes: bformdec1 and bformenc1. These opcodes deprecate the older bformdec and bformenc.
  - New Score control opcodes by Victor Lazzarini: rewindscore and setscorepos.

- New functionality:

  - The vbap family of opcodes (vbap4, vbap8, vbap16 and vbapz) now accept k-rate variables for all their input arguments.
  - New pulseaudio I/O module on Linux.
  - New optional ienv parameter to generate envelopes for the soundfont opcodes: sfplay, sfplay3, sfplaym and sfplay3m.
  - Added 'skip normalisation argument' to "tanh" named GEN routine. (See Named GEN Routines)
  - Added scheduler priority option on alsa.

- Bug fixes and improvements:

  - Allow scientific notation (as was in csound4!) in GEN23.
  - Fixed bug in FLTK initialization. Should make FLTK usage more stable.
  - Error on /* */ comments in orchestra fixed.
  - poscil no longer overwrites frequency if variable is shared.
  - printk and printks check that opcode is initialised.
  - Deprecate soundout and soundouts in favour of fout.
  - Fixed space opcode to accept non-pow-2 (deferred) tables.
  - Fixed pvsmorph bug.

- Internal Changes:

  - New parser has #include and argumentless macros.
  - Less casting between floats and doubles in float version.
  - Includes experimental multicore support.
  - buzz opcode rewritten.
  - Many other internal changes and small bug fixes.

### New in Version 5.08 (February 2008)

- New opcodes:

  - imagecreate, imagesize, imagegetpixel, imagesetpixel, imagesave, imageload and imagefree: New image file processing opcodes by Cesare Marilungo to read/write png images from Csound.
  - pvsbandp and pvsbandr by John ffitch, which perform band-pass and band-reject filtering in the spectral domain on a pvs signal.
  - New HRTF opcodes by Brian Carty:hrtfmove, hrtfmove2 and hrtfstat.
  - New waveshaping opcodes: powershape, polynomial, chebyshevpoly, pdclip, pdhalf, pdhalfy, and syncphasor
  - New jack transport control opcode: jacktransport

- New functionality

  - Added --csd-line-nums= command line option to select mode for error line reporting.
  - New "no-carry" operator (! ) for score language that prevents implicit carrying of p-fields in i-statements.
  - Added --syntax-check-only commandline flag (exclusive with --i-only)
  - <CsLicence> tag for CSDs. <CsLicense> is accepted as an alternative to <CsLicence>.

- Bug fixes and improvements:

  - Changed order of outputs for hilbert. This change breaks compatibility with previous versions, but fixes the opcode and now works as documented.
  - Messages about loading opcode plugins modified so can be suppressed with message level flag.
  - Major changes to score error reporting; now accurately reports the line numbers for the chain of inputs for most errors.
  - Corrected pan2 so it agrees with documentation.
  - <CsVersion> tag works again according to the manual.
  - Fixed the { and } score looping statements. Added missing documentation for them and ~, &, |, and # operators in score expressions.
  - hilbert had its outputs reversed, now correct. Manual example updated.

- Internal Changes:

  - Change to gettext localisation; French and Columbian-Spanish translations available.
  - Internal changes to partikkel, interpolation of waveform read and windowing, allowing more precise pitch synchronous granular synthesis. Updated examples for partikkel.
  - pvscale: Improved algorithm for SDFT case so no ampltitude variation.

### New in Version 5.07 (October 2007)

- New opcodes:

  - pan2: a stereo panning opcode
  - cpsmidinn, pchmidinn, octmidinn: converters for MIDI note numbers
  - fluidSetInterpMethod: interpolation in fluid sound fonts
  - sflooper: a soundfont version of flooper2
  - pvsbuffer and pvsbufread: buffering/reading of fsigs for delays/timescale changes.

- New functionality

  - SDFT - the Sliding Discrete Fourier Transform -- added seamlessly to pvsanal, etc opcodes if the overlap is less than the ksmps or less than 10. Some pvsXXX opcodes extended to take a-rate parameters when sliding.

  - New feature (-O null / --logfile=null) that disables all messages and printing to the console.

- Bug fixes and improvements:

  - partikkel -- particle synthesis had an inadvertent bug, now fixed.
  - Closing of MIDI input on Windows(MM) failed; now fixed
  - fluidEngine opcode now takes optional number of channels (range 16-256, default to 256) and polyphony (range 16-4096, default to 4096) to use.
  - atsa utility safer when given silence.
  - ATSaddnz: improved checking.
  - Ambisonics (bformdec, bformenc) has more options for controlled opposites.
  - Bug in turnoff2 fixed.
  - het_export: invalid check caused export to fail.

- Internal Changes:

  - Improved Windows installer.
  - CsoundVST replaced by CsoundAC, that does not depend on the VST SDK headers.
  - Less messages in Windows(MM) startup.
  - P argument type added (k-rate defaults to 1) for opcode in and out types.

### New in Version 5.06 (June 2007)

- New granular opcodes: partikkel, partikkelsync and diskgrain.

- New opcode for event dispatch: scoreline.

- Many new opcodes from Gabriel Maldonado's CsoundAV: hvs1, hvs2, hvs3, vphaseseg, inrg, outrg, lposcila, lposcilsa, lposcilsa2, tabmorph, tabmorpha, tabmorphi, tabmorphak, trandom, vtable1k, slider8table, slider16table, slider32table, slider64table, slider8tablef, slider16tablef, slider32tablef, slider64tablef, sliderKawai and the a-rate version of ctrl7.

- Also from CsoundAV, many new FLTK widget opcodes: FLkeyIn, FLslidBnk2, FLvslidBnk, FLvslidBnk2, FLmouse, FLxyin, FLhvsBox, FLslidBnkSet, FLslidBnkSetk, FLslidBnk2Set, FLslidBnk2Setk, FLslidBnkGetHandle,

- New pvs opcodes: pvsdiskin, pvsmorph,

- eqfil

- New command line options (--m-warnings)to control messages

- csladspa: a CSD to LADSPA plugin kit.

- And many bug fixes including (but not limited to): fixed k-rate version of system; fixed scaling problems of vrandh and vrandi; fixed ocasional failure of turnoff; fixed OS X bug; fixed ATScross and fixed mod.

  Csound5GUI now works properly on all platforms and csoundapi~ (pd object) has been updated.

Prev | Up | Next
Getting Started with Csound | Home | Part I. Overview