Combining Analysis and Synthesis in the Chuck Programming Language

Combining Analysis and Synthesis in the Chuck Programming Language

COMBINING ANALYSIS AND SYNTHESIS IN THE CHUCK PROGRAMMING LANGUAGE Ge Wang Rebecca Fiebrink Perry R. Cook Princeton University Princeton University Princeton University Dept. of Computer Science Dept. of Computer Science Dept. of Computer Science Princeton, NJ USA Princeton, NJ USA (also Music) [email protected] [email protected] Princeton, NJ USA [email protected] Figure 0. A ChucK-based programming model for building audio analysis and synthesis programs. ABSTRACT Such a unified programming platform, we believe, should successfully address the following issues. First, In this paper, we present a new programming model for in many musical applications, analysis and synthesis performing audio analysis, spectral processing, and inform one another. Therefore, the environment should feature extraction in the ChucK programming language. facilitate and encourage this symbiotic relationship, The solution unifies analysis and synthesis in the same placing equal emphasis on the two, and providing high-level, strongly-timed, and concurrent environment, flexibility and ease of programming for both. Next, the extending and fully integrating with the existing system should present a precise and flexible language framework. In particular, we introduce the programming model with which programmers can notion of a Unit Analyzer (UAna) and new constructs rapidly prototype and implement analysis and synthesis for dataflow, data types and semantics for operations in tasks – and perhaps even do on-the-fly. Additionally, analysis domains, and mechanisms for seamlessly the high-level abstractions in the system should expose combining analysis and synthesis tasks in a precise, essential low-level parameters while doing away with sample-synchronous manner. We present the motivation syntactic overhead, thereby providing a highly flexible of our system, and describe new language-level and open framework that can be easily used for a variety syntaxes, semantics, and the underlying implementation. of tasks. Finally, it’s extremely important that the We provide code examples and discuss potential uses written code represent the underlying algorithms and and benefits of the system for audio researchers, dataflow precisely and clearly. Overall, we envision a performers, and teachers. language that meets these criteria and that can be equally suitable for audio research (e.g., synthesis, 1. MOTIVATION spectral processing, feature extraction), pedagogy, composition, and musical performance. Combining analysis and synthesis in the same There exist frameworks and languages that framework can lead to interesting applications, as effectively address some components of our goals, exemplified by the works of Roger Dannenberg and including synthesis systems that accommodate analysis Chris Raphael [7], Nick Collins [4], and many others. tasks and vice versa, and standalone systems that Existing systems are mostly implemented in perform a specialized analysis/synthesis task. What we combinations of low-level C modules, open source hope to achieve, in this work, is to produce a single libraries and frameworks, high-level languages, and programming platform that meets the need of a broad proprietary software. We’d like to enable more people audience by offering solutions from programming to experiment with, prototype, and create new tools and language perspective. In doing so, we hope to encourage systems like these, starting from a single unified, high- new and different ways to think about audio level platform, without minimizing the need to develop programming for audio and synthesis. plug-ins in other languages (e.g., C) or to write custom In this paper, we present our programming model for low-level modules from scratch. specifying precise audio analysis and synthesis tasks in the ChucK programming language – specifically designed to address the goals we outlined above. We have designed and implemented new language 2.2. Frameworks for Audio Analysis constructs and integrated them into the existing ChucK Recent years have seen a proliferation of general tools framework, in a way that strives to capitalize on and frameworks to perform audio analysis, particularly programmers’ understanding of the existing language in the area of music information retrieval (MIR). features, making analysis objects, dataflow, and control Commonly used tools specialized for MIR include analogous to (but appropriately distinct from) their MARSYAS [23], CLAM [1], SndObj [12], synthesis counterparts. The new system inherits the MATLAB/Octave [14], M2K [8], and jAudio [16] / precise timing and concurrency model of ChucK and jMIR [17]. These tools support feature extraction from supports a syntax that clearly delineates dataflow and audio files, and classification and learning from these control in both analysis and synthesis processes. features. MARSYAS, SndObj, and CLAM also provide The rest of this paper is organized in the following objects for high-level analysis/resynthesis (e.g., way. In Section 2, we situate our motivations and goals phasevocoder, sinusoidal resynthesis, spectral modeling in the context of existing analysis and synthesis synthesis). These are primarily libraries and environments and tools. Section 3 presents our design of frameworks; as such, they offer programmability at a a new hybrid analysis/synthesis programming model. In different level than languages such as ChucK. As far as Section 4, we illustrate this system using several we can tell, there is no high-level language specialized examples of basic building blocks for analysis tasks. for analysis tasks, much less one focused on support for Section 5 addresses the implementation decisions real-time combined analysis and synthesis. Therefore, involved in creating and integrating this model into we feel that a ChucK-oriented programming model can ChucK. We conclude by discussing potential be potentially interesting in its own right, and may serve applications of a unified ChucK analysis/synthesis as a complimentary tool to existing systems. environment in Section 6 and future work in Section 7. Rapid prototyping tools have an established role in MIR. M2K, for example, has been developed for this 2. RELATED WORK purpose. It provides a graphical patching environment for feature extractors, classifiers, and other modules. 2.1. Analysis In Synthesis Environments Dataflow and functionality in M2K itineraries are There are several high-level synthesis programming determined by connections between built-in and user- environments that provide modules for analysis-related created objects, implemented in Java. MARSYAS also tasks. Max/MSP [20] provides objects for forward and provides support for rapid prototyping, via Python and inverse FFT (via the fft~, ifft~, and related MARSYAS Scripting Language [3]. Our approach objects), constructs to facilitate windowing and overlap differs from these in that we hope to enable rapid (e.g., pfft~), and support for frame-based operations. experimentation from a single, high-level programming SuperCollider [15] provides FFT/IFFT Unit Generators platform, further reducing turnaround time. as well as a variety of specialized objects for spectral 2.3. Analysis and Resynthesis Applications processing (e.g., the PV_* objects as well as third-party objects for feature extraction and onset detection [5]). There exists a set of applications such as AudioSculpt CSound [24] includes a variety of FFT-based spectral [2], SPEAR [10], and TAPESTREA [18] that integrate processing tools (e.g., cvanal, hetro, lpanal, analysis and synthesis capabilities, in order to perform pvanal). The analysis functionality of these systems tasks such as transformation and resynthesis of existing relies on pre-made, “black-box” objects (e.g., coded and sounds, and other processing such as cross-synthesis. imported from C/C++) to meet the needs for common, These are specialized and do not intrinsically offer specific analysis tasks. While these are powerful for programmability, whereas we are interested in allowing many types of tasks, these environments, in general, are programmers to implement similar tasks “from scratch” more intended for synthesis and less for designing and and to do so in real-time. implementing new, low-level analysis systems directly 2.4. ChucK in the language. Furthermore, many low-level analysis design tasks demand clear and precise control over time, ChucK [25] is a programming language for audio and we believe that this may be difficult to achieve for synthesis, whose programming model promotes a strong many analysis tasks in existing systems. awareness of time and concurrency, and encourages Nyquist [6] allows programs to perform FFT/IFFT rapid experimentation via on-the-fly programming. Unit and directly access and manipulate frame-level data, generators can be dynamically connected and control which opens the door to explicit, low-level analysis and can be asserted at any unit generator at any time and at spectral manipulation in the program. Our system builds any rate. ChucK also supports a precise concurrent on this idea by providing a distinct, general class of programming model in which processes (called shreds) analysis objects and by allowing a generic can be naturally synchronized via the timing mechanism representation of the data passed between analysis and events. The property of precise low-level control modules (including, but not limited to, FFT frames). over time and parallelism embedded in a high-level Furthermore, our analysis system applies the

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    8 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us