diff options
| author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2022-08-28 05:39:44 +0200 |
|---|---|---|
| committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2022-08-28 05:39:44 +0200 |
| commit | 70baaeb4e78d12c329a03e929fd30d41730ed2b1 (patch) | |
| tree | 74e0b2998455894762b6910ef4008d43f5dc9366 /content/posts/2022-07-05-what-would-dna-sound-if-synthesized.md | |
| parent | b1d9aefd2a9fa0074f8d18fa2410cdd53d4c8de6 (diff) | |
| download | mitjafelicijan.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.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 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 | |||
| 145 | An example spectrogram of Ludwig van Beethoven Symphony No. 6 First movement. | 145 | An 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 |  | 151 |  |
| 152 | 152 | ||
| 153 | The other option could also be in combination with [gnuplot](http://www.gnuplot.info/). This would require an intermediary step, however. | 153 | The 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 |  | 200 |  |
| 201 | 201 | ||
| 202 | ### Mouse | 202 | ### Mouse |
| 203 | 203 | ||
| 204 | This 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/). | 204 | This 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 |  | 210 |  |
| 211 | 211 | ||
| 212 | ### Bison | 212 | ### Bison |
| 213 | 213 | ||
| 214 | This 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/). | 214 | This 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 |  | 220 |  |
| 221 | 221 | ||
| 222 | ### Taurus | 222 | ### Taurus |
| 223 | 223 | ||
| 224 | This 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/). | 224 | This 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 |  | 230 |  |
| 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 | ||
| 236 | 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. | 236 | 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. |
| 237 | 237 | ||
| 238 |  | 238 |  |
| 239 | 239 | ||
| 240 |  | 240 |  |
| 241 | 241 | ||
| 242 |  | 242 |  |
| 243 | 243 | ||
| 244 | 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. | 244 | 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. |
| 245 | 245 | ||
| 246 | Before all of this I also checked Audio MIDI Setup app under MacOS and checked MIDI Studio by pressing ⌘-2. | 246 | Before all of this I also checked Audio MIDI Setup app under MacOS and checked MIDI Studio by pressing ⌘-2. |
| 247 | 247 | ||
| 248 |  | 248 |  |
| 249 | 249 | ||
| 250 | The whole script that parses and send notes to the Elektron looks like this. | 250 | The whole script that parses and send notes to the Elektron looks like this. |
| 251 | 251 | ||
| @@ -287,7 +287,7 @@ del player | |||
| 287 | pygame.midi.quit() | 287 | pygame.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 | ||
| 292 | All 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. | 292 | All 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 | ||
