diff options
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.md | 30 |
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 | |||
| 174 | An example spectrogram of Ludwig van Beethoven Symphony No. 6 First movement. | 174 | An 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 |  | 180 |  |
| 181 | 181 | ||
| 182 | The other option could also be in combination with | 182 | The 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 |  | 235 |  |
| 236 | 236 | ||
| 237 | ### Mouse | 237 | ### Mouse |
| 238 | 238 | ||
| @@ -241,10 +241,10 @@ can get [genom data | |||
| 241 | here](http://ftp.ensembl.org/pub/release-106/fasta/mus_musculus/dna/). | 241 | here](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 |  | 247 |  |
| 248 | 248 | ||
| 249 | ### Bison | 249 | ### Bison |
| 250 | 250 | ||
| @@ -253,10 +253,10 @@ get [genom data | |||
| 253 | here](http://ftp.ensembl.org/pub/release-106/fasta/bison_bison_bison/cdna/). | 253 | here](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 |  | 259 |  |
| 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 | |||
| 265 | here](http://ftp.ensembl.org/pub/release-106/fasta/bos_taurus/cdna/). | 265 | here](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 |  | 271 |  |
| 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 | |||
| 281 | Sony Bluetooth speaker I have that supports 3.5 mm audio in. Elektron doesn't | 281 | Sony Bluetooth speaker I have that supports 3.5 mm audio in. Elektron doesn't |
| 282 | have internal speakers. | 282 | have internal speakers. |
| 283 | 283 | ||
| 284 |  | 284 |  |
| 285 | 285 | ||
| 286 |  | 286 |  |
| 287 | 287 | ||
| 288 |  | 288 |  |
| 289 | 289 | ||
| 290 | For communicating with Elektron, I choose `pygame` Python module that has MIDI | 290 | For communicating with Elektron, I choose `pygame` Python module that has MIDI |
| 291 | built in. With this, it was rather simple to send notes to the device. All I did | 291 | built 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. | |||
| 294 | Before all of this I also checked Audio MIDI Setup app under MacOS and checked | 294 | Before all of this I also checked Audio MIDI Setup app under MacOS and checked |
| 295 | MIDI Studio by pressing ⌘-2. | 295 | MIDI Studio by pressing ⌘-2. |
| 296 | 296 | ||
| 297 |  | 297 |  |
| 298 | 298 | ||
| 299 | The whole script that parses and send notes to the Elektron looks like this. | 299 | The whole script that parses and send notes to the Elektron looks like this. |
| 300 | 300 | ||
| @@ -336,7 +336,7 @@ del player | |||
| 336 | pygame.midi.quit() | 336 | pygame.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 | ||
| 341 | All of this could be made much more interesting if I choose different | 341 | All of this could be made much more interesting if I choose different |
| 342 | instruments for different Nucleotides, or doing more funky stuff with Elektron. | 342 | instruments for different Nucleotides, or doing more funky stuff with Elektron. |
