aboutsummaryrefslogtreecommitdiff
path: root/content/posts/2022-07-05-what-would-dna-sound-if-synthesized.md
diff options
context:
space:
mode:
authorMitja Felicijan <m@mitjafelicijan.com>2023-08-05 12:09:37 +0200
committerMitja Felicijan <m@mitjafelicijan.com>2023-08-05 12:09:37 +0200
commit2f5ea5f4982d6276881c9a3342ed8847ebc7d326 (patch)
treec405cf24bce11c00d7d453bdd18995cf8cda97aa /content/posts/2022-07-05-what-would-dna-sound-if-synthesized.md
parentc181dc5c37435029a0f5f2c51d6f36da4d32afd5 (diff)
downloadmitjafelicijan.com-2f5ea5f4982d6276881c9a3342ed8847ebc7d326.tar.gz
Moved assets to posts
Diffstat (limited to 'content/posts/2022-07-05-what-would-dna-sound-if-synthesized.md')
-rw-r--r--content/posts/2022-07-05-what-would-dna-sound-if-synthesized.md30
1 files changed, 15 insertions, 15 deletions
diff --git a/content/posts/2022-07-05-what-would-dna-sound-if-synthesized.md b/content/posts/2022-07-05-what-would-dna-sound-if-synthesized.md
index 968341c..cf0755f 100644
--- a/content/posts/2022-07-05-what-would-dna-sound-if-synthesized.md
+++ b/content/posts/2022-07-05-what-would-dna-sound-if-synthesized.md
@@ -174,10 +174,10 @@ sox output.wav -n spectrogram -o spectrogram.png
174An example spectrogram of Ludwig van Beethoven Symphony No. 6 First movement. 174An example spectrogram of Ludwig van Beethoven Symphony No. 6 First movement.
175 175
176<audio controls> 176<audio controls>
177 <source src="/assets/dna-synthesized/symphony-no6-1st-movement.mp3" type="audio/mpeg"> 177 <source src="/posts/dna-synthesized/symphony-no6-1st-movement.mp3" type="audio/mpeg">
178</audio> 178</audio>
179 179
180![Ludwig van Beethoven Symphony No. 6 First movement](/assets/dna-synthesized/symphony-no6-1st-movement.png) 180![Ludwig van Beethoven Symphony No. 6 First movement](/posts/dna-synthesized/symphony-no6-1st-movement.png)
181 181
182The other option could also be in combination with 182The other option could also be in combination with
183[gnuplot](http://www.gnuplot.info/). This would require an intermediary step, 183[gnuplot](http://www.gnuplot.info/). This would require an intermediary step,
@@ -229,10 +229,10 @@ spectrogram based on a WAV file.
229### Niels Bohr quote 229### Niels Bohr quote
230 230
231<audio controls> 231<audio controls>
232 <source src="/assets/dna-synthesized/quote/out.mp3" type="audio/mpeg"> 232 <source src="/posts/dna-synthesized/quote/out.mp3" type="audio/mpeg">
233</audio> 233</audio>
234 234
235![Spectogram](/assets/dna-synthesized/quote/spectogram.png) 235![Spectogram](/posts/dna-synthesized/quote/spectogram.png)
236 236
237### Mouse 237### Mouse
238 238
@@ -241,10 +241,10 @@ can get [genom data
241here](http://ftp.ensembl.org/pub/release-106/fasta/mus_musculus/dna/). 241here](http://ftp.ensembl.org/pub/release-106/fasta/mus_musculus/dna/).
242 242
243<audio controls> 243<audio controls>
244 <source src="/assets/dna-synthesized/mouse/out.mp3" type="audio/mpeg"> 244 <source src="/posts/dna-synthesized/mouse/out.mp3" type="audio/mpeg">
245</audio> 245</audio>
246 246
247![Spectogram](/assets/dna-synthesized/mouse/spectogram.png) 247![Spectogram](/posts/dna-synthesized/mouse/spectogram.png)
248 248
249### Bison 249### Bison
250 250
@@ -253,10 +253,10 @@ get [genom data
253here](http://ftp.ensembl.org/pub/release-106/fasta/bison_bison_bison/cdna/). 253here](http://ftp.ensembl.org/pub/release-106/fasta/bison_bison_bison/cdna/).
254 254
255<audio controls> 255<audio controls>
256 <source src="/assets/dna-synthesized/bison/out.mp3" type="audio/mpeg"> 256 <source src="/posts/dna-synthesized/bison/out.mp3" type="audio/mpeg">
257</audio> 257</audio>
258 258
259![Spectogram](/assets/dna-synthesized/bison/spectogram.png) 259![Spectogram](/posts/dna-synthesized/bison/spectogram.png)
260 260
261### Taurus 261### Taurus
262 262
@@ -265,10 +265,10 @@ This is part of a taurus genome `Bos_taurus.ARS-UCD1.2.cdna`. You can get
265here](http://ftp.ensembl.org/pub/release-106/fasta/bos_taurus/cdna/). 265here](http://ftp.ensembl.org/pub/release-106/fasta/bos_taurus/cdna/).
266 266
267<audio controls> 267<audio controls>
268 <source src="/assets/dna-synthesized/taurus/out.mp3" type="audio/mpeg"> 268 <source src="/posts/dna-synthesized/taurus/out.mp3" type="audio/mpeg">
269</audio> 269</audio>
270 270
271![Spectogram](/assets/dna-synthesized/taurus/spectogram.png) 271![Spectogram](/posts/dna-synthesized/taurus/spectogram.png)
272 272
273## Making a drummer out of a DNA sequence 273## Making a drummer out of a DNA sequence
274 274
@@ -281,11 +281,11 @@ Elektron is connected to my MacBook via USB cable and audio out is patched to a
281Sony Bluetooth speaker I have that supports 3.5 mm audio in. Elektron doesn't 281Sony Bluetooth speaker I have that supports 3.5 mm audio in. Elektron doesn't
282have internal speakers. 282have internal speakers.
283 283
284![](/assets/dna-synthesized/elektron/IMG_0619.jpg) 284![](/posts/dna-synthesized/elektron/IMG_0619.jpg)
285 285
286![](/assets/dna-synthesized/elektron/IMG_0620.jpg) 286![](/posts/dna-synthesized/elektron/IMG_0620.jpg)
287 287
288![](/assets/dna-synthesized/elektron/IMG_0622.jpg) 288![](/posts/dna-synthesized/elektron/IMG_0622.jpg)
289 289
290For communicating with Elektron, I choose `pygame` Python module that has MIDI 290For communicating with Elektron, I choose `pygame` Python module that has MIDI
291built in. With this, it was rather simple to send notes to the device. All I did 291built in. With this, it was rather simple to send notes to the device. All I did
@@ -294,7 +294,7 @@ was map MIDI notes to the actual Nucleotides.
294Before all of this I also checked Audio MIDI Setup app under MacOS and checked 294Before all of this I also checked Audio MIDI Setup app under MacOS and checked
295MIDI Studio by pressing ⌘-2. 295MIDI Studio by pressing ⌘-2.
296 296
297![](/assets/dna-synthesized/elektron/midi-studio.jpg) 297![](/posts/dna-synthesized/elektron/midi-studio.jpg)
298 298
299The whole script that parses and send notes to the Elektron looks like this. 299The whole script that parses and send notes to the Elektron looks like this.
300 300
@@ -336,7 +336,7 @@ del player
336pygame.midi.quit() 336pygame.midi.quit()
337``` 337```
338 338
339<video src="/assets/dna-synthesized/elektron/elektron.mp4" controls></video> 339<video src="/posts/dna-synthesized/elektron/elektron.mp4" controls></video>
340 340
341All of this could be made much more interesting if I choose different 341All of this could be made much more interesting if I choose different
342instruments for different Nucleotides, or doing more funky stuff with Elektron. 342instruments for different Nucleotides, or doing more funky stuff with Elektron.