kramann.info
© Guido Kramann

Login: Passwort:










kramann.info
© Guido Kramann

Login: Passwort:




Intraaction1 -- (Virtual) DIT (Do-It-Together) Example using Arithmetic Operation Grammar (AOG) and Evolutionary Optimization -- contributuion to Ubiquitous Music 2024

(EN google-translate)

(PL google-translate)

Intraaction1.zip -- Processing project, which is discussed here.
Musical production by Intraaction1 on Youtube (https://youtu.be/LnrMH4bbgGs).

Standalone-version and exported runnables for windows and linux 64Bit:

Intraaction1standalone.zip
application.linux64.zip
application.windows64.zip

Interactive version in which agent1 is replaced by the user using the PC keyboard:

Intraaction1standalonePCkeyboard.zip Intraaction1standalonePCkeyboard.zip
  • DEUTSCH, siehe weiter unten.
  • License / Lizenz, see below / siehe ganz unten

Intraaction1 was created in the context of making Karen Barad's agential materialism fruitful for the Ubiquitous Music movement.

In the setting of Intraaction1, there is a virtual musician who models z_n+1 = p*z_n*(1-z_n) using Pierre Francois Verhulst's iterative logistic equation. For p greater than 3.5, more and more bifurcations occur, which then produce an impenetrable, chaotic sequence for z from p=4. P is changed in the course of the performance. Only a partial interval of the value range of z is taken into account and interpreted and played with a certain factor as a midi pitch. The part of the musical performance described so far should be understood as the first acting agent in a world of continuously evolving musical structures. Agent one can be interpreted as having a world model whose system boundaries point beyond the current event. The corresponding musical agent would draw his creative ideas more from his previous experiences in the world and less from an analysis of the current situation. The musical performance of agent one is realized with the help of a harpsichord (Pianotec8, "Neupert Clavicord Lute") and represented by red dots in the piano roll in the video.

As a counterpart to agent one, there is agent two. Agent two is a machine that uses the last N occurring sound events to optimize a generative script, which in turn produces sound events. The generative script is a simple variant of the generative scripting language Arithmetic Operation Grammar (AOG) and the currently valid generative lines are shown at the bottom left of the video. The meaning of the symbols is as follows:

Each language element here consists of exactly one character.

' The apostrophe represents a counter that counts up in small equidistant time steps dt, starting with zero. dt is also the smallest time unit in the performance.

0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X.Y,Z represents the integers 0 to 35.

a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z are used to fetch the last result of another line. a fetches it from the preceding tic in the current line, b in the following line, etc. If the last line is exceeded, counting starts again at the first line (modulo).

Each line begins with an apostrophe. This can be followed by zero or several binary operations, which are executed in their natural order. Binary operations are:

+ - * arithmetic operations as we know them. Decimal places are truncated.

% Modulo (If not applicable, zero is returned as the result).

Integer division, a:b returns a/b if this is applicable without remainder, otherwise zero.

Intraaction1 uses three AOG lines with a maximum of three binary operations. The result x after these operations is converted to a miditone height as follows: Take x*0.93 as frequency f and determine the next possible miditone pitch m. Subtract an offset of 15 from m.

If the same midi tone pitch occurs several times at the same time, this is used to change the volume.

In the Intraaction1 processing sketch, the AOG class also represents the generative script as described above and is the gene to be optimized in an evolutionary algorithm as represented by the AOGenetics class.

As a quality criterion, it is determined how many of the last 6 (MAXTONES) sound events that occurred at exactly the pitch that occurred at exactly this tic would have been generated by the generative script. The script selected as best (aogplay) then continuously generates other sound events for the current tic. These sound events generated by Agent two are then fed through a virtual Blüthner grand piano, the strings of which are covered with a skin (Pianotec8).

As the sound events generated by agent two are also taken into account in the optimization, the result is a feedback loop that gives the musical performance a certain life of its own even when agent one is not contributing anything.

The very natural sounding performance results from a side effect: in order to keep the result reproducible, the pseudo-random generator was initialized with the fixed value zero. On the other hand, the optimizer was not implemented as a concurrent process, but was inserted into the same cyclically executed method (draw) that also sends the midi commands and generates the graphics. The slight fluctuations in tempo, which appear as if playing against a resistance, are due to optimization runs of varying complexity.

Agent two's only source of knowledge is therefore the musical form that is currently being created. Agent two then tries to develop a model of how the currently occurring musical form could have come about. The currently found generative script can therefore be understood as the simulation of a model-like idea that is currently valid. But that's not all. Since we are dealing with a generative model that helps to shape the world in the making, the case explicitly arises here that structures of understanding, even if virtual, have a constitutive influence on the world (here the musical form).

Agent one could easily be replaced by a human actor. The chosen path, in which this agent is currently simulated, represents in an objectified way a special variety of DIT (Do-It-Together) as a (virtual) human-machine structure: through the generative model implemented with AOG, which constitutes the world, we have before us the case described by Karen Barad in agential materialism, in which the arrangement used, which analyzes the world, also determines the way in which structures are formed. If we turn our gaze away from the agents and look at the material, in this case the resulting musical structure, it becomes clear that the material at hand makes future structures possible, but at the same time limits the area within which this can happen.

The entire situation is illustrated once again in the following diagram (see Figure below, Intraacation Concept):

Intraaction Concept.

Bild 0-1: Intraaction Concept.

The overall system of Intraaction1 is shown schematically on the right: a (virtual) musician contributes sound events. These sound events are to be reproduced by a generative script that is constantly optimized. The best script now generates new sound events itself. These can in turn influence the optimization result (feedback). On the left, the same arrangement is shown from a more abstract perspective: A first agent acts according to a superordinate idea of the world, which is not necessarily limited to the aspects of the world that are currently being influenced, indeed, does not even have to include them. A second agent helps to shape the same section of the world (DIT) but, unlike agent one, focuses exclusively on this section of the world.

  • GERMAN:

Intraaction1 -- (Virtuelles) DIT (Do-It-Together) Beispiel unter Verwendung von Arithmetic Operation Grammar (AOG) und evolutionärer Optimierung -- Beitrag beim Ubiquitous-Music-Symposium 2024

Intraaction1.zip -- Processing-Projekt, das hier besprochen wird.

Standalone-Version und exportierte ausführbare Dateien davon für Linux und Windows 64Bit:

Intraaction1standalone.zip
application.linux64.zip
application.windows64.zip

Interaktive Version, bei der Agent1 durch den Benutzer ersetzt ist, welcher über die PC-Tastatur spielt:

Intraaction1standalonePCkeyboard.zip Intraaction1standalonePCkeyboard.zip
Musikalische Produktion von Intraaction1 on Youtube (https://youtu.be/LnrMH4bbgGs).

Intraaction1 ist im Zusammenhang damit entstanden, den agentiellen Materialismus von Karen Barad für die Bewegung Ubiquitous Music fruchtbar zu machen.

In dem Setting von Intraaction1 gibt es einen virtuellen Musiker, der hier durch die iterative logistische Gleichung nach Pierre Francois Verhulst z_n+1 = p*z_n*(1-z_n) modelliert. Für p größer 3,5 treten immer mehr Bifurkationen auf, die dann ab p=4 eine undurchschaubare, chaotische Abfolge für z hervorrufen. P wird im Verlaufe der Performance verändert. Es wird nur ein Teilintervall des Wertebereichs von z berücksichtigt und mit einem gewissen Faktor versehen als Miditonhöhe interpretiert und gespielt. Der bisher beschriebene Part der musikalischen Performance sei als erster handelnder Agent in einer Welt aus kontinuierlich entstehenden musikalischen Strukturen zu verstehen. Man kann Agent eins so interpretieren, als läge ihm ein Weltmodell vor, dessen Systemgrenzen über das aktuelle Geschehen hinaus verweisen. Der entsprechende musikalische Akteur würde seine kreativen Ideen eher aus seinen bisher in der Welt gemachten Erfahrungen beziehen und weniger aus einer Analyse der aktuellen Situation. Das musikalische Spiel von Agent eins wird mit Hilfe eines Cembalos (Pianotec8, "Neupert Clavicord Lute") umgesetzt und in der Pianoroll im Video durch rote Punkte dargestellt.

Als Gegenpart zu Agent eins, gibt es Agent zwei. Agent zwei ist eine Maschine, die die letzten N auftretenden Tonereignisse nutzt, um ein generatives Skript zu optimieren, das dann seinerseits Tonereignisse hervorbringt. Das generative Skript ist eine einfache Variante der generativen Skriptsprache Arithmetic Operation Grammar (AOG) und die aktuell gültigen generativen Zeilen werden links unten im Video eingeblendet. Die Bedeutung der Symbole ist die folgende:

Jedes Sprachelement besteht hier aus nur genau einem Zeichen.

' Das Hochkomma repräsentiert einen Zähler, der beginnend mit Null in kleinen äquidistanten Zeitschritten dt hochzählt. dt ist gleichzeitig die kleinste Zeiteinheit bei der Performance.

0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X.Y,Z repräsentiert die ganzen Zahlen 0 bis 35.

a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z werden benutzt, um das letzte Ergebnis einer anderen Zeile zu holen. a holt es vom vorangehenden tic in der aktuellen Zeile, b in der nachfolgenden usw. wird die letzte Zeile überschritten, beginnt die Zählung wieder bei der ersten Zeile (Modulo).

Jede Zeile beginnt mit dem Hochkomma. Dahinter können Null, oder mehrere binäre Operationen folgen, die in ihrer natürlichen Reihenfolge ausgeführt werden. Binäre Operationen sind:

+ - * arithmetische Operationen, wie man sie kennt. Nachkommastellen werden abgeschnitten.

% Modulo (Wenn nicht anwendbar, wird Null als Ergebnis geliefert.)

: Ganzzahlige Division, a:b liefert a/b, wenn das ohne Rest anwendbar ist, sonst Null.

Intraaction1 benutzt drei AOG-Zeilen mit maximal drei binären Operationen. Das Ergebnis x nach diesen Operationen wird folgenderweise in eine Miditonhöhe umgewandelt: Fasse x*0.93 als Frequenz f auf und bestimme die nächstmögliche Miditonhöhe m. Ziehe von m einen Offset von 15 ab.

Taucht mehrmals zum gleichen Zeitpunkt die gleiche Miditonhöhe auf, so wird dies genutzt, um die Lautstärke zu verändern.

Im Processing Sketch Intraaction1 repräsentiert die Klasse AOG gleichzeitig das generative Skript, so wie es zuvor beschrieben wurde und ist das zu optimierende Gen in einem evolutionären Algorithmus, wie er durch die Klasse AOGenetics repräsentiert wird.

Als Gütekriterum wird bestimmt, wieviele der letzten 6 (MAXTONES) aufgetretenen Tonereignisse in genau der aufgetretenen Tonhöhe an genau diesem Tic durch das generative Skript generiert worden wären. Das dann als Bestes ausgewählte Skript (aogplay) generiert dann kontinuierlich immer zum gerade aktuellen Tic auch andere Tonereignisse. Diese somit von Agent zwei generierten Tonereignisse werden dann durch einen virtuellen Blüthner Flügel gespielt, dessen Saiten mit einem Fell abgedeckt sind (Pianotec8).

Indem auch die von Agent zwei gebildeten Tonereignisse wieder mit in der Optimierung berücksichtigt werden, erhält man eine Rückkopplung, die der musikalischen Performance auch dann ein gewisses Eigenleben gibt, wenn gerade Agent eins nichts beiträgt.

Die sehr natürlich anmutende Spielweise, ergibt sich aus einem Nebeneffekt: Um das Ergebnis reproduzierbar zu halten, wurde einerseits der Pseudozufallsgenerator mit dem festen Wert Null initialisiert. Zum anderen wurde aber auch der Optimierer nicht als nebenläufiger Prozess implementiert, sondern in die gleiche zyklisch ausgeführte Methode (draw) eingefügt, die auch die Midibefehle sendet und die Grafik erzeugt. Die leichten Temposchwankungen, die wirken, als würde gegen einen Widerstand gespielt werden, rühren von unterschiedlich aufwändigen Optimierungsläufen her.

Der Agent zwei besitzt als einzige Wissensquelle also ausschließlich die aktuell im Entstehen begriffene musikalische Form. Agent zwei versucht dann ein Modell davon zu entwickeln, wie die aktuell auftretende musikalische Form zustande gekommen sein könnte. Man kann also das aktuell gefundene generative Skript als die Simulation einer modellhaften Vorstellung verstehen, die gerade Gültigkeit hat. Aber damit nicht genug. Da es sich um ein generatives Modell handelt, das die im Entstehen begriffene Welt mit gestaltet, tritt hier explizit der Fall auf, dass Verstehensstrukturen, wenn auch virtuelle, einen konstitutiven Einfluss auf die Welt (hier die musikalische Form) haben.

Agent eins könnte ohne Weiteres durch einen menschlichen Akteur ersetzt werden. Der eingeschlagene Weg, bei dem dieser Akteuer aktuell simuliert wird, repräsentiert in verobjektivierter Art und Weise eine besondere Spielart von DIT (Do-It-Together) als (virtueller) Mensch-Maschine-Struktur: Durch das mit AOG umgesetzte, die Welt konstituierende generative Modell hat man den von Karen Barad im agentiellen Materialismus beschriebenen Fall vor sich, bei dem die verwendete Anordnung, die die Welt analysiert, gleichzeitig auch die Art und Weise bestimmt, wie Strukturen ausgebildet werden. Wendet man den Blick umgekehrt von den Agenten ab und schaut auf die Materie, das ist hier die entstehende musikalische Struktur, so wird deutlich, dass das vorliegende Material einerseits zukünftige Strukturen ermöglicht, aber zugleich den Bereich eingrenzt innerhalb dessen dies geschehen kann.

Die gesamte Situation wird in folgendem Schaubild noch einmal vor Augen geführt (siehe die Abbildung weiter unten, Intraaktionskonzept):

Intraaktionskonzept.

Bild 0-2: Intraaktionskonzept.

Rechts ist das Gesamtsystem von Intraaction1 schematisch dargestellt: ein (virtueller) Musiker trägt Tonereignisse bei. Diese Tonereignisse sollen von einem generativen Skript reproduziert werden, das stetig optimiert wird. Das beste Skript generiert nun selbst neue Tonereignisse. Diese können ihrerseits wieder das Optimierungsergebnis beeinflussen (Feedback). Links ist die gleiche Anordnung von einer abstrakteren Warte her dargestellt: Ein erster Agent handelt gemäß einer übergeordneten Vorstellung der Welt, die sich nicht unbedingt auf die Aspekte der Welt beschränkt, auf die gerade Einfluss genommen wird, ja, sie nicht einmal inbegreifen muss. Ein zweiter Agent gestaltet den gleichen Weltabschnitt mit (DIT), hat dabei aber im Gegensatz zu Agent eins ausschließlich diesen Weltausschnitt im Fokus.



LICENSE
(MIT, see also https://opensource.org/licenses/MIT)

Copyright 2024 Guido Kramann (website: http://www.kramann.info e-mail: kramann@th-brandenburg.de)


Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.


THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.