Loading...
Moon Sun Mountain Binary
Wcmm

Code

The code of project wcmm

About

¿Qué posibilidades creativas ofrece el Machine Learning? Para explorar las respuestas a esta pregunta hemos creado WCMM, el resultado de un proceso creativo haciendo uso de Machine Learning. Se trata de una inteligencia artificial improvisando al piano mientras pinta sobre un lienzo.

Para crear WCMM hemos usado Magenta un proyecto de investigación de código abierto que explora el papel del aprendizaje automático como herramienta creativa.

Con WCMM continuamos nuestra aproximación al Machine Learning desde las periferias creativas, como ya lo hicimos con proyectos previos como ciberbarba o Receteitor.

Como funciona

Hemos usado performace_rnn que busca generar música teniendo en cuenta la expresividad en el tiempo y la dinámica Para conocer más sobre el tema liderado por iansimon osageev puedes consultar el paper del proyecto https://magenta.tensorflow.org/performance-rnn

La expresividad en el tiempo y la dinámica son una parte esencial de la música y esta particularidad nos hizo querer jugar con performace_rnn. Para entender la importancia de la expresividad y la dinámica puedes escuchar los siguientes dos clips de la misma pieza de Chopin, el primero de los cuales ha sido despojado de estas cualidades:

Chopin (quantized)

Chopin (performed by Sageev Oore)

La sutileza o contundencia pulsando la tecla del piano o alargando las notas es un elemento creativo con el que cuentan los pianistas para sus interpretaciones, su sensibilidad es fundamental para que podamos sentir emociones.

Así que, ¿podemos crear máquinas cargadas de sensibilidad?

Performace_rnn nos da la improvisación al piano. Una Red Neuronal Recurrente (RNN), que podríamos simplificar diciendo que es una red neuronal con memoria, dada una serie concreta (texto, temperaturas, notas) nos ofrecerá el “supuesto” siguiente elemento de una serie. En nuestro caso es una nota MIDI pero con su expresividad y su dinámica, como cuando lo hace un intérprete real que pulsa el teclado en un piano.

Performace_rnn admite una serie de ajustes, como la temperatura o la densidad de pulsación, la escala y su nota tónica, pero en nuestro caso esto lo delegamos en el cliente gestionado por el navegador.

Tensorflow.js - Magenta

En el repositorio del proyecto esta el código python asi como el colab para poder experimentar con el modelo. Nosotros hemos usado un modelo pre-entrenado para usarlos con Tensorflow.js. TensorFlow.js es una biblioteca para desarrollar y entrenar modelos ML en JavaScript, y desplegar en el navegador o en Node.js

Con TensorFlow.js y desde el navegador cargamos el modelo RNN de Magenta y vamos modificando los ajustes. Un ejemplo: pitch_class_histogram; se trata de una cadena de 12 valores que representan la frecuencia relativa de las notas de cada clase de tono, comenzando con C (Do), como "[2, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1]. La RNN "tenderá a adherirse a una escala de C mayor, con el doble de C que cualquiera de las otras notas de la escala.

Tone.js

Usamos tone.js para poder hacer tocar al navegador y en el caso de perfromance_rnn usamos la base de sonidos de Salamander Grand Piano con el proyecto tone-piano que nos aporta esa gestión de velocidad y dinámica.

P5.js

WCMM nace como un proyecto de arte generativo, son muchos los artistas que están usando el machine learning para poder crear diferentes obras. Hablamos de arte generativo es Cuando el artista entra en colaboración con alguna suerte de autómata creador, y resigna el poder de decidir cada detalle de lo que sucede en la obra, ese diálogo es el que permite lo generativo.

Nuestro autómata es la red neuronal recurrente que toca el piano y su sensibilidad es la que usamos para crear el trazo.

Para la creación visual hemos usado p5.js es uno de los proyectos más bonitos de internet, su comunidad y su posibilidades son increíbles.

Para la creación visual hemos usado p5.js es uno de los proyectos más bonitos de Internet. Su comunidad y su posibilidades son increíbles. El trazo que emula la acuarela se genera a partir de un conjunto de vértices translúcidos con una mezcla de colores específica.

Como parte del proyecto, se han realizado varios experimentos previos para lograr el mejor trazo posible y jugar con la expresividad a través del código. A continuación se pueden ver algunos de esos experimentos.

Ejemplo

Con el trazo resuelto el siguiente elemento era relacionar la improvisación del performance_rnn con este trazo, que cada nota enviada desde tensorflow.js, genere una animación y que esta se vea representada por las características de la nota el momento y la dinámica de la misma.

Esto en combinación con las escalas nos permiten crear las historias y luego combinarlas entre sí creando lienzos únicos en cada visionado.

Autores

Creador por Karlos G Libreal @patxangas y realizado con la ayuda como siempre de Aitor Resano, Miren Arrese y Oier bravo. Ujue agudo

Bikolabs

Es el laboratorio de especulación de Biko buscamos en las periferias creativas nuevas experiencias y nuevos mestizajes para poder ir 20 minutos por delante.

Inspiración

El arte digital o generativo es como un rizoma donde todo se entrelaza creando nodos fuertes o débiles pero que en su conjunto crean una red compleja y basta en matices. Este proyecto tiene muchas inspiraciones pero algunas eran obligadas de mencionar: @zachlieberman Explicando su proceso creativo diario me inspiró para buscar el mío propio Iñaki zalba con su visión del juego y los espacios preparados. Kjetil Golid con su https://generated.space/ sus codigos son fudamentales para el arte generativo y la base inicial del trazo

Wcmm

Code

The code of project wcmm

About

What creative possibilities does machine learning offer?
WCMM is a creative process using Machine Learning. This machine is an artificial intelligence which improvises at the piano while painting.

WCMM its made with Magenta, an open-source research project that explores the role of the machine learning as a creative tool.

We have been working with machine learning for some time now for our projects as in the case of the ciberbarba or previously in receitor .
WCMM is another approach to this game.

How it works

We have used performace_rnn that seeks to generate music taking care of the expressiveness in time and dynamics. This research has been created by iansimon osageev and here it is. paper of the project: https://magenta.tensorflow.org/performance-rnn

Expressiveness in time and dynamics are an essential part of music and this particularity made us want to play with performace_rnn. To understand the importance of expressiveness and dynamics listen to the following two clips from the same piece of Chopin,the first of whom has been stripped of these qualities:

Chopin (quantized)

Chopin (performed by Sageev Oore)

Subtlety or forcefulness by pressing the piano key or lengthening notes is a creative element that pianists count on for your interpretations, your sensitivity is fundamental so that we can feel emotions.

So can we create machines loaded with sensitivity?

Performace_rnn gives us an improvisation at the piano. A neural network (RNN) that we could simplify by saying that it is a network. neuronal with memory, what it gives us is that given a series of concrete (text, temperatures, notes) the neural network will offer us the next "supposed" element in the series. In our case it is a MIDI note but with its expressiveness and its dynamics, as when a real interpreter does when he presses the keyboard on a piano.

Performace_rnn supports a number of settings, such as temperature or the density of pulsation, scale and its tonic note but in our If this is delegated to the client managed by the browser.

Tensorflow.js - Magenta

In the repository of the proyecto there is the python code as well as the colab to be able to experiment with the model. We have used a pre-trained model to use them with Tensorflow.js. TensorFlow.js is a library for developing and training ML models in JavaScript, and display in the browser or in Node.js

With tensorflow.js and from the browser is where we load the model RNN of Magenta and where we are modifying the settings as for example the pitch_class_histogram: That a string representation of a 12 values representing the relative frequency of the notes for each tone class, beginning with C (C). For example: 2, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1] The RNN "will tend to adhere". to a scale of C greater, with twice as much C as any of the others. other notes on the scale.

Tone.js

We use tone.js to be able to play in the browser and in the case of perfromance_rnn we use the sound base of Salamander Grand Piano with the project tone-piano that gives us the management of speed and dynamics.

P5.js

WCMM is born as a project of generative art, there are many artists who are using machine learning in order to be able to create different works. For us generative art is When the artist enters into collaboration with some sort of automaton, and resigns the power to decide every single detail of the what happens in the work, that dialogue is the one that allows the generative.

Our automaton is the recurrent neural network that plays the piano and his sensitivity is what we use to create the stroke.

For the visual creation we have used p5.js is one of the projects of the internet, your community and your possibilities are unbelievable.

The line with which we emulate the watercolor works by creating a set of translucent vertices with a mixture of colours simulates a watercolor. The process of experimentation to achieve the best possible stroke is part of the project, create a prepared environment where you can play and express yourself with the code is part of the project, here you can see some of the experiments.

Ejemplo

With the stroke resolved the following element was to relate the improvisation of the performance_rnn with this stroke, that each note sent from tensorflow.js, generate an animation and that this one is is represented by the characteristics of the note the moment and the dynamics of it.

This in combination with the scales allow us to create the stories and then combine them with each other to create unique canvases in every viewing.

Autors

Created by Karlos G Libreal @patxangas and carried out with the help, as always, ofe Aitor Resano, Miren Arrese y Oier bravo. Ujue agudo

Bikolabs

It's the speculation laboratory from Biko we search in the creative peripheries new experiences and new crossbreeds for to be able to see 20 minutes ahead.

Inspiration

The digital or generative art is like a rhizome where everything is it intertwines creating strong or weak nodes but which as a whole they create a complex network and it is enough in nuances. This project has many inspirations but these were bound to mention. @zachlieberman Explaining his daily creative process inspired me to seek the my own Iñaki zalba with his vision of the game and the spaces prepared. Kjetil Golid with his https://generated.space/ their codes are fundamental to generative art and the basis of the initial stroke