Requirements Investigation for an Interface for Csound

Authors Avatar
Requirements Investigation for an Interface for Csound

Yuhua Guo

City University, London

Northampton Square London EC1V 0HB

[email protected]

Abstract:

Csound has been around for more than 20 years and is today's standard digital sound processing program which provides powerful functions for digital sound synthesis. Csound enables people to make music with just a personal computer.

Developed originally as a command line driven program by Barry Vercoe, Csound, however, lacks the use interface capability that is needed for most of today's personal computers and this makes it difficult to use for many ordinary composers.

The difficulty of using Csound lies in the manual creation of its score and orchestra files which involves the use of many parameters.

This project aims to investigate the compositional process of music and gather a set of user requirements for developing a user interface for Csound. The interface will help composers to use Csound more easily.

TABLE OF CONTENTS

INTRODUCTION 3

2. RESEARCH CONTEXT 5

2.1 THE PRINCIPLES OF SOUND 5

2.1.1 THE HUMAN EAR 5

2.1.2 Fundamental concepts in sound and music 5

2.2 THE HISTORY OF COMPUTER MUSIC 6

2.3 MUSICAL SIGNAL SYNTHESIS 8

2.3.1 Direct synthesis algorithms 10

2.3.2 Physical Modeling Synthesis 13

2.3.3 Synthesis control signals 14

2.3.4 Musical notation and interface 16

2.4 Musical Processing Programs 19

2.5 Requirements Specification 23

3 METHODOLOGY 28

3.1 THE PRESENTATION 28

3.2 INTERVIEWS 29

3.3 THE QUESTIONNAIRE 31

3.3.1 Purpose of the questionnaire 31

3.3.2 Construction of the questionnaire 32

4 RESULTS 34

4.1 QUESTIONNAIRE RESULTS 34

4.2 ANALYSIS AND DISCUSSION 39

4.2.1 The compositional process and tools 39

4.2.2 Notation and Interface 45

4.2.3 How composers think of sound 47

4.3 RESULTS SUMMARISATION 47

6 CONCLUSIONS AND RECOMMENDATIONS 49

6.1 TEST OF OBJECTIVE 49

6.2 CONCLUSIONS AND RECOMMENDATIONS 49

6.3 LEARNING FROM THE PROJECT 51

REFERENCES 52

Introduction

Computer science has made massive progress over the years and we can now do more things with computers. One of the fields that computer has made a huge impact on is music. The compositional process used to mean sitting in front of a piano for days before getting a piece and only find out it didn't sound right after gathering an entire orchestra to perform it. With a powerful computer and the right synthesis software, composers now can compose even without musical instruments. Considering computers are now more affordable, electronic composition is therefore a convenient and economical way to make music.

Most of today's sound synthesis products evolve from tools developed by researchers in the seventies. These tools were not developed specifically for compositional purposes and researchers at the laboratory used them for scientific experiments. Csound is a programming language for sound synthesis which was developed during that time. Csound has the capability of creating any possible sounds and its capability makes it an ideal tool for composition.

Csound is however a text-based synthesis language and Csound users have to manually create the score and orchestra files that are necessarily for Csound to work. As most of today's software programs are equipped with graphical user interfaces e.g. Microsoft Visual Basic provides a graphical environment for its users to write code, the lack of an intuitive user interface makes Csound extremely difficult to use. Moreover, most composers are not natural computer programmers and the fact that most composers have to spend a huge amount of time and effort on learning Csound before they can use it to compose makes them even more reluctant to use Csound as a compositional tool.

Although there are many other musical processing programs available on the market, they in general suffer from obvious weaknesses,

* Musical processing programs with their own synthesis algorithms are by far less powerful in comparison with Csound

* Many musical processing programs that are built on top of Csound are not designed specifically for composers.

Great emphasis is always placed on utilising Csound's functions, and many developers neglect the fact that programs that are built to interact with Csound should be designed as tools to allow composers to be more focused on compositional experiments, not just help them to use Csound. Therefore quite often these programs make Csound usable but still are not ideal as compositional tools.

The primary objective of this project was to investigate the compositional process of music and gather a set of user requirements that will be used to develop a user interface for Csound. The interface will interact with Csound and allow the composers to compose with a high level of abstraction. The interface will allow the composers to focus on their imagination and realise their imagination with Csound's functionality.

A number of activities were carried out to investigate the compositional process, most importantly the interviews with professional composers. The information gathered from the composers included data of functional requirements, non-functional requirements, and requirements for the interface of the system. The data was analysed and written as a requirement specification document.

A number of tasks were taken in order to achieve the project objective. The tasks are as follows,

* A literature survey which consisted of study on requirement specification for software development, sound, musical signal processing, and a market research on some musical processing programs.

* Preparation of materials used for the investigation, this included making appointments of interviews, designing presentation slides and questionnaire, and arranging equipment for the interviews such as tape recorder.

* The investigation which included conducting a number of interview with professional composers.

* Analysis of data gathered in the interview

* Creating the requirement specification document

The project objective would be tested by conducting a requirements review with the composer who would be interviewed in the project.

A successful implementation of the proposed interface will provide composers with a friendly environment to compose utilising Csound's functions. The system will provide powerful functions for the composers to focus on exploring their imaginations and realise them very easily. Such an interface will benefit most professional composers as well as home music hobbyists.

2. Research Context

2.1 The principles of sound

To fully appreciate sound synthesis, it is important to understand the physics of the sound phenomenon. The following study was carried out during this project.

2.1.1 The human ear

The human ear is a complex system which enables us to hear and identify sounds. The ear serves as a transducer, converting sound energy to mechanical energy to a nerve impulse which is transmitted to the brain. This ability of our ears enables us to do the following actions:

* Perceive the pitch of sounds by detection of the wave's frequencies

* Perceive the loudness of sound by detection of the wave's amplitude

* Perceive the timbre of the sound by detection of the different frequencies which make up a complex sound wave

2.1.2 Fundamental concepts in sound and music

Frequency

Frequency means how often an object completes a vibration within one second.

Natural Frequency

When objects are hit, struck, plucked, strummed they tend to vibrate at a single frequency or a set of frequencies. The frequency or frequencies at which an object tends vibrate with is called nature frequency.

An object that tends to vibrate at a single frequency produces a pure tone. Other objects might vibrate at more complex frequencies, if the frequencies an object vibrates at are integer multiples of the first frequency then the object produces a musically rich tone.

The natural frequency of an object can be manipulated by changing the speed or wavelength. Therefore the natural frequency of a musical instrument can also be manipulated by change the properties of the instrument. For example, a guitarist adjusts the frequencies of a guitar by changing the linear density of each string of the guitar, by doing so he can control the frequencies at which each string vibrates. The guitarist can also control the frequencies by pressing the string against one of the frets on different positions on the neck of the guitar.

Fundamental Frequency (first harmonic / fundamental frequency)

The lowest frequency produced by any instrument is called the fundamental frequency. The fundamental has the longest period and followed by a set of harmonics which have integer multiples of the fundamental frequency.

Pitch

The sensations of frequencies are commonly referred to as the pitch of a sound. Pitch is closely related to frequency. A high pitch sound corresponds to a high frequency and a low pitch sound corresponds to a low frequency.

Harmonic

Each natural frequency that an object or instrument produces exhibits its own characteristic vibrational mode or waveform. These waveforms are only created by the object or instrument at specific frequencies of vibrations, and these frequencies are called harmonics.

Loudness

The loudness of a sound is of a subject response which depends on a few factors. Different individuals might perceive different loudness of the same sound e.g. older people might perceive a different loudness of the same sound to younger people.

Timbre

The quality of a sound that distinguishes it from other sounds of the same pitch and loudness.

Amplitude

The amplitude of a wave refers to the maximum amount of displacement of an object from its rest position.

2.2 The history of computer music

Schottstaedt (1997) defines computer music as "the production of expressive music by means of computational tools, systems or devices". Computer music is a relatively new field in the music history which emerged after the advert of computer. With the help of modern technology especially the use of powerful computers composers can now do something in music which was unimaginable before.

"I dream of instruments obedient to my thought and which with their contribution of a whole new world of unsuspected sounds, will lend themselves to the exigencies of my inner rhythm." Edgard Varese spoke these words in 1937 which reflected part of how he felt about the traditional way of composition. Throughout the music history, like many other composers, Varese was tired of the tonal, textural, and timbral capabilities of acoustic instruments. In order to hear a multi-instrument piece, at that time, the composer had to gather an entire orchestra to perform in front of him. This was a very costly and inefficient solution that could only be afforded to the very wealthy and the very famous.

Between the end of the 19th century and the beginning of the 20th century, there were major developments and extensions in musical languages such as Romanticism, Impressionism, and Expressionism etc. In sharp contrast to the extensions in the musical languages, the developments of new instruments progressed very slowly. New instruments invented often lacked the capabilities to complement the new compositional developments. In the first half of the 20th century, developments of new musical instruments were focused on the electronic synthesis of sound and electronic manipulation of sound. For example, Lev Termen invented his Theremin in 1924, a system which was capable of performing a continuous range of pitches by altering the frequency of an electronic oscillator. Many others also invented similar systems at that time, most of these systems however failed. This was because most of these systems were quite primitive in both construction and sound producing capability, also the composers at the time still preferred to use traditional instrument as their composing tool. In 1930s the electric phonograph was invented and frequently used for compositional and performance purposes. Many composers started using it as a tool for composition and thus produced many works. For example, John Cage's Imaginary Landscape No.1 was produced by using different turntable speeds to manipulate signals and mixed the results with muted piano and cymbal. As a result the works of these composers and the use of non-traditional instruments in composition gained wider acceptance.

Although phonograph were used by many composers, it was the development of the analogue tape recorder that created a working medium that allowed musicians to edit sound events for the first time in a meaningful way. Analogue tape recorder gave composers great flexibility accounting for several advantages. For example, the composer could re-record a portion of a piece of music in order to make changes or fix errors. Peter Schaeffer, a young engineer for the French national Radio, began producing tape recordings of natural sounds in 1948. These sounds included locomotive sounds, wind, thunder, and others. He used tape recorder to transform the sounds in several ways and performed it in Paris in October of 1948, this was the first public performance of music that was not played by humans. This kind of music was initially called "electronic concrete" because the sounds were concrete and sonorous objects that could not be plastically manipulated, and later it was changed to a more popular term "electronic music". At around the same time many other similar experiences were also conducted with analogue tape recorders and many other works were composed. Among them, Karlheinz Stockhausen's Elektronische Studien II was famous because it was first electronic composition to be formally notated. The recognition gained by the works of Stockhausen, as well as interest in the instruments which he had exploited in their production, had a profound influence on worldwide research combining music and technology. A few years later, some American institutions attempted to use computers for musical composition but without much success. Luening and Ussachevsky eventually recognised this idea and successfully received a grant from the Radio Corporation of America (RCA). In 1959 they developed the first analogue synthesiser.

Many American institutions took part in the computer music research and many composers became interested in the equipment developed in RCA and started using them to compose. Milton Babbitt produced his first electronic work in 1961 called "Composition for Synthesiser", which was described by Manning (1976) as "the fruit of a seemingly effortless transition from his strictly ordered style of instrumental writing to an electronic equivalent". Compared to analogue tape recorders, analogue synthesisers eliminated not only the need for tape manipulation but also for the laborious task of interconnecting numerous electronic components. Babbitt and a few other famous composers' keen interest in using the analogue synthesiser increased the interest in electronic music even further. As the result of research at numerous institutions and commercial research, voltage controlled synthesiser was developed later. Voltage controlled synthesiser was basically a devise that contained a separate module that could control each individual variable of sound, and then allowed all of those modules to function together under a common voltage control. Microprocessors became available in the 70s and eventually making music with a home computer became reality in the later 70s.

The first real music program was written in 1957 by Max Mathews, an engineer at the Bell Telephone Laboratories in New Jersey. He called his program "MUSIC" which was capable of playing single line tunes. MUSIC ran on a mainframe computer which, by today's standard, was slow and expensive to run and took a long time to compose a small piece. The program however attracted quite a few researchers who were enthusiastic about this new development. As a result, they all worked with Mathews' system and made various updates and improvements over the years. As computers became smaller, faster, and cheaper in 1970s, computers became capable of performing some complex tasks such as handling live performance. As computers continue to become more powerful, an electronic composer nowadays does not need more than a powerful enough machine and some good software synthesisers to do the composition at home.

2.3 Musical Signal Synthesis

Any sound produced by acoustic instruments is the result of physical vibration of a resonating structure. The vibration activity can be described by signals corresponding to the evolution in the time of the acoustic pressure generated by the resonator. The fact that sound can be characterised by signals means that computers can used to generate sounds either for imitation of musical instruments or generation of new sounds. The problem for doing so earlier was because mainframes were too slow and expensive to use. But now even an average PC is powerful enough to handle the heavy number crunching required by real-time music synthesis.

Synthesis algorithm is the core of any synthesis software, each has its own characteristics that is preferred by different people. There are many sound synthesis algorithms currently available either commercially or in the academic community. Current algorithm development trend is towards computational efficiency and user friendlier interface. This means that it is now easier for composers to get access to many synthesis tools, and at the same time be also able to quickly use them without spending a great deal on learning. A sound synthesis algorithm can be thought of as digital model for a sound itself. A digital model can serve two purposes which are representing and generating a whole class of sounds through the appropriate use of control parameters. The class of sounds here means the sounds generated according to their generation mechanisms. For example, strings and woodwinds are two classes of sounds because the mechanisms used to generate them are different. The degree of the compactness of a class of sounds is determined by two factors, the sensitivity of the digital model to parameter variation and the amount of control needed to produce a desired sound. A digital model can be used to represent classes of sound sample by sample, in this case, the control signal of the digital model is represented by the sound itself. Therefore it is impossible to modify the model and the composer can not control the model, but on the other hand, the number of samples can be generated using the model is unlimited. In the opposite case, a digital model can be constructed as a physical instrument that can be used to generate different sounds that belong to the same class. The generation of different sounds is achieved through the use of parameters. Because the model represents only one specific sound generation mechanism, the number of sounds can be generated is much more limited than that of the previous model. The advantage of the second model is that the composer can control the model through the use of parameters of the model. For example, the composer can modify the pitch of a particular sound generated by changing the parameter that determines the pitch level of the sound. So in conclusion, the compactness of the class of sounds associated with a synthesis algorithm is in contrast with the playability of the algorithm. The playability of a synthesis algorithm is very important to a musician who replies on the synthesis software to compose. As most of musicians are not computer scientists any algorithms should provide an intuitive and easy access to its control parameters.

Most synthesis algorithms have different reasons for their original inception and different applicability to actual synthesis needs. That means there does not exist a general purpose algorithm that is good at everything. The usefulness of an algorithm is determined by some important factors that include the parameters the algorithm requires to work, the computational load an algorithm places on the hardware, the kinds of sounds the algorithm can produce without requiring extensive modification and/or tuning, the ease of controlling the algorithm, and the ease of implementation. Out of those the parameters is always the most important factor for an algorithm. Control parameters of a synthesis algorithm can serve different purposes. A very traditional way of the use of control parameters is to generate all the different sounds that belong to the class characterised by the algorithm. This application of parameters has become inefficient, as musicians nowadays are more concerned with other issues such as the timbral dynamics and musical expression problems. For example, timbral difference between soft (dark) and loud (brilliant) tones are usually obtained through parameter control. Algorithms must enable the composers to achieve these goals with the appropriate use of parameters.

Synthesis algorithms can be generally divided into two classes, class direct synthesis algorithms and physical modelling techniques. Some of the well-known algorithms are described as follows.

2.3.1 Direct synthesis algorithms

2.3.1.1 Sampling

Although some sounds are very difficult to synthesise with a synthesiser, it is possible to reproduce them through recording. The idea behind sampling is to store a large quantity of examples of complete sounds produced by musical instruments, then when a sound is needed just directly replay a sound from the repertoire.

Sampling has its advantages and disadvantages. On one hand, sampling is very versatile as you can almost sample every single sound with it, it is also easy and efficient to implement, leading to low cost design. Moreover, when combined with some additional processing, very convincing acoustical instrument simulations can be achieved. For example, sampling can produce very good result for drums. On the other hand, sampling requires a lot of memory and high performance computational device. Because sampling doesn't have many parameters, it is difficult to modify the sound. A common way to modify is to change the sampling speed (rate) which results in a pitch deviation and too many pitch deviations might lead to unnatural timbral modifications.

2.3.1.2 Subtractive Synthesis

Subtractive synthesis is often referred to as analogue synthesis as most analogue synthesizers employ this method to generate sounds. It starts with a complex sound that has a complex waveform, then obtain a desired sound by using a filter to remove unnecessary portions of the sound. Subtractive synthesis is a simple process, which involves the following steps in order to generate a sound,

* An Oscillator is used to generate a suitably bright sound.

* A Filter is used to cut-off or cut-down the brightness to something more suitable.

* An Amplifier is used to control the loudness of the sound over a period of time so as to emulate a natural instrument.

Diagram3.1

Because most low order filtering is very intuitive, subtractive synthesis is very easy to use. Most of its parameters also have proper psychoacoustical semantics as timbre is created by taking a proper starting waveform and shaping its spectrum with filters. Modulation is then used to adjust the sound and make it sound more lively and organic. Sounds generated by subtractive synthesis are very similar to those we used to hear. On the negative side, it is very hard to generate accurate acoustical sounds using subtractive synthesis because of its simplicity. Digital implementations are often problematic and require extensive modification and addition of features in order to sound good.

2.3.1.3 Additive Synthesis
Join now!


Additive synthesis works the opposite way from subtractive synthesis. While subtractive synthesis produces a new sound by removing portions of an initial sound, additive synthesis builds a complex sound by adding simple sounds together. Additive synthesis is based on Fourier theory that is: every sound can be created by combining multiple sine waves at different frequencies, phase angles, and amplitudes.

Implementation of additive synthesis requires the creation of many sine waves. This is because most instrumental sounds include rapidly varying and stochastic components that arise from nonlinear interactions in the instruments. This structure means the synthesis ...

This is a preview of the whole essay