aboutsummaryrefslogtreecommitdiff
path: root/content/posts/2022-07-05-what-would-dna-sound-if-synthesized.md
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2022-08-28 05:39:44 +0200
committerMitja Felicijan <mitja.felicijan@gmail.com>2022-08-28 05:39:44 +0200
commit70baaeb4e78d12c329a03e929fd30d41730ed2b1 (patch)
tree74e0b2998455894762b6910ef4008d43f5dc9366 /content/posts/2022-07-05-what-would-dna-sound-if-synthesized.md
parentb1d9aefd2a9fa0074f8d18fa2410cdd53d4c8de6 (diff)
downloadmitjafelicijan.com-70baaeb4e78d12c329a03e929fd30d41730ed2b1.tar.gz
Moved statis assets and converted all CSS to Tailwind
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 c028ec2..ba5cc4b 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
@@ -145,10 +145,10 @@ sox output.wav -n spectrogram -o spectrogram.png
145An example spectrogram of Ludwig van Beethoven Symphony No. 6 First movement. 145An example spectrogram of Ludwig van Beethoven Symphony No. 6 First movement.
146 146
147<audio controls> 147<audio controls>
148 <source src="/dna-synthesized/symphony-no6-1st-movement.mp3" type="audio/mpeg"> 148 <source src="/assets/dna-synthesized/symphony-no6-1st-movement.mp3" type="audio/mpeg">
149</audio> 149</audio>
150 150
151![Ludwig van Beethoven Symphony No. 6 First movement](/dna-synthesized/symphony-no6-1st-movement.png) 151![Ludwig van Beethoven Symphony No. 6 First movement](/assets/dna-synthesized/symphony-no6-1st-movement.png)
152 152
153The other option could also be in combination with [gnuplot](http://www.gnuplot.info/). This would require an intermediary step, however. 153The other option could also be in combination with [gnuplot](http://www.gnuplot.info/). This would require an intermediary step, however.
154 154
@@ -194,40 +194,40 @@ What I did was take interesting parts from an animal's genome and feed it to a t
194### Niels Bohr quote 194### Niels Bohr quote
195 195
196<audio controls> 196<audio controls>
197 <source src="/dna-synthesized/quote/out.mp3" type="audio/mpeg"> 197 <source src="/assets/dna-synthesized/quote/out.mp3" type="audio/mpeg">
198</audio> 198</audio>
199 199
200![Spectogram](/dna-synthesized/quote/spectogram.png) 200![Spectogram](/assets/dna-synthesized/quote/spectogram.png)
201 201
202### Mouse 202### Mouse
203 203
204This is part of a mouse genome `Mus_musculus.GRCm39.dna.nonchromosomal`. You can get [genom data here](http://ftp.ensembl.org/pub/release-106/fasta/mus_musculus/dna/). 204This is part of a mouse genome `Mus_musculus.GRCm39.dna.nonchromosomal`. You can get [genom data here](http://ftp.ensembl.org/pub/release-106/fasta/mus_musculus/dna/).
205 205
206<audio controls> 206<audio controls>
207 <source src="/dna-synthesized/mouse/out.mp3" type="audio/mpeg"> 207 <source src="/assets/dna-synthesized/mouse/out.mp3" type="audio/mpeg">
208</audio> 208</audio>
209 209
210![Spectogram](/dna-synthesized/mouse/spectogram.png) 210![Spectogram](/assets/dna-synthesized/mouse/spectogram.png)
211 211
212### Bison 212### Bison
213 213
214This is part of a bison genome `Bison_bison_bison.Bison_UMD1.0.cdna`. You can get [genom data here](http://ftp.ensembl.org/pub/release-106/fasta/bison_bison_bison/cdna/). 214This is part of a bison genome `Bison_bison_bison.Bison_UMD1.0.cdna`. You can get [genom data here](http://ftp.ensembl.org/pub/release-106/fasta/bison_bison_bison/cdna/).
215 215
216<audio controls> 216<audio controls>
217 <source src="/dna-synthesized/bison/out.mp3" type="audio/mpeg"> 217 <source src="/assets/dna-synthesized/bison/out.mp3" type="audio/mpeg">
218</audio> 218</audio>
219 219
220![Spectogram](/dna-synthesized/bison/spectogram.png) 220![Spectogram](/assets/dna-synthesized/bison/spectogram.png)
221 221
222### Taurus 222### Taurus
223 223
224This is part of a taurus genome `Bos_taurus.ARS-UCD1.2.cdna`. You can get [genom data here](http://ftp.ensembl.org/pub/release-106/fasta/bos_taurus/cdna/). 224This is part of a taurus genome `Bos_taurus.ARS-UCD1.2.cdna`. You can get [genom data here](http://ftp.ensembl.org/pub/release-106/fasta/bos_taurus/cdna/).
225 225
226<audio controls> 226<audio controls>
227 <source src="/dna-synthesized/taurus/out.mp3" type="audio/mpeg"> 227 <source src="/assets/dna-synthesized/taurus/out.mp3" type="audio/mpeg">
228</audio> 228</audio>
229 229
230![Spectogram](/dna-synthesized/taurus/spectogram.png) 230![Spectogram](/assets/dna-synthesized/taurus/spectogram.png)
231 231
232## Making a drummer out of a DNA sequence 232## Making a drummer out of a DNA sequence
233 233
@@ -235,17 +235,17 @@ To make things even more interesting, I decided to send this data via MIDI to my
235 235
236Elektron 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. 236Elektron 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.
237 237
238![](/dna-synthesized/elektron/IMG_0619.jpg) 238![](/assets/dna-synthesized/elektron/IMG_0619.jpg)
239 239
240![](/dna-synthesized/elektron/IMG_0620.jpg) 240![](/assets/dna-synthesized/elektron/IMG_0620.jpg)
241 241
242![](/dna-synthesized/elektron/IMG_0622.jpg) 242![](/assets/dna-synthesized/elektron/IMG_0622.jpg)
243 243
244For 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. 244For 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.
245 245
246Before all of this I also checked Audio MIDI Setup app under MacOS and checked MIDI Studio by pressing ⌘-2. 246Before all of this I also checked Audio MIDI Setup app under MacOS and checked MIDI Studio by pressing ⌘-2.
247 247
248![](/dna-synthesized/elektron/midi-studio.jpg) 248![](/assets/dna-synthesized/elektron/midi-studio.jpg)
249 249
250The whole script that parses and send notes to the Elektron looks like this. 250The whole script that parses and send notes to the Elektron looks like this.
251 251
@@ -287,7 +287,7 @@ del player
287pygame.midi.quit() 287pygame.midi.quit()
288``` 288```
289 289
290<video src="/dna-synthesized/elektron/elektron.mp4" controls></video> 290<video src="/assets/dna-synthesized/elektron/elektron.mp4" controls></video>
291 291
292All of this could be made much more interesting if I choose different instruments for different Nucleotides, or doing more funky stuff with Elektron. But for now, this should be enough. It is just a proof of concept. Something to play around with. 292All of this could be made much more interesting if I choose different instruments for different Nucleotides, or doing more funky stuff with Elektron. But for now, this should be enough. It is just a proof of concept. Something to play around with.
293 293