Custom synth waveform using heart rhythms

KuzinRob

Pill Pusher
My brain scares me sometimes...

I'm a pharmacist, and work in a hospital. I see electrocardiograms (EKGs or more appropriately ECGs) all the time. The healthcare worker in me sees normal sinus rhythm...

70.gif

...the musician in me sees a synth waveform.

I just think it would be really cool to use a single cycle of an ECG waveform as a synth waveform. It would be an awesome Easter egg for anyone that, say, imports a song with a synthesizer solo using this waveform into a DAW and sees a heart rhythm.

Am I completely off my rocker, or is this possible? Would be really sweet with Torsades de Pointes!

torsades.JPG
 
It should certainly be possible with a synth or soft synth that lets you use custom waveforms. It's also possible to analyze the waveform to see what the harmonics are.
 
Okay, I apparently had nothing better to do today, so I spent several hours making a waveform based on the ECG graph you posted. (Feel free to pay me handsomely for my efforts, preferably in cash-- although I'll settle for a cold beer as long as it isn't PBR!)

What I did was try to create a reasonably "focused" graph from the one you posted (which was kind of blurry), restricted to one cycle and scaled down to a 256-by-255-pixel grid. Then I used a nifty program I found that takes a bitmap file and converts it into an Excel spreadsheet. I used the Excel spreadsheet to come up with 255 samples or slices of said waveform, and wrote a quickie FreeBASIC program to read the 255 samples and write them to a WAV file. I also pulled the WAV file into WavePad so I could do a FFT analysis of it.

Attached are three files:
-- an MP3 conversion of the original WAV file;
-- the waveform as displayed by WavePad; and
-- the FFT analysis of the waveform.

The WAV file is programmed to play an A4 (440 Hz) with the waveform, for 5 seconds, so you can hear what it sounds like. It sounds a lot higher than A4 because of all the harmonics. Obviously, there's no ADSR envelope applied to it.

The values of the samples are unsigned 8-bit integers ranging from 0 to 255, whereas the original graph has a gray line near the bottom-- so the samples I generated extend equally above and below the "middle line," whereas in the original graph about three-fourths of the waveform is above the gray line and about one-fourth is below it. I assume that the waveform would sound a bit different if I were to shift the sampled values upward, since the harmonics would presumably be different. Maybe I'll try doing that later just to see.

View attachment Heartbeat.mp3

Heartbeat_Wave.png

Heartbeat_FFT.png
 
I don't know about flatlining, but it's very "rich" in harmonics, both odd and even. It's definitely not a "soft" tone-- more a high-pitched, somewhat shrill tone.
 
DC offset shouldn't make it sound any different unless it causes clipping. That offset is definitely stripped out coming out the DAC, if not at some point before.
 
Back
Top