Embedded Sound Synthesis

Embedded Sound Synthesis

Embedded Sound Synthesis Victor LAZZARINI, Joseph TIMONEY and Shane BYRNE Sound and Digital Music Technology Group Maynooth University Maynooth, Co.Kildare Ireland, fVictor.Lazzarini, Joseph.Timoney, [email protected] Abstract ity of Csound, which has been shown to run This article introduces the use of the Intel Galileo on a great variety of platforms, from super- development board as a platform for sound synthe- computers2 to mobile[Lazzarini et al., 2012][Yi sis and processing, in conjunction with the Csound and Lazzarini, 2012] and web[Lazzarini et al., sound and music computing system. The board in- 2014], and now on embedded systems such as cludes an Arduino-compatible electronics interface, the Galileo. The hardware and software combi- and runs an embedded systems version of the Linux nation discussed in this paper has the potential operating system. The paper describes the relevant of opening up a variety of new applications for hardware and software environment. It introduces a port of Csound, which includes custom frontends electronic music composers and performers. that take some advantage of the board capabilities. As a case study, we have developed a com- As a case study, a MIDI synthesizer is explored as plete software image for the system, which al- one of the many potential applications of the system. lows it to be booted up as an outboard MIDI Further possibilities of the technology for Ubiquitous synthesizer. This paper is organised as follows: Music are also discussed, which use the various in- we first describe the hardware and software en- terfacing facilities present on the Galileo. vironment that is available to Galileo develop- Keywords ers. We then discuss the details of the port of the Csound system, and its custom frontend Embedded systems, sound synthesis and processing, that takes advantage of the board's Arduino- music programming, Ubiquitous Music like capabilities. This is followed by a report 1 Introduction on our case study, the MIDI synthesizer. Fi- nally, we propose some further applications of The Intel Galileo board1 (fig.1) is an embed- the technology. ded systems development board based on the Quark System-on-Chip (SoC), which includes an Arduino-like functionality (and compatibil- 2 Galileo hardware and software ity with some existing extension shields and software). The board can be used as a straight Galileo boards have been produced under replacement for the Arduino Uno boards, with two slightly different hardware configurations, a customised Arduino Integrated Development namely, original (GEN1, pictured in fig.1), Environment (IDE) that allows programming of and a revised specification (GEN2, pictured 3 applications (sketches) using the Wiring library. in fig.2) . They generally run under custom, The Galileo, however, runs under a Linux-based specially-designed, Linux for embedded systems operating system, and thus allows other modes images, created and supported by the Yocto 4 of application that are not restricted to Arduino Project . The board can be booted up from the IDE sketches, and which can take more com- flash memory (containing a minimal/small linux plete advantage of the board capabilities. image), or from the SD card, which can contain In this article, we examine the use of more complete operating system images. the Galileo board for sound synthesis and processing, with the Csound[ffitch et al., 2Csound was used as part of two class C projects 2014][Boulanger, 2000] sound and music com- at the Irish Centre for High-Performance Computing puting system. We demonstrate the scalabil- (ICHEC) exploring parallel processing for audio 3http://www.intel.ie/content/www/ie/en/ 1http://arduino.cc/en/ArduinoCertified/ do-it-yourself/galileo-maker-quark-board.html IntelGalileo 4https://www.yoctoproject.org Figure 1: The Intel Galileo (GEN1) with ethernet and USB connections 2.1 Hardware specifications put/output functions). The Quark GPIOs allow The two share some basic attributes that in- faster switching performance, through a dedi- clude a Quark processor, which has the same cated software interface. Analog IOs are imple- instruction set to the Pentium, or i586, CPU, mented in GEN1 via an Analog Devices AD7298 and contains a single core running at 400 ADC IC, providing 12 bits of resolution, and MHz (also known as `Clanton')5, 10/100Mbit in GEN2 via a Texas Instruments ADS108S102 ethernet, PCI Express, USB 2.0 device and IIO-ADC, which is 10-bit (scaled to a 12-bit host interfaces, and microSD card reader. range for compatibility purposes). Pulse-width GEN1 boards have a 3.5 mm RS-232 connec- modulation (PWM) is also implemented differ- tor, whereas GEN2 replaces this with a 6-pin ently on the GEN2 board, providing higher res- Transistor-Transistor Logic (TTL) Universal olution. Asynchronous Receiver-Transmitter (UART) header that is compatible with standard adap- 2.2 Software systems tors. The board is generally run under a specially- The Galileo uses the standard Arduino pin built Linux OS image, although a Debian-based layout, which includes 20 General-Purpose In- system has also recently been tested, and Mi- put/Output (GPIO) pins (6 multiplexed as ana- crosoft has also provided a cut-down version of log inputs), plus power and Serial Peripheral Windows 8 for it. We will discuss here the orig- Interface (SPI) headers. The hardware imple- inal Linux software that has been designed for mentation of these is different in GEN1 and the board. There are two types of Linux im- GEN2. In the former, an external GPIO ex- ages that are used in the Galileo, based on dif- pander chip (Cypress CY8C9540A) is used to ferent versions of the standard C library. The control most of the pins in the shield, with only smaller image, mostly meant to be run from two Quark GPIOs connected directly (accessi- the limited space in the board flash memory, ble via a multiplexer switch). The latter has is built with uClibc. This library was originally 12 Quark GPIOs fully accessible to the head- designed for embedded Linux systems not us- ers, and uses a different GPIO expander chip ing memory management units, but also runs layout (3 NXP PCAL9535A), mostly to con- on standard Linux. The other type of image is trol multiplexing (leaving eight available for in- based on eglibc, which was designed for embed- 5http://ark.intel.com/products/79084/ ded systems but is generally compatible with Intel-Quark-SoC-X1000-16K-Cache-400-MHz the standard glibc. This library is more suit- Figure 2: The Intel Galileo (GEN2) with ethernet, USB audio and a potentiometer connected to analog input 1 (pin A1) able for SD card-based installations with no size USB or PCI Express interfaces. constraints, as it is more fully-featured and pro- vides better performance than uClibc. Software built with the Arduino IDE normally depends 3 Csound for the Galileo on uClibc, and therefore will not run on an eglibc image (although the Arduino IDE can be A fully-functional port of Csound was built for rebuilt from source to target this). the Galileo board using the cross-compilation 2.2.1 Development environment environment described above. The only two ba- Although it is possible to include all the devel- sic dependencies for Csound are libsndfile (for opment tools and use the board itself to build soundfile access) and the ALSA library (for re- software, it is more advisable to set up a cross- altime audio and MIDI). Although the image compiling toolchain on a host computer. This built with the provided BSP contains both, is done by building an image and the toolchain there are still a few issues to be resolved be- from the sources, through a Linux Board Sup- fore we can build the system. Firstly, the cross- port Package (BSP) provided by Intel for the compilation environment installation does not Clanton platform. The BSP is a collection of appear to include the ALSA headers, so these scripts (shell scripts, python scripts, recipes, need to be copied manually from the sysroot in etc) built with the resources provided by the the Yocto build to the installed toolchain sys- Yocto Project, that allows us to build full Linux- root. based operating systems for specific embedded Secondly, the libsndfile originally provided platforms. It uses the bitbake tool to collect all by the Yocto build is broken, as it depends on the information in the various scripts, download large file offset support that is not provided from sources, patch, build, and install the oper- as standard by the system. So we have to ating system software. The Galileo Yocto BSP modify the bitbake build recipe (provided in can be used to build a fully-functional eglibc- ./poky/meta/recipes-multimedia/libsndfi based Linux standard base distribution, and a le/libsndfile1 1.0.25.bb) to configure Software Developer Kit (SDK) containing a gc- the build with -D FILE OFFSET BITS=64, and c/g++ toolchain. Most importantly for us, this rebuild the image and SDK. With this in place, Linux image contains the alsa library, and with we can proceed to build Csound in the usual it, we can access soundcards connected via the manner, using the CMake tools. 3.1 Custom frontends 3.3 Digital input and output In order to access the basic Arduino-like func- The remaining 14 pins can be used for general- tionality of the Galileo, specific frontends were purpose digital input or output. Access is developed: gcsound (GEN1) and gcsound2 provided as requested, through blocking read- (GEN2). This functionality can be divided ing/writing operations. This functionality is into two groups: access to analog inputs, and implemented as new opcodes in the system: access to the GPIO digital input and output.

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