One of the basic properties of music is being a language, unlike any other language, yet a language. Else neither composition, nor
improvisation, nor barbershop singing, nor Burundi drumming, nor afternoon raga would have made sense.
A computer programming instructions set can be a language as well, although unlike "natural" languages. Libraries of basic computer
instructions have once been used directly for creating simple sounds. More complex sound production tasks
required more complex tools with instruction sets structured into programming languages. It is interesting how some
general programming languages, structured mathematically, also turned usable for music tools programming.
A evolutional step forward transforms tools to make music into tools to make tools to make music.
Here the hierarchy and priority of structured music making tasks also structured the software tools regarding
their purpose.
Software devised for playing something can be written in several programming languages, text-based and visual, simple and complex,
procedural or objective. Depending
on the language, a software program may be compiled or interpreted.
In educative environments, with the objective of showing someone how something can work, or illustrate
a scientific thesis, interpreted languages show advantage, for simplicity and making the machine immediately show
the effect of programming.
Simple code examples - Common text-based languages : C and C++:
In the art this may not be enough; it's not about knowing something can be done, but doing it as well.
In audio software the task is furtherly aggravated by the fact that intensive sound making calculation happens in time,
the result must be musically acceptable, certain and convincing.
This has its price, which is showing in need for preparation, cautious choice of materials, methods and some extra work.
Compiled languages go for advantage of compiled programs, being few orders of magnitude faster than the
interpreted programs, thus meeting strength requirements of industrial real-time processing tools. Few of these languages are being long enough in use,
to have become well known and have a huge number of competent professionals constantly working on their improvement.
For time-critical tasks in sound and music computation, compiled language show advantage in terms of writing audio software.
Where human interaction is an issue, rather than performance latency, interpreted languages show clear advantage.
Modern computer music environments combine advantages of the both, respectively.
Among the living computer languages C is being favored in our sound-generation workshops, for being mature, ubiquitous, small and efficient.
It performs well in terms of tradition and innovation, computing power and demands on the author/programmer,
robustness and sophistication, reliability and real time
control of programs. Vast majority of audio software and entire operation systems are written in
C. Even specialized, musically oriented high level languages, such as
Cmix or Csound use a C-reminiscent syntax and are rooted in C. Basic examples walktrhough of programming in graphic environments such as
PD i MAX will also be shown.
Code examples & Reference - High level music-oriented text-based language: RTcmix:
Basic code examples - Graphical languages : Pd and MAX/MSP: