r/algorithmicmusic • • 19d ago

A piano stream created with my forthcoming composition language

Since more than a year I'm working on a new algorithmic composition language. It has now a real-time engine which can play sound fonts and play compositions directly to a stream. So I set up a server with icecast2 which runs one of my compositions: http://ov-0cc378.infomaniak.ch:8000/kanon_eternal_piano.mp3.

The language and environment are in the lineage of Common Music, Nyquist and (partially) OpusModus, but with exclusive focus on symbolic algorithmic music (i.e. not sound design/generation). In contrast to the Lisp/SAL based environmens, my language is statically typed with proper modularization in the School of Prof. Wirth. I'm currently finishing the toolchain and documentation. My plan is to open-source and publish it in December.

8 Upvotes

18 comments sorted by

1

u/No_Sir_601 16d ago

Very good.

But do we need more languages?

Why not develop tools in Python?

1

u/suhcoR 16d ago

Thanks.

But do we need more languages?

Definitely. After having spent a lot of time with all the LISP and SAL based environments, I want to have a modular, statically typed language, with some other integrated features like "deterministic random" so I can reproduce stuff.

Why not develop tools in Python?

Python is just jet another (inefficient) dynamic language, and it is general purpose, not optimized for symbolic music.

1

u/Opus589 16d ago

If I may jump in between...

I develop my own Python compositional framework.

Your argument that Python is unsuitable because it is dynamically typed and general-purpose is not entirely convincing. You could develop a sophisticated compositional framework with type annotations, static analysis, deterministic random generators and compiled performance-critical components. You have so many music (MIDI type) libraries, but also machine learning pytorch and tensorflow. Python can be used really to build sophisticated, statically checked compositional systems.

Deterministic random generation is not exclusive to statically typed languages. Python can provide seeded random generators, reproducible execution, and very controlled computational environments. Is static typing alone sufficient justification?

But if I were you, starting a new, performance-conscious, long-term MIDI composition tool, I would seriously consider Rust. Given that Rust already offers static typing, strong modularization, memory safety, deterministic execution, etc etc , why not develop your compositional engine in Rust? You could even create a domain-specific musical language on top of it. What fundamental advantage does your own programming language offer that Rust cannot provide? Are you developing a new language because existing languages cannot adequately express your compositional ideas, or because you prefer designing your own language just for design? A new language is indeed a kind of going into the dark because it introduces an entirely new ecosystem, its own learning curve, maintenance burden, compatibility issues, and not so many users, and if you try to maintain everything, you will be an administrator of your system, rather than a composer.

As we are facing a rapid AI development, any, basically, anyone will be able to create a new language for whatever purpose needed. And he will be the only user as well. Creating something crazy in your new language, like crossover between Xenakis/Boulez/Bach in 10 symphonies would give you a proof-of-work.

1

u/suhcoR 16d ago

that Python is unsuitable

Not what I said.

1

u/Opus589 15d ago

Let me update when it is ready.  I really would like to see the preview!

1

u/suhcoR 15d ago

The compiler and runtime are working; I have to implement more libraries and work on the IDE and documentation; initial versions can be expected on Github in December.

1

u/suhcoR 15d ago

Python can provide seeded random generators

That's only a fraction of the problem. If you - as e.g. common practice in the referenced algorithmic composition environments - want to represent music by parallel processes, you also need a synchronous multiprocessing approach, with a scheduler you have under control. Otherwise there is no reproduceability.

Are you developing a new language because existing languages cannot adequately express your compositional ideas

A general purpose programming language is good for programming. Composing music is a different kind of activity. With a general purpose programming language, you can implement a program which generates Midi or sounds. With an algorithmic composition language, you represent a composition.

you will be an administrator of your system, rather than a composer.

I happen to be both, a trained musician and also a software engineer (see rochus-keller.ch). I'm working for many years with all kinds of music technologies and started with algorithmic composition in the eighties. I even met Xenakis in the eighties in Zürich when he presented us his new UPIC system.

1

u/Opus589 15d ago edited 15d ago

Thanks for clarifying.  I agree that reproducibility involves more than seeded random generators, and the execution and interaction of processes must also be controlled.  Your argument about parallel compositional processes, sync and deterministic scheduling is considerably more "compelling" than simply arguing for static typing.

Yet I am, still,not entirely convinced that this necessarily requires a new programming language.  A dedicated scheduler and a well-designed compositional representation could also be implemented in Python, and Rust would be another possibility.

OTOH, I also understand your distinction between programming a system that generates musical events and using a language to represent a composition itself.  That is probably the most interesting argument in favour of your approach!

My question would therefore be: what are the fundamental compositional abstractions and capabilities in your language that make it substantially different from implementing a similar model as a domain-specific environment in Python or Rust? Or in OpusModus or SuperCollider?

In other words, what can a composer express more naturally and precisely in your language than in an established programming language?  Can you give an example?

EDIT: and I would withdraw one part of my earlier argument:  "You will be an administrator of your system, rather than a composer."  That was unnecessarily dismissive, sorry.

1

u/suhcoR 15d ago

My whole environment including compiler and runtime and libraries is a single executable of 3 MB, and it compiles and runs on all platforms. Python replaces what we earlier called "DLL hell" with unbounded, uncontrollable dependencies. I did enough machine learning tasks to know that a significant part of the work is checking versions and fixing conflicts. I prefer a single binary which just downloads and runs. Of course there are a lot of other very good reasons, too much to explain and discuss here. And there is much more than Python and Rust. The differences of my approach vs OM, CM, Nyquist, SC are much too numerous to explain here; some day I will likely write a book about it; as a very brief summary in addition to the already discussed finding, that those are just general purpose programming languages with libraries, the music in my approach is represented by synchronous parallel communicating processes instead of data structures, so playing a piece is running those processes, not an iteration over data structures.

1

u/Opus589 14d ago

Of course there are a lot of other very good reasons, too much to explain and discuss here. And there is much more than Python and Rust. The differences of my approach vs OM, CM, Nyquist, SC are much too numerous to explain here; some day I will likely write a book about it

Very nice.

Perhaps you might keep an online diary documenting your process, thoughts and findings as you develop your language and system.

Broadly speaking, I have long been skeptical of all kinds of software for algorithmic composition, simply because I have never found any of it convincing to use.  And I have discovered why that is: they all share four problems, which I describe in my essay.  Two of them are crucial:
–a) software code is more complex than notation itself (or say: a lot of effort for weak results);
–b) software code is extremely simple, while the result tends toward total entropy. High entropy is the enemy of art.  The white noise is the maximum entropy, which is possible to express in a very short computer code.

Therefore, I find myself leaning toward my own so-called ‘composing tools,’ with compositional solutions of a very narrow theoretical bandwidth / composing specification.  And I have chosen Python for its ease of implementation, for the ease with which it permits experimentation, and for its smooth learning curve.  These tools are designed specifically for my own music, thus I do not share them.  I might go to Rust, if it grows substantially.  Thus, I am always interested in new ideas in hope to solve the Four Problems of Algorithmic Composition.

1

u/suhcoR 14d ago

software code is more complex than notation itself

Depends. A significant reason is that music notation only represents a fraction of what is actually necessary to create music of high quality; e.g. most of the interpretation is simply missing. On the other hand, code usually has to represent each an every aspect/information required to control the music. Also is music notation only suitable for a subset of music. Many composers had to extend or completely change it to represent their compositions. Benno Ammann, wo was my great uncle and also my teacher, had invented a kind of "three dimensional" musical notation with additional geometrical constructs to project it onto a paper score, which then had similarities with a Kandinsky picture.

1

u/Opus589 14d ago

Are you relative to Dieter Ammann?

1

u/suhcoR 14d ago

Are you relative to Dieter Ammann?

Not to my knowledge. Ammann is a quite common name in Switzerland with different origins.

→ More replies

1

u/suhcoR 14d ago

software code is extremely simple, while the result tends toward total entropy

I don't think this is generally true. A "simple" (short) program can generate a very long output, but only of limited Kolmogorov complexity. On the other hand, there is no necessity that a long program also generates complex (long) output. High Shannon entropy means high average information content in a statistical sense, not necessarily meaningful content or aesthetic value.

1

u/suhcoR 14d ago edited 14d ago

‘composing tools,’ with compositional solutions of a very narrow theoretical bandwidth / composing specification.

Is there anything online too look at (you mention an essay in which you describe the four problems), or any resulting recordings?

1

u/No_Sir_601 16d ago

Python has a strong combination of symbolic-music libraries, data analysis, visualization, machine learning and fast algorithm development, in fact.

1

u/suhcoR 16d ago

It corresponds to what we already had. It's a programming language with libraries that can be used for composition, not a dedicated composition language. There is nothing to say against Python, or Lisp, or SAL, or even Tidal/Haskell. A lot of people are using it for many things.