On The Design of Csound5 LAC2005 John ffitch On The Design of - - PowerPoint PPT Presentation

on the design of csound5
SMART_READER_LITE
LIVE PREVIEW

On The Design of Csound5 LAC2005 John ffitch On The Design of - - PowerPoint PPT Presentation

On The Design of Csound5 LAC2005 John ffitch On The Design of Csound5 p.1/21 Introduction On The Design of Csound5 p.2/21 Introduction Csound written by Barry Vercoe circa 1985 as a member of the MusicV family. It provides a wide


slide-1
SLIDE 1

On The Design of Csound5

LAC2005

John ffitch

On The Design of Csound5 – p.1/21

slide-2
SLIDE 2

Introduction

On The Design of Csound5 – p.2/21

slide-3
SLIDE 3

Introduction

Csound written by Barry Vercoe circa 1985 as a member of the MusicV family. It provides a wide variety of sound synthesis and analysis techniques.

On The Design of Csound5 – p.3/21

slide-4
SLIDE 4

Introduction

Csound written by Barry Vercoe circa 1985 as a member of the MusicV family. It provides a wide variety of sound synthesis and analysis techniques. I started working on Csound about 1990 when I ported it to a DOS machine as a wet-weekend activity

On The Design of Csound5 – p.3/21

slide-5
SLIDE 5

Introduction

Csound written by Barry Vercoe circa 1985 as a member of the MusicV family. It provides a wide variety of sound synthesis and analysis techniques. I started working on Csound about 1990 when I ported it to a DOS machine as a wet-weekend activity A large (?) and growing, diverse, user community, supported by a small group of programmers.

end

On The Design of Csound5 – p.3/21

slide-6
SLIDE 6

Problems over Time I: Legal

On The Design of Csound5 – p.4/21

slide-7
SLIDE 7

Problems over Time I: Legal

  • Licenced under the M.I.T. licence that allows educational

and research purposes only .... For any other uses...including... distribution...specific prior permission...must be obtained.

On The Design of Csound5 – p.4/21

slide-8
SLIDE 8

Problems over Time I: Legal

  • Licenced under the M.I.T. licence that allows educational

and research purposes only .... For any other uses...including... distribution...specific prior permission...must be obtained.

  • So, assuming creating music is research, download sites

were in effect a monopoly, and actually granted to just two

  • f us.

On The Design of Csound5 – p.4/21

slide-9
SLIDE 9

Problems over Time I: Legal

  • Licenced under the M.I.T. licence that allows educational

and research purposes only .... For any other uses...including... distribution...specific prior permission...must be obtained.

  • So, assuming creating music is research, download sites

were in effect a monopoly, and actually granted to just two

  • f us.
  • Conflicts with other innovations, and isolated the Csound

software from other developments.

end

On The Design of Csound5 – p.4/21

slide-10
SLIDE 10

Problems over Time II: Use

On The Design of Csound5 – p.5/21

slide-11
SLIDE 11

Problems over Time II: Use

  • Users started demanding real-time output

On The Design of Csound5 – p.5/21

slide-12
SLIDE 12

Problems over Time II: Use

  • Users started demanding real-time output
  • Demands for embedding Csound in other programs

and/or other programs in Csound

end

On The Design of Csound5 – p.5/21

slide-13
SLIDE 13

Towards The Big Freeze

Csound was written in K&R C, and converted to ANSI in the

  • 1990s. The code style is 1970’s, with ad hoc parsing

processes and few comments. Eventually MIT’s lawyers agreed to a licence change to LGPL, and all authors agreed to the new licence.

On The Design of Csound5 – p.6/21

slide-14
SLIDE 14

Architecture of Csound4

Opcodes Orchestra Reader Musmon

On The Design of Csound5 – p.7/21

slide-15
SLIDE 15

The Big Freeze

In 2001, following false starts, we began the big freeze.

On The Design of Csound5 – p.8/21

slide-16
SLIDE 16

The Big Freeze

In 2001, following false starts, we began the big freeze.

  • No new opcodes or language developments.

On The Design of Csound5 – p.8/21

slide-17
SLIDE 17

The Big Freeze

In 2001, following false starts, we began the big freeze.

  • No new opcodes or language developments.
  • Bug fixing would continue as necessary

On The Design of Csound5 – p.8/21

slide-18
SLIDE 18

The Big Freeze

In 2001, following false starts, we began the big freeze.

  • No new opcodes or language developments.
  • Bug fixing would continue as necessary
  • A separate code tree would be started

On The Design of Csound5 – p.8/21

slide-19
SLIDE 19

The Big Freeze

In 2001, following false starts, we began the big freeze.

  • No new opcodes or language developments.
  • Bug fixing would continue as necessary
  • A separate code tree would be started
  • A small plugin system was made available for Csound for

users to create new operations is they must.

end

On The Design of Csound5 – p.8/21

slide-20
SLIDE 20

Requirements

On The Design of Csound5 – p.9/21

slide-21
SLIDE 21

Requirements

  • Make the system embeddable by creating an API

On The Design of Csound5 – p.10/21

slide-22
SLIDE 22

Requirements

  • Make the system embeddable by creating an API
  • Use of other people’s libraries as much as possible

On The Design of Csound5 – p.10/21

slide-23
SLIDE 23

Requirements

  • Make the system embeddable by creating an API
  • Use of other people’s libraries as much as possible
  • Re-enterable and multi-instantiation of code

On The Design of Csound5 – p.10/21

slide-24
SLIDE 24

Requirements

  • Make the system embeddable by creating an API
  • Use of other people’s libraries as much as possible
  • Re-enterable and multi-instantiation of code
  • User interface code to be separated from the engine

On The Design of Csound5 – p.10/21

slide-25
SLIDE 25

Requirements

  • Make the system embeddable by creating an API
  • Use of other people’s libraries as much as possible
  • Re-enterable and multi-instantiation of code
  • User interface code to be separated from the engine
  • A new parser that is maintainable

On The Design of Csound5 – p.10/21

slide-26
SLIDE 26

Requirements

  • Make the system embeddable by creating an API
  • Use of other people’s libraries as much as possible
  • Re-enterable and multi-instantiation of code
  • User interface code to be separated from the engine
  • A new parser that is maintainable
  • Cross platform and ALL OLD PIECES MUST RUN

UNCHANGED

end

On The Design of Csound5 – p.10/21

slide-27
SLIDE 27

Architecture of Csound5

External Libraries Orchestra Reader Engine Input/Output Messages Base Opcodes Loadable Library

On The Design of Csound5 – p.11/21

slide-28
SLIDE 28

Implementation

On The Design of Csound5 – p.12/21

slide-29
SLIDE 29

Implementation

  • API largely the work of Michael Gogins, and he has used

it in VST plugin Csound.

On The Design of Csound5 – p.13/21

slide-30
SLIDE 30

Implementation

  • API largely the work of Michael Gogins, and he has used

it in VST plugin Csound.

  • Libraries for

Audio files (libsndfile) Realtime audio I/O (portaudio) MIDI (portMIDI) Graphics (FLTK)

On The Design of Csound5 – p.13/21

slide-31
SLIDE 31

Implementation

  • API largely the work of Michael Gogins, and he has used

it in VST plugin Csound.

  • Libraries for

Audio files (libsndfile) Realtime audio I/O (portaudio) MIDI (portMIDI) Graphics (FLTK)

  • A Static and Global hunt continues, but most now

encapsulated in a single struct that maintains the instances’ state.

On The Design of Csound5 – p.13/21

slide-32
SLIDE 32

Implementation (continued)

  • Use of SCons as the controlled builder; multi-platform and

has proved robust and a good decision after many problems with autoconf etc..

On The Design of Csound5 – p.14/21

slide-33
SLIDE 33

Implementation (continued)

  • Use of SCons as the controlled builder; multi-platform and

has proved robust and a good decision after many problems with autoconf etc..

  • Running on Linux, OSX, Windows and OS9, and probably
  • thers.

On The Design of Csound5 – p.14/21

slide-34
SLIDE 34

Implementation (continued)

  • Use of SCons as the controlled builder; multi-platform and

has proved robust and a good decision after many problems with autoconf etc..

  • Running on Linux, OSX, Windows and OS9, and probably
  • thers.
  • And still no parser.....

end

On The Design of Csound5 – p.14/21

slide-35
SLIDE 35

Unplanned Developments

On The Design of Csound5 – p.15/21

slide-36
SLIDE 36

Unplanned Developments

Initially the idea of plugins was suggested to allow commercial or patented opcodes to be deployed. I moved many existing opcodes to plugins as a demonstration that it could be done.

On The Design of Csound5 – p.16/21

slide-37
SLIDE 37

Unplanned Developments

Initially the idea of plugins was suggested to allow commercial or patented opcodes to be deployed. I moved many existing opcodes to plugins as a demonstration that it could be done. Now most opcodes are loaded from libraries.

On The Design of Csound5 – p.16/21

slide-38
SLIDE 38

Unplanned Developments

Initially the idea of plugins was suggested to allow commercial or patented opcodes to be deployed. I moved many existing opcodes to plugins as a demonstration that it could be done. Now most opcodes are loaded from libraries. Extended to allow plugin table generators

On The Design of Csound5 – p.16/21

slide-39
SLIDE 39

Unplanned Developments

Initially the idea of plugins was suggested to allow commercial or patented opcodes to be deployed. I moved many existing opcodes to plugins as a demonstration that it could be done. Now most opcodes are loaded from libraries. Extended to allow plugin table generators Extended to allow plugin realtime audio and MIDI

On The Design of Csound5 – p.16/21

slide-40
SLIDE 40

Unplanned Developments

Initially the idea of plugins was suggested to allow commercial or patented opcodes to be deployed. I moved many existing opcodes to plugins as a demonstration that it could be done. Now most opcodes are loaded from libraries. Extended to allow plugin table generators Extended to allow plugin realtime audio and MIDI Extended to allow plugin untilities.......(as of Monday)

end

On The Design of Csound5 – p.16/21

slide-41
SLIDE 41

Experience

On The Design of Csound5 – p.17/21

slide-42
SLIDE 42

Experience

  • The whole process has taken much longer than expected,

and caused much more aggravation.

On The Design of Csound5 – p.18/21

slide-43
SLIDE 43

Experience

  • The whole process has taken much longer than expected,

and caused much more aggravation.

  • Libsndfile was an excellent decision and has worked.

On The Design of Csound5 – p.18/21

slide-44
SLIDE 44

Experience

  • The whole process has taken much longer than expected,

and caused much more aggravation.

  • Libsndfile was an excellent decision and has worked.
  • Portaudio has been less successful; we started with v19

expecting it to be finished well before us. It works on Linux, but the direct ALSA plugin seems better. On OSX we have had much trouble. Windows just seems confusing.

On The Design of Csound5 – p.18/21

slide-45
SLIDE 45

Experience

  • The whole process has taken much longer than expected,

and caused much more aggravation.

  • Libsndfile was an excellent decision and has worked.
  • Portaudio has been less successful; we started with v19

expecting it to be finished well before us. It works on Linux, but the direct ALSA plugin seems better. On OSX we have had much trouble. Windows just seems confusing.

  • PortMIDI is OK, but does not do as much as hoped.

On The Design of Csound5 – p.18/21

slide-46
SLIDE 46

Experience

  • The whole process has taken much longer than expected,

and caused much more aggravation.

  • Libsndfile was an excellent decision and has worked.
  • Portaudio has been less successful; we started with v19

expecting it to be finished well before us. It works on Linux, but the direct ALSA plugin seems better. On OSX we have had much trouble. Windows just seems confusing.

  • PortMIDI is OK, but does not do as much as hoped.
  • Much code cleaning has been done, but lost localisation.

end

On The Design of Csound5 – p.18/21

slide-47
SLIDE 47

Current State

On The Design of Csound5 – p.19/21

slide-48
SLIDE 48

Current State

  • On Linux it works well, reported as fast and robust. Has

been used in live performance. I would not use ant other than CS5 now.

  • On Windows is almost acceptable.
  • Manual now under control.
  • Still no parser.....

end

On The Design of Csound5 – p.20/21

slide-49
SLIDE 49

Current State

  • On Linux it works well, reported as fast and robust. Has

been used in live performance. I would not use ant other than CS5 now.

  • On Windows is almost acceptable.
  • Manual now under control.
  • Still no parser.....

end

On The Design of Csound5 – p.20/21

slide-50
SLIDE 50

Current State

  • On Linux it works well, reported as fast and robust. Has

been used in live performance. I would not use ant other than CS5 now.

  • On Windows is almost acceptable.
  • Manual now under control.
  • Still no parser.....

end

On The Design of Csound5 – p.20/21

slide-51
SLIDE 51

Conclusions

This was an exercise in evolution not revolution. We are close to release, and already have users. I also wish to acknowledge the significant efforts of the community in saying what they want; and in particular

Michael Gogins for the API, and Windows development. The

influence of Richard Boulanger is always with me to encourage when things go badly. And especially Istvan Varga, who has done so much in the last 3 months, especially while I was disabled with RSI.

On The Design of Csound5 – p.21/21