From ae24d9a8869c497537839f330384cbadb2cf687c Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Tue, 31 Oct 2023 10:17:43 +0100 Subject: Updated theme --- public/what-would-dna-sound-if-synthesized.html | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'public/what-would-dna-sound-if-synthesized.html') diff --git a/public/what-would-dna-sound-if-synthesized.html b/public/what-would-dna-sound-if-synthesized.html index 5b8b082..8c02137 100755 --- a/public/what-would-dna-sound-if-synthesized.html +++ b/public/what-would-dna-sound-if-synthesized.html @@ -102,7 +102,7 @@ in Python.

Generating Spectograms

out to use the SoX - Sound eXchange, the Swiss Army knife of audio manipulation one because it didn't require anything else.
sox output.wav -n spectrogram -o spectrogram.png
-

An example spectrogram of Ludwig van Beethoven Symphony No. 6 First movement.

Ludwig van Beethoven Symphony No. 6 First movement

The other option could also be in combination with +

An example spectrogram of Ludwig van Beethoven Symphony No. 6 First movement.

Ludwig van Beethoven Symphony No. 6 First movement

The other option could also be in combination with gnuplot. This would require an intermediary step, however.

sox output.wav audio.dat
 tail -n+3 audio.dat > audio_only.dat
@@ -135,21 +135,21 @@ this.

 

Pre-generated sequences

What I did was take interesting parts from an animal's genome and feed it to a tone generator script. This then generated a WAV file and I converted those to MP3, so they can be played in a browser. The last step was creating a -spectrogram based on a WAV file.

Niels Bohr quote

Spectogram

Mouse

This is part of a mouse genome Mus_musculus.GRCm39.dna.nonchromosomal. You +spectrogram based on a WAV file.

Niels Bohr quote

Spectogram

Mouse

This is part of a mouse genome Mus_musculus.GRCm39.dna.nonchromosomal. You can get genom data -here.

Spectogram

Bison

This is part of a bison genome Bison_bison_bison.Bison_UMD1.0.cdna. You can +here.

Spectogram

Bison

This is part of a bison genome Bison_bison_bison.Bison_UMD1.0.cdna. You can get genom data -here.

Spectogram

Taurus

This is part of a taurus genome Bos_taurus.ARS-UCD1.2.cdna. You can get +here.

Spectogram

Taurus

This is part of a taurus genome Bos_taurus.ARS-UCD1.2.cdna. You can get genom data -here.

Spectogram

Making a drummer out of a DNA sequence

To make things even more interesting, I decided to send this data via MIDI to my +here.

Spectogram

Making a drummer out of a DNA sequence

To make things even more interesting, I decided to send this data via MIDI to my Elektron Model:Samples. This is a really cool piece of equipment that supports MIDI in via USB and 3.5 mm audio jack.

Elektron is connected to my MacBook via USB cable and audio out is patched to a Sony Bluetooth speaker I have that supports 3.5 mm audio in. Elektron doesn't -have internal speakers.

For communicating with Elektron, I choose pygame Python module that has MIDI +have internal speakers.

For communicating with Elektron, I choose pygame Python module that has MIDI built in. With this, it was rather simple to send notes to the device. All I did was map MIDI notes to the actual Nucleotides.

Before all of this I also checked Audio MIDI Setup app under MacOS and checked -MIDI Studio by pressing ⌘-2.

The whole script that parses and send notes to the Elektron looks like this.

import pygame.midi
+MIDI Studio by pressing ⌘-2.

The whole script that parses and send notes to the Elektron looks like this.

import pygame.midi
 import time
 
 pygame.midi.init()
@@ -199,11 +199,11 @@ intriguing, biological, natural.

I actually find the results fascinating. I to music of nature. Even though it's quite the same, it's also quite different. The subtle differences on repeat kind of creates music on its own. Makes you wonder. It kind of puts Occam’s Razor in its place. Nature for sure loves to -make things as energy efficient as possible.


Posts from blogs I follow around the net