Chiptune Synthesis
Total Page:16
File Type:pdf, Size:1020Kb
- UFEE63-30-3 - A modern implementation of chiptune synthesis by Philip Phelps (#03974520) Summary A chiptune can be broadly categorised as a piece of music produced by sound chips in home computer/ games systems popular in the 1980s into the 1990s. The synthesis techniques often employed in chiptunes involve the careful control of the hardware features available in the sound chips. Such chips generally featured a limited number of simple oscillators with simple waveforms such as square, triangle, pseudorandom noise, and so on. In order to create more interesting sounds, chiptune composers rely on software synthesis structures that are used to configure the sound chip to alternate between waveforms, and to alter the pitch of the oscillators. MaxMSP is a graphical programming environment developed by Cycling’74. This report documents the reasons behind the decision to choose MaxMSP for the design and implementation of a software synthesiser for the creation of chiptunes. The report presents the detailed research into the sound hardware, and software used for composing chiptunes, exposing the differences in user interface design between modern composition software tools such as MIDI sequencers and historic composition tools such as trackers. Several pieces of historic software are examined; with elements of each user interface being assessed for inclusion in a modern software synthesiser user interface. The report also explains in detail the internal hardware structure of several popular sound chips (such as the General Instruments AY-3-8910) and examines several examples of software structures used to control the hardware synthesis structures inside the chips. The report documents the design of numerous software modules (programmed in the MaxMSP environment) and explains how each module can be combined to form the software synthesiser. Several block diagrams are included, explaining the internal structure of various modules, along with detailed maintenance notes for each module to help other programmers continue development of the system. The report assesses the computational efficiency of the produced synthesiser, and suggests several possible improvements that could be made in this area. The development of an “external” MaxMSP object in the C programming language is also documented, with fully commented source code provided. - i - Acknowledgements The author would like to thank Dr. David Creasey for his support and helpful comments during the project, and Dr. Barbara Savage for the conversations that inspired several diagrams in the introduction chapter. The author would also like to thank Gareth Morris (gwEm) for the guidance regarding Atari chiptune terminology, Max Matthews, Miller Puckette and the Cycling’74 team for creating MaxMSP, and to my mother for help during the proof reading. - ii - Table of contents Chapter 1 Introduction ................................................................................... 1 1.1 Motivation ............................................................................................1 1.2 Chiptune sound character..........................................................................5 1.3 Introduction to MaxMSP and PureData ...........................................................5 1.4 Objectives ............................................................................................7 1.5 Strategy ...............................................................................................8 1.5.1 Design strategy .................................................................................8 1.5.2 Project management strategy.............................................................. 11 1.5.3 Software development strategy............................................................ 13 1.5.4 Report structure management ............................................................. 15 1.5.5 Testing strategy .............................................................................. 16 1.6 A brief overview of MIDI .......................................................................... 18 1.7 Trackers vs. MIDI sequencers .................................................................... 19 1.8 Layered systems ................................................................................... 22 Chapter 2 Interface considerations .................................................................. 25 2.1 Choosing the development environment....................................................... 25 2.1.1 Environment decision ........................................................................ 27 2.2 Historic interfaces................................................................................. 27 2.2.1 Historical sound design interface influences ............................................. 28 2.3 Modern interfaces ................................................................................. 34 2.3.1 Genetic algorithm ............................................................................ 34 2.3.2 Possible solution to “tracker instrument numbers” problem .......................... 35 2.3.3 Parameter storage ........................................................................... 36 Chapter 3 Synthesis considerations .................................................................. 37 3.1 Historic hardware synthesis...................................................................... 41 3.2 Historic software synthesis....................................................................... 42 3.2.1 Software with similar goals to the project ............................................... 45 3.3 Modern techniques ................................................................................ 46 Chapter 4 Summary of findings ....................................................................... 47 4.1 Major decisions – changes to objectives ....................................................... 47 4.2 Summary of findings .............................................................................. 48 4.3 Specifications and requirements ................................................................ 49 Chapter 5 Implementation ............................................................................. 49 5.1 MaxMSP terms and conventions ................................................................. 51 5.1.1 Fundamental concepts and terms.......................................................... 51 5.1.2 Commonly used objects ..................................................................... 53 5.2 Overview of system ............................................................................... 55 5.3 Synthesis ............................................................................................ 57 5.3.1 The [clockedseq~] abstraction ............................................................. 60 5.3.2 Arpeggiation and Portamento [arpporta~] abstraction ................................. 67 5.3.3 The [midiarpeggiator~] abstraction ....................................................... 70 5.3.4 The [midiportamento~] abstraction ....................................................... 73 5.3.5 The [lfo~] abstraction ....................................................................... 75 5.3.6 Oscillators ..................................................................................... 77 5.3.7 Amplitude envelope structure.............................................................. 80 - iii - 5.3.8 Ringmodulation............................................................................... 82 5.3.9 The [envelope~] abstraction ............................................................... 85 5.4 Interface components ............................................................................ 88 5.4.1 The [Interface] abstraction................................................................. 88 5.4.2 [midinotefilter] abstraction ................................................................ 91 5.4.3 [filterprocessing] abstraction .............................................................. 92 5.5 [editor] GUI abstraction.......................................................................... 95 5.5.1 Control methods.............................................................................. 96 5.5.2 Step sequencers .............................................................................. 97 5.5.3 Envelopes..................................................................................... 100 5.5.4 [calculator] patch........................................................................... 101 5.5.5 [mixer~] patch............................................................................... 102 5.6 Communication and storage of parameters .................................................. 105 5.6.1 [transportdata] abstraction................................................................ 108 5.6.2 [convertdata] abstraction.................................................................. 109 5.7 Improving computational efficiency........................................................... 110 5.8 Custom MaxMSP external........................................................................ 112 5.8.1 Requirements specification................................................................ 112 5.8.2 Implementation ............................................................................. 113 5.8.3 Problems and abandonment ............................................................... 115 Chapter 6 Conclusions