Electric Grammars. Algorithmic Design and Construction of Experimental Music Circuits
Total Page:16
File Type:pdf, Size:1020Kb
Proceedings of the 14th Sound and Music Computing Conference, July 5-8, Espoo, Finland Electric grammars. Algorithmic design and construction of experimental music circuits Simone Pappalardo Andrea Valle Conservatorio Statale di Musica “O. Respighi” di Latina CIRMA-StudiUm - Universita` di Torino [email protected] [email protected] ABSTRACT final physical output (i.e. electronic components) is a dif- ficult task. On the other side, nowadays available tech- The paper discusses a generative approach to the design nologies seem promising in favoring such an approach, as of experimental electronic circuits for musical application. a panoply of Electronic Design Automation (EDA) soft- The model takes into account rewriting rules inspired by L- ware solutions are available, that can be directly linked to systems constrained by domain-specific features depend- automatic circuit printing. In the following, we discuss a ing on electronic components, and generates families of generative methodology for audio circuit design, propose circuits. An integrated production pipeline is introduced, an application, and describe an integrated pipeline solution that ranges from algorithmic design to simulation up to from circuit modeling to PCB printing. hardware printing. 2. ALGORITHMIC DESIGN FOR AUDIO 1. INTRODUCTION CIRCUIT A generative approach has been intensely pursued in the Generative approaches to art and creativity are typically digital domain, i.e. where a certain generative system has intended as ways to yield complex structures by defining an established connection between software and final out- compact formal procedures. A plethora of models and put. Computer music has worked extensively on algorith- techniques has been defined in the last decades, includ- mic composition techniques that have been applied since ing, among the others, formal grammars, fractals, cellular its inception both to event organization and audio gener- automata [5]. As such approaches are formal, they have ation [1]. On the other side, physical computing [2] has been applied/mapped to various aesthetic domains, includ- successfully tried in recent years to fill the gap between ing e.g. visual art and music composition. The rationale computation and the physical world, by linking algorith- at their base is to shift the focus from the final work to the mic design to a heterogeneous set of production systems, meta-level, that of a system capable of generating various e.g. in the extensive applications of 3D printing. Concern- “legal”, “well-formed” outputs. In turn, outputs may be ing electronics, and in particular electronic circuit design, evaluated, e.g. filtered in terms of acceptance/refusal in re- it can be observed that the latter is a complex task, as it lation to some (un)desired features, and the evaluation may involves accurate selection of components in relation to a be used to tune the system by means of a feedback loop. In specific desired output. Thus, algorithmic techniques are short, algorithmic techniques like the aforementioned ones used on the design side mostly for circuit optimization. As are mostly used to explore the output space of a system. an example, evolutionary algorithms have been used to de- In the domain of sound production, analog audio synthesis sign circuits: the rationale is that in some cases a certain –far from being a dead end– has survived to digital audio performance is expected and the algorithm is iteratively and it is at the moment flourishing among musicians, in run so to design a circuit to fit the targeted performance [3]. particular in hybrid systems that retain analog audio gen- In this sense, generation is constrained by an expected re- eration while assigning control to digital modules. In the sult rather than focusing on the exploration of new behav- field of electronic circuits for music applications, modular iors (see also [4] for AI techniques based on an evolution- systems that can be assembled in various ways are a stan- ary computation for circuit design). Moreover, hardware dard solution since the inception of analog electronic mu- layout for electronic components involves many critical sic, and recently various efforts have been made to create steps, depending on both component features (packaging) miniature, highly reconfigurable modular systems (e.g. lit- 1 and routing constraints (e.g. non overlapping of routes). tleBits ). However, as the assembly is left to the user, all Thus, a completely automated pipeline as required by a these systems are not suited for generative techniques. In truly generative approach, linking algorithmic models to this sense, the generative process should move to a lower hardware level. A generative approach to audio circuit de- sign has not been investigated, as far as we know, as typi- Copyright: c 2017 Simone Pappalardo et al. This is cal audio circuits implement well-defined schemes that are an open-access article distributed under the terms of the a priori constrained in relation to specific needs, e.g. noise Creative Commons Attribution 3.0 Unported License, which permits unre- reduction optimization or adherence to a certain already es- stricted use, distribution, and reproduction in any medium, provided the original author and source are credited. 1 http://littlebits.cc SMC2017-351 Proceedings of the 14th Sound and Music Computing Conference, July 5-8, Espoo, Finland tablished model, as in the case of guitar pedal effects. On the other side, many experimental music practices focus on the manipulation of analog audio circuits with a clear exploratory aim [6]. As an extreme example, the popular practice of circuit bending [7] even proposes a paradoxi- cal “anti-theory” as a knowledge background for a totally empirical approach to electronic hacking. Differently from the previous empirical approaches but sharing the same ex- ploratory perspective, we propose a generative approach to Figure 1. Diode clipping circuit. audio circuit design for experimental music. The main aim of our project is to produce families of circuits, sharing some basic features, that can be printed automatically, so that each board is unique while retaining a family resem- blance with the other from the same generative model. The design methodology is a three-step process: 1. Model retrieval: as a first step, an already estab- Figure 2. Diode clamping circuit. lished audio circuit is taken into account, so to start with a well-know and working example; is to link some independent object characterized by audio 2. Functional decomposition: the circuit is theoreti- input and output (methodology, step 2). Second, it should cally decomposed into functional units that can be provide a spectral enrichment (a music desideratum) with- thought as closed elements provided with inputs and out a final amplitude overload (an audio constraint related outputs. These units can include various electronic to generative procedure, as iteration results in stacking an component configurations. Granularity at the single undefined number of components). component level (e.g. diode) is too basic to provide In relation to step 1, it can be observed that diodes ap- an operative base for generation, as too many con- plications have been widely used in audio. in particular, straints would have to be taken into account. diode clipping (Figure 1) is often used in analog and audio 3. Rule-based re-organisation: functional units are con- circuits to create distortion effects or to protect a device’s sidered as symbols to be arranged in strings follow- input from possible current overloads: as a consequence, ing a specific formalization. various schematics implementing this technique are avail- able (e.g. [8]). Diodes used in analog effects for guitar While conceptually separated, the three steps are tightly in- generally clip when the input signal voltage reaches the tegrated, as there is a constant feedback loop among search- forward threshold voltage of the component. For our cir- ing for suitable audio circuits, investigating about their fit- cuit we decided to work with Schottky diodes so to have a ting into a modular approach, and assessing the robust- very low clipping threshold (typically 0:2 V against 0:7 V ness in scaling up component assembly via generative pro- of a silicon type). cedure. In the following, we will discuss the previous In classical analog distortion guitar effects, the amplitude methodology in relation to a case study. of the input signal is limited in either directions by a fixed amount. Indeed, in these devices, the reference threshold voltage for diodes is the circuit ground, so that the input 3. MODEL RETRIEVAL AND FUNCTIONAL signal clips at the small forward voltage of the forward bi- DECOMPOSITION IN A TEST CASE ased diode. In practical applications, the threshold voltage In this section we discuss audio analog electronics, that is, of the diode, and thus therefore the signal clipping point, in reference to the previous process, both models (1) and can be set to any desired value by increasing or decreas- decomposition (2). We will discuss a specific test case to ing the reference voltage [9]. It is therefore theoretically show various emerging issues, but the former is meant as possible to modulate the clipping threshold of a wave by an example of the previously introduced, general method- setting an audio-controlled variable threshold as the for- ology. As already said, while it might be desirable to un- ward biasing of the diode. In our case, the threshold of the couple electronic circuit design from generative modeling, diode is controlled by a clamping circuit [10] (Figure 2). In there is a feedback loop between the domain to be genera- order both to isolate the effects of two circuits (clamping tively modeled (electronic circuits) and the modeling sys- and clipping) and to control impedances to implement a tem (see later). In general terms, our basic design choice simulation of an audio-modulated diode with Spice3 [11], was targeted to define an expansion procedure of a certain we improved the theoretical schematics in Figures 1 and basic circuit.