The New Developments in Csound 6
Total Page:16
File Type:pdf, Size:1020Kb
ICMC 2015 – Sept. 25 - Oct. 1, 2015 – CEMI, University of North Texas The New Developments in Csound 6 John ffitch Victor Lazzarini Steven Yi University of Bath National University of Ireland, Maynooth Department of Computer Science Department of Music Michael Gogins Andres´ Cabrera Irreducible Productions University of California, Santa Barbara New York Media Arts and Technology ABSTRACT of Csound presented here, over the years [3] [4] [5] [6] [7] [8] [9]. However, it is well worth describing what Csound In this paper we introduce a major new version of Csound, is in a bit more detail, because 1) Csound has a long history the audio processing system and library. We begin with an of development, and much of the information describing it is overview of the current status of Csound (version 5), as well outdated; and 2) the motivation for the present directions will as its three layers of use (high, middle, and low). We then become clearer as we outline the present system. outline the design motivations and features of version 6. We The best way to describe Csound, in its version 5, is to continue by exploring external changes and discussing some present it as a series of layers, with various ‘modes of entry’ examples of use. We conclude by looking forward to the next for users and for related applications. steps in the development of Csound. At the lowest level, Csound is a self-contained audio pro- gramming language implemented in a cross-platform library, 1. INTRODUCTION with a well-defined API, which allows software developers to create programs for audio synthesis and processing, and com- In 2012, six years after the initial release of the first major puter music composition. Csound supports a variety of syn- re-engineering of the well-known and widely-used software thesis techniques in its orchestra language, and allows various sound synthesis system Csound [1], we (its developers) de- means/levels of internal and external control. Csound is ex- cided to embark on a further revision of many of its inter- tensible via plugin modules. Software that uses Csound can nal and external aspects. Developments since version 5.00 be written in C, C++, Objective-C, Java, Python, Lua, Tcl, [2] until the current release, 5.19, have been mostly incre- Lisp, and others. Csound runs on Windows, Linux, OSX, mental. They have also been limited by our commitment Solaris, Haiku, Android and iOS. to maintaining both binary and API (Application Program- ming Interface) compatibility with earlier versions (although The middle layer is characterized by writing programs in the the system has actually come through a binary upgrade, after Csound language for performance, composition, and other version 5.09). To allow for a number of requested changes, audio processing tasks such as sonification. At this level, the we decided a new major version was necessary, which would system allows composers to design computer music instru- mean a break in backwards compatibility (both API and bi- ments, and to control them in real time or deferred time. In- nary). This does not, however, mean a break in backwards teraction with the system comes via various frontends, many compatibility of Csound code and pieces. Older pieces and of which are third party (i.e. not maintained as part of the code will always continue to work with Csound 6. This pa- Csound releases). The ‘classic’ command-line interface (CLI) per discusses the motivation for Csound 6, its development is the basic frontend, where the system is controlled by a sin- process, and major features of the new system. gle terminal command. As this was the only original means of using the software, traditionally a number of frontends have been designed to provide a simpler wrapper around CLI 2. WHAT IS CSOUND? Csound. More commonly, today, frontends access the Csound For the ICMC audience, it might not seem necessary to de- library directly (via its API). These frontends provide diverse scribe such a well-known and established software package. modes of interaction. For example, Csound can be embedded After all, there have been a number of papers on the subject in graphical environments such as Pure Data via the csoundapi∼ frontend, and in Max/MSP via csound∼. Com- position environments such as blue use it as a sound engine. Copyright: c 2015 John ffitch et al. This is an open-access article dis- For more general-purpose uses, there are integrated devel- tributed under the terms of the Creative Commons Attribution License 3.0 opment environments (IDEs) for programming with Csound Unported, which permits unrestricted use, distribution, and reproduction in (such as CsoundQt and WinXsound), and plugin/application any medium, provided the original author and source are credited. generators, such as Cs-LADSPA [6] and Cabbage[8]. – 424 – ICMC 2015 – Sept. 25 - Oct. 1, 2015 – CEMI, University of North Texas At this level, Csound co-exists with a number of tools and cult now, especially with the availability of models that exist languages which add support for activities such as algorith- as open-source code. In fact, there is a multiplication of in- mic composition and graphical user interaction. cipient systems that claim to be the intelligent solution to per- ceived problems in existing software. The majority of these app users, do not cross the 80/20 divide of development. This occurs performers, possibly for a variety of reasons, but especially for the lack composers of an enthusiastic user (and developer) community. There is great value in the accumulated knowledge of the community Csound-based apps, high and the large body of existing code. We understand that mov- applications desktop programs composers, performers, ing Csound away from its origins as a system does not mean Csound IDEs, frontends, researchers ditching users and music along the way. The requirements of middle language plugin generators the community are paramount to where we want the software levels to go. By supporting the various levels of entry into the sys- programming languages low Csound library and tools tem, we aim to foster interest in the software and in computer music in general. This translates as well into the different lev- els of difficulty that the Csound language contains. It allows developers, researchers educators to provide a smooth learning curve for students, go- ing from the early (and simpler) set of language elements into Figure 1. The various levels of Csound, related software and end users. the expanded one that the system supports today. At the highest level, use of Csound occurs by developing 3. WHY CSOUND 6? applications based on the middle and lower levels. Here, the user might not even know that Csound is involved, as user By 2012, we began to feel that Csound 5’s incremental model programming is generally not involved. This is seen, for in- of development was becoming a limitation. At the 2011 In- stance, in some frontends, such as Cecilia and blue, where ternational Csound Conference in Hannover, users and devel- the user might only need to deal with parameter setting in the opers met to agree on a number of desired features that the graphical interface, in plugins or applications generated by software should have in future versions. Some of these (like Cabbage, in bundled packages such as Csound4Live (which support for mobile platforms and some additional language uses the csound∼ frontend), or in mobile applications for iOS features) were achievable in Csound 5 and indeed were soon and Android [9]. made available. Others have required a major re-engineering It is clear that Csound has attracted a diverse set of users, of the system. Among them, we can cite: from the expert programmer to the mobile app customer. In • the capacity of new orchestra code, ie. instruments and addition, thanks to Csound’s long history, especially by com- user-defined opcodes (UDOs), to be added to a running posers working at the middle level, there is a legacy of music instance of the engine (enhancing, for instance, live- written with Csound that is worth preserving (and that in fact coding support and interactive sound design); stretches back to 70s compositions written for Csound’s pre- decessors MUSIC 11 and MUSIC 360 [10]). This has focused • major additions to the orchestra language, for instance, our minds to provide a completely backwards-compatible sys- generic arrays, debugging/introspection, and a type sys- tem (as far as the language is concerned) as sine qua non con- tem; dition for future versions. Some may criticise this as recipe for an ever increasing lan- • rationalisation of the API to simplify its usage and to guage, with its associated complexity penalty, and, as often allow further features in frontends; vocalised in the detractors’ corner, ‘bloat.’ But although some • fast loadable (FASL-like) binary formats, API construc- ‘bloat’ is inevitable in a system nearly three decades old, the tion of instruments; Csound language is still syntactically very simple (it consists of just a few simple syntactical constructs), and the process- • further development of concurrency (enhancement of ing engine is generally efficient in terms of DSP and algo- existing support [7]). rithm implementations. What criticisms fail to consider is that Csound has fostered a vibrant community of users and This list was our starting point for the development of developers. Csound 6. We understand that community is the biggest asset a sys- tem like Csound can have. Without users, expert and non- 4. INTERNAL CHANGES IN VERSION 6.0 expert, a system withers and dies. It would not be a huge task (in comparative terms) to ditch the old system and re- A number of important changes have been made to the code create one whose language adapts completely to the flavour- base, which not only introduce significant improvements and of-the-moment software design.