Chugens, Chubgraphs, Chugins: 3 Tiers For

Total Page:16

File Type:pdf, Size:1020Kb

Chugens, Chubgraphs, Chugins: 3 Tiers For CHUGENS, CHUBGRAPHS, CHUGINS: 3 TIERS FOR tick function, which accepts a single floating-point 1::second => delay.delay; EXTENDING CHUCK argument (the input sample) and returns a single } floating-point value (the output sample). For example, (Chubgraphs that do not wish to process an input signal, this code uses a Chugen to synthesize a sinusoid using such as audio synthesizing algorithms, may omit the Spencer Salazar Ge Wang the cosine function: connection from inlet.) Center for Computer Research in Music and Acoustics Compared to Chugens, Chubgraphs have obvious class MyCosine extends Chugen performance advantages, as primary audio-rate Stanford University { {spencer, ge}@ccrma.stanford.edu 0 => int p; processing still occurs in the native machine code 440 => float f; underlying its component ugens. However Chubgraphs second/samp => float SRATE; are limited to audio algorithms that can be expressed as combinations of existing unit generators; implementing, ABSTRACT native compiled code, which is precisely the intent of fun float tick(float in) for example, intricate mathematical formulae or ChuGins. { The ChucK programming language lacks return Math.cos(p++*2*pi*f/SRATE); conditional logic in the form of a ugen graph is possible straightforward mechanisms for extension beyond its } but, in our experience, fraught with hazard. 2. RELATED WORK } built-in programming and processing facilities. Chugens address this issue by allowing programmers to live-code Extensibility is a primary concern of music software of In the case of an audio synthesizer that does not process 3.3. ChuGins new unit generators in ChucK in real-time. Chubgraphs all varieties. The popular audio programming an existing signal, the input sample may be ignored. also allow new unit generators to be built in ChucK, by environments Max/MSP [15], Pure Data [10], A Chugen defined so may be integrated into audio ChuGins (pronounced “chug-in”) allow near limitless SuperCollider [8], and Csound [ ] all provide defining specific arrangements of existing unit 4 graphs like any standard ChucK ugen. Since the tick possibilities for expansion of ChucK’s capabilities. A generators. ChuGins allow a wide array of high- mechanisms for developing C/C++-based compiled function is just a standard ChucK class member function, ChuGin is a distributable dynamic library, typically performance unit generators and general functionality to sound processing functions. Max also allows control-rate it can be as simple or as elaborate as required. Standard written in C or C++ compiled to native machine code, functionality to be encapsulated in-situ in the form of be exposed in ChucK by providing a dynamic binding library calls, file I/O, multiprocessing (using spork), and which ChucK can be instructed to load at runtime. When between ChucK and native C/C++-based compiled Javascript code snippets. Max’s Gen facility dynamically other general ChucK programming structures can be loaded, the ChuGin defines one or more classes that are compiles audio-rate processors, implemented as either code. Performance and code analysis shows that the integrated into the tick function and supporting code. subsequently available to ChucK programs. These most suitable approach for extending ChucK is data-flows or textual code, to native machine code. For performance reasons, its important to consider that classes may define new unit generators or provide Csound allows the execution of Tcl, Lua, and Python situation-dependent. the tick function will be called for every sample of general programmatic functionality beyond that built in code for control-rate and/or audio-rate manipulation and audio, so simple tick functions will typically perform to ChucK. Since these classes are normal ChucK classes 1. INTRODUCTION synthesis. The Impromptu environment supports live- better. Moreover, the intrinsic overhead of ChucK’s implemented with native code, member functions and coding of audio-rate processors in a Scheme-like variables can be used to provide an interface to control Since its introduction, the ChucK programming virtual machine architecture will cause Chugens to language [3], and LuaAV does the same for Lua [13]. parameters. language [14] has become a popular tool for computer underperform compared to a native C/C++ Pure allows programmers to dynamically write and ChuGins are best suited for audio algorithms that are music composers, educators, and application software implementation. Lastly, since Chugens are execute audio signal processors using Faust [5]. A reasonably well understood and stand to gain from the developers. However, to date, its catalogue of audio fundamentally a specialization of a ChucK class, it may thriving ecosystem revolves around extensions to performance of compiled machine code. The “write- processing unit generators and general programming define functions to provide structured access to popular digital audio workstation software, in the form compile-run” development cycle and C/C++-based functionality has been largely limited to those that are whichever parameters it wishes to expose to the of VST, RTAS, AudioUnits, and LADSPA plugins programming mandated by ChuGins makes built-in when the ChucK binary executable is compiled. programmer. developed primarily in C and C++. For general-purpose implementation of audio processors require Adding new unit generators mandates recompilation of computing, JNI provides a highly flexible binding comparatively more effort than the Chubgraph or 3.2. Chubgraphs the entirety of ChucK, requiring a level of expertise and between native machine code and the Java virtual Chugen approaches. However for ugens a programmer motivation reserved for an elite group of power-users. machine-based run-time environment [7]. RubyGems is intends to use over an extended period of time, the effort Furthermore, community-based development efforts are Chubgraphs (pronounced “chub-graph”) provide a way a complete plugin and package management tool for to construct new unit generators by composition, to implement a ChuGin will quickly pay off in the form hampered by this centralization of functionality, as both Ruby-based plugins and C/C++ libraries compiled of lower CPU usage. developers of new unit generators have no easy way to arranging multiple existing ugens into a single unit. In with Ruby bindings [11]. this way, common arrangements of existing unit An additional advantage of ChuGins is that they may share their work. generators can be defined and instantiated. Furthermore, provide functionality far outside the intrinsic The aim of the work described herein is to provide 3. CHUGENS, CHUBGRAPHS, CHUGINS Chubgraph parameters can be exposed in a structured capabilities of ChucK. Complex synthesis C/C++ based ChucK with multiple levels of extensibility, each manner via class member functions. synthesis packages can be imported wholesale into essential and appropriate to specific tasks and levels of ChucK, opening up an abundance of sonic possibilities. 3.1. Chugens A Chubgraph is defined by extending the Chubgraph user expertise. On the one hand, ChucK’s pervasive For example, ChuGins have been implemented to bring class. The Chubgraph class has member variables named ethos of on-the-fly development creates the desire to The goal of Chugens (pronounced “chyoo-jen”) is to audio processing programs from the Faust programming inlet and outlet; inlet is a ugen that represents the design and implement new audio processors in ChucK facilitate rapid prototyping of audio synthesis and language into ChucK. Similarly, the SoundFont renderer input signal to the Chubgraph, and outlet is the output itself in real-time, working down to the per-sample level processing algorithms. Additionally, Chugens provide a FluidSynth has been packaged as a ChuGin. This if necessary. Furthermore, implementing these signal. The Chubgraph’s internal audio processing graph basic framework for extending ChucK’s built-in audio is created by spanning a sequence of ugens between functionality is not limited to audio processing; a serial components in ChucK allows their use on any operating processing functionality. Using the Chugen system, a port input/output ChuGin is under development, as are inlet and outlet. The following Chubgraph system ChucK supports with no additional effort from programmer can implement sample-rate audio other general purpose programming libraries. the developer. For these cases we have developed implements a basic feedback echo processor: algorithms within the ChucK development environment, Development of a ChuGin is somewhat more complex Chugens and Chubgraphs. utilizing the full array of programming facilities than Chubgraphs or Chugens, and does not lend itself to On the other hand, real-time performance class Feedback extends Chubgraph provided by ChucK. These processing units can be { explicit presentation of code herein. Using a set of requirements often mandate the use of compiled native naturally integrated into standard ChucK programs, even inlet => Gain dry => outlet; convenience macros, a ChuGin developer first defines a machine code for complex audio-rate processing. There in the same script file, providing seamless control of dry => Delay delay => outlet; function, which ChucK calls upon first loading also exists a wealth of C/C++-based software libraries query audio-rate processing, control-rate manipulation, and delay => Gain feedback => delay; the ChuGin. ChucK provides the query function with for audio synthesis and effects, such as FluidSynth
Recommended publications
  • Synchronous Programming in Audio Processing Karim Barkati, Pierre Jouvelot
    Synchronous programming in audio processing Karim Barkati, Pierre Jouvelot To cite this version: Karim Barkati, Pierre Jouvelot. Synchronous programming in audio processing. ACM Computing Surveys, Association for Computing Machinery, 2013, 46 (2), pp.24. 10.1145/2543581.2543591. hal- 01540047 HAL Id: hal-01540047 https://hal-mines-paristech.archives-ouvertes.fr/hal-01540047 Submitted on 15 Jun 2017 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. A Synchronous Programming in Audio Processing: A Lookup Table Oscillator Case Study KARIM BARKATI and PIERRE JOUVELOT, CRI, Mathématiques et systèmes, MINES ParisTech, France The adequacy of a programming language to a given software project or application domain is often con- sidered a key factor of success in software development and engineering, even though little theoretical or practical information is readily available to help make an informed decision. In this paper, we address a particular version of this issue by comparing the adequacy of general-purpose synchronous programming languages to more domain-specific
    [Show full text]
  • Audio Visual Instrument in Puredata
    Francesco Redente Production Analysis for Advanced Audio Project Option - B Student Details: Francesco Redente 17524 ABHE0515 Submission Code: PAB BA/BSc (Hons) Audio Production Date of submission: 28/08/2015 Module Lecturers: Jon Pigrem and Andy Farnell word count: 3395 1 Declaration I hereby declare that I wrote this written assignment / essay / dissertation on my own and without the use of any other than the cited sources and tools and all explanations that I copied directly or in their sense are marked as such, as well as that the dissertation has not yet been handed in neither in this nor in equal form at any other official commission. II2 Table of Content Introduction ..........................................................................................4 Concepts and ideas for GSO ........................................................... 5 Methodology ....................................................................................... 6 Research ............................................................................................ 7 Programming Implementation ............................................................. 8 GSO functionalities .............................................................................. 9 Conclusions .......................................................................................13 Bibliography .......................................................................................15 III3 Introduction The aim of this paper will be to present the reader with a descriptive analysis
    [Show full text]
  • Pdates Actuator’S Outputs
    M2 ATIAM – IM Graphical reactive programming Esterel, SCADE, Pure Data Philippe Esling [email protected] 1 M2 STL – PPC – UPMC First thing’s first Today we will see reactive programming languages • Theory • ESTEREL • SCADE • Pure Data However our goal is to see how to apply this to musical data (audio) and real-time constraints Hence all exercises are done with Pure Data • Pure data is open source, free and cross-platform • Works as Max/Msp (have almost all same features) • Can easily be embedded on UDOO cards (special distribution) So go now to download it and install it right away https://puredata.info/downloads/pure-data 2 M2 STL – PPC – UPMC Reactive programming: Basic notions Goals and aims Here we aim towards creating critical, reactive, embedded software. 3 M2 STL – PPC – UPMC Reactive programming: Basic notions Goals and aims Here we aim towards creating critical, reactive, embedded software. The mandatory notions that we should get first are • Embedded • Critical • Safety • Reactive • Determinism 4 M2 STL – PPC – UPMC Reactive programming: Basic notions Goals and aims Here we aim towards creating critical, reactive, embedded software. The mandatory notions that we should get first are ? • Embedded • Critical • Safety • Reactive • Determinism 5 M2 STL – PPC – UPMC Reactive programming: Basic notions Goals and aims Here we aim towards creating critical, reactive, embedded software. The mandatory notions that we should get first are • Embedded An embedded system is a computer • Critical system with a dedicated function • Safety within a larger mechanical or • Reactive electrical system, often with real- • Determinism time computing constraints. 6 M2 STL – PPC – UPMC Reactive programming: Basic notions Goals and aims Here we aim towards creating critical, reactive, embedded software.
    [Show full text]
  • Kronos Reimagining Musical Signal Processing
    Kronos Reimagining Musical Signal Processing Vesa Norilo March 14, 2016 PREFACE First of all, I wish to thank my supervisors; Dr. Kalev Tiits, Dr. Marcus Castrén and Dr. Lauri Savioja,thanks for guidanceand acknowledgements and some necessary goading. Secondly; this project would never have materialized without the benign influence of Dr Mikael Laurson and Dr Mika Kuuskankare. I learned most of my research skills working as a research assistant in the PWGL project, which I had the good fortune to join at a relatively early age. Very few get such a head start. Most importantly I want to thank my family, Lotta and Roi, for their love, support and patience. Many thanks to Roi’s grandparents as well, who have made it possible for us to juggle an improb- able set of props: freelance musician careers, album productions, trips around the world, raising a baby and a couple of theses on the side. This thesis is typeset in LATEX with the Ars Classica stylesheet generously shared by Lorenzo Pantieri. This report is a part of the portfolio required for the Applied Studies Program for the degree of Doctorthe applied of Music. It studies consists of an program introductory portfolio essay, supporting appendices and six internationally peer reviewed articles. The portfolio comprises of this report and a software package, Kronos. Kronos is a programming language development environment designed for musical signal processing. The contributions of the package include the specification and implementation of a compiler for this language. Kronos is intended for musicians and music technologists. It aims to facilitate creation of sig- nal processors and digital instruments for use in the musical context.
    [Show full text]
  • Table of Contents Pure Data
    Table of Contents Pure Data............................................................................................................................................................1 Real Time Graphical Programming..................................................................................................................2 Graphical Programming...........................................................................................................................2 Real Time.................................................................................................................................................3 What is digital audio? ........................................................................................................................................4 Frequency and Gain.................................................................................................................................4 Sampling Rate and Bit Depth..................................................................................................................4 Speed and Pitch Control..........................................................................................................................5 Volume Control, Mixing and Clipping....................................................................................................6 The Nyquist Number and Foldover/Aliasing...........................................................................................6 DC Offset.................................................................................................................................................7
    [Show full text]
  • Distributed Musical Decision-Making in an Ensemble of Musebots: Dramatic Changes and Endings
    Distributed Musical Decision-making in an Ensemble of Musebots: Dramatic Changes and Endings Arne Eigenfeldt Oliver Bown Andrew R. Brown Toby Gifford School for the Art and Design Queensland Sensilab Contemporary Arts University of College of Art Monash University Simon Fraser University New South Wales Griffith University Melbourne, Australia Vancouver, Canada Sydney, Australia Brisbane, Australia [email protected] [email protected] [email protected] [email protected] Abstract tion, while still allowing each musebot to employ different A musebot is defined as a piece of software that auton- algorithmic strategies. omously creates music and collaborates in real time This paper presents our initial research examining the with other musebots. The specification was released affordances of a multi-agent decision-making process, de- early in 2015, and several developers have contributed veloped in a collaboration between four coder-artists. The musebots to ensembles that have been presented in authors set out to explore strategies by which the musebot North America, Australia, and Europe. This paper de- ensemble could collectively make decisions about dramatic scribes a recent code jam between the authors that re- structure of the music, including planning of more or less sulted in four musebots co-creating a musical structure major changes, the biggest of which being when to end. that included negotiated dynamic changes and a negoti- This is in the context of an initial strategy to work with a ated ending. Outcomes reported here include a demon- stration of the protocol’s effectiveness across different distributed decision-making process where each author's programming environments, the establishment of a par- musebot agent makes music, and also contributes to the simonious set of parameters for effective musical inter- decision-making process.
    [Show full text]
  • Procedural Sequencing 1 Göran Sandström
    Procedural Sequencing 1 Göran Sandström Bachelor Thesis Spring 2013 School of Health and Society Department Design and Computer Science Procedural Sequencing A New Form of Procedural Music Creation Author: Göran Sandström Instructor: Anders-Petter Andersson Examiner: Daniel Einarsson Procedural Sequencing 2 Göran Sandström School of Health and Society Department Design and Computer Science Kristianstad University SE-291 88 Kristianstad Sweden Author, Program and Year: Göran Sandström, Interactive Sound Design, 2010 Instructor: Anders-Petter Andersson, PhD. Sc., HKr Examination: This graduation work on 15 higher education credits is a part of the requirements for a Degree of Bachelor in Computer Science Title: Procedural Sequencing Language: English Approved By: _________________________________ Daniel Einarsson Date Examiner Procedural Sequencing 3 Göran Sandström Table of Contents List of Abbreviations and Acronyms............................................................................4 List of Figures...............................................................................................................4 Abstract.........................................................................................................................5 1. Introduction.............................................................................................6 1.1 Aim and Purpose.....................................................................................................6 1.2 Method....................................................................................................................6
    [Show full text]
  • Berkelee Voltage Presentation.Key
    A Brief History of Physical Modeling Synthesis, Leading up to Mobile Devices and MPE Pat Scandalis Dr. Julius O. Smith III Nick Porcaro Berklee Voltage, March 10-11 2017 02/20/2017 1 Overview The story of physical modeling stretches back nearly 1000 years (yup)! We now find ourselves in a place where each of us can be Jimi Hendrix with just a small device in the palm of our hands. Its a fun and deeply technical topic drawing on many fields including physics, acoustics, digital signal processing and music. • Demo • A few high points from the history • Questions, possibly from the FAQ The Full Presentation Can Be Found at: moforte.com/berklee-voltage-physical-modeling/ It’s also posted in the news section 02/20/2017 of the moForte website 2 Physical Modeling Was Poised to be the “Next Big Thing” in 1994 So What Happened? 02/20/2017 3 For Context, what is Physical Modeling Synthesis? • Methods in which a sound is generated using a mathematical model of the physical source of sound. • Any gestures that are used to interact with a real physical system can be mapped to parameters yielded an interactive an expressive performance experience. • Physical modeling is a collection of different techniques. 02/20/2017 4 Taxonomy of Modeling Areas Hornbostel–Sachs Classification • Chordaphones - Guitars • Idiophones - Mallet Instruments • Aerophones - Woodwinds • Electrophones - Virtual Analog • Membranophones - Drums • Game Sounds 02/20/2017 • Voice 5 First a Quick Demo! Geo Shred Preview Modeled Guitar Features and and Europa Demo Demo Reel 02/20/2017 6 Brief (though not complete) History of Physical Modeling Synthesis As well as a some commercial products using the technology 7 02/20/2017 Early Mechanical Voice Synthesis • 1000 -1200 ce - Speech Machines, Brazen Heads • 1791 - Wolfgang Von Kempelin, speaking machine.
    [Show full text]
  • Pure Data: Another Integrated Computer Music Environment
    Pure Data another integrated computer music environment Miller S Puckette Department of Music UCSD La Jolla Ca mspucsdedu c Kunitachi College of Music Reprinted from Pro ceedings Second Intercollege Computer Music Concerts Tachikawa pp May Abstract making software systems which were really usable by noncomputer scientists was addressed by the A new software system called Pure Data is in the Max program Max was an attempt to make early stages of development Its design attempts to a screenbased patching language that could imi remedy some of the deciencies of the Max program tate the mo dalities of a patchable analog synthesizer while preserving its strengths The most imp ortant Many other graphical patching languages had b een weakness of Max is the diculty of maintaining com prop osed that did not suciently address the real p ound data structures of the type that might arise time control asp ect and many other researchers had when analyzing and resynthesizing sounds or when by then prop osed much more sophisticated realtime recording and mo difying sequences of events of many control strategies without presenting a clear and fun dierent types Also it has proved hard to integrate touse graphical interface Max was in essence a com nonaudio signals video for instance and also au promise that got part way toward b oth goals dio sp ectra into Maxs rigid tilde ob ject system Finally the whole issue of maintaining two separate As so on as Philipp e Manourys Pluton was realized copies of all data structures one to edit and one to using
    [Show full text]
  • Co-Audicle: a Collaborative Audio Programming Space
    CO-AUDICLE: A COLLABORATIVE AUDIO PROGRAMMING SPACE Ge Wang Ananya Misra Philip Davidson Perry R. Cook† Princeton University Department of Computer Science (†also Music) ABSTRACT people, across a wide geography, build and play one in- strument. This is our primary motivation. The Co-Audicle describes the next phase of the Audi- There have been various research projects looking at cle’s development. We extend the Audicle to create a aspects of this type of collaboration. [2, 5, 1]. The Co- collaborative, multi-user interaction space based around Audicle’s focus is code and the act of programming audio the ChucK language. The Co-Audicle operates either in in a real-time, distributed environment. It is concerned client/server mode or as part of a peer-to-peer network. with the topology of the collaboration and the levels of We also describe new graphical and GUI-building func- guarantee about timing, synchronization, and interaction tionalities. We draw inspiration from both live interaction associated with each. software, as well as online gaming environments. The ChucK/Audicle framework provides a good plat- form and starting point for the Co-Audicle. ChucK pro- grams are strongly-timed, which means they can move to a new operating environment on another host, and find out 1. INTRODUCTION AND MOTIVATION and manipulate time appropriately. ChucK programs are a concise way to describe sound synthesis very precisely. Co-Audicle describes the next phase of the Audicle’s de- The latter is useful in that many sounds or passages can velopment. We extend the environment described in the be transmitted in place of actual audio, greatly reducing Audicle [8] to create a collaborative, multi-user interac- need for sustained bandwidth.
    [Show full text]
  • Design and Implementation of a Software Sound Synthesizer
    HELSINKI UNIVERSITY OF TECHNOLOGY Department of Electrical and Communications Engineering Laboratory of Acoustics and Audio Signal Processing Jari Kleimola Design and Implementation of a Software Sound Synthesizer Master‘s Thesis submitted in partial fulfillment of the requirements for the degree of Master of Science in Technology. Espoo, August 31st, 2005 Supervisor and Instructor: Professor Vesa Välimäki HELSINKI UNIVERSITY ABSTRACT OF THE OF TECHNOLOGY MASTER‘S THESIS Author: Jari Kleimola Name of the Thesis: Design and Implementation of a Software Sound Synthesizer Date: August 31st, 2005 Number of Pages: 96+4 Department: Electrical and Communications Engineering Professorship: S-89 Acoustics and Audio Signal Processing Supervisor: Professor Vesa Välimäki Instructor: Professor Vesa Välimäki Increased processing power of personal computers has enabled their use as real-time virtual musical instruments. In this thesis, such a software sound synthesizer is designed and implemented, with the main objective being in the development of a composite synthesis architecture comprising several elementary synthesis techniques. First, a survey of sound synthesis, effects processing and modulation techniques was conducted, followed by an investigation to some existing implementations in hardware and software platforms. Next, a formal object-oriented design methodology was applied to capture the requirements of the implementation, and an architectural design phase was carried out to ensure that the requirements were fulfilled. Thereafter, the actual implementation work was divided between the reusable application framework library and the extended implementation packages. Finally, evaluation of the results was made in form of sound and source code analysis. As a conclusion, the composite synthesis architecture was found to be relatively intuitive and realizable.
    [Show full text]
  • A Declarative Metaprogramming Language for Digital Signal
    Vesa Norilo Kronos: A Declarative Centre for Music and Technology University of Arts Helsinki, Sibelius Academy Metaprogramming PO Box 30 FI-00097 Uniarts, Finland Language for Digital [email protected] Signal Processing Abstract: Kronos is a signal-processing programming language based on the principles of semifunctional reactive systems. It is aimed at efficient signal processing at the elementary level, and built to scale towards higher-level tasks by utilizing the powerful programming paradigms of “metaprogramming” and reactive multirate systems. The Kronos language features expressive source code as well as a streamlined, efficient runtime. The programming model presented is adaptable for both sample-stream and event processing, offering a cleanly functional programming paradigm for a wide range of musical signal-processing problems, exemplified herein by a selection and discussion of code examples. Signal processing is fundamental to most areas handful of simple concepts. This language is a good of creative music technology. It is deployed on fit for hardware—ranging from CPUs to GPUs and both commodity computers and specialized sound- even custom-made DSP chips—but unpleasant for processing hardware to accomplish transformation humans to work in. Human programmers are instead and synthesis of musical signals. Programming these presented with a very high-level metalanguage, processors has proven resistant to the advances in which is compiled into the lower-level data flow. general computer science. Most signal processors This programming method is called Kronos. are programmed in low-level languages, such as C, often thinly wrapped in rudimentary C++. Such a workflow involves a great deal of tedious detail, as Musical Programming Paradigms these languages do not feature language constructs and Environments that would enable a sufficiently efficient imple- mentation of abstractions that would adequately The most prominent programming paradigm for generalize signal processing.
    [Show full text]