<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://vjmedia.wpi.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Vsmercola</id>
	<title>vjmedia - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://vjmedia.wpi.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Vsmercola"/>
	<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/Special:Contributions/Vsmercola"/>
	<updated>2026-06-15T18:55:10Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.8</generator>
	<entry>
		<id>https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=248330</id>
		<title>Arrhythmia Data Sonification</title>
		<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=248330"/>
		<updated>2020-08-26T13:06:13Z</updated>

		<summary type="html">&lt;p&gt;Vsmercola: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By Victor Mercola&lt;br /&gt;
&lt;br /&gt;
My father, Mark Mercola, is a professor of medicine at Stanford University and the head of the Mercola Lab (as of writing this project). While talking with him about the classes I take at WPI, he mentioned how it would be interesting to use data sonification to educate and/or demonstrate the effectiveness of a new drug that he is working on. I agreed with his proposal and used the data he gave me for my final project in MU3620, Arrhythmia Data Sonification. Using GNU Octave, Ableton Live, and Sonic Pi, I was able to make &amp;quot;music&amp;quot; that would change according to an arrhythmic heartbeat.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Before working with music, there is some important preliminary background information to go over.&lt;br /&gt;
&lt;br /&gt;
The standard heartbeat seen on electrocardiograms (ECG / EKG) and other heart monitors is comprised of five different sections, named the &amp;quot;P Wave&amp;quot;, the &amp;quot;QRS Complex&amp;quot;, and the &amp;quot;T Wave&amp;quot;. The specific disease my father is working on is Long QT syndrome - as its name suggests, Long QT syndrome is a fatal, congenital cardiac rhythm disorder that where the length of the QT interval is longer than usual, causing arrhythmia patterns. My father is specifically working on Long QT type 3 (a.k.a. Long QT3 syndrome), which is caused by a problem regulating sodium ions in heart cells. He is currently working on a new drug to treat disease, currently named &amp;quot;Mex2A&amp;quot; and nicknamed &amp;quot;Super Mex&amp;quot; by his staff.&lt;br /&gt;
&lt;br /&gt;
== Analyzing &amp;amp; processing the data ==&lt;br /&gt;
&lt;br /&gt;
[[File:Mex2A graph.PNG|800px|center|Series of graphs of the results, from 100uM to 0uM left to right.]]&lt;br /&gt;
&lt;br /&gt;
My father sent me a large spreadsheet that, when graphed, produced the results of the graphs above. These show the results of human heart cells with Long QT3 syndrome given different dose amounts of Mex2A, in micromolar. The graphs represent the direct electrical activity of heart muscle cells that is related to the surface ECG reading. rightmost graph with the title &amp;quot;0&amp;quot; is the control data, without any Mex2A dose (0 uM). As the graphs progress from right to left, the graph's peaks become more and more regular until the 11.111uM dose - this dose shows strikingly regular peaks denoting a heartbeat. When I saw this data, I thought would be neat to make &amp;quot;music&amp;quot; where each peak represented a music measure's bar line, and the tempo of the song would increase or decrease depending on how fast or slow the heart cells beat, respectively. &lt;br /&gt;
&lt;br /&gt;
To turn the heartbeat data into music intervals, I first opened the file in GNU Octave (open-source MATLAB alternative). I first wanted to find the average interval of the 11uM dose beats, because I wanted the average interval's corresponding BPM to be scaled to 120 BPM. After recording the timestamps of all of the important peaks, I made a new array of intervals of unit milliseconds. With those intervals, I could convert the intervals' inverse, in Hz (1 cycle per second). I then converted the intervals' Hz to BPM (beats per minute) by multiplying by 60.  &lt;br /&gt;
&lt;br /&gt;
I figured out that the heart cells when given the 11uM dose could beat at about 43.885 BPM normally. In music terms, that tempo is the faster end of &amp;quot;grave&amp;quot;. I decided from here that I could normalize the interval BPM's by dividing each value by the average. From here, it was rinse and repeat for the other graphs - The interval data for 3.703uM, 1.2345uM, 0.4115uM, 0.1271uM, and 0uM were all normalized with the same 43.885 BPM value. The remaining data, 100uM and 33.333uM, were not used because there wasn't any pulse on the same intensity as the 11uM dose.&lt;br /&gt;
&lt;br /&gt;
 %{&lt;br /&gt;
 Octave code for generating music from heartbeats&lt;br /&gt;
 Victor Mercola&lt;br /&gt;
 MU 3620&lt;br /&gt;
 2019-12-09&lt;br /&gt;
 under Prof. Manzo&lt;br /&gt;
 %}&lt;br /&gt;
   &lt;br /&gt;
 pkg load signal;&lt;br /&gt;
 averageInterval = 1367.2; % interval of average heart rate [ms]&lt;br /&gt;
 averageHz = 1 / (1367.2 / 1000); % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 averageBPM = averageHz * 60; % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 % disp(averageBPM) &lt;br /&gt;
 &lt;br /&gt;
 %{ &lt;br /&gt;
 1 beat        1 beat&lt;br /&gt;
 -----       = ------&lt;br /&gt;
 1367.2 ms     1.3672 s&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 x = csvread(&amp;quot;N406K_forMark.csv&amp;quot;,1,0); % original file, a csv &lt;br /&gt;
 &lt;br /&gt;
 %{&lt;br /&gt;
 Mex2A_100uM     = transpose(x(:,2)); % Mex2A - 100 uM&lt;br /&gt;
 Mex2A_33_333uM  = transpose(x(:,3)); % Mex2A - 33.333 uM&lt;br /&gt;
 Mex2A_11_111uM  = transpose(x(:,4)); % Mex2A - 11.111 uM&lt;br /&gt;
 Mex2A_3_703uM   = transpose(x(:,5)); % Mex2A - 3.703 uM&lt;br /&gt;
 Mex2A_1_2345uM  = transpose(x(:,6)); % Mex2A - 1.2345 uM&lt;br /&gt;
 Mex2A_0_4115uM  = transpose(x(:,7)); % Mex2A - 0.4115 uM&lt;br /&gt;
 Mex2A_0_1271uM  = transpose(x(:,8)); % Mex2A - 0.1271 uM&lt;br /&gt;
 Mex2A_0uM       = transpose(x(:,9)); % Mex2A - 0 uM&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 t = transpose(x(:,1)); % time array [ms]&lt;br /&gt;
 Mex2A = [100, 33.333, 11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]; &lt;br /&gt;
 &lt;br /&gt;
 n = 3; &lt;br /&gt;
 &lt;br /&gt;
 % find the peaks in the graph&lt;br /&gt;
 this_row = transpose(x(:,n + 1));&lt;br /&gt;
 [pks idx] = findpeaks(this_row, &amp;quot;MinPeakHeight&amp;quot;,0.015, &amp;quot;MinPeakDistance&amp;quot;, 5); &lt;br /&gt;
 &lt;br /&gt;
 % convert those peak values from findpeaks into coordinates&lt;br /&gt;
 peakX = t(idx);&lt;br /&gt;
 peakY = this_row(idx);&lt;br /&gt;
 disp(peakX);  &lt;br /&gt;
  &lt;br /&gt;
 f = figure;&lt;br /&gt;
 plot(t, this_row, peakX, peakY, 'x');&lt;br /&gt;
 axis([min(t), max(t), 0, 0.03]);&lt;br /&gt;
 title([&amp;quot;Intensity of Mex2A=&amp;quot;, num2str(Mex2A(n)), &amp;quot;uM&amp;quot;]);&lt;br /&gt;
 xlabel(&amp;quot;Time, t [ms]&amp;quot;);&lt;br /&gt;
 ylabel(&amp;quot;Intensity&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
 % calculate peak intervals&lt;br /&gt;
 for i = 2:length(peakX)&lt;br /&gt;
     pkToPkInterval(i - 1) = peakX(i) - peakX(i-1); % time between intervals [ms]&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 pkToPkHz = 1./(pkToPkInterval / 1000);  % interval frequency [Hz]&lt;br /&gt;
 pkToPkBPM = pkToPkHz * 60; % interval frequency [BPM]&lt;br /&gt;
 disp(pkToPkBPM); &lt;br /&gt;
 &lt;br /&gt;
 pkToPkRatio = pkToPkBPM / averageBPM&lt;br /&gt;
&lt;br /&gt;
== Playing the data ==&lt;br /&gt;
&lt;br /&gt;
I could export the data from GNU Octave into Sonic Pi by first pasting it into a simple text editor to format it nicely. Once I made a quick 120 BPM single-measure beat, I could import it into Sonic Pi and change its playback rate in time with the arrays that I generated from GNU Octave. While Sonic Pi is great for live-coding music, I personally think it's missing a couple of key programming elements. Two examples of this that are present is this code is &amp;quot;for&amp;quot; loops with changing variables and not being able to determine the length of an array. I found simple workarounds for both of these, though. &lt;br /&gt;
&lt;br /&gt;
 # Data Sonification with heartbeats&lt;br /&gt;
 # Victor Mercola - MU 3620&lt;br /&gt;
 # Prof. Manzo, 2019-12-09&lt;br /&gt;
 &lt;br /&gt;
 doses = [11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]&lt;br /&gt;
 avgBPM = 43.885&lt;br /&gt;
 &lt;br /&gt;
 dose = 0&lt;br /&gt;
 6.times do&lt;br /&gt;
   if(dose == 0)&lt;br /&gt;
     # 11.111 uM dose&lt;br /&gt;
     intervals = [1.00371, 1.00371, 1.00371, 1.00371, 0.98189, 1.00371]&lt;br /&gt;
     n = 6&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 1)&lt;br /&gt;
     # 3.703 uM dose&lt;br /&gt;
     intervals = [1.1292, 1.0037, 0.98189, 2.5093, 1.0504, 0.98189, 2.5093, 1.0754, 2.3772]&lt;br /&gt;
     n = 9&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 2)&lt;br /&gt;
     # 1.2345 uM dose&lt;br /&gt;
     intervals = [2.5093, 3.7639, 3.7639, 1.1581, 2.5093, 3.7639, 3.7639, 1.1292, 2.6569, 3.7639, 3.7639, 1.1292, 2.5093, 1.0504]&lt;br /&gt;
     n = 14&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 3)&lt;br /&gt;
     # 0.4115 uM dose&lt;br /&gt;
     intervals = [2.8229, 0.961, 2.8229, 0.94098, 2.8229, 4.1061, 3.7639, 0.961, 3.0111, 0.94098, 2.8229]&lt;br /&gt;
     n = 11&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 4)&lt;br /&gt;
     # 0.1271 uM dose&lt;br /&gt;
     intervals = [4.1061, 4.5167, 1.1016, 0.94098, 2.6569, 4.1061, 5.0185, 4.5167, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.1061, 4.1061, 4.5167, 1.1292]&lt;br /&gt;
     n = 21&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 5)&lt;br /&gt;
     # 0 uM dose&lt;br /&gt;
     intervals = [5.0185, 4.5167, 5.0185, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 1.1886, 1.0037, 2.6569, 4.5167, 5.0185, 5.0185, 5.6459, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 4.5167, 5.0185, 5.0185, 4.5167]&lt;br /&gt;
     n = 26&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   # Here's where the actual music happens&lt;br /&gt;
   &lt;br /&gt;
   i = 0&lt;br /&gt;
   n.times do&lt;br /&gt;
     puts(doses[dose],&amp;quot;uM&amp;quot;)&lt;br /&gt;
     puts(intervals[i])&lt;br /&gt;
     puts(&amp;quot;Heart BPM:&amp;quot;,avgBPM*intervals[i])&lt;br /&gt;
     puts(&amp;quot;Music BPM:&amp;quot;,120*intervals[i])&lt;br /&gt;
     sample &amp;quot;D:/OneDrive/Documents/GNU Octave/quick drum loop v2.wav&amp;quot;, rate:intervals[i]&lt;br /&gt;
     wait 2 * (1 / intervals[i])&lt;br /&gt;
     i = i + 1&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   dose = dose + 1&lt;br /&gt;
   wait 1&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
== End Result ==&lt;br /&gt;
&lt;br /&gt;
The first result of the project only had a simple drum pattern as a base loop and was used as a proof-of-proof-of-concept. I sent the results to my father and his staff; he said that they really liked it. After talking with him about the sounds that I made, I added a simple bass to the base loop and a sound to indicate the start of a measure, which made it sound slightly better.&lt;br /&gt;
&lt;br /&gt;
This video below shows the data sonification in order from the 11.111uM dose to the control 0uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-11-to-0.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
This video below shows the data sonification in order from the control 0uM dose to the 11.111uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-0-to-11.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Would nightcore, speedcore, and/or extratone music that varies with an arrhythmic heartbeat sound good? I don't think so. However, I can say for certain that this project was a very effective way to compare the the different doses of Mex2A when treating Long QT3 syndrome.&lt;br /&gt;
&lt;br /&gt;
== Further Reading / Viewing ==&lt;br /&gt;
* [https://www.gnu.org/software/octave/ GNU Octave] - the open-source scientific programming language I used to analyze the data for this project.&lt;br /&gt;
* [https://sonic-pi.net/ Sonic Pi] - the open-source live-coding synth I used to make the music for this project.&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Long_QT_syndrome Long QT Syndrome (Wikipedia Article)] - this is the syndrome that my father is currently working to treat with Mex2A.&lt;br /&gt;
&lt;br /&gt;
[[Category: Advisor:Manzo]]&lt;br /&gt;
[[Category:Algorithmic, Interactive, &amp;amp; Electro-acoustic Compositions]]&lt;br /&gt;
[[Category:Electronic Music Composition (3620)]]&lt;/div&gt;</summary>
		<author><name>Vsmercola</name></author>
		
	</entry>
	<entry>
		<id>https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247057</id>
		<title>Arrhythmia Data Sonification</title>
		<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247057"/>
		<updated>2019-12-15T21:21:31Z</updated>

		<summary type="html">&lt;p&gt;Vsmercola: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By Victor Mercola&lt;br /&gt;
&lt;br /&gt;
My father, Mark Mercola, is a professor of medicine at Stanford University and the head of the Mercola Lab (as of writing this project). While talking with him about the classes I take at WPI, he mentioned how it would be interesting to use data sonification to educate and/or demonstrate the effectiveness of a new drug that he is working on. I agreed with his proposal and used the data he gave me for my final project in MU3620, Arrhythmia Data Sonification. Using GNU Octave, Ableton Live, and Sonic Pi, I was able to make &amp;quot;music&amp;quot; that would change according to an arrhythmic heartbeat.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Before working with music, there is some important preliminary background information to go over.&lt;br /&gt;
&lt;br /&gt;
The standard heartbeat seen on electrocardiograms (ECG / EKG) and other heart monitors is comprised of five different sections, named the &amp;quot;P Wave&amp;quot;, the &amp;quot;QRS Complex&amp;quot;, and the &amp;quot;T Wave&amp;quot;. The specific disease my father is working on is Long QT syndrome - as its name suggests, Long QT syndrome is a fatal, congenital cardiac rhythm disorder that where the length of the QT interval is longer than usual, causing arrhythmia patterns. My father is specifically working on Long QT type 3 (a.k.a. Long QT3 syndrome), which is caused by a problem regulating sodium ions in heart cells. He is currently working on a new drug to treat disease, currently named &amp;quot;Mex2A&amp;quot; and nicknamed &amp;quot;Super Mex&amp;quot; by his staff.&lt;br /&gt;
&lt;br /&gt;
== Analyzing &amp;amp; processing the data ==&lt;br /&gt;
&lt;br /&gt;
[[File:Mex2A graph.PNG|800px|center|Series of graphs of the results, from 100uM to 0uM left to right.]]&lt;br /&gt;
&lt;br /&gt;
My father sent me a large spreadsheet that, when graphed, produced the results of the graphs above. These show the results of human heart cells with Long QT3 syndrome given different dose amounts of Mex2A, in micromolar. The graphs represent the direct electrical activity of heart muscle cells that is related to the surface ECG reading. rightmost graph with the title &amp;quot;0&amp;quot; is the control data, without any Mex2A dose (0 uM). As the graphs progress from right to left, the graph's peaks become more and more regular until the 11.111uM dose - this dose shows strikingly regular peaks denoting a heartbeat. When I saw this data, I thought would be neat to make &amp;quot;music&amp;quot; where each peak represented a music measure's bar line, and the tempo of the song would increase or decrease depending on how fast or slow the heart cells beat, respectively. &lt;br /&gt;
&lt;br /&gt;
To turn the heartbeat data into music intervals, I first opened the file in GNU Octave (open-source MATLAB alternative). I first wanted to find the average interval of the 11uM dose beats, because I wanted the average interval's corresponding BPM to be scaled to 120 BPM. After recording the timestamps of all of the important peaks, I made a new array of intervals of unit milliseconds. With those intervals, I could convert the intervals' inverse, in Hz (1 cycle per second). I then converted the intervals' Hz to BPM (beats per minute) by multiplying by 60.  &lt;br /&gt;
&lt;br /&gt;
I figured out that the heart cells when given the 11uM dose could beat at about 43.885 BPM normally. In music terms, that tempo is the faster end of &amp;quot;grave&amp;quot;. I decided from here that I could normalize the interval BPM's by dividing each value by the average. From here, it was rinse and repeat for the other graphs - The interval data for 3.703uM, 1.2345uM, 0.4115uM, 0.1271uM, and 0uM were all normalized with the same 43.885 BPM value. The remaining data, 100uM and 33.333uM, were not used because there wasn't any pulse on the same intensity as the 11uM dose.&lt;br /&gt;
&lt;br /&gt;
 %{&lt;br /&gt;
 Octave code for generating music from heartbeats&lt;br /&gt;
 Victor Mercola&lt;br /&gt;
 MU 3620&lt;br /&gt;
 2019-12-09&lt;br /&gt;
 under Prof. Manzo&lt;br /&gt;
 %}&lt;br /&gt;
   &lt;br /&gt;
 pkg load signal;&lt;br /&gt;
 averageInterval = 1367.2; % interval of average heart rate [ms]&lt;br /&gt;
 averageHz = 1 / (1367.2 / 1000); % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 averageBPM = averageHz * 60; % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 % disp(averageBPM) &lt;br /&gt;
 &lt;br /&gt;
 %{ &lt;br /&gt;
 1 beat        1 beat&lt;br /&gt;
 -----       = ------&lt;br /&gt;
 1367.2 ms     1.3672 s&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 x = csvread(&amp;quot;N406K_forMark.csv&amp;quot;,1,0); % original file, a csv &lt;br /&gt;
 &lt;br /&gt;
 %{&lt;br /&gt;
 Mex2A_100uM     = transpose(x(:,2)); % Mex2A - 100 uM&lt;br /&gt;
 Mex2A_33_333uM  = transpose(x(:,3)); % Mex2A - 33.333 uM&lt;br /&gt;
 Mex2A_11_111uM  = transpose(x(:,4)); % Mex2A - 11.111 uM&lt;br /&gt;
 Mex2A_3_703uM   = transpose(x(:,5)); % Mex2A - 3.703 uM&lt;br /&gt;
 Mex2A_1_2345uM  = transpose(x(:,6)); % Mex2A - 1.2345 uM&lt;br /&gt;
 Mex2A_0_4115uM  = transpose(x(:,7)); % Mex2A - 0.4115 uM&lt;br /&gt;
 Mex2A_0_1271uM  = transpose(x(:,8)); % Mex2A - 0.1271 uM&lt;br /&gt;
 Mex2A_0uM       = transpose(x(:,9)); % Mex2A - 0 uM&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 t = transpose(x(:,1)); % time array [ms]&lt;br /&gt;
 Mex2A = [100, 33.333, 11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]; &lt;br /&gt;
 &lt;br /&gt;
 n = 3; &lt;br /&gt;
 &lt;br /&gt;
 % find the peaks in the graph&lt;br /&gt;
 this_row = transpose(x(:,n + 1));&lt;br /&gt;
 [pks idx] = findpeaks(this_row, &amp;quot;MinPeakHeight&amp;quot;,0.015, &amp;quot;MinPeakDistance&amp;quot;, 5); &lt;br /&gt;
 &lt;br /&gt;
 % convert those peak values from findpeaks into coordinates&lt;br /&gt;
 peakX = t(idx);&lt;br /&gt;
 peakY = this_row(idx);&lt;br /&gt;
 disp(peakX);  &lt;br /&gt;
  &lt;br /&gt;
 f = figure;&lt;br /&gt;
 plot(t, this_row, peakX, peakY, 'x');&lt;br /&gt;
 axis([min(t), max(t), 0, 0.03]);&lt;br /&gt;
 title([&amp;quot;Intensity of Mex2A=&amp;quot;, num2str(Mex2A(n)), &amp;quot;uM&amp;quot;]);&lt;br /&gt;
 xlabel(&amp;quot;Time, t [ms]&amp;quot;);&lt;br /&gt;
 ylabel(&amp;quot;Intensity&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
 % calculate peak intervals&lt;br /&gt;
 for i = 2:length(peakX)&lt;br /&gt;
     pkToPkInterval(i - 1) = peakX(i) - peakX(i-1); % time between intervals [ms]&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 pkToPkHz = 1./(pkToPkInterval / 1000);  % interval frequency [Hz]&lt;br /&gt;
 pkToPkBPM = pkToPkHz * 60; % interval frequency [BPM]&lt;br /&gt;
 disp(pkToPkBPM); &lt;br /&gt;
 &lt;br /&gt;
 pkToPkRatio = pkToPkBPM / averageBPM&lt;br /&gt;
&lt;br /&gt;
== Playing the data ==&lt;br /&gt;
&lt;br /&gt;
I could export the data from GNU Octave into Sonic Pi by first pasting it into a simple text editor to format it nicely. Once I made a quick 120 BPM single-measure beat, I could import it into Sonic Pi and change its playback rate in time with the arrays that I generated from GNU Octave. While Sonic Pi is great for live-coding music, I personally think it's missing a couple of key programming elements. Two examples of this that are present is this code is &amp;quot;for&amp;quot; loops with changing variables and not being able to determine the length of an array. I found simple workarounds for both of these, though. &lt;br /&gt;
&lt;br /&gt;
 # Data Sonification with heartbeats&lt;br /&gt;
 # Victor Mercola - MU 3620&lt;br /&gt;
 # Prof. Manzo, 2019-12-09&lt;br /&gt;
 &lt;br /&gt;
 doses = [11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]&lt;br /&gt;
 avgBPM = 43.885&lt;br /&gt;
 &lt;br /&gt;
 dose = 0&lt;br /&gt;
 6.times do&lt;br /&gt;
   if(dose == 0)&lt;br /&gt;
     # 11.111 uM dose&lt;br /&gt;
     intervals = [1.00371, 1.00371, 1.00371, 1.00371, 0.98189, 1.00371]&lt;br /&gt;
     n = 6&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 1)&lt;br /&gt;
     # 3.703 uM dose&lt;br /&gt;
     intervals = [1.1292, 1.0037, 0.98189, 2.5093, 1.0504, 0.98189, 2.5093, 1.0754, 2.3772]&lt;br /&gt;
     n = 9&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 2)&lt;br /&gt;
     # 1.2345 uM dose&lt;br /&gt;
     intervals = [2.5093, 3.7639, 3.7639, 1.1581, 2.5093, 3.7639, 3.7639, 1.1292, 2.6569, 3.7639, 3.7639, 1.1292, 2.5093, 1.0504]&lt;br /&gt;
     n = 14&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 3)&lt;br /&gt;
     # 0.4115 uM dose&lt;br /&gt;
     intervals = [2.8229, 0.961, 2.8229, 0.94098, 2.8229, 4.1061, 3.7639, 0.961, 3.0111, 0.94098, 2.8229]&lt;br /&gt;
     n = 11&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 4)&lt;br /&gt;
     # 0.1271 uM dose&lt;br /&gt;
     intervals = [4.1061, 4.5167, 1.1016, 0.94098, 2.6569, 4.1061, 5.0185, 4.5167, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.1061, 4.1061, 4.5167, 1.1292]&lt;br /&gt;
     n = 21&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 5)&lt;br /&gt;
     # 0 uM dose&lt;br /&gt;
     intervals = [5.0185, 4.5167, 5.0185, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 1.1886, 1.0037, 2.6569, 4.5167, 5.0185, 5.0185, 5.6459, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 4.5167, 5.0185, 5.0185, 4.5167]&lt;br /&gt;
     n = 26&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   # Here's where the actual music happens&lt;br /&gt;
   &lt;br /&gt;
   i = 0&lt;br /&gt;
   n.times do&lt;br /&gt;
     puts(doses[dose],&amp;quot;uM&amp;quot;)&lt;br /&gt;
     puts(intervals[i])&lt;br /&gt;
     puts(&amp;quot;Heart BPM:&amp;quot;,avgBPM*intervals[i])&lt;br /&gt;
     puts(&amp;quot;Music BPM:&amp;quot;,120*intervals[i])&lt;br /&gt;
     sample &amp;quot;D:/OneDrive/Documents/GNU Octave/quick drum loop v2.wav&amp;quot;, rate:intervals[i]&lt;br /&gt;
     wait 2 * (1 / intervals[i])&lt;br /&gt;
     i = i + 1&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   dose = dose + 1&lt;br /&gt;
   wait 1&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
== End Result ==&lt;br /&gt;
&lt;br /&gt;
The first result of the project only had a simple drum pattern as a base loop and was used as a proof-of-proof-of-concept. I sent the results to my father and his staff; he said that they really liked it. After talking with him about the sounds that I made, I added a simple bass to the base loop and a sound to indicate the start of a measure, which made it sound slightly better.&lt;br /&gt;
&lt;br /&gt;
This video below shows the data sonification in order from the 11.111uM dose to the control 0uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-11-to-0.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
This video below shows the data sonification in order from the control 0uM dose to the 11.111uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-0-to-11.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Would nightcore, speedcore, and/or extratone music that varies with an arrhythmic heartbeat sound good? I don't think so. However, I can say for certain that this project was a very effective way to compare the the different doses of Mex2A when treating Long QT3 syndrome.&lt;br /&gt;
&lt;br /&gt;
== Further Reading / Viewing ==&lt;br /&gt;
* [https://www.gnu.org/software/octave/ GNU Octave] - the open-source scientific programming language I used to analyze the data for this project.&lt;br /&gt;
* [https://sonic-pi.net/ Sonic Pi] - the open-source live-coding synth I used to make the music for this project.&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Long_QT_syndrome Long QT Syndrome (Wikipedia Article)] - this is the syndrome that my father is currently working to treat with Mex2A.&lt;br /&gt;
&lt;br /&gt;
== Post-Mortem ==&lt;br /&gt;
This part will be updated once I finish continuing this project over break. If my father's paper on Mex2A and Long QT3 syndrome is published, I'll definitely leave a link here. Stay tuned!&lt;br /&gt;
&lt;br /&gt;
[[Category: Advisor:Manzo]]&lt;br /&gt;
[[Category:Algorithmic, Interactive, &amp;amp; Electro-acoustic Compositions]]&lt;br /&gt;
[[Category:Electronic Music Composition (3620)]]&lt;/div&gt;</summary>
		<author><name>Vsmercola</name></author>
		
	</entry>
	<entry>
		<id>https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247056</id>
		<title>Arrhythmia Data Sonification</title>
		<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247056"/>
		<updated>2019-12-15T21:19:44Z</updated>

		<summary type="html">&lt;p&gt;Vsmercola: /* Further Reading / Viewing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By Victor Mercola&lt;br /&gt;
&lt;br /&gt;
My father, Mark Mercola, is a professor of medicine at Stanford University and the head of the Mercola Lab (as of writing this project). While talking with him about the classes I take at WPI, he mentioned how it would be interesting to use data sonification to educate and/or demonstrate the effectiveness of a new drug that he is working on. I agreed with his proposal and used the data he gave me for my final project in MU3620, Arrhythmia Data Sonification. Using GNU Octave, Ableton Live, and Sonic Pi, I was able to make &amp;quot;music&amp;quot; that would change according to an arrhythmic heartbeat.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Before working with music, there is some important preliminary background information to go over.&lt;br /&gt;
&lt;br /&gt;
The standard heartbeat seen on electrocardiograms (ECG / EKG) and other heart monitors is comprised of five different sections, named the &amp;quot;P Wave&amp;quot;, the &amp;quot;QRS Complex&amp;quot;, and the &amp;quot;T Wave&amp;quot;. The specific disease my father is working on is Long QT syndrome - as its name suggests, Long QT syndrome is a fatal, congenital cardiac rhythm disorder that where the length of the QT interval is longer than usual, causing arrhythmia patterns. My father is specifically working on Long QT type 3 (a.k.a. Long QT3 syndrome), which is caused by a problem regulating sodium ions in heart cells. He is currently working on a new drug to treat disease, currently named &amp;quot;Mex2A&amp;quot; and nicknamed &amp;quot;Super Mex&amp;quot; by his staff.&lt;br /&gt;
&lt;br /&gt;
== Analyzing &amp;amp; processing the data ==&lt;br /&gt;
&lt;br /&gt;
[[File:Mex2A graph.PNG|800px|center|Series of graphs of the results, from 100uM to 0uM left to right.]]&lt;br /&gt;
&lt;br /&gt;
My father sent me a large spreadsheet that, when graphed, produced the results of the graphs above. These show the results of human heart cells with Long QT3 syndrome given different dose amounts of Mex2A, in micromolar. The graphs represent the direct electrical activity of heart muscle cells that is related to the surface ECG reading. rightmost graph with the title &amp;quot;0&amp;quot; is the control data, without any Mex2A dose (0 uM). As the graphs progress from right to left, the graph's peaks become more and more regular until the 11.111uM dose - this dose shows strikingly regular peaks denoting a heartbeat. When I saw this data, I thought would be neat to make &amp;quot;music&amp;quot; where each peak represented a music measure's bar line, and the tempo of the song would increase or decrease depending on how fast or slow the heart cells beat, respectively. &lt;br /&gt;
&lt;br /&gt;
To turn the heartbeat data into music intervals, I first opened the file in GNU Octave (open-source MATLAB alternative). I first wanted to find the average interval of the 11uM dose beats, because I wanted the average interval's corresponding BPM to be scaled to 120 BPM. After recording the timestamps of all of the important peaks, I made a new array of intervals of unit milliseconds. With those intervals, I could convert the intervals' inverse, in Hz (1 cycle per second). I then converted the intervals' Hz to BPM (beats per minute) by multiplying by 60.  &lt;br /&gt;
&lt;br /&gt;
I figured out that the heart cells when given the 11uM dose could beat at about 43.885 BPM normally. In music terms, that tempo is the faster end of &amp;quot;grave&amp;quot;. I decided from here that I could normalize the interval BPM's by dividing each value by the average. From here, it was rinse and repeat for the other graphs - The interval data for 3.703uM, 1.2345uM, 0.4115uM, 0.1271uM, and 0uM were all normalized with the same 43.885 BPM value. The remaining data, 100uM and 33.333uM, were not used because there wasn't any pulse on the same intensity as the 11uM dose.&lt;br /&gt;
&lt;br /&gt;
 %{&lt;br /&gt;
 Octave code for generating music from heartbeats&lt;br /&gt;
 Victor Mercola&lt;br /&gt;
 MU 3620&lt;br /&gt;
 2019-12-09&lt;br /&gt;
 under Prof. Manzo&lt;br /&gt;
 %}&lt;br /&gt;
   &lt;br /&gt;
 pkg load signal;&lt;br /&gt;
 averageInterval = 1367.2; % interval of average heart rate [ms]&lt;br /&gt;
 averageHz = 1 / (1367.2 / 1000); % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 averageBPM = averageHz * 60; % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 % disp(averageBPM) &lt;br /&gt;
 &lt;br /&gt;
 %{ &lt;br /&gt;
 1 beat        1 beat&lt;br /&gt;
 -----       = ------&lt;br /&gt;
 1367.2 ms     1.3672 s&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 x = csvread(&amp;quot;N406K_forMark.csv&amp;quot;,1,0); % original file, a csv &lt;br /&gt;
 &lt;br /&gt;
 %{&lt;br /&gt;
 Mex2A_100uM     = transpose(x(:,2)); % Mex2A - 100 uM&lt;br /&gt;
 Mex2A_33_333uM  = transpose(x(:,3)); % Mex2A - 33.333 uM&lt;br /&gt;
 Mex2A_11_111uM  = transpose(x(:,4)); % Mex2A - 11.111 uM&lt;br /&gt;
 Mex2A_3_703uM   = transpose(x(:,5)); % Mex2A - 3.703 uM&lt;br /&gt;
 Mex2A_1_2345uM  = transpose(x(:,6)); % Mex2A - 1.2345 uM&lt;br /&gt;
 Mex2A_0_4115uM  = transpose(x(:,7)); % Mex2A - 0.4115 uM&lt;br /&gt;
 Mex2A_0_1271uM  = transpose(x(:,8)); % Mex2A - 0.1271 uM&lt;br /&gt;
 Mex2A_0uM       = transpose(x(:,9)); % Mex2A - 0 uM&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 t = transpose(x(:,1)); % time array [ms]&lt;br /&gt;
 Mex2A = [100, 33.333, 11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]; &lt;br /&gt;
 &lt;br /&gt;
 n = 3; &lt;br /&gt;
 &lt;br /&gt;
 % find the peaks in the graph&lt;br /&gt;
 this_row = transpose(x(:,n + 1));&lt;br /&gt;
 [pks idx] = findpeaks(this_row, &amp;quot;MinPeakHeight&amp;quot;,0.015, &amp;quot;MinPeakDistance&amp;quot;, 5); &lt;br /&gt;
 &lt;br /&gt;
 % convert those peak values from findpeaks into coordinates&lt;br /&gt;
 peakX = t(idx);&lt;br /&gt;
 peakY = this_row(idx);&lt;br /&gt;
 disp(peakX);  &lt;br /&gt;
  &lt;br /&gt;
 f = figure;&lt;br /&gt;
 plot(t, this_row, peakX, peakY, 'x');&lt;br /&gt;
 axis([min(t), max(t), 0, 0.03]);&lt;br /&gt;
 title([&amp;quot;Intensity of Mex2A=&amp;quot;, num2str(Mex2A(n)), &amp;quot;uM&amp;quot;]);&lt;br /&gt;
 xlabel(&amp;quot;Time, t [ms]&amp;quot;);&lt;br /&gt;
 ylabel(&amp;quot;Intensity&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
 % calculate peak intervals&lt;br /&gt;
 for i = 2:length(peakX)&lt;br /&gt;
     pkToPkInterval(i - 1) = peakX(i) - peakX(i-1); % time between intervals [ms]&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 pkToPkHz = 1./(pkToPkInterval / 1000);  % interval frequency [Hz]&lt;br /&gt;
 pkToPkBPM = pkToPkHz * 60; % interval frequency [BPM]&lt;br /&gt;
 disp(pkToPkBPM); &lt;br /&gt;
 &lt;br /&gt;
 pkToPkRatio = pkToPkBPM / averageBPM&lt;br /&gt;
&lt;br /&gt;
== Playing the data ==&lt;br /&gt;
&lt;br /&gt;
I could export the data from GNU Octave into Sonic Pi by first pasting it into a simple text editor to format it nicely. Once I made a quick 120 BPM single-measure beat, I could import it into Sonic Pi and change its playback rate in time with the arrays that I generated from GNU Octave. While Sonic Pi is great for live-coding music, I personally think it's missing a couple of key programming elements. Two examples of this that are present is this code is &amp;quot;for&amp;quot; loops with changing variables and not being able to determine the length of an array. I found simple workarounds for both of these, though. &lt;br /&gt;
&lt;br /&gt;
 # Data Sonification with heartbeats&lt;br /&gt;
 # Victor Mercola - MU 3620&lt;br /&gt;
 # Prof. Manzo, 2019-12-09&lt;br /&gt;
 &lt;br /&gt;
 doses = [11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]&lt;br /&gt;
 avgBPM = 43.885&lt;br /&gt;
 &lt;br /&gt;
 dose = 0&lt;br /&gt;
 6.times do&lt;br /&gt;
   if(dose == 0)&lt;br /&gt;
     # 11.111 uM dose&lt;br /&gt;
     intervals = [1.00371, 1.00371, 1.00371, 1.00371, 0.98189, 1.00371]&lt;br /&gt;
     n = 6&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 1)&lt;br /&gt;
     # 3.703 uM dose&lt;br /&gt;
     intervals = [1.1292, 1.0037, 0.98189, 2.5093, 1.0504, 0.98189, 2.5093, 1.0754, 2.3772]&lt;br /&gt;
     n = 9&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 2)&lt;br /&gt;
     # 1.2345 uM dose&lt;br /&gt;
     intervals = [2.5093, 3.7639, 3.7639, 1.1581, 2.5093, 3.7639, 3.7639, 1.1292, 2.6569, 3.7639, 3.7639, 1.1292, 2.5093, 1.0504]&lt;br /&gt;
     n = 14&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 3)&lt;br /&gt;
     # 0.4115 uM dose&lt;br /&gt;
     intervals = [2.8229, 0.961, 2.8229, 0.94098, 2.8229, 4.1061, 3.7639, 0.961, 3.0111, 0.94098, 2.8229]&lt;br /&gt;
     n = 11&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 4)&lt;br /&gt;
     # 0.1271 uM dose&lt;br /&gt;
     intervals = [4.1061, 4.5167, 1.1016, 0.94098, 2.6569, 4.1061, 5.0185, 4.5167, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.1061, 4.1061, 4.5167, 1.1292]&lt;br /&gt;
     n = 21&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 5)&lt;br /&gt;
     # 0 uM dose&lt;br /&gt;
     intervals = [5.0185, 4.5167, 5.0185, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 1.1886, 1.0037, 2.6569, 4.5167, 5.0185, 5.0185, 5.6459, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 4.5167, 5.0185, 5.0185, 4.5167]&lt;br /&gt;
     n = 26&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   # Here's where the actual music happens&lt;br /&gt;
   &lt;br /&gt;
   i = 0&lt;br /&gt;
   n.times do&lt;br /&gt;
     puts(doses[dose],&amp;quot;uM&amp;quot;)&lt;br /&gt;
     puts(intervals[i])&lt;br /&gt;
     puts(&amp;quot;Heart BPM:&amp;quot;,avgBPM*intervals[i])&lt;br /&gt;
     puts(&amp;quot;Music BPM:&amp;quot;,120*intervals[i])&lt;br /&gt;
     sample &amp;quot;D:/OneDrive/Documents/GNU Octave/quick drum loop v2.wav&amp;quot;, rate:intervals[i]&lt;br /&gt;
     wait 2 * (1 / intervals[i])&lt;br /&gt;
     i = i + 1&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   dose = dose + 1&lt;br /&gt;
   wait 1&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
== End Result ==&lt;br /&gt;
&lt;br /&gt;
The first result of the project only had a simple drum pattern as a base loop and was used as a proof-of-proof-of-concept. I sent the results to my father and his staff and he said that they really liked it. After talking with him about it, I added a simple bass to the base loop, which made it sound slightly better.&lt;br /&gt;
&lt;br /&gt;
This video below shows the data sonification in order from the 11.111uM dose to the control 0uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-11-to-0.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
This video below shows the data sonification in order from the control 0uM dose to the 11.111uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-0-to-11.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Would nightcore, speedcore, and/or extratone music that varies with an arrhythmic heartbeat sound good? I don't think so. However, I can say for certain that this project was a very effective way to use sound to compare the the different doses of Mex2A when treating Long QT3 syndrome.&lt;br /&gt;
&lt;br /&gt;
== Further Reading / Viewing ==&lt;br /&gt;
* [https://www.gnu.org/software/octave/ GNU Octave] - the open-source scientific programming language I used to analyze the data for this project.&lt;br /&gt;
* [https://sonic-pi.net/ Sonic Pi] - the open-source live-coding synth I used to make the music for this project.&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Long_QT_syndrome Long QT Syndrome (Wikipedia Article)] - this is the syndrome that my father is currently working to treat with Mex2A.&lt;br /&gt;
&lt;br /&gt;
== Post-Mortem ==&lt;br /&gt;
This part will be updated once I finish continuing this project over break. If my father's paper on Mex2A and Long QT3 syndrome is published, I'll definitely leave a link here. Stay tuned!&lt;br /&gt;
&lt;br /&gt;
[[Category: Advisor:Manzo]]&lt;br /&gt;
[[Category:Algorithmic, Interactive, &amp;amp; Electro-acoustic Compositions]]&lt;br /&gt;
[[Category:Electronic Music Composition (3620)]]&lt;/div&gt;</summary>
		<author><name>Vsmercola</name></author>
		
	</entry>
	<entry>
		<id>https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247055</id>
		<title>Arrhythmia Data Sonification</title>
		<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247055"/>
		<updated>2019-12-15T21:16:44Z</updated>

		<summary type="html">&lt;p&gt;Vsmercola: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By Victor Mercola&lt;br /&gt;
&lt;br /&gt;
My father, Mark Mercola, is a professor of medicine at Stanford University and the head of the Mercola Lab (as of writing this project). While talking with him about the classes I take at WPI, he mentioned how it would be interesting to use data sonification to educate and/or demonstrate the effectiveness of a new drug that he is working on. I agreed with his proposal and used the data he gave me for my final project in MU3620, Arrhythmia Data Sonification. Using GNU Octave, Ableton Live, and Sonic Pi, I was able to make &amp;quot;music&amp;quot; that would change according to an arrhythmic heartbeat.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Before working with music, there is some important preliminary background information to go over.&lt;br /&gt;
&lt;br /&gt;
The standard heartbeat seen on electrocardiograms (ECG / EKG) and other heart monitors is comprised of five different sections, named the &amp;quot;P Wave&amp;quot;, the &amp;quot;QRS Complex&amp;quot;, and the &amp;quot;T Wave&amp;quot;. The specific disease my father is working on is Long QT syndrome - as its name suggests, Long QT syndrome is a fatal, congenital cardiac rhythm disorder that where the length of the QT interval is longer than usual, causing arrhythmia patterns. My father is specifically working on Long QT type 3 (a.k.a. Long QT3 syndrome), which is caused by a problem regulating sodium ions in heart cells. He is currently working on a new drug to treat disease, currently named &amp;quot;Mex2A&amp;quot; and nicknamed &amp;quot;Super Mex&amp;quot; by his staff.&lt;br /&gt;
&lt;br /&gt;
== Analyzing &amp;amp; processing the data ==&lt;br /&gt;
&lt;br /&gt;
[[File:Mex2A graph.PNG|800px|center|Series of graphs of the results, from 100uM to 0uM left to right.]]&lt;br /&gt;
&lt;br /&gt;
My father sent me a large spreadsheet that, when graphed, produced the results of the graphs above. These show the results of human heart cells with Long QT3 syndrome given different dose amounts of Mex2A, in micromolar. The graphs represent the direct electrical activity of heart muscle cells that is related to the surface ECG reading. rightmost graph with the title &amp;quot;0&amp;quot; is the control data, without any Mex2A dose (0 uM). As the graphs progress from right to left, the graph's peaks become more and more regular until the 11.111uM dose - this dose shows strikingly regular peaks denoting a heartbeat. When I saw this data, I thought would be neat to make &amp;quot;music&amp;quot; where each peak represented a music measure's bar line, and the tempo of the song would increase or decrease depending on how fast or slow the heart cells beat, respectively. &lt;br /&gt;
&lt;br /&gt;
To turn the heartbeat data into music intervals, I first opened the file in GNU Octave (open-source MATLAB alternative). I first wanted to find the average interval of the 11uM dose beats, because I wanted the average interval's corresponding BPM to be scaled to 120 BPM. After recording the timestamps of all of the important peaks, I made a new array of intervals of unit milliseconds. With those intervals, I could convert the intervals' inverse, in Hz (1 cycle per second). I then converted the intervals' Hz to BPM (beats per minute) by multiplying by 60.  &lt;br /&gt;
&lt;br /&gt;
I figured out that the heart cells when given the 11uM dose could beat at about 43.885 BPM normally. In music terms, that tempo is the faster end of &amp;quot;grave&amp;quot;. I decided from here that I could normalize the interval BPM's by dividing each value by the average. From here, it was rinse and repeat for the other graphs - The interval data for 3.703uM, 1.2345uM, 0.4115uM, 0.1271uM, and 0uM were all normalized with the same 43.885 BPM value. The remaining data, 100uM and 33.333uM, were not used because there wasn't any pulse on the same intensity as the 11uM dose.&lt;br /&gt;
&lt;br /&gt;
 %{&lt;br /&gt;
 Octave code for generating music from heartbeats&lt;br /&gt;
 Victor Mercola&lt;br /&gt;
 MU 3620&lt;br /&gt;
 2019-12-09&lt;br /&gt;
 under Prof. Manzo&lt;br /&gt;
 %}&lt;br /&gt;
   &lt;br /&gt;
 pkg load signal;&lt;br /&gt;
 averageInterval = 1367.2; % interval of average heart rate [ms]&lt;br /&gt;
 averageHz = 1 / (1367.2 / 1000); % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 averageBPM = averageHz * 60; % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 % disp(averageBPM) &lt;br /&gt;
 &lt;br /&gt;
 %{ &lt;br /&gt;
 1 beat        1 beat&lt;br /&gt;
 -----       = ------&lt;br /&gt;
 1367.2 ms     1.3672 s&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 x = csvread(&amp;quot;N406K_forMark.csv&amp;quot;,1,0); % original file, a csv &lt;br /&gt;
 &lt;br /&gt;
 %{&lt;br /&gt;
 Mex2A_100uM     = transpose(x(:,2)); % Mex2A - 100 uM&lt;br /&gt;
 Mex2A_33_333uM  = transpose(x(:,3)); % Mex2A - 33.333 uM&lt;br /&gt;
 Mex2A_11_111uM  = transpose(x(:,4)); % Mex2A - 11.111 uM&lt;br /&gt;
 Mex2A_3_703uM   = transpose(x(:,5)); % Mex2A - 3.703 uM&lt;br /&gt;
 Mex2A_1_2345uM  = transpose(x(:,6)); % Mex2A - 1.2345 uM&lt;br /&gt;
 Mex2A_0_4115uM  = transpose(x(:,7)); % Mex2A - 0.4115 uM&lt;br /&gt;
 Mex2A_0_1271uM  = transpose(x(:,8)); % Mex2A - 0.1271 uM&lt;br /&gt;
 Mex2A_0uM       = transpose(x(:,9)); % Mex2A - 0 uM&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 t = transpose(x(:,1)); % time array [ms]&lt;br /&gt;
 Mex2A = [100, 33.333, 11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]; &lt;br /&gt;
 &lt;br /&gt;
 n = 3; &lt;br /&gt;
 &lt;br /&gt;
 % find the peaks in the graph&lt;br /&gt;
 this_row = transpose(x(:,n + 1));&lt;br /&gt;
 [pks idx] = findpeaks(this_row, &amp;quot;MinPeakHeight&amp;quot;,0.015, &amp;quot;MinPeakDistance&amp;quot;, 5); &lt;br /&gt;
 &lt;br /&gt;
 % convert those peak values from findpeaks into coordinates&lt;br /&gt;
 peakX = t(idx);&lt;br /&gt;
 peakY = this_row(idx);&lt;br /&gt;
 disp(peakX);  &lt;br /&gt;
  &lt;br /&gt;
 f = figure;&lt;br /&gt;
 plot(t, this_row, peakX, peakY, 'x');&lt;br /&gt;
 axis([min(t), max(t), 0, 0.03]);&lt;br /&gt;
 title([&amp;quot;Intensity of Mex2A=&amp;quot;, num2str(Mex2A(n)), &amp;quot;uM&amp;quot;]);&lt;br /&gt;
 xlabel(&amp;quot;Time, t [ms]&amp;quot;);&lt;br /&gt;
 ylabel(&amp;quot;Intensity&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
 % calculate peak intervals&lt;br /&gt;
 for i = 2:length(peakX)&lt;br /&gt;
     pkToPkInterval(i - 1) = peakX(i) - peakX(i-1); % time between intervals [ms]&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 pkToPkHz = 1./(pkToPkInterval / 1000);  % interval frequency [Hz]&lt;br /&gt;
 pkToPkBPM = pkToPkHz * 60; % interval frequency [BPM]&lt;br /&gt;
 disp(pkToPkBPM); &lt;br /&gt;
 &lt;br /&gt;
 pkToPkRatio = pkToPkBPM / averageBPM&lt;br /&gt;
&lt;br /&gt;
== Playing the data ==&lt;br /&gt;
&lt;br /&gt;
I could export the data from GNU Octave into Sonic Pi by first pasting it into a simple text editor to format it nicely. Once I made a quick 120 BPM single-measure beat, I could import it into Sonic Pi and change its playback rate in time with the arrays that I generated from GNU Octave. While Sonic Pi is great for live-coding music, I personally think it's missing a couple of key programming elements. Two examples of this that are present is this code is &amp;quot;for&amp;quot; loops with changing variables and not being able to determine the length of an array. I found simple workarounds for both of these, though. &lt;br /&gt;
&lt;br /&gt;
 # Data Sonification with heartbeats&lt;br /&gt;
 # Victor Mercola - MU 3620&lt;br /&gt;
 # Prof. Manzo, 2019-12-09&lt;br /&gt;
 &lt;br /&gt;
 doses = [11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]&lt;br /&gt;
 avgBPM = 43.885&lt;br /&gt;
 &lt;br /&gt;
 dose = 0&lt;br /&gt;
 6.times do&lt;br /&gt;
   if(dose == 0)&lt;br /&gt;
     # 11.111 uM dose&lt;br /&gt;
     intervals = [1.00371, 1.00371, 1.00371, 1.00371, 0.98189, 1.00371]&lt;br /&gt;
     n = 6&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 1)&lt;br /&gt;
     # 3.703 uM dose&lt;br /&gt;
     intervals = [1.1292, 1.0037, 0.98189, 2.5093, 1.0504, 0.98189, 2.5093, 1.0754, 2.3772]&lt;br /&gt;
     n = 9&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 2)&lt;br /&gt;
     # 1.2345 uM dose&lt;br /&gt;
     intervals = [2.5093, 3.7639, 3.7639, 1.1581, 2.5093, 3.7639, 3.7639, 1.1292, 2.6569, 3.7639, 3.7639, 1.1292, 2.5093, 1.0504]&lt;br /&gt;
     n = 14&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 3)&lt;br /&gt;
     # 0.4115 uM dose&lt;br /&gt;
     intervals = [2.8229, 0.961, 2.8229, 0.94098, 2.8229, 4.1061, 3.7639, 0.961, 3.0111, 0.94098, 2.8229]&lt;br /&gt;
     n = 11&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 4)&lt;br /&gt;
     # 0.1271 uM dose&lt;br /&gt;
     intervals = [4.1061, 4.5167, 1.1016, 0.94098, 2.6569, 4.1061, 5.0185, 4.5167, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.1061, 4.1061, 4.5167, 1.1292]&lt;br /&gt;
     n = 21&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 5)&lt;br /&gt;
     # 0 uM dose&lt;br /&gt;
     intervals = [5.0185, 4.5167, 5.0185, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 1.1886, 1.0037, 2.6569, 4.5167, 5.0185, 5.0185, 5.6459, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 4.5167, 5.0185, 5.0185, 4.5167]&lt;br /&gt;
     n = 26&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   # Here's where the actual music happens&lt;br /&gt;
   &lt;br /&gt;
   i = 0&lt;br /&gt;
   n.times do&lt;br /&gt;
     puts(doses[dose],&amp;quot;uM&amp;quot;)&lt;br /&gt;
     puts(intervals[i])&lt;br /&gt;
     puts(&amp;quot;Heart BPM:&amp;quot;,avgBPM*intervals[i])&lt;br /&gt;
     puts(&amp;quot;Music BPM:&amp;quot;,120*intervals[i])&lt;br /&gt;
     sample &amp;quot;D:/OneDrive/Documents/GNU Octave/quick drum loop v2.wav&amp;quot;, rate:intervals[i]&lt;br /&gt;
     wait 2 * (1 / intervals[i])&lt;br /&gt;
     i = i + 1&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   dose = dose + 1&lt;br /&gt;
   wait 1&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
== End Result ==&lt;br /&gt;
&lt;br /&gt;
The first result of the project only had a simple drum pattern as a base loop and was used as a proof-of-proof-of-concept. I sent the results to my father and his staff and he said that they really liked it. After talking with him about it, I added a simple bass to the base loop, which made it sound slightly better.&lt;br /&gt;
&lt;br /&gt;
This video below shows the data sonification in order from the 11.111uM dose to the control 0uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-11-to-0.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
This video below shows the data sonification in order from the control 0uM dose to the 11.111uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-0-to-11.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Would nightcore, speedcore, and/or extratone music that varies with an arrhythmic heartbeat sound good? I don't think so. However, I can say for certain that this project was a very effective way to use sound to compare the the different doses of Mex2A when treating Long QT3 syndrome.&lt;br /&gt;
&lt;br /&gt;
== Further Reading / Viewing ==&lt;br /&gt;
* [https://www.gnu.org/software/octave/ GNU Octave] - the open-source scientific programming language I used to analyze the data for this project.&lt;br /&gt;
* [https://sonic-pi.net/ Sonic Pi] - the open-source live-coding synth I used to make the music for this project.&lt;br /&gt;
&lt;br /&gt;
== Post-Mortem ==&lt;br /&gt;
This part will be updated once I finish continuing this project over break. If my father's paper on Mex2A and Long QT3 syndrome is published, I'll definitely leave a link here. Stay tuned!&lt;br /&gt;
&lt;br /&gt;
[[Category: Advisor:Manzo]]&lt;br /&gt;
[[Category:Algorithmic, Interactive, &amp;amp; Electro-acoustic Compositions]]&lt;br /&gt;
[[Category:Electronic Music Composition (3620)]]&lt;/div&gt;</summary>
		<author><name>Vsmercola</name></author>
		
	</entry>
	<entry>
		<id>https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247054</id>
		<title>Arrhythmia Data Sonification</title>
		<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247054"/>
		<updated>2019-12-15T21:16:12Z</updated>

		<summary type="html">&lt;p&gt;Vsmercola: /* End Result */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By Victor Mercola&lt;br /&gt;
&lt;br /&gt;
My father, Mark Mercola, is a professor of medicine at Stanford University and the head of the Mercola Lab (as of writing this project). While talking with him about the classes I take at WPI, he mentioned how it would be interesting to use data sonification to educate and/or demonstrate the effectiveness of a new drug that he is working on. I agreed with his proposal and used the data he gave me for my final project in MU3620, Arrhythmia Data Sonification. Using GNU Octave, Ableton Live, and Sonic Pi, I was able to make &amp;quot;music&amp;quot; that would change according to an arrhythmic heartbeat.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Before working with music, there is some important preliminary background information to go over.&lt;br /&gt;
&lt;br /&gt;
The standard heartbeat seen on electrocardiograms (ECG / EKG) and other heart monitors is comprised of five different sections, named the &amp;quot;P Wave&amp;quot;, the &amp;quot;QRS Complex&amp;quot;, and the &amp;quot;T Wave&amp;quot;. The specific disease my father is working on is Long QT syndrome - as its name suggests, Long QT syndrome is a fatal, congenital cardiac rhythm disorder that where the length of the QT interval is longer than usual, causing arrhythmia patterns. My father is specifically working on Long QT type 3 (a.k.a. Long QT3 syndrome), which is caused by a problem regulating sodium ions in heart cells. He is currently working on a new drug to treat disease, currently named &amp;quot;Mex2A&amp;quot; and nicknamed &amp;quot;Super Mex&amp;quot; by his staff.&lt;br /&gt;
&lt;br /&gt;
== Analyzing &amp;amp; processing the data ==&lt;br /&gt;
&lt;br /&gt;
[[File:Mex2A graph.PNG|800px|center|Series of graphs of the results, from 100uM to 0uM left to right.]]&lt;br /&gt;
&lt;br /&gt;
My father sent me a large spreadsheet that, when graphed, produced the results of the graphs above. These show the results of human heart cells with Long QT3 syndrome given different dose amounts of Mex2A, in micromolar. The graphs represent the direct electrical activity of heart muscle cells that is related to the surface ECG reading. rightmost graph with the title &amp;quot;0&amp;quot; is the control data, without any Mex2A dose (0 uM). As the graphs progress from right to left, the graph's peaks become more and more regular until the 11.111uM dose - this dose shows strikingly regular peaks denoting a heartbeat. When I saw this data, I thought would be neat to make &amp;quot;music&amp;quot; where each peak represented a music measure's bar line, and the tempo of the song would increase or decrease depending on how fast or slow the heart cells beat, respectively. &lt;br /&gt;
&lt;br /&gt;
To turn the heartbeat data into music intervals, I first opened the file in GNU Octave (open-source MATLAB alternative). I first wanted to find the average interval of the 11uM dose beats, because I wanted the average interval's corresponding BPM to be scaled to 120 BPM. After recording the timestamps of all of the important peaks, I made a new array of intervals of unit milliseconds. With those intervals, I could convert the intervals' inverse, in Hz (1 cycle per second). I then converted the intervals' Hz to BPM (beats per minute) by multiplying by 60.  &lt;br /&gt;
&lt;br /&gt;
I figured out that the heart cells when given the 11uM dose could beat at about 43.885 BPM normally. In music terms, that tempo is the faster end of &amp;quot;grave&amp;quot;. I decided from here that I could normalize the interval BPM's by dividing each value by the average. From here, it was rinse and repeat for the other graphs - The interval data for 3.703uM, 1.2345uM, 0.4115uM, 0.1271uM, and 0uM were all normalized with the same 43.885 BPM value. The remaining data, 100uM and 33.333uM, were not used because there wasn't any pulse on the same intensity as the 11uM dose.&lt;br /&gt;
&lt;br /&gt;
 %{&lt;br /&gt;
 Octave code for generating music from heartbeats&lt;br /&gt;
 Victor Mercola&lt;br /&gt;
 MU 3620&lt;br /&gt;
 2019-12-09&lt;br /&gt;
 under Prof. Manzo&lt;br /&gt;
 %}&lt;br /&gt;
   &lt;br /&gt;
 pkg load signal;&lt;br /&gt;
 averageInterval = 1367.2; % interval of average heart rate [ms]&lt;br /&gt;
 averageHz = 1 / (1367.2 / 1000); % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 averageBPM = averageHz * 60; % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 % disp(averageBPM) &lt;br /&gt;
 &lt;br /&gt;
 %{ &lt;br /&gt;
 1 beat        1 beat&lt;br /&gt;
 -----       = ------&lt;br /&gt;
 1367.2 ms     1.3672 s&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 x = csvread(&amp;quot;N406K_forMark.csv&amp;quot;,1,0); % original file, a csv &lt;br /&gt;
 &lt;br /&gt;
 %{&lt;br /&gt;
 Mex2A_100uM     = transpose(x(:,2)); % Mex2A - 100 uM&lt;br /&gt;
 Mex2A_33_333uM  = transpose(x(:,3)); % Mex2A - 33.333 uM&lt;br /&gt;
 Mex2A_11_111uM  = transpose(x(:,4)); % Mex2A - 11.111 uM&lt;br /&gt;
 Mex2A_3_703uM   = transpose(x(:,5)); % Mex2A - 3.703 uM&lt;br /&gt;
 Mex2A_1_2345uM  = transpose(x(:,6)); % Mex2A - 1.2345 uM&lt;br /&gt;
 Mex2A_0_4115uM  = transpose(x(:,7)); % Mex2A - 0.4115 uM&lt;br /&gt;
 Mex2A_0_1271uM  = transpose(x(:,8)); % Mex2A - 0.1271 uM&lt;br /&gt;
 Mex2A_0uM       = transpose(x(:,9)); % Mex2A - 0 uM&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 t = transpose(x(:,1)); % time array [ms]&lt;br /&gt;
 Mex2A = [100, 33.333, 11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]; &lt;br /&gt;
 &lt;br /&gt;
 n = 3; &lt;br /&gt;
 &lt;br /&gt;
 % find the peaks in the graph&lt;br /&gt;
 this_row = transpose(x(:,n + 1));&lt;br /&gt;
 [pks idx] = findpeaks(this_row, &amp;quot;MinPeakHeight&amp;quot;,0.015, &amp;quot;MinPeakDistance&amp;quot;, 5); &lt;br /&gt;
 &lt;br /&gt;
 % convert those peak values from findpeaks into coordinates&lt;br /&gt;
 peakX = t(idx);&lt;br /&gt;
 peakY = this_row(idx);&lt;br /&gt;
 disp(peakX);  &lt;br /&gt;
  &lt;br /&gt;
 f = figure;&lt;br /&gt;
 plot(t, this_row, peakX, peakY, 'x');&lt;br /&gt;
 axis([min(t), max(t), 0, 0.03]);&lt;br /&gt;
 title([&amp;quot;Intensity of Mex2A=&amp;quot;, num2str(Mex2A(n)), &amp;quot;uM&amp;quot;]);&lt;br /&gt;
 xlabel(&amp;quot;Time, t [ms]&amp;quot;);&lt;br /&gt;
 ylabel(&amp;quot;Intensity&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
 % calculate peak intervals&lt;br /&gt;
 for i = 2:length(peakX)&lt;br /&gt;
     pkToPkInterval(i - 1) = peakX(i) - peakX(i-1); % time between intervals [ms]&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 pkToPkHz = 1./(pkToPkInterval / 1000);  % interval frequency [Hz]&lt;br /&gt;
 pkToPkBPM = pkToPkHz * 60; % interval frequency [BPM]&lt;br /&gt;
 disp(pkToPkBPM); &lt;br /&gt;
 &lt;br /&gt;
 pkToPkRatio = pkToPkBPM / averageBPM&lt;br /&gt;
&lt;br /&gt;
== Playing the data ==&lt;br /&gt;
&lt;br /&gt;
I could export the data from GNU Octave into Sonic Pi by first pasting it into a simple text editor to format it nicely. Once I made a quick 120 BPM single-measure beat, I could import it into Sonic Pi and change its playback rate in time with the arrays that I generated from GNU Octave. While Sonic Pi is great for live-coding music, I personally think it's missing a couple of key programming elements. Two examples of this that are present is this code is &amp;quot;for&amp;quot; loops with changing variables and not being able to determine the length of an array. I found simple workarounds for both of these, though. &lt;br /&gt;
&lt;br /&gt;
 # Data Sonification with heartbeats&lt;br /&gt;
 # Victor Mercola - MU 3620&lt;br /&gt;
 # Prof. Manzo, 2019-12-09&lt;br /&gt;
 &lt;br /&gt;
 doses = [11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]&lt;br /&gt;
 avgBPM = 43.885&lt;br /&gt;
 &lt;br /&gt;
 dose = 0&lt;br /&gt;
 6.times do&lt;br /&gt;
   if(dose == 0)&lt;br /&gt;
     # 11.111 uM dose&lt;br /&gt;
     intervals = [1.00371, 1.00371, 1.00371, 1.00371, 0.98189, 1.00371]&lt;br /&gt;
     n = 6&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 1)&lt;br /&gt;
     # 3.703 uM dose&lt;br /&gt;
     intervals = [1.1292, 1.0037, 0.98189, 2.5093, 1.0504, 0.98189, 2.5093, 1.0754, 2.3772]&lt;br /&gt;
     n = 9&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 2)&lt;br /&gt;
     # 1.2345 uM dose&lt;br /&gt;
     intervals = [2.5093, 3.7639, 3.7639, 1.1581, 2.5093, 3.7639, 3.7639, 1.1292, 2.6569, 3.7639, 3.7639, 1.1292, 2.5093, 1.0504]&lt;br /&gt;
     n = 14&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 3)&lt;br /&gt;
     # 0.4115 uM dose&lt;br /&gt;
     intervals = [2.8229, 0.961, 2.8229, 0.94098, 2.8229, 4.1061, 3.7639, 0.961, 3.0111, 0.94098, 2.8229]&lt;br /&gt;
     n = 11&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 4)&lt;br /&gt;
     # 0.1271 uM dose&lt;br /&gt;
     intervals = [4.1061, 4.5167, 1.1016, 0.94098, 2.6569, 4.1061, 5.0185, 4.5167, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.1061, 4.1061, 4.5167, 1.1292]&lt;br /&gt;
     n = 21&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 5)&lt;br /&gt;
     # 0 uM dose&lt;br /&gt;
     intervals = [5.0185, 4.5167, 5.0185, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 1.1886, 1.0037, 2.6569, 4.5167, 5.0185, 5.0185, 5.6459, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 4.5167, 5.0185, 5.0185, 4.5167]&lt;br /&gt;
     n = 26&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   # Here's where the actual music happens&lt;br /&gt;
   &lt;br /&gt;
   i = 0&lt;br /&gt;
   n.times do&lt;br /&gt;
     puts(doses[dose],&amp;quot;uM&amp;quot;)&lt;br /&gt;
     puts(intervals[i])&lt;br /&gt;
     puts(&amp;quot;Heart BPM:&amp;quot;,avgBPM*intervals[i])&lt;br /&gt;
     puts(&amp;quot;Music BPM:&amp;quot;,120*intervals[i])&lt;br /&gt;
     sample &amp;quot;D:/OneDrive/Documents/GNU Octave/quick drum loop v2.wav&amp;quot;, rate:intervals[i]&lt;br /&gt;
     wait 2 * (1 / intervals[i])&lt;br /&gt;
     i = i + 1&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   dose = dose + 1&lt;br /&gt;
   wait 1&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
== End Result ==&lt;br /&gt;
&lt;br /&gt;
The first result of the project only had a simple drum pattern as a base loop and was used as a proof-of-proof-of-concept. I sent the results to my father and his staff and he said that they really liked it. After talking with him about it, I added a simple bass to the base loop, which made it sound slightly better.&lt;br /&gt;
&lt;br /&gt;
This video below shows the data sonification in order from the 11.111uM dose to the control 0uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-11-to-0.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
This video below shows the data sonification in order from the control 0uM dose to the 11.111uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-0-to-11.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Would nightcore, speedcore, and/or extratone music that varies with an arrhythmic heartbeat sound good? I don't think so. However, I can say for certain that this project was a very effective way to use sound to compare the the different doses of Mex2A when treating Long QT3 syndrome.&lt;br /&gt;
&lt;br /&gt;
== Further Reading / Viewing ==&lt;br /&gt;
* [https://www.gnu.org/software/octave/ GNU Octave] - the open-source scientific programming language I used to analyze the data for this project.&lt;br /&gt;
* [https://sonic-pi.net/ Sonic Pi] - the open-source live-coding synth I used to make the music for this project.&lt;br /&gt;
&lt;br /&gt;
== Post-Mortem ==&lt;br /&gt;
This part will be updated once I finish continuing this project over break. If my father's paper on Mex2A is published, I'll definitely leave a link here. Stay tuned!&lt;br /&gt;
&lt;br /&gt;
[[Category: Advisor:Manzo]]&lt;br /&gt;
[[Category:Algorithmic, Interactive, &amp;amp; Electro-acoustic Compositions]]&lt;br /&gt;
[[Category:Electronic Music Composition (3620)]]&lt;/div&gt;</summary>
		<author><name>Vsmercola</name></author>
		
	</entry>
	<entry>
		<id>https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247053</id>
		<title>Arrhythmia Data Sonification</title>
		<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247053"/>
		<updated>2019-12-15T21:13:28Z</updated>

		<summary type="html">&lt;p&gt;Vsmercola: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By Victor Mercola&lt;br /&gt;
&lt;br /&gt;
My father, Mark Mercola, is a professor of medicine at Stanford University and the head of the Mercola Lab (as of writing this project). While talking with him about the classes I take at WPI, he mentioned how it would be interesting to use data sonification to educate and/or demonstrate the effectiveness of a new drug that he is working on. I agreed with his proposal and used the data he gave me for my final project in MU3620, Arrhythmia Data Sonification. Using GNU Octave, Ableton Live, and Sonic Pi, I was able to make &amp;quot;music&amp;quot; that would change according to an arrhythmic heartbeat.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Before working with music, there is some important preliminary background information to go over.&lt;br /&gt;
&lt;br /&gt;
The standard heartbeat seen on electrocardiograms (ECG / EKG) and other heart monitors is comprised of five different sections, named the &amp;quot;P Wave&amp;quot;, the &amp;quot;QRS Complex&amp;quot;, and the &amp;quot;T Wave&amp;quot;. The specific disease my father is working on is Long QT syndrome - as its name suggests, Long QT syndrome is a fatal, congenital cardiac rhythm disorder that where the length of the QT interval is longer than usual, causing arrhythmia patterns. My father is specifically working on Long QT type 3 (a.k.a. Long QT3 syndrome), which is caused by a problem regulating sodium ions in heart cells. He is currently working on a new drug to treat disease, currently named &amp;quot;Mex2A&amp;quot; and nicknamed &amp;quot;Super Mex&amp;quot; by his staff.&lt;br /&gt;
&lt;br /&gt;
== Analyzing &amp;amp; processing the data ==&lt;br /&gt;
&lt;br /&gt;
[[File:Mex2A graph.PNG|800px|center|Series of graphs of the results, from 100uM to 0uM left to right.]]&lt;br /&gt;
&lt;br /&gt;
My father sent me a large spreadsheet that, when graphed, produced the results of the graphs above. These show the results of human heart cells with Long QT3 syndrome given different dose amounts of Mex2A, in micromolar. The graphs represent the direct electrical activity of heart muscle cells that is related to the surface ECG reading. rightmost graph with the title &amp;quot;0&amp;quot; is the control data, without any Mex2A dose (0 uM). As the graphs progress from right to left, the graph's peaks become more and more regular until the 11.111uM dose - this dose shows strikingly regular peaks denoting a heartbeat. When I saw this data, I thought would be neat to make &amp;quot;music&amp;quot; where each peak represented a music measure's bar line, and the tempo of the song would increase or decrease depending on how fast or slow the heart cells beat, respectively. &lt;br /&gt;
&lt;br /&gt;
To turn the heartbeat data into music intervals, I first opened the file in GNU Octave (open-source MATLAB alternative). I first wanted to find the average interval of the 11uM dose beats, because I wanted the average interval's corresponding BPM to be scaled to 120 BPM. After recording the timestamps of all of the important peaks, I made a new array of intervals of unit milliseconds. With those intervals, I could convert the intervals' inverse, in Hz (1 cycle per second). I then converted the intervals' Hz to BPM (beats per minute) by multiplying by 60.  &lt;br /&gt;
&lt;br /&gt;
I figured out that the heart cells when given the 11uM dose could beat at about 43.885 BPM normally. In music terms, that tempo is the faster end of &amp;quot;grave&amp;quot;. I decided from here that I could normalize the interval BPM's by dividing each value by the average. From here, it was rinse and repeat for the other graphs - The interval data for 3.703uM, 1.2345uM, 0.4115uM, 0.1271uM, and 0uM were all normalized with the same 43.885 BPM value. The remaining data, 100uM and 33.333uM, were not used because there wasn't any pulse on the same intensity as the 11uM dose.&lt;br /&gt;
&lt;br /&gt;
 %{&lt;br /&gt;
 Octave code for generating music from heartbeats&lt;br /&gt;
 Victor Mercola&lt;br /&gt;
 MU 3620&lt;br /&gt;
 2019-12-09&lt;br /&gt;
 under Prof. Manzo&lt;br /&gt;
 %}&lt;br /&gt;
   &lt;br /&gt;
 pkg load signal;&lt;br /&gt;
 averageInterval = 1367.2; % interval of average heart rate [ms]&lt;br /&gt;
 averageHz = 1 / (1367.2 / 1000); % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 averageBPM = averageHz * 60; % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 % disp(averageBPM) &lt;br /&gt;
 &lt;br /&gt;
 %{ &lt;br /&gt;
 1 beat        1 beat&lt;br /&gt;
 -----       = ------&lt;br /&gt;
 1367.2 ms     1.3672 s&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 x = csvread(&amp;quot;N406K_forMark.csv&amp;quot;,1,0); % original file, a csv &lt;br /&gt;
 &lt;br /&gt;
 %{&lt;br /&gt;
 Mex2A_100uM     = transpose(x(:,2)); % Mex2A - 100 uM&lt;br /&gt;
 Mex2A_33_333uM  = transpose(x(:,3)); % Mex2A - 33.333 uM&lt;br /&gt;
 Mex2A_11_111uM  = transpose(x(:,4)); % Mex2A - 11.111 uM&lt;br /&gt;
 Mex2A_3_703uM   = transpose(x(:,5)); % Mex2A - 3.703 uM&lt;br /&gt;
 Mex2A_1_2345uM  = transpose(x(:,6)); % Mex2A - 1.2345 uM&lt;br /&gt;
 Mex2A_0_4115uM  = transpose(x(:,7)); % Mex2A - 0.4115 uM&lt;br /&gt;
 Mex2A_0_1271uM  = transpose(x(:,8)); % Mex2A - 0.1271 uM&lt;br /&gt;
 Mex2A_0uM       = transpose(x(:,9)); % Mex2A - 0 uM&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 t = transpose(x(:,1)); % time array [ms]&lt;br /&gt;
 Mex2A = [100, 33.333, 11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]; &lt;br /&gt;
 &lt;br /&gt;
 n = 3; &lt;br /&gt;
 &lt;br /&gt;
 % find the peaks in the graph&lt;br /&gt;
 this_row = transpose(x(:,n + 1));&lt;br /&gt;
 [pks idx] = findpeaks(this_row, &amp;quot;MinPeakHeight&amp;quot;,0.015, &amp;quot;MinPeakDistance&amp;quot;, 5); &lt;br /&gt;
 &lt;br /&gt;
 % convert those peak values from findpeaks into coordinates&lt;br /&gt;
 peakX = t(idx);&lt;br /&gt;
 peakY = this_row(idx);&lt;br /&gt;
 disp(peakX);  &lt;br /&gt;
  &lt;br /&gt;
 f = figure;&lt;br /&gt;
 plot(t, this_row, peakX, peakY, 'x');&lt;br /&gt;
 axis([min(t), max(t), 0, 0.03]);&lt;br /&gt;
 title([&amp;quot;Intensity of Mex2A=&amp;quot;, num2str(Mex2A(n)), &amp;quot;uM&amp;quot;]);&lt;br /&gt;
 xlabel(&amp;quot;Time, t [ms]&amp;quot;);&lt;br /&gt;
 ylabel(&amp;quot;Intensity&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
 % calculate peak intervals&lt;br /&gt;
 for i = 2:length(peakX)&lt;br /&gt;
     pkToPkInterval(i - 1) = peakX(i) - peakX(i-1); % time between intervals [ms]&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 pkToPkHz = 1./(pkToPkInterval / 1000);  % interval frequency [Hz]&lt;br /&gt;
 pkToPkBPM = pkToPkHz * 60; % interval frequency [BPM]&lt;br /&gt;
 disp(pkToPkBPM); &lt;br /&gt;
 &lt;br /&gt;
 pkToPkRatio = pkToPkBPM / averageBPM&lt;br /&gt;
&lt;br /&gt;
== Playing the data ==&lt;br /&gt;
&lt;br /&gt;
I could export the data from GNU Octave into Sonic Pi by first pasting it into a simple text editor to format it nicely. Once I made a quick 120 BPM single-measure beat, I could import it into Sonic Pi and change its playback rate in time with the arrays that I generated from GNU Octave. While Sonic Pi is great for live-coding music, I personally think it's missing a couple of key programming elements. Two examples of this that are present is this code is &amp;quot;for&amp;quot; loops with changing variables and not being able to determine the length of an array. I found simple workarounds for both of these, though. &lt;br /&gt;
&lt;br /&gt;
 # Data Sonification with heartbeats&lt;br /&gt;
 # Victor Mercola - MU 3620&lt;br /&gt;
 # Prof. Manzo, 2019-12-09&lt;br /&gt;
 &lt;br /&gt;
 doses = [11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]&lt;br /&gt;
 avgBPM = 43.885&lt;br /&gt;
 &lt;br /&gt;
 dose = 0&lt;br /&gt;
 6.times do&lt;br /&gt;
   if(dose == 0)&lt;br /&gt;
     # 11.111 uM dose&lt;br /&gt;
     intervals = [1.00371, 1.00371, 1.00371, 1.00371, 0.98189, 1.00371]&lt;br /&gt;
     n = 6&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 1)&lt;br /&gt;
     # 3.703 uM dose&lt;br /&gt;
     intervals = [1.1292, 1.0037, 0.98189, 2.5093, 1.0504, 0.98189, 2.5093, 1.0754, 2.3772]&lt;br /&gt;
     n = 9&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 2)&lt;br /&gt;
     # 1.2345 uM dose&lt;br /&gt;
     intervals = [2.5093, 3.7639, 3.7639, 1.1581, 2.5093, 3.7639, 3.7639, 1.1292, 2.6569, 3.7639, 3.7639, 1.1292, 2.5093, 1.0504]&lt;br /&gt;
     n = 14&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 3)&lt;br /&gt;
     # 0.4115 uM dose&lt;br /&gt;
     intervals = [2.8229, 0.961, 2.8229, 0.94098, 2.8229, 4.1061, 3.7639, 0.961, 3.0111, 0.94098, 2.8229]&lt;br /&gt;
     n = 11&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 4)&lt;br /&gt;
     # 0.1271 uM dose&lt;br /&gt;
     intervals = [4.1061, 4.5167, 1.1016, 0.94098, 2.6569, 4.1061, 5.0185, 4.5167, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.1061, 4.1061, 4.5167, 1.1292]&lt;br /&gt;
     n = 21&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 5)&lt;br /&gt;
     # 0 uM dose&lt;br /&gt;
     intervals = [5.0185, 4.5167, 5.0185, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 1.1886, 1.0037, 2.6569, 4.5167, 5.0185, 5.0185, 5.6459, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 4.5167, 5.0185, 5.0185, 4.5167]&lt;br /&gt;
     n = 26&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   # Here's where the actual music happens&lt;br /&gt;
   &lt;br /&gt;
   i = 0&lt;br /&gt;
   n.times do&lt;br /&gt;
     puts(doses[dose],&amp;quot;uM&amp;quot;)&lt;br /&gt;
     puts(intervals[i])&lt;br /&gt;
     puts(&amp;quot;Heart BPM:&amp;quot;,avgBPM*intervals[i])&lt;br /&gt;
     puts(&amp;quot;Music BPM:&amp;quot;,120*intervals[i])&lt;br /&gt;
     sample &amp;quot;D:/OneDrive/Documents/GNU Octave/quick drum loop v2.wav&amp;quot;, rate:intervals[i]&lt;br /&gt;
     wait 2 * (1 / intervals[i])&lt;br /&gt;
     i = i + 1&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   dose = dose + 1&lt;br /&gt;
   wait 1&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
== End Result ==&lt;br /&gt;
&lt;br /&gt;
The first result of the project only had a simple drum pattern as a base loop and was used as a proof-of-proof-of-concept. I sent the results to my father and his staff and he said that they really liked it. After talking with him about it, I added a simple bass to the base loop, which made it sound slightly better.&lt;br /&gt;
&lt;br /&gt;
This video below shows the data sonification in order from the 11.111uM dose to the control 0uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-11-to-0.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
This video below shows the data sonification in order from the control 0uM dose to the 11.111uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-0-to-11.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Would nightcore, speedcore, and/or extratone music that varies with an arrhythmic heartbeat sound good? I don't think so. However, I can say for certain that this project was a very effective tool for using sound to compare the control and expected-dosage results of Mex2A.&lt;br /&gt;
&lt;br /&gt;
== Further Reading / Viewing ==&lt;br /&gt;
* [https://www.gnu.org/software/octave/ GNU Octave] - the open-source scientific programming language I used to analyze the data for this project.&lt;br /&gt;
* [https://sonic-pi.net/ Sonic Pi] - the open-source live-coding synth I used to make the music for this project.&lt;br /&gt;
&lt;br /&gt;
== Post-Mortem ==&lt;br /&gt;
This part will be updated once I finish continuing this project over break. If my father's paper on Mex2A is published, I'll definitely leave a link here. Stay tuned!&lt;br /&gt;
&lt;br /&gt;
[[Category: Advisor:Manzo]]&lt;br /&gt;
[[Category:Algorithmic, Interactive, &amp;amp; Electro-acoustic Compositions]]&lt;br /&gt;
[[Category:Electronic Music Composition (3620)]]&lt;/div&gt;</summary>
		<author><name>Vsmercola</name></author>
		
	</entry>
	<entry>
		<id>https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247052</id>
		<title>Arrhythmia Data Sonification</title>
		<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247052"/>
		<updated>2019-12-15T21:12:44Z</updated>

		<summary type="html">&lt;p&gt;Vsmercola: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By Victor Mercola&lt;br /&gt;
&lt;br /&gt;
My father, Mark Mercola, is a professor of medicine at Stanford University and the head of the Mercola Lab (as of writing this project). While talking with him about the classes I take at WPI, he mentioned how it would be interesting to use data sonification to educate and/or demonstrate the effectiveness of a new drug that he is working on. I agreed with his proposal and used the data he gave me for my final project in MU3620, Arrhythmia Data Sonification. Using GNU Octave, Ableton Live, and Sonic Pi, I was able to make &amp;quot;music&amp;quot; that would change according to an arrhythmic heartbeat.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Before working with music, there is some important preliminary background information to go over.&lt;br /&gt;
&lt;br /&gt;
The standard heartbeat seen on electrocardiograms (ECG / EKG) and other heart monitors is comprised of five different sections, named the &amp;quot;P Wave&amp;quot;, the &amp;quot;QRS Complex&amp;quot;, and the &amp;quot;T Wave&amp;quot;. The specific disease my father is working on is Long QT syndrome - as its name suggests, Long QT syndrome is a fatal, congenital cardiac rhythm disorder that where the length of the QT interval is longer than usual, causing arrhythmia patterns. My father is specifically working on Long QT type 3 (a.k.a. Long QT3 syndrome), which is caused by a problem regulating sodium ions in heart cells. He is currently working on a new drug to treat disease, currently named &amp;quot;Mex2A&amp;quot; and nicknamed &amp;quot;Super Mex&amp;quot; by his staff.&lt;br /&gt;
&lt;br /&gt;
== Analyzing &amp;amp; processing the data ==&lt;br /&gt;
&lt;br /&gt;
[[File:Mex2A graph.PNG|800px|center|Series of graphs of the results, from 100uM to 0uM left to right.]]&lt;br /&gt;
&lt;br /&gt;
My father sent me a large spreadsheet that, when graphed, produced the results of the graphs above. These show the results of human heart cells with Long QT3 syndrome given different dose amounts of Mex2A, in micromolar. The graphs represent the direct electrical activity of heart muscle cells that is related to the surface ECG reading. rightmost graph with the title &amp;quot;0&amp;quot; is the control data, without any Mex2A dose (0 uM). As the graphs progress from right to left, the graph's peaks become more and more regular until the 11.111uM dose - this dose shows strikingly regular peaks denoting a heartbeat. When I saw this data, I thought would be neat to make &amp;quot;music&amp;quot; where each peak represented a music measure's bar line, and the tempo of the song would increase or decrease depending on how fast or slow the heart cells beat, respectively. &lt;br /&gt;
&lt;br /&gt;
To turn the heartbeat data into music intervals, I first opened the file in GNU Octave (open-source MATLAB alternative). I first wanted to find the average interval of the 11uM dose beats, because I wanted the average interval's corresponding BPM to be scaled to 120 BPM. After recording the timestamps of all of the important peaks, I made a new array of intervals of unit milliseconds. With those intervals, I could convert the intervals' inverse, in Hz (1 cycle per second). I then converted the intervals' Hz to BPM (beats per minute) by multiplying by 60.  &lt;br /&gt;
&lt;br /&gt;
I figured out that the heart cells when given the 11uM dose could beat at about 43.885 BPM normally. In music terms, that tempo is the faster end of &amp;quot;grave&amp;quot;. I decided from here that I could normalize the interval BPM's by dividing each value by the average. From here, it was rinse and repeat for the other graphs - The interval data for 3.703uM, 1.2345uM, 0.4115uM, 0.1271uM, and 0uM were all normalized with the same 43.885 BPM value. The remaining data, 100uM and 33.333uM, were not used because there wasn't any pulse on the same intensity as the 11uM dose.&lt;br /&gt;
&lt;br /&gt;
 %{&lt;br /&gt;
 Octave code for generating music from heartbeats&lt;br /&gt;
 Victor Mercola&lt;br /&gt;
 MU 3620&lt;br /&gt;
 2019-12-09&lt;br /&gt;
 under Prof. Manzo&lt;br /&gt;
 %}&lt;br /&gt;
   &lt;br /&gt;
 pkg load signal;&lt;br /&gt;
 averageInterval = 1367.2; % interval of average heart rate [ms]&lt;br /&gt;
 averageHz = 1 / (1367.2 / 1000); % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 averageBPM = averageHz * 60; % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 % disp(averageBPM) &lt;br /&gt;
 &lt;br /&gt;
 %{ &lt;br /&gt;
 1 beat        1 beat&lt;br /&gt;
 -----       = ------&lt;br /&gt;
 1367.2 ms     1.3672 s&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 x = csvread(&amp;quot;N406K_forMark.csv&amp;quot;,1,0); % original file, a csv &lt;br /&gt;
 &lt;br /&gt;
 %{&lt;br /&gt;
 Mex2A_100uM     = transpose(x(:,2)); % Mex2A - 100 uM&lt;br /&gt;
 Mex2A_33_333uM  = transpose(x(:,3)); % Mex2A - 33.333 uM&lt;br /&gt;
 Mex2A_11_111uM  = transpose(x(:,4)); % Mex2A - 11.111 uM&lt;br /&gt;
 Mex2A_3_703uM   = transpose(x(:,5)); % Mex2A - 3.703 uM&lt;br /&gt;
 Mex2A_1_2345uM  = transpose(x(:,6)); % Mex2A - 1.2345 uM&lt;br /&gt;
 Mex2A_0_4115uM  = transpose(x(:,7)); % Mex2A - 0.4115 uM&lt;br /&gt;
 Mex2A_0_1271uM  = transpose(x(:,8)); % Mex2A - 0.1271 uM&lt;br /&gt;
 Mex2A_0uM       = transpose(x(:,9)); % Mex2A - 0 uM&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 t = transpose(x(:,1)); % time array [ms]&lt;br /&gt;
 Mex2A = [100, 33.333, 11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]; &lt;br /&gt;
 &lt;br /&gt;
 n = 3; &lt;br /&gt;
 &lt;br /&gt;
 % find the peaks in the graph&lt;br /&gt;
 this_row = transpose(x(:,n + 1));&lt;br /&gt;
 [pks idx] = findpeaks(this_row, &amp;quot;MinPeakHeight&amp;quot;,0.015, &amp;quot;MinPeakDistance&amp;quot;, 5); &lt;br /&gt;
 &lt;br /&gt;
 % convert those peak values from findpeaks into coordinates&lt;br /&gt;
 peakX = t(idx);&lt;br /&gt;
 peakY = this_row(idx);&lt;br /&gt;
 disp(peakX);  &lt;br /&gt;
  &lt;br /&gt;
 f = figure;&lt;br /&gt;
 plot(t, this_row, peakX, peakY, 'x');&lt;br /&gt;
 axis([min(t), max(t), 0, 0.03]);&lt;br /&gt;
 title([&amp;quot;Intensity of Mex2A=&amp;quot;, num2str(Mex2A(n)), &amp;quot;uM&amp;quot;]);&lt;br /&gt;
 xlabel(&amp;quot;Time, t [ms]&amp;quot;);&lt;br /&gt;
 ylabel(&amp;quot;Intensity&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
 % calculate peak intervals&lt;br /&gt;
 for i = 2:length(peakX)&lt;br /&gt;
     pkToPkInterval(i - 1) = peakX(i) - peakX(i-1); % time between intervals [ms]&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 pkToPkHz = 1./(pkToPkInterval / 1000);  % interval frequency [Hz]&lt;br /&gt;
 pkToPkBPM = pkToPkHz * 60; % interval frequency [BPM]&lt;br /&gt;
 disp(pkToPkBPM); &lt;br /&gt;
 &lt;br /&gt;
 pkToPkRatio = pkToPkBPM / averageBPM&lt;br /&gt;
&lt;br /&gt;
== Playing the data ==&lt;br /&gt;
&lt;br /&gt;
I could export the data from GNU Octave into Sonic Pi by first pasting it into a simple text editor to format it nicely. Once I made a quick 120 BPM single-measure beat, I could import it into Sonic Pi and change its playback rate in time with the arrays that I generated from GNU Octave. While Sonic Pi is great for live-coding music, I personally think it's missing a couple of key programming elements. Two examples of this that are present is this code is &amp;quot;for&amp;quot; loops with changing variables and not being able to determine the length of an array. I found simple workarounds for both of these, though. &lt;br /&gt;
&lt;br /&gt;
 # Data Sonification with heartbeats&lt;br /&gt;
 # Victor Mercola - MU 3620&lt;br /&gt;
 # Prof. Manzo, 2019-12-09&lt;br /&gt;
 &lt;br /&gt;
 doses = [11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]&lt;br /&gt;
 avgBPM = 43.885&lt;br /&gt;
 &lt;br /&gt;
 dose = 0&lt;br /&gt;
 6.times do&lt;br /&gt;
   if(dose == 0)&lt;br /&gt;
     # 11.111 uM dose&lt;br /&gt;
     intervals = [1.00371, 1.00371, 1.00371, 1.00371, 0.98189, 1.00371]&lt;br /&gt;
     n = 6&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 1)&lt;br /&gt;
     # 3.703 uM dose&lt;br /&gt;
     intervals = [1.1292, 1.0037, 0.98189, 2.5093, 1.0504, 0.98189, 2.5093, 1.0754, 2.3772]&lt;br /&gt;
     n = 9&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 2)&lt;br /&gt;
     # 1.2345 uM dose&lt;br /&gt;
     intervals = [2.5093, 3.7639, 3.7639, 1.1581, 2.5093, 3.7639, 3.7639, 1.1292, 2.6569, 3.7639, 3.7639, 1.1292, 2.5093, 1.0504]&lt;br /&gt;
     n = 14&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 3)&lt;br /&gt;
     # 0.4115 uM dose&lt;br /&gt;
     intervals = [2.8229, 0.961, 2.8229, 0.94098, 2.8229, 4.1061, 3.7639, 0.961, 3.0111, 0.94098, 2.8229]&lt;br /&gt;
     n = 11&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 4)&lt;br /&gt;
     # 0.1271 uM dose&lt;br /&gt;
     intervals = [4.1061, 4.5167, 1.1016, 0.94098, 2.6569, 4.1061, 5.0185, 4.5167, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.1061, 4.1061, 4.5167, 1.1292]&lt;br /&gt;
     n = 21&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 5)&lt;br /&gt;
     # 0 uM dose&lt;br /&gt;
     intervals = [5.0185, 4.5167, 5.0185, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 1.1886, 1.0037, 2.6569, 4.5167, 5.0185, 5.0185, 5.6459, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 4.5167, 5.0185, 5.0185, 4.5167]&lt;br /&gt;
     n = 26&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   # Here's where the actual music happens&lt;br /&gt;
   &lt;br /&gt;
   i = 0&lt;br /&gt;
   n.times do&lt;br /&gt;
     puts(doses[dose],&amp;quot;uM&amp;quot;)&lt;br /&gt;
     puts(intervals[i])&lt;br /&gt;
     puts(&amp;quot;Heart BPM:&amp;quot;,avgBPM*intervals[i])&lt;br /&gt;
     puts(&amp;quot;Music BPM:&amp;quot;,120*intervals[i])&lt;br /&gt;
     sample &amp;quot;D:/OneDrive/Documents/GNU Octave/quick drum loop v2.wav&amp;quot;, rate:intervals[i]&lt;br /&gt;
     wait 2 * (1 / intervals[i])&lt;br /&gt;
     i = i + 1&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   dose = dose + 1&lt;br /&gt;
   wait 1&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
== End Result ==&lt;br /&gt;
&lt;br /&gt;
The first result of the project only had a simple drum pattern as a base loop and was used as a proof-of-proof-of-concept. I sent the results to my father and his staff and he said that they really liked it. After talking with him about it, I added a simple bass to the base loop, which made it sound slightly better.&lt;br /&gt;
&lt;br /&gt;
This video below shows the data sonification from the 11.111uM dose to the control 0uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-11-to-0.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
This video below shows the data sonification from the control 0uM dose to the 11.111uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-0-to-11.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Would nightcore, speedcore, and/or extratone music that varies with an arrhythmic heartbeat sound good? I don't think so. However, I can say for certain that this project was a very effective tool for using sound to compare the control and expected-dosage results of Mex2A.&lt;br /&gt;
&lt;br /&gt;
== Further Reading / Viewing ==&lt;br /&gt;
* [https://www.gnu.org/software/octave/ GNU Octave] - the open-source scientific programming language I used to analyze the data for this project.&lt;br /&gt;
* [https://sonic-pi.net/ Sonic Pi] - the open-source live-coding synth I used to make the music for this project.&lt;br /&gt;
&lt;br /&gt;
== Post-Mortem ==&lt;br /&gt;
This part will be updated once I finish continuing this project over break. If my father's paper on Mex2A is published, I'll definitely leave a link here. Stay tuned!&lt;br /&gt;
&lt;br /&gt;
[[Category: Advisor:Manzo]]&lt;br /&gt;
[[Category:Algorithmic, Interactive, &amp;amp; Electro-acoustic Compositions]]&lt;br /&gt;
[[Category:Electronic Music Composition (3620)]]&lt;/div&gt;</summary>
		<author><name>Vsmercola</name></author>
		
	</entry>
	<entry>
		<id>https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247051</id>
		<title>Arrhythmia Data Sonification</title>
		<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247051"/>
		<updated>2019-12-15T21:12:31Z</updated>

		<summary type="html">&lt;p&gt;Vsmercola: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By Victor Mercola&lt;br /&gt;
&lt;br /&gt;
My father, Mark Mercola, is a professor of medicine at Stanford University and the head of the Mercola Lab (as of writing this project). While talking with him about the classes I take at WPI, he mentioned how it would be interesting to use data sonification to educate and/or demonstrate the effectiveness of a new drug that he is working on. I agreed with his proposal and used the data he gave me for my final project in MU3620, Arrhythmia Data Sonification. Using GNU Octave, Ableton Live, and Sonic Pi, I was able to make &amp;quot;music&amp;quot; that would change according to an arrhythmic heartbeat.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Before working with music, there is some important preliminary background information to go over.&lt;br /&gt;
&lt;br /&gt;
The standard heartbeat seen on electrocardiograms (ECG / EKG) and other heart monitors is comprised of five different sections, named the &amp;quot;P Wave&amp;quot;, the &amp;quot;QRS Complex&amp;quot;, and the &amp;quot;T Wave&amp;quot;. The specific disease my father is working on is Long QT syndrome - as its name suggests, Long QT syndrome is a fatal, congenital cardiac rhythm disorder that where the length of the QT interval is longer than usual, causing arrhythmia patterns. My father is specifically working on Long QT type 3 (a.k.a. Long QT3 syndrome), which is caused by a problem regulating sodium ions in heart cells. He is currently working on a new drug to treat disease, currently named &amp;quot;Mex2A&amp;quot; and nicknamed &amp;quot;Super Mex&amp;quot; by his staff.&lt;br /&gt;
&lt;br /&gt;
== Analyzing &amp;amp; processing the data ==&lt;br /&gt;
&lt;br /&gt;
[[File:Mex2A graph.PNG|800px|center|Series of graphs of the results, from 100uM to 0uM left to right.]]&lt;br /&gt;
&lt;br /&gt;
My father sent me a large spreadsheet that, when graphed, produced the results of the graphs above. These show the results of human heart cells with Long QT3 syndrome given different dose amounts of Mex2A, in micromolar. The graphs represent the direct electrical activity of heart muscle cells that is related to the surface ECG reading. rightmost graph with the title &amp;quot;0&amp;quot; is the control data, without any Mex2A dose (0 uM). As the graphs progress from right to left, the graph's peaks become more and more regular until the 11.111uM dose - this dose shows strikingly regular peaks denoting a heartbeat. When I saw this data, I thought would be neat to make &amp;quot;music&amp;quot; where each peak represented a music measure's bar line, and the tempo of the song would increase or decrease depending on how fast or slow the heart cells beat, respectively. &lt;br /&gt;
&lt;br /&gt;
To turn the heartbeat data into music intervals, I first opened the file in GNU Octave (open-source MATLAB alternative). I first wanted to find the average interval of the 11uM dose beats, because I wanted the average interval's corresponding BPM to be scaled to 120 BPM. After recording the timestamps of all of the important peaks, I made a new array of intervals of unit milliseconds. With those intervals, I could convert the intervals' inverse, in Hz (1 cycle per second). I then converted the intervals' Hz to BPM (beats per minute) by multiplying by 60.  &lt;br /&gt;
&lt;br /&gt;
I figured out that the heart cells when given the 11uM dose could beat at about 43.885 BPM normally. In music terms, that tempo is the faster end of &amp;quot;grave&amp;quot;. I decided from here that I could normalize the interval BPM's by dividing each value by the average. From here, it was rinse and repeat for the other graphs - The interval data for 3.703uM, 1.2345uM, 0.4115uM, 0.1271uM, and 0uM were all normalized with the same 43.885 BPM value. The remaining data ,100uM and 33.333uM, were not used because there wasn't any pulse on the same intensity as the 11uM dose.&lt;br /&gt;
&lt;br /&gt;
 %{&lt;br /&gt;
 Octave code for generating music from heartbeats&lt;br /&gt;
 Victor Mercola&lt;br /&gt;
 MU 3620&lt;br /&gt;
 2019-12-09&lt;br /&gt;
 under Prof. Manzo&lt;br /&gt;
 %}&lt;br /&gt;
   &lt;br /&gt;
 pkg load signal;&lt;br /&gt;
 averageInterval = 1367.2; % interval of average heart rate [ms]&lt;br /&gt;
 averageHz = 1 / (1367.2 / 1000); % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 averageBPM = averageHz * 60; % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 % disp(averageBPM) &lt;br /&gt;
 &lt;br /&gt;
 %{ &lt;br /&gt;
 1 beat        1 beat&lt;br /&gt;
 -----       = ------&lt;br /&gt;
 1367.2 ms     1.3672 s&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 x = csvread(&amp;quot;N406K_forMark.csv&amp;quot;,1,0); % original file, a csv &lt;br /&gt;
 &lt;br /&gt;
 %{&lt;br /&gt;
 Mex2A_100uM     = transpose(x(:,2)); % Mex2A - 100 uM&lt;br /&gt;
 Mex2A_33_333uM  = transpose(x(:,3)); % Mex2A - 33.333 uM&lt;br /&gt;
 Mex2A_11_111uM  = transpose(x(:,4)); % Mex2A - 11.111 uM&lt;br /&gt;
 Mex2A_3_703uM   = transpose(x(:,5)); % Mex2A - 3.703 uM&lt;br /&gt;
 Mex2A_1_2345uM  = transpose(x(:,6)); % Mex2A - 1.2345 uM&lt;br /&gt;
 Mex2A_0_4115uM  = transpose(x(:,7)); % Mex2A - 0.4115 uM&lt;br /&gt;
 Mex2A_0_1271uM  = transpose(x(:,8)); % Mex2A - 0.1271 uM&lt;br /&gt;
 Mex2A_0uM       = transpose(x(:,9)); % Mex2A - 0 uM&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 t = transpose(x(:,1)); % time array [ms]&lt;br /&gt;
 Mex2A = [100, 33.333, 11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]; &lt;br /&gt;
 &lt;br /&gt;
 n = 3; &lt;br /&gt;
 &lt;br /&gt;
 % find the peaks in the graph&lt;br /&gt;
 this_row = transpose(x(:,n + 1));&lt;br /&gt;
 [pks idx] = findpeaks(this_row, &amp;quot;MinPeakHeight&amp;quot;,0.015, &amp;quot;MinPeakDistance&amp;quot;, 5); &lt;br /&gt;
 &lt;br /&gt;
 % convert those peak values from findpeaks into coordinates&lt;br /&gt;
 peakX = t(idx);&lt;br /&gt;
 peakY = this_row(idx);&lt;br /&gt;
 disp(peakX);  &lt;br /&gt;
  &lt;br /&gt;
 f = figure;&lt;br /&gt;
 plot(t, this_row, peakX, peakY, 'x');&lt;br /&gt;
 axis([min(t), max(t), 0, 0.03]);&lt;br /&gt;
 title([&amp;quot;Intensity of Mex2A=&amp;quot;, num2str(Mex2A(n)), &amp;quot;uM&amp;quot;]);&lt;br /&gt;
 xlabel(&amp;quot;Time, t [ms]&amp;quot;);&lt;br /&gt;
 ylabel(&amp;quot;Intensity&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
 % calculate peak intervals&lt;br /&gt;
 for i = 2:length(peakX)&lt;br /&gt;
     pkToPkInterval(i - 1) = peakX(i) - peakX(i-1); % time between intervals [ms]&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 pkToPkHz = 1./(pkToPkInterval / 1000);  % interval frequency [Hz]&lt;br /&gt;
 pkToPkBPM = pkToPkHz * 60; % interval frequency [BPM]&lt;br /&gt;
 disp(pkToPkBPM); &lt;br /&gt;
 &lt;br /&gt;
 pkToPkRatio = pkToPkBPM / averageBPM&lt;br /&gt;
&lt;br /&gt;
== Playing the data ==&lt;br /&gt;
&lt;br /&gt;
I could export the data from GNU Octave into Sonic Pi by first pasting it into a simple text editor to format it nicely. Once I made a quick 120 BPM single-measure beat, I could import it into Sonic Pi and change its playback rate in time with the arrays that I generated from GNU Octave. While Sonic Pi is great for live-coding music, I personally think it's missing a couple of key programming elements. Two examples of this that are present is this code is &amp;quot;for&amp;quot; loops with changing variables and not being able to determine the length of an array. I found simple workarounds for both of these, though. &lt;br /&gt;
&lt;br /&gt;
 # Data Sonification with heartbeats&lt;br /&gt;
 # Victor Mercola - MU 3620&lt;br /&gt;
 # Prof. Manzo, 2019-12-09&lt;br /&gt;
 &lt;br /&gt;
 doses = [11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]&lt;br /&gt;
 avgBPM = 43.885&lt;br /&gt;
 &lt;br /&gt;
 dose = 0&lt;br /&gt;
 6.times do&lt;br /&gt;
   if(dose == 0)&lt;br /&gt;
     # 11.111 uM dose&lt;br /&gt;
     intervals = [1.00371, 1.00371, 1.00371, 1.00371, 0.98189, 1.00371]&lt;br /&gt;
     n = 6&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 1)&lt;br /&gt;
     # 3.703 uM dose&lt;br /&gt;
     intervals = [1.1292, 1.0037, 0.98189, 2.5093, 1.0504, 0.98189, 2.5093, 1.0754, 2.3772]&lt;br /&gt;
     n = 9&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 2)&lt;br /&gt;
     # 1.2345 uM dose&lt;br /&gt;
     intervals = [2.5093, 3.7639, 3.7639, 1.1581, 2.5093, 3.7639, 3.7639, 1.1292, 2.6569, 3.7639, 3.7639, 1.1292, 2.5093, 1.0504]&lt;br /&gt;
     n = 14&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 3)&lt;br /&gt;
     # 0.4115 uM dose&lt;br /&gt;
     intervals = [2.8229, 0.961, 2.8229, 0.94098, 2.8229, 4.1061, 3.7639, 0.961, 3.0111, 0.94098, 2.8229]&lt;br /&gt;
     n = 11&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 4)&lt;br /&gt;
     # 0.1271 uM dose&lt;br /&gt;
     intervals = [4.1061, 4.5167, 1.1016, 0.94098, 2.6569, 4.1061, 5.0185, 4.5167, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.1061, 4.1061, 4.5167, 1.1292]&lt;br /&gt;
     n = 21&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 5)&lt;br /&gt;
     # 0 uM dose&lt;br /&gt;
     intervals = [5.0185, 4.5167, 5.0185, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 1.1886, 1.0037, 2.6569, 4.5167, 5.0185, 5.0185, 5.6459, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 4.5167, 5.0185, 5.0185, 4.5167]&lt;br /&gt;
     n = 26&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   # Here's where the actual music happens&lt;br /&gt;
   &lt;br /&gt;
   i = 0&lt;br /&gt;
   n.times do&lt;br /&gt;
     puts(doses[dose],&amp;quot;uM&amp;quot;)&lt;br /&gt;
     puts(intervals[i])&lt;br /&gt;
     puts(&amp;quot;Heart BPM:&amp;quot;,avgBPM*intervals[i])&lt;br /&gt;
     puts(&amp;quot;Music BPM:&amp;quot;,120*intervals[i])&lt;br /&gt;
     sample &amp;quot;D:/OneDrive/Documents/GNU Octave/quick drum loop v2.wav&amp;quot;, rate:intervals[i]&lt;br /&gt;
     wait 2 * (1 / intervals[i])&lt;br /&gt;
     i = i + 1&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   dose = dose + 1&lt;br /&gt;
   wait 1&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
== End Result ==&lt;br /&gt;
&lt;br /&gt;
The first result of the project only had a simple drum pattern as a base loop and was used as a proof-of-proof-of-concept. I sent the results to my father and his staff and he said that they really liked it. After talking with him about it, I added a simple bass to the base loop, which made it sound slightly better.&lt;br /&gt;
&lt;br /&gt;
This video below shows the data sonification from the 11.111uM dose to the control 0uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-11-to-0.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
This video below shows the data sonification from the control 0uM dose to the 11.111uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-0-to-11.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Would nightcore, speedcore, and/or extratone music that varies with an arrhythmic heartbeat sound good? I don't think so. However, I can say for certain that this project was a very effective tool for using sound to compare the control and expected-dosage results of Mex2A.&lt;br /&gt;
&lt;br /&gt;
== Further Reading / Viewing ==&lt;br /&gt;
* [https://www.gnu.org/software/octave/ GNU Octave] - the open-source scientific programming language I used to analyze the data for this project.&lt;br /&gt;
* [https://sonic-pi.net/ Sonic Pi] - the open-source live-coding synth I used to make the music for this project.&lt;br /&gt;
&lt;br /&gt;
== Post-Mortem ==&lt;br /&gt;
This part will be updated once I finish continuing this project over break. If my father's paper on Mex2A is published, I'll definitely leave a link here. Stay tuned!&lt;br /&gt;
&lt;br /&gt;
[[Category: Advisor:Manzo]]&lt;br /&gt;
[[Category:Algorithmic, Interactive, &amp;amp; Electro-acoustic Compositions]]&lt;br /&gt;
[[Category:Electronic Music Composition (3620)]]&lt;/div&gt;</summary>
		<author><name>Vsmercola</name></author>
		
	</entry>
	<entry>
		<id>https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247050</id>
		<title>Arrhythmia Data Sonification</title>
		<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247050"/>
		<updated>2019-12-15T21:12:11Z</updated>

		<summary type="html">&lt;p&gt;Vsmercola: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By Victor Mercola&lt;br /&gt;
&lt;br /&gt;
My father, Mark Mercola, is a professor of medicine at Stanford University and the head of the Mercola Lab (as of writing this project). While talking with him about the classes I take at WPI, he mentioned how it would be interesting to use data sonification to educate and/or demonstrate the effectiveness of a new drug that he is working on. I agreed with his proposal and used the data he gave me for my final project in MU3620, Arrhythmia Data Sonification. Using GNU Octave, Ableton Live, and Sonic Pi, I was able to make &amp;quot;music&amp;quot; that would change according to an arrhythmic heartbeat.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Before working with music, there is some important preliminary background information to go over.&lt;br /&gt;
&lt;br /&gt;
The standard heartbeat seen on electrocardiograms (ECG / EKG) and other heart monitors is comprised of five different sections, named the &amp;quot;P Wave&amp;quot;, the &amp;quot;QRS Complex&amp;quot;, and the &amp;quot;T Wave&amp;quot;. The specific disease my father is working on is Long QT syndrome - as its name suggests, Long QT syndrome is a fatal, congenital cardiac rhythm disorder that where the length of the QT interval is longer than usual, causing arrhythmia patterns. My father is specifically working on Long QT type 3 (a.k.a. Long QT3 syndrome), which is caused by a problem regulating sodium ions in heart cells. He is currently working on a new drug to treat disease, currently named &amp;quot;Mex2A&amp;quot; and nicknamed &amp;quot;Super Mex&amp;quot; by his staff.&lt;br /&gt;
&lt;br /&gt;
== Analyzing &amp;amp; processing the data ==&lt;br /&gt;
&lt;br /&gt;
[[File:Mex2A graph.PNG|800px|center|Series of graphs of the results, from 100uM to 0uM left to right.]]&lt;br /&gt;
&lt;br /&gt;
My father sent me a large spreadsheet that, when graphed, produced the results of the graphs above. These show the results of human heart cells with Long QT3 syndrome given different dose amounts of Mex2A, in micromolar. The graphs represent the direct electrical activity of heart muscle cells that is related to the surface ECG reading. rightmost graph with the title &amp;quot;0&amp;quot; is the control data, without any Mex2A dose (0 uM). As the graphs progress from right to left, the graph's peaks become more and more regular until the 11.111uM dose - this dose shows strikingly regular peaks denoting a heartbeat. When I saw this data, I thought would be neat to make &amp;quot;music&amp;quot; where each peak represented a music measure's bar line, and the tempo of the song would increase or decrease depending on how fast or slow the heart cells beat, respectively. &lt;br /&gt;
&lt;br /&gt;
To turn the heartbeat data into music intervals, I first opened the file in GNU Octave (open-source MATLAB alternative). I first wanted to find the average interval of the 11uM dose beats, because I wanted the average interval's corresponding BPM to be scaled to 120 BPM. After recording the timestamps of all of the important peaks, I made a new array of intervals of unit milliseconds. With those intervals, I could convert the intervals' inverse, in Hz (1 cycle per second). I then converted the intervals' Hz to BPM (beats per minute) by multiplying by 60.  &lt;br /&gt;
&lt;br /&gt;
I figured out that the heart cells when given the 11uM dose could beat at about 43.885 BPM normally. In music terms, that tempo is the faster end of &amp;quot;grave&amp;quot;. I decided from here that I could normalize the interval BPM's by dividing each value by the average. From here, it was rinse and repeat for the other graphs - The interval data for 3.703uM, 1.2345uM, 0.4115uM, 0.1271uM, and 0uM were all normalized with the same 43.885 BPM value. The remaining data, (100uM and 33.333uM) were not used because there wasn't any pulse on the same intensity as the 11uM dose.&lt;br /&gt;
&lt;br /&gt;
 %{&lt;br /&gt;
 Octave code for generating music from heartbeats&lt;br /&gt;
 Victor Mercola&lt;br /&gt;
 MU 3620&lt;br /&gt;
 2019-12-09&lt;br /&gt;
 under Prof. Manzo&lt;br /&gt;
 %}&lt;br /&gt;
   &lt;br /&gt;
 pkg load signal;&lt;br /&gt;
 averageInterval = 1367.2; % interval of average heart rate [ms]&lt;br /&gt;
 averageHz = 1 / (1367.2 / 1000); % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 averageBPM = averageHz * 60; % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 % disp(averageBPM) &lt;br /&gt;
 &lt;br /&gt;
 %{ &lt;br /&gt;
 1 beat        1 beat&lt;br /&gt;
 -----       = ------&lt;br /&gt;
 1367.2 ms     1.3672 s&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 x = csvread(&amp;quot;N406K_forMark.csv&amp;quot;,1,0); % original file, a csv &lt;br /&gt;
 &lt;br /&gt;
 %{&lt;br /&gt;
 Mex2A_100uM     = transpose(x(:,2)); % Mex2A - 100 uM&lt;br /&gt;
 Mex2A_33_333uM  = transpose(x(:,3)); % Mex2A - 33.333 uM&lt;br /&gt;
 Mex2A_11_111uM  = transpose(x(:,4)); % Mex2A - 11.111 uM&lt;br /&gt;
 Mex2A_3_703uM   = transpose(x(:,5)); % Mex2A - 3.703 uM&lt;br /&gt;
 Mex2A_1_2345uM  = transpose(x(:,6)); % Mex2A - 1.2345 uM&lt;br /&gt;
 Mex2A_0_4115uM  = transpose(x(:,7)); % Mex2A - 0.4115 uM&lt;br /&gt;
 Mex2A_0_1271uM  = transpose(x(:,8)); % Mex2A - 0.1271 uM&lt;br /&gt;
 Mex2A_0uM       = transpose(x(:,9)); % Mex2A - 0 uM&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 t = transpose(x(:,1)); % time array [ms]&lt;br /&gt;
 Mex2A = [100, 33.333, 11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]; &lt;br /&gt;
 &lt;br /&gt;
 n = 3; &lt;br /&gt;
 &lt;br /&gt;
 % find the peaks in the graph&lt;br /&gt;
 this_row = transpose(x(:,n + 1));&lt;br /&gt;
 [pks idx] = findpeaks(this_row, &amp;quot;MinPeakHeight&amp;quot;,0.015, &amp;quot;MinPeakDistance&amp;quot;, 5); &lt;br /&gt;
 &lt;br /&gt;
 % convert those peak values from findpeaks into coordinates&lt;br /&gt;
 peakX = t(idx);&lt;br /&gt;
 peakY = this_row(idx);&lt;br /&gt;
 disp(peakX);  &lt;br /&gt;
  &lt;br /&gt;
 f = figure;&lt;br /&gt;
 plot(t, this_row, peakX, peakY, 'x');&lt;br /&gt;
 axis([min(t), max(t), 0, 0.03]);&lt;br /&gt;
 title([&amp;quot;Intensity of Mex2A=&amp;quot;, num2str(Mex2A(n)), &amp;quot;uM&amp;quot;]);&lt;br /&gt;
 xlabel(&amp;quot;Time, t [ms]&amp;quot;);&lt;br /&gt;
 ylabel(&amp;quot;Intensity&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
 % calculate peak intervals&lt;br /&gt;
 for i = 2:length(peakX)&lt;br /&gt;
     pkToPkInterval(i - 1) = peakX(i) - peakX(i-1); % time between intervals [ms]&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 pkToPkHz = 1./(pkToPkInterval / 1000);  % interval frequency [Hz]&lt;br /&gt;
 pkToPkBPM = pkToPkHz * 60; % interval frequency [BPM]&lt;br /&gt;
 disp(pkToPkBPM); &lt;br /&gt;
 &lt;br /&gt;
 pkToPkRatio = pkToPkBPM / averageBPM&lt;br /&gt;
&lt;br /&gt;
== Playing the data ==&lt;br /&gt;
&lt;br /&gt;
I could export the data from GNU Octave into Sonic Pi by first pasting it into a simple text editor to format it nicely. Once I made a quick 120 BPM single-measure beat, I could import it into Sonic Pi and change its playback rate in time with the arrays that I generated from GNU Octave. While Sonic Pi is great for live-coding music, I personally think it's missing a couple of key programming elements. Two examples of this that are present is this code is &amp;quot;for&amp;quot; loops with changing variables and not being able to determine the length of an array. I found simple workarounds for both of these, though. &lt;br /&gt;
&lt;br /&gt;
 # Data Sonification with heartbeats&lt;br /&gt;
 # Victor Mercola - MU 3620&lt;br /&gt;
 # Prof. Manzo, 2019-12-09&lt;br /&gt;
 &lt;br /&gt;
 doses = [11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]&lt;br /&gt;
 avgBPM = 43.885&lt;br /&gt;
 &lt;br /&gt;
 dose = 0&lt;br /&gt;
 6.times do&lt;br /&gt;
   if(dose == 0)&lt;br /&gt;
     # 11.111 uM dose&lt;br /&gt;
     intervals = [1.00371, 1.00371, 1.00371, 1.00371, 0.98189, 1.00371]&lt;br /&gt;
     n = 6&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 1)&lt;br /&gt;
     # 3.703 uM dose&lt;br /&gt;
     intervals = [1.1292, 1.0037, 0.98189, 2.5093, 1.0504, 0.98189, 2.5093, 1.0754, 2.3772]&lt;br /&gt;
     n = 9&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 2)&lt;br /&gt;
     # 1.2345 uM dose&lt;br /&gt;
     intervals = [2.5093, 3.7639, 3.7639, 1.1581, 2.5093, 3.7639, 3.7639, 1.1292, 2.6569, 3.7639, 3.7639, 1.1292, 2.5093, 1.0504]&lt;br /&gt;
     n = 14&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 3)&lt;br /&gt;
     # 0.4115 uM dose&lt;br /&gt;
     intervals = [2.8229, 0.961, 2.8229, 0.94098, 2.8229, 4.1061, 3.7639, 0.961, 3.0111, 0.94098, 2.8229]&lt;br /&gt;
     n = 11&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 4)&lt;br /&gt;
     # 0.1271 uM dose&lt;br /&gt;
     intervals = [4.1061, 4.5167, 1.1016, 0.94098, 2.6569, 4.1061, 5.0185, 4.5167, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.1061, 4.1061, 4.5167, 1.1292]&lt;br /&gt;
     n = 21&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 5)&lt;br /&gt;
     # 0 uM dose&lt;br /&gt;
     intervals = [5.0185, 4.5167, 5.0185, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 1.1886, 1.0037, 2.6569, 4.5167, 5.0185, 5.0185, 5.6459, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 4.5167, 5.0185, 5.0185, 4.5167]&lt;br /&gt;
     n = 26&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   # Here's where the actual music happens&lt;br /&gt;
   &lt;br /&gt;
   i = 0&lt;br /&gt;
   n.times do&lt;br /&gt;
     puts(doses[dose],&amp;quot;uM&amp;quot;)&lt;br /&gt;
     puts(intervals[i])&lt;br /&gt;
     puts(&amp;quot;Heart BPM:&amp;quot;,avgBPM*intervals[i])&lt;br /&gt;
     puts(&amp;quot;Music BPM:&amp;quot;,120*intervals[i])&lt;br /&gt;
     sample &amp;quot;D:/OneDrive/Documents/GNU Octave/quick drum loop v2.wav&amp;quot;, rate:intervals[i]&lt;br /&gt;
     wait 2 * (1 / intervals[i])&lt;br /&gt;
     i = i + 1&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   dose = dose + 1&lt;br /&gt;
   wait 1&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
== End Result ==&lt;br /&gt;
&lt;br /&gt;
The first result of the project only had a simple drum pattern as a base loop and was used as a proof-of-proof-of-concept. I sent the results to my father and his staff and he said that they really liked it. After talking with him about it, I added a simple bass to the base loop, which made it sound slightly better.&lt;br /&gt;
&lt;br /&gt;
This video below shows the data sonification from the 11.111uM dose to the control 0uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-11-to-0.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
This video below shows the data sonification from the control 0uM dose to the 11.111uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-0-to-11.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Would nightcore, speedcore, and/or extratone music that varies with an arrhythmic heartbeat sound good? I don't think so. However, I can say for certain that this project was a very effective tool for using sound to compare the control and expected-dosage results of Mex2A.&lt;br /&gt;
&lt;br /&gt;
== Further Reading / Viewing ==&lt;br /&gt;
* [https://www.gnu.org/software/octave/ GNU Octave] - the open-source scientific programming language I used to analyze the data for this project.&lt;br /&gt;
* [https://sonic-pi.net/ Sonic Pi] - the open-source live-coding synth I used to make the music for this project.&lt;br /&gt;
&lt;br /&gt;
== Post-Mortem ==&lt;br /&gt;
This part will be updated once I finish continuing this project over break. If my father's paper on Mex2A is published, I'll definitely leave a link here. Stay tuned!&lt;br /&gt;
&lt;br /&gt;
[[Category: Advisor:Manzo]]&lt;br /&gt;
[[Category:Algorithmic, Interactive, &amp;amp; Electro-acoustic Compositions]]&lt;br /&gt;
[[Category:Electronic Music Composition (3620)]]&lt;/div&gt;</summary>
		<author><name>Vsmercola</name></author>
		
	</entry>
	<entry>
		<id>https://vjmedia.wpi.edu/index.php?title=Microtonal_Music_Composition&amp;diff=247037</id>
		<title>Microtonal Music Composition</title>
		<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/index.php?title=Microtonal_Music_Composition&amp;diff=247037"/>
		<updated>2019-12-14T01:16:48Z</updated>

		<summary type="html">&lt;p&gt;Vsmercola: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By Victor Mercola&lt;br /&gt;
&lt;br /&gt;
Microtonal music, by definition, is a type of music that uses intervals between notes smaller than a traditional semitone or half-step. However, it has become an umbrella term for music that doesn't use the standard 12-note tuning system. For my MU2300 final project, I created one original song and made a cover of another song, both of which did not use the standard tuning style.  &lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Recall that music is fundamentally based on ratios of the harmonic series (1, 1/2, 1/3, 1/4, etc.) and that an octave has the frequency ratio of 2/1, a perfect fifth has a ratio of 3/2, and a perfect fourth has a ratio of 4/3. This method of tuning an instrument based on fundamental frequencies is called just intonation, or JI. However, the JI isn't used in modern music because the ratios between notes are not preserved when transposing sound. It also is mathematically impossible to tune a piano with a single rational interval such that the octave's 2/1 ratio is preserved.&lt;br /&gt;
&lt;br /&gt;
For starters, traditional Western music breaks down the octave into 12 logarithmic equally spaced intervals. This tuning method is called 12 equal divisions of the octave, or 12edo. Two notes that are adjacent on a keyboard have the irrational frequency ratio of 2&amp;lt;sup&amp;gt;(1/12)&amp;lt;/sup&amp;gt;/1. We call these twelve notes C, C♯/D♭, D, D♯/E♭, E, F, F♯/G♭, G, G♯/A♭, A, A♯/B♭, and B. The interval spanning two notes is called a whole step or a whole tone, and the interval spanning one note is called a half-step or a semitone. The sharp (♯) and flat (♭) accidentals are used to denote differences of a half step, and the natural (♮) cancels out other accidentals in a measure. Double-sharps and double-flats do exist, but are rarely used. A traditional Western diatonic scale consists of five whole steps and two half steps. For example, the standard C Major diatonic scale consists of the notes C, D, E, F, G, A, B, and C in that order. Other scales do exist (pentatonic, octatonic, etc), but the major scale is the most important.&lt;br /&gt;
&lt;br /&gt;
To better describe intervals, the semitone can be split into 100 equally spaced steps, or cents. Two notes a cent apart have a frequency ratio of 2&amp;lt;sup&amp;gt;(1/1200)&amp;lt;/sup&amp;gt;/1, and there are 1200 cents equally distributed in an octave. This interval is too small for the human ear to differentiate, because human ears can only detect about a 5-10 cent difference between two notes. Using cents is useful in determining how close two notes are to each other. Solving the equation below determines how many cents the rational interval a/b spans. For example, The 3/2 interval is an interval about 701.96 cents. A fifth (C to G) in 12edo has the ratio of 2&amp;lt;sup&amp;gt;(7/12)&amp;lt;/sup&amp;gt;/1; this ratio is about 2 cents flat of the ratio 3/2. The harmonic seventh (C to B♭) has a ratio of 2&amp;lt;sup&amp;gt;(5/6)&amp;lt;/sup&amp;gt;/1 in 12edo, which is 31 cents sharp of its just intonation counterpart, 7/4. More divisions of the octave means that the higher precision for specific intervals. Higher divisions per octave (like 22edo, 31edo, and 53edo) can sometimes provide much better approximations of harmonic series ratios than 12edo. Microtonal music does exist historically in non-Western music. For example, some types of Indian music unequally divides the octave into 22 unequal divisions of the octave. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt; (a/b) = 2&amp;lt;sup&amp;gt;(X/1200)&amp;lt;/sup&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 22edo, in MuseScore ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:22edo test.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Instead of breaking the octave into twelve equally spaced notes per octave, let’s break it into 22 equally spaced notes per octave. The ratio of two adjacent notes on this keyboard would be 2&amp;lt;sup&amp;gt;(1/22)&amp;lt;/sup&amp;gt;/1, or about 54.55 cents. Since 22edo has almost twice the amount of notes as 12edo, new accidentals have to be introduced to denote the interval changes. One way to do this is to introduce &amp;quot;up&amp;quot; (↑) and &amp;quot;down&amp;quot; (↓) to denote shifting the base note up or down by one step, respectively. Sharps and flats can be repurposed to denote increments of three steps. We can combine these two types of accidentals together to get a range of accidents from -4 steps to +4 steps. Just like double-sharps and double-flats in 12edo, sharp-ups and flat-downs might not be used as much as the other accidentals.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Symbol !! Steps Up/Down&lt;br /&gt;
|-&lt;br /&gt;
| ♭↓ || -4&lt;br /&gt;
|-&lt;br /&gt;
| ♭ || -3&lt;br /&gt;
|-&lt;br /&gt;
| ♭↑ || -2&lt;br /&gt;
|-&lt;br /&gt;
| ↓ || -1&lt;br /&gt;
|-&lt;br /&gt;
| ♮ || 0&lt;br /&gt;
|-&lt;br /&gt;
| ↑ || +1&lt;br /&gt;
|-&lt;br /&gt;
| ♯↓ || +2&lt;br /&gt;
|-&lt;br /&gt;
| ♯ || +3&lt;br /&gt;
|-&lt;br /&gt;
| ♯↑ || +4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The standard 12edo scale has the pattern long-long-short-long-long-long-short, which can be denoted as &amp;quot;5L2s&amp;quot;. 22edo has a similar scale with the exact same interval pattern, except long steps span 4 notes, and short steps span 1 note. This scale pattern can be generated with the circle of fifths. Letter names can be given to the notes in this scale, and the other notes' names can be derived with accidentals. &lt;br /&gt;
&lt;br /&gt;
Now, the scale has these 22 notes: &lt;br /&gt;
&lt;br /&gt;
C, D♭/C↑, C♯↓/D♭↑, C♯/D↓, &lt;br /&gt;
&lt;br /&gt;
D, E♭/D↑, D♯↓/E♭↑ D♯/E↓, E, &lt;br /&gt;
&lt;br /&gt;
F, G♭/F↑, F♯↓/G♭↑, F♯/G↓, &lt;br /&gt;
&lt;br /&gt;
G, A♭/G↑, G♯↓/A♭↑, G♯/A↓, &lt;br /&gt;
&lt;br /&gt;
A, B♭/A↑, A♯↓/B♭↑, A♯/B↓, and B.&lt;br /&gt;
&lt;br /&gt;
[[File:22edo_diagram.png|600px|center|Linear comparison between 12edo (top) and 22edo (bottom) scales, with corresponding note names.]]&lt;br /&gt;
&lt;br /&gt;
The 22edo diatonic scale isn't the only scale that can be made with these 22 notes, though. Similar to 12edo, the starting point of the scale can be changed to make the Major, Dorian, Lydian, Mixolydian, Minor, and Locrian modes.  The 22edo Porcupine[7] scale has one long step and six short steps in the pattern &amp;quot;long-short-short-short-short-short-short&amp;quot;, where the long step spans four notes and the short step spans three notes. Porcupine is denoted as &amp;quot;1L6s&amp;quot; - its modes are named &amp;quot;Chinchillian&amp;quot;, &amp;quot;Badgerian&amp;quot;, &amp;quot;Zebrian&amp;quot;, &amp;quot;Dingoian&amp;quot;, &amp;quot;Gazellian&amp;quot;, &amp;quot;Lemurian&amp;quot;, and &amp;quot;Pandian&amp;quot; &amp;lt;sup&amp;gt;[citation/fact-check needed]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
One major notation difference when composing with these note names is that accidental notes that are equivalent in 12edo are not equal in 22edo. For example, A♯ and B♭ are equivalent in 12edo, but are two steps apart in 22edo.&lt;br /&gt;
&lt;br /&gt;
This is an etude I made in A↓ (A-down) minor in MuseScore using the [https://github.com/euwbah/musescore-n-tet-plugins 22edo plugin made by GitHub user eubwah]. The PDF file for the score can be downloaded here: [[File:Etude-in-a-down-minor-score.pdf]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;mp3player&amp;gt;File:Etude-in-a-down-minor.ogg&amp;lt;/mp3player&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Etude-in-a-down-minor-score.png|700px|center|Score]]&lt;br /&gt;
&lt;br /&gt;
== 72edo, in Ableton Live ==&lt;br /&gt;
Equal divisions of the octave that are divisible by 12 are easier to use because they can be represented by multiple piano tracks. This is what I did with my cover piece of [https://www.youtube.com/watch?v=8re6rFj7q10 &amp;quot;Toward the Continuum&amp;quot; by Dolores Catherino], who was one of my inspirations for this project. The original version of &amp;quot;Toward the Continuum&amp;quot; is in 106edo; however, I couldn't perfectly fit that into Ableton Live, so I reduced it down to 72edo. The sheet music for Catherino's works are [https://polychromaticmusic.com/notation-scores-polychromatic-pitchcolor-music/ available online] - this is what I used to create the cover. &lt;br /&gt;
&lt;br /&gt;
The 72edo octave is grouped into 6 sets of 12 scales, each 1/6 of a semitone apart (~16.67 cents) in ascending order: red, orange, yellow, green, blue, violet. The scale starts from C-red, goes across the C's of the other scales, then returns to D-red, and so on.&lt;br /&gt;
&lt;br /&gt;
Using the Simpler tool in Live, I converted an excerpt of me playing piano into a single instrument, used the tuner in Live to tune it to A-432 Hz (as instructed on the sheet music), then adjusted it as closely as possible to the cent difference required for 72edo's six separate scales.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;mp3player&amp;gt;File:Toward-The-Continuum-72edo.mp3&amp;lt;/mp3player&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Final Thoughts ==&lt;br /&gt;
Just like in other forms of art, you have to learn the rules before you can learn how to break them. When I first found microtonal music by accident, I had this weird revelation when I heard a chord change that couldn't exist in standard 12edo tuning. Honestly, it's fun trying to come up with new scales, new tuning methods, and new chords based on how the notes sound good together. The tuning system, scale, and mode all affect how the music sounds, just like how the colors of a piece change how it looks.&lt;br /&gt;
== Sources ==&lt;br /&gt;
* &amp;quot;22edo&amp;quot;. Xenharmonic Wiki, viewed 2019-10-10. https://en.xen.wiki/w/22edo&lt;br /&gt;
* Catherino, Dolores. &amp;quot;What is Polychromoatic Music? - An Introduction with comparison of modern microtonal music.&amp;quot; ''YouTube.'' https://www.youtube.com/watch?v=ZMRUm_CoW-I&lt;br /&gt;
* 12tone. &amp;quot;How Many Notes Are There? The Theory of Quarter Tones&amp;quot;. ''YouTube.'' https://www.youtube.com/watch?v=bWG6CGKMnNA&lt;br /&gt;
* 12tone. &amp;quot;TET for Tat: Why Do We Use 12 Notes?&amp;quot;. ''YouTube.'' https://www.youtube.com/watch?v=ZOLRvbPURXQ&lt;br /&gt;
* Catherino, Dolores. &amp;quot;Implementing PolyChromatic PitchColor with MIDI&amp;quot;. https://polychromaticmusic.com/polychromatic-pitchcolor-and-midi/&lt;br /&gt;
&lt;br /&gt;
== Further Viewing ==&lt;br /&gt;
* [http://terpstrakeyboard.com/play-it-now/ Terpstra Keyboard Web App]: An online web-based application that you can make custom hexagonal keyboards with. It is based on the Terpstra Keyboard. Open this link in Chrome - for some reason, it doesn't work in Firefox.&lt;br /&gt;
* [https://fritzo.org/keys/#style=piano The Rational Keyboard] by Fritz Obermeyer: An &amp;quot;infinitely&amp;quot; large just intonation keyboard that shifts what keys you can see based on what intervals sound good together.&lt;br /&gt;
* REAPER - I didn't have time to experiment with this DAW, but I read that it has microtonal piano roll capabilities.&lt;br /&gt;
&lt;br /&gt;
== Tools used in this project ==&lt;br /&gt;
* Ableton Live Suite - Proprietary DAW used for 72edo. &lt;br /&gt;
* MuseScore - Open-source sheet music program with plugin capabilities, used for 22edo.&lt;br /&gt;
* Inkscape - Open-source SVG editor, used to make the diagram for this project.&lt;br /&gt;
* [https://musescore.org/en/project/2231-edo-retuning-plugins-suite 22/31 EDO Retuning Plugins Suite] by GitHub user &amp;quot;eubwah&amp;quot;. This QML plugin takes a MuseScore file and retunes its notes into 22edo and 31edo based on accidentals.&lt;br /&gt;
* [http://zynaddsubfx.sourceforge.net/ ZynAddSubFX and ZynFusion]: Two open source microtonal synth VST/LV2 plugins with microtonal capabilities (up to 128 notes per octave)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Music (popular, contemporary, non-classical)]]&lt;br /&gt;
[[Category:Foundations of Music Technology (2300)]]&lt;br /&gt;
[[Category: Advisor:Manzo]]&lt;/div&gt;</summary>
		<author><name>Vsmercola</name></author>
		
	</entry>
	<entry>
		<id>https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247036</id>
		<title>Arrhythmia Data Sonification</title>
		<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247036"/>
		<updated>2019-12-14T01:13:44Z</updated>

		<summary type="html">&lt;p&gt;Vsmercola: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By Victor Mercola&lt;br /&gt;
&lt;br /&gt;
My father, Mark Mercola, is a professor of medicine at Stanford University and the head of the Mercola Lab (as of writing this project). While talking with him about the classes I take at WPI, he mentioned how it would be interesting to use data sonification to educate and/or demonstrate the effectiveness of a new drug that he is working on. I agreed with his proposal and used the data he gave me for my final project in MU3620, Arrhythmia Data Sonification. Using GNU Octave, Ableton Live, and Sonic Pi, I was able to make &amp;quot;music&amp;quot; that would change according to an arrhythmic heartbeat.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
https://upload.wikimedia.org/wikipedia/commons/9/9e/SinusRhythmLabels.svg&lt;br /&gt;
Before working with music, there is some important preliminary background information to go over.&lt;br /&gt;
&lt;br /&gt;
The standard heartbeat seen on electrocardiograms (ECG / EKG) and other heart monitors is comprised of five different sections, named the &amp;quot;P Wave&amp;quot;, the &amp;quot;QRS Complex&amp;quot;, and the &amp;quot;T Wave&amp;quot;. The specific disease my father is working on is Long QT syndrome - as its name suggests, Long QT syndrome is a fatal, congenital cardiac rhythm disorder that where the length of the QT interval is longer than usual, causing arrhythmia patterns. My father is specifically working on Long QT type 3 (a.k.a. Long QT3 syndrome), which is caused by a problem regulating sodium ions in heart cells. He is currently working on a new drug to treat disease, currently named &amp;quot;Mex2A&amp;quot; and nicknamed &amp;quot;Super Mex&amp;quot; by his staff.&lt;br /&gt;
&lt;br /&gt;
== Analyzing &amp;amp; processing the data ==&lt;br /&gt;
&lt;br /&gt;
[[File:Mex2A graph.PNG|800px|center|Series of graphs of the results, from 100uM to 0uM left to right.]]&lt;br /&gt;
&lt;br /&gt;
My father sent me a large spreadsheet that, when graphed, produced the results of the graphs above. These show the results of human heart cells with Long QT3 syndrome given different dose amounts of Mex2A, in micromolar. The graphs' X-axes show the measured time in milliseconds, with measured intervals spaced roughly 30 ms apart. The graphs' Y-axes show the measured intensity - when the heart cells beat, the intensity goes up. One can tell from the graphs that the 100uM dose and 33.333uM dose results do not show any peaks, but the 11.111uM dose shows strikingly regular peaks denoting a heartbeat. When I saw this data, I thought would be neat to make &amp;quot;music&amp;quot; where each peak represented a music measure's bar line, and the tempo of the song would increase or decrease depending on how fast or slow the heart cells beat, respectively. &lt;br /&gt;
&lt;br /&gt;
To turn the heartbeat data into music intervals, I first opened the file in GNU Octave (open-source MATLAB alternative). I first wanted to find the average interval of the 11uM dose beats, because I wanted the average interval's corresponding BPM to be scaled to 120 BPM. After recording the timestamps of all of the important peaks, I made a new array of intervals of unit milliseconds. With those intervals, I could convert the intervals' inverse, in Hz (1 cycle per second). I then converted the intervals' Hz to BPM (beats per minute) by multiplying by 60.  &lt;br /&gt;
&lt;br /&gt;
I figured out that the heart cells when given the 11uM dose could beat at about 43.885 BPM normally. In music terms, that tempo is the faster end of &amp;quot;grave&amp;quot;. I could normalize the interval BPM's by dividing each value by the average. From here, it was rinse and repeat for the other graphs - The interval data for 3.703uM, 1.2345uM, 0.4115uM, 0.1271uM, and 0uM were all normalized with the same 43.885 BPM value.&lt;br /&gt;
&lt;br /&gt;
 %{&lt;br /&gt;
 Octave code for generating music from heartbeats&lt;br /&gt;
 Victor Mercola&lt;br /&gt;
 MU 3620&lt;br /&gt;
 2019-12-09&lt;br /&gt;
 under Prof. Manzo&lt;br /&gt;
 %}&lt;br /&gt;
   &lt;br /&gt;
 pkg load signal;&lt;br /&gt;
 averageInterval = 1367.2; % interval of average heart rate [ms]&lt;br /&gt;
 averageHz = 1 / (1367.2 / 1000); % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 averageBPM = averageHz * 60; % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 % disp(averageBPM) &lt;br /&gt;
 &lt;br /&gt;
 %{ &lt;br /&gt;
 1 beat        1 beat&lt;br /&gt;
 -----       = ------&lt;br /&gt;
 1367.2 ms     1.3672 s&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 x = csvread(&amp;quot;N406K_forMark.csv&amp;quot;,1,0); % original file, a csv &lt;br /&gt;
 &lt;br /&gt;
 %{&lt;br /&gt;
 Mex2A_100uM     = transpose(x(:,2)); % Mex2A - 100 uM&lt;br /&gt;
 Mex2A_33_333uM  = transpose(x(:,3)); % Mex2A - 33.333 uM&lt;br /&gt;
 Mex2A_11_111uM  = transpose(x(:,4)); % Mex2A - 11.111 uM&lt;br /&gt;
 Mex2A_3_703uM   = transpose(x(:,5)); % Mex2A - 3.703 uM&lt;br /&gt;
 Mex2A_1_2345uM  = transpose(x(:,6)); % Mex2A - 1.2345 uM&lt;br /&gt;
 Mex2A_0_4115uM  = transpose(x(:,7)); % Mex2A - 0.4115 uM&lt;br /&gt;
 Mex2A_0_1271uM  = transpose(x(:,8)); % Mex2A - 0.1271 uM&lt;br /&gt;
 Mex2A_0uM       = transpose(x(:,9)); % Mex2A - 0 uM&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 t = transpose(x(:,1)); % time array [ms]&lt;br /&gt;
 Mex2A = [100, 33.333, 11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]; &lt;br /&gt;
 &lt;br /&gt;
 n = 3; &lt;br /&gt;
 &lt;br /&gt;
 % find the peaks in the graph&lt;br /&gt;
 this_row = transpose(x(:,n + 1));&lt;br /&gt;
 [pks idx] = findpeaks(this_row, &amp;quot;MinPeakHeight&amp;quot;,0.015, &amp;quot;MinPeakDistance&amp;quot;, 5); &lt;br /&gt;
 &lt;br /&gt;
 % convert those peak values from findpeaks into coordinates&lt;br /&gt;
 peakX = t(idx);&lt;br /&gt;
 peakY = this_row(idx);&lt;br /&gt;
 disp(peakX);  &lt;br /&gt;
  &lt;br /&gt;
 f = figure;&lt;br /&gt;
 plot(t, this_row, peakX, peakY, 'x');&lt;br /&gt;
 axis([min(t), max(t), 0, 0.03]);&lt;br /&gt;
 title([&amp;quot;Intensity of Mex2A=&amp;quot;, num2str(Mex2A(n)), &amp;quot;uM&amp;quot;]);&lt;br /&gt;
 xlabel(&amp;quot;Time, t [ms]&amp;quot;);&lt;br /&gt;
 ylabel(&amp;quot;Intensity&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
 % calculate peak intervals&lt;br /&gt;
 for i = 2:length(peakX)&lt;br /&gt;
     pkToPkInterval(i - 1) = peakX(i) - peakX(i-1); % time between intervals [ms]&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 pkToPkHz = 1./(pkToPkInterval / 1000);  % interval frequency [Hz]&lt;br /&gt;
 pkToPkBPM = pkToPkHz * 60; % interval frequency [BPM]&lt;br /&gt;
 disp(pkToPkBPM); &lt;br /&gt;
 &lt;br /&gt;
 pkToPkRatio = pkToPkBPM / averageBPM&lt;br /&gt;
&lt;br /&gt;
== Playing the data ==&lt;br /&gt;
&lt;br /&gt;
I could export the data from GNU Octave into Sonic Pi by first pasting it into a simple text editor to format it nicely. Once I made a quick 120 BPM single-measure beat, I could import it into Sonic Pi and change its playback rate in time with the arrays that I generated from GNU Octave. While Sonic Pi is great for live-coding music, I personally think it's missing a couple of key programming elements. Two examples of this that are present is this code is &amp;quot;for&amp;quot; loops with changing variables and not being able to determine the length of an array. I found simple workarounds for both of these, though. &lt;br /&gt;
&lt;br /&gt;
 # Data Sonification with heartbeats&lt;br /&gt;
 # Victor Mercola - MU 3620&lt;br /&gt;
 # Prof. Manzo, 2019-12-09&lt;br /&gt;
 &lt;br /&gt;
 doses = [11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]&lt;br /&gt;
 avgBPM = 43.885&lt;br /&gt;
 &lt;br /&gt;
 dose = 0&lt;br /&gt;
 6.times do&lt;br /&gt;
   if(dose == 0)&lt;br /&gt;
     # 11.111 uM dose&lt;br /&gt;
     intervals = [1.00371, 1.00371, 1.00371, 1.00371, 0.98189, 1.00371]&lt;br /&gt;
     n = 6&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 1)&lt;br /&gt;
     # 3.703 uM dose&lt;br /&gt;
     intervals = [1.1292, 1.0037, 0.98189, 2.5093, 1.0504, 0.98189, 2.5093, 1.0754, 2.3772]&lt;br /&gt;
     n = 9&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 2)&lt;br /&gt;
     # 1.2345 uM dose&lt;br /&gt;
     intervals = [2.5093, 3.7639, 3.7639, 1.1581, 2.5093, 3.7639, 3.7639, 1.1292, 2.6569, 3.7639, 3.7639, 1.1292, 2.5093, 1.0504]&lt;br /&gt;
     n = 14&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 3)&lt;br /&gt;
     # 0.4115 uM dose&lt;br /&gt;
     intervals = [2.8229, 0.961, 2.8229, 0.94098, 2.8229, 4.1061, 3.7639, 0.961, 3.0111, 0.94098, 2.8229]&lt;br /&gt;
     n = 11&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 4)&lt;br /&gt;
     # 0.1271 uM dose&lt;br /&gt;
     intervals = [4.1061, 4.5167, 1.1016, 0.94098, 2.6569, 4.1061, 5.0185, 4.5167, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.1061, 4.1061, 4.5167, 1.1292]&lt;br /&gt;
     n = 21&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 5)&lt;br /&gt;
     # 0 uM dose&lt;br /&gt;
     intervals = [5.0185, 4.5167, 5.0185, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 1.1886, 1.0037, 2.6569, 4.5167, 5.0185, 5.0185, 5.6459, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 4.5167, 5.0185, 5.0185, 4.5167]&lt;br /&gt;
     n = 26&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   # Here's where the actual music happens&lt;br /&gt;
   &lt;br /&gt;
   i = 0&lt;br /&gt;
   n.times do&lt;br /&gt;
     puts(doses[dose],&amp;quot;uM&amp;quot;)&lt;br /&gt;
     puts(intervals[i])&lt;br /&gt;
     puts(&amp;quot;Heart BPM:&amp;quot;,avgBPM*intervals[i])&lt;br /&gt;
     puts(&amp;quot;Music BPM:&amp;quot;,120*intervals[i])&lt;br /&gt;
     sample &amp;quot;D:/OneDrive/Documents/GNU Octave/quick drum loop v2.wav&amp;quot;, rate:intervals[i]&lt;br /&gt;
     wait 2 * (1 / intervals[i])&lt;br /&gt;
     i = i + 1&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   dose = dose + 1&lt;br /&gt;
   wait 1&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
== End Result ==&lt;br /&gt;
&lt;br /&gt;
The first result of the project only had a simple drum pattern as a base loop and was used as a proof-of-proof-of-concept. I sent the results to my father and his staff and he said that they really liked it. After talking with him about it, I added a simple bass to the base loop, which made it sound slightly better.&lt;br /&gt;
&lt;br /&gt;
This video below shows the data sonification from the 11.111uM dose to the control 0uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-11-to-0.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
This video below shows the data sonification from the control 0uM dose to the 11.111uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-0-to-11.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Would nightcore, speedcore, and/or extratone music that varies with an arrhythmic heartbeat sound good? I don't think so. However, I can say for certain that this project was a very effective tool for using sound to compare the control and expected-dosage results of Mex2A.&lt;br /&gt;
&lt;br /&gt;
== Further Reading / Viewing ==&lt;br /&gt;
* [https://www.gnu.org/software/octave/ GNU Octave] - the open-source scientific programming language I used to analyze the data for this project.&lt;br /&gt;
* [https://sonic-pi.net/ Sonic Pi] - the open-source live-coding synth I used to make the music for this project.&lt;br /&gt;
&lt;br /&gt;
== Post-Mortem ==&lt;br /&gt;
This part will be updated once I finish continuing this project over break. If my father's paper on Mex2A is published, I'll definitely leave a link here. Stay tuned!&lt;br /&gt;
&lt;br /&gt;
[[Category: Advisor:Manzo]]&lt;br /&gt;
[[Category:Algorithmic, Interactive, &amp;amp; Electro-acoustic Compositions]]&lt;br /&gt;
[[Category:Electronic Music Composition (3620)]]&lt;/div&gt;</summary>
		<author><name>Vsmercola</name></author>
		
	</entry>
	<entry>
		<id>https://vjmedia.wpi.edu/index.php?title=Microtonal_Music_Composition&amp;diff=247035</id>
		<title>Microtonal Music Composition</title>
		<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/index.php?title=Microtonal_Music_Composition&amp;diff=247035"/>
		<updated>2019-12-14T01:02:28Z</updated>

		<summary type="html">&lt;p&gt;Vsmercola: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By Victor Mercola&lt;br /&gt;
&lt;br /&gt;
Microtonal music, by definition, is a type of music that uses intervals between notes smaller than a traditional semitone or half-step. However, it has become an umbrella term for music that doesn't use the standard 12-note tuning system. For my MU2300 final project, I created one original song and made a cover of another song, both of which did not use the standard tuning style.  &lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Recall that music is fundamentally based on ratios of the harmonic series (1, 1/2, 1/3, 1/4, etc.) and that an octave has the frequency ratio of 2/1, a perfect fifth has a ratio of 3/2, and a perfect fourth has a ratio of 4/3. This method of tuning an instrument based on fundamental frequencies is called just intonation, or JI. However, JI isn't used in modern music because the ratios between notes are not preserved when transposing sound. It also is mathematically impossible to tune a piano with a single rational interval such that the octave's 2/1 ratio is preserved.&lt;br /&gt;
&lt;br /&gt;
For starters, traditional Western music breaks down the octave into 12 logarithmic equally spaced intervals. This tuning method is called 12 equal divisions of the octave, or 12edo. Two notes that are adjacent on a keyboard have the irrational frequency ratio of 2&amp;lt;sup&amp;gt;(1/12)&amp;lt;/sup&amp;gt;/1. We call these twelve notes C, C♯/D♭, D, D♯/E♭, E, F, F♯/G♭, G, G♯/A♭, A, A♯/B♭, and B. The interval spanning two notes is called a whole step or a whole tone, and the interval spanning one note is called a half-step or a semitone. The sharp (♯) and flat (♭) accidentals are used to denote differences of a half step, and the natural (♮) cancels out other accidentals in a measure. Double-sharps and double-flats do exist, but are rarely used. A traditional Western diatonic scale consists of five whole steps and two half steps. For example, the standard C Major diatonic scale consists of the notes C, D, E, F, G, A, B, and C in that order. Other scales do exist (pentatonic, octatonic, etc), but the major scale is the most important.&lt;br /&gt;
&lt;br /&gt;
To better describe intervals, the semitone can be split into 100 equally spaced steps, or cents. Two notes a cent apart have a frequency ratio of 2&amp;lt;sup&amp;gt;(1/1200)&amp;lt;/sup&amp;gt;/1, and there are 1200 cents equally distributed in an octave. This interval is too small for the human ear to differentiate, because human ears can only detect about a 5-10 cent difference between two notes. Using cents is useful in determining how close two notes are to each other. Solving the equation below determines how many cents the rational interval a/b spans. For example, The 3/2 interval is an interval about 701.96 cents. A fifth (C to G) in 12edo has the ratio of 2&amp;lt;sup&amp;gt;(7/12)&amp;lt;/sup&amp;gt;/1; this ratio is about 2 cents flat of the ratio 3/2. The harmonic seventh (C to B♭) has a ratio of 2&amp;lt;sup&amp;gt;(5/6)&amp;lt;/sup&amp;gt;/1 in 12edo, which is 31 cents sharp of its just intonation counterpart, 7/4. More divisions of the octave means higher precision for specific intervals. Higher divisions per octave (like 22edo, 31edo, and 53edo) can sometimes provide much better approximations of harmonic series ratios than 12edo. It's important to point out that microtonal music does exist historically in non-Western music; for example, some types of Indian music unequally divides the octave into 22 unequal divisions of the octave. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt; (a/b) = 2&amp;lt;sup&amp;gt;(X/1200)&amp;lt;/sup&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 22edo, in MuseScore ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:22edo test.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Instead of breaking the octave into twelve equally spaced notes per octave, let’s break it into 22 equally spaced notes per octave. The ratio of two adjacent notes on this keyboard would be 2&amp;lt;sup&amp;gt;(1/22)&amp;lt;/sup&amp;gt;/1, or about 54.55 cents. Since 22edo has almost twice the amount of notes as 12edo, new accidentals have to be introduced to denote the interval changes. One way to do this is to introduce &amp;quot;up&amp;quot; (↑) and &amp;quot;down&amp;quot; (↓) to denote shifting the base note up or down by one step, respectively. Sharps and flats can be repurposed to denote increments of three steps. We can combine these two types of accidentals together to get a range of accidents from -4 steps to +4 steps. Just like double-sharps and double-flats in 12edo, sharp-ups and flat-downs might not be used as much as the other accidentals.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Symbol !! Steps Up/Down&lt;br /&gt;
|-&lt;br /&gt;
| ♭↓ || -4&lt;br /&gt;
|-&lt;br /&gt;
| ♭ || -3&lt;br /&gt;
|-&lt;br /&gt;
| ♭↑ || -2&lt;br /&gt;
|-&lt;br /&gt;
| ↓ || -1&lt;br /&gt;
|-&lt;br /&gt;
| ♮ || 0&lt;br /&gt;
|-&lt;br /&gt;
| ↑ || +1&lt;br /&gt;
|-&lt;br /&gt;
| ♯↓ || +2&lt;br /&gt;
|-&lt;br /&gt;
| ♯ || +3&lt;br /&gt;
|-&lt;br /&gt;
| ♯↑ || +4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The standard 12edo scale has the pattern long-long-short-long-long-long-short, which can be denoted as &amp;quot;5L2s&amp;quot;. 22edo has a similar scale with the exact same interval pattern, except long steps span 4 notes, and short steps span 1 note. This scale pattern can be generated with the circle of fifths. Letter names can be given to the notes in this scale, and the other notes' names can be derived with accidentals. &lt;br /&gt;
&lt;br /&gt;
Now, the scale has these 22 notes: &lt;br /&gt;
&lt;br /&gt;
C, D♭/C↑, C♯↓/D♭↑, C♯/D↓, &lt;br /&gt;
&lt;br /&gt;
D, E♭/D↑, D♯↓/E♭↑ D♯/E↓, E, &lt;br /&gt;
&lt;br /&gt;
F, G♭/F↑, F♯↓/G♭↑, F♯/G↓, &lt;br /&gt;
&lt;br /&gt;
G, A♭/G↑, G♯↓/A♭↑, G♯/A↓, &lt;br /&gt;
&lt;br /&gt;
A, B♭/A↑, A♯↓/B♭↑, A♯/B↓, and B.&lt;br /&gt;
&lt;br /&gt;
[[File:22edo_diagram.png|600px|center|Linear comparison between 12edo (top) and 22edo (bottom) scales, with corresponding note names.]]&lt;br /&gt;
&lt;br /&gt;
The 22edo diatonic scale isn't the only scale that can be made with these 22 notes, though. Similar to 12edo, the starting point of the scale can be changed to make the Major, Dorian, Lydian, Mixolydian, Minor, and Locrian modes.  The 22edo Porcupine[7] scale has one long step and six short steps in the pattern &amp;quot;long-short-short-short-short-short-short&amp;quot;, where the long step spans four notes and the short step spans three notes. Porcupine is denoted as &amp;quot;1L6s&amp;quot; - its modes are named &amp;quot;Chinchillian&amp;quot;, &amp;quot;Badgerian&amp;quot;, &amp;quot;Zebrian&amp;quot;, &amp;quot;Dingoian&amp;quot;, &amp;quot;Gazellian&amp;quot;, &amp;quot;Lemurian&amp;quot;, and &amp;quot;Pandian&amp;quot; &amp;lt;sup&amp;gt;[citation/fact-check needed]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
One major notation difference when composing with these note names is that accidental notes that are equivalent in 12edo are not equal in 22edo. For example, A♯ and B♭ are equivalent in 12edo, but are two steps apart in 22edo.&lt;br /&gt;
&lt;br /&gt;
This is an etude I made in A↓ (A-down) minor in MuseScore using the [https://github.com/euwbah/musescore-n-tet-plugins 22edo plugin made by GitHub user eubwah]. The PDF file for the score can be downloaded here: [[File:Etude-in-a-down-minor-score.pdf]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;mp3player&amp;gt;File:Etude-in-a-down-minor.ogg&amp;lt;/mp3player&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Etude-in-a-down-minor-score.png|700px|center|Score]]&lt;br /&gt;
&lt;br /&gt;
== 72edo, in Ableton Live ==&lt;br /&gt;
Equal divisions of the octave that are divisible by 12 are easier to use because they can be represented by multiple piano tracks. This is what I did with my cover piece of [https://www.youtube.com/watch?v=8re6rFj7q10 &amp;quot;Toward the Continuum&amp;quot; by Dolores Catherino], who was one of my inspirations for this project. The original version of &amp;quot;Toward the Continuum&amp;quot; is in 106edo; however, I couldn't perfectly fit that into Ableton Live, so I reduced it down to 72edo. The sheet music for Catherino's works are [https://polychromaticmusic.com/notation-scores-polychromatic-pitchcolor-music/ available online] - this is what I used to create the cover. &lt;br /&gt;
&lt;br /&gt;
The 72edo octave is grouped into 6 sets of 12 scales, each 1/6 of a semitone apart (~16.67 cents) in ascending order: red, orange, yellow, green, blue, violet. The scale starts from C-red, goes across the C's of the other scales, then returns to D-red, and so on.&lt;br /&gt;
&lt;br /&gt;
Using the Simpler tool in Live, I converted an excerpt of me playing piano into a single instrument, used the tuner in Live to tune it to A-432 Hz (as instructed on the sheet music), then adjusted it as closely as possible to the cent difference required for 72edo's six separate scales.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;mp3player&amp;gt;File:Toward-The-Continuum-72edo.mp3&amp;lt;/mp3player&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Final Thoughts ==&lt;br /&gt;
Just like in other forms of art, you have to learn the rules before you can learn how to break them. When I first found microtonal music by accident, I had this weird revelation when I heard a chord change that couldn't exist in standard 12edo tuning. Honestly, it's fun trying to come up with new scales, new tuning methods, and new chords based on how the notes sound good together. The tuning system, scale, and mode all affect how the music sounds, just like how the colors of a piece change how it looks.&lt;br /&gt;
== Sources ==&lt;br /&gt;
* &amp;quot;22edo&amp;quot;. Xenharmonic Wiki, viewed 2019-10-10. https://en.xen.wiki/w/22edo&lt;br /&gt;
* Catherino, Dolores. &amp;quot;What is Polychromoatic Music? - An Introduction with comparison of modern microtonal music.&amp;quot; ''YouTube.'' https://www.youtube.com/watch?v=ZMRUm_CoW-I&lt;br /&gt;
* 12tone. &amp;quot;How Many Notes Are There? The Theory of Quarter Tones&amp;quot;. ''YouTube.'' https://www.youtube.com/watch?v=bWG6CGKMnNA&lt;br /&gt;
* 12tone. &amp;quot;TET for Tat: Why Do We Use 12 Notes?&amp;quot;. ''YouTube.'' https://www.youtube.com/watch?v=ZOLRvbPURXQ&lt;br /&gt;
* Catherino, Dolores. &amp;quot;Implementing PolyChromatic PitchColor with MIDI&amp;quot;. https://polychromaticmusic.com/polychromatic-pitchcolor-and-midi/&lt;br /&gt;
&lt;br /&gt;
== Further Viewing ==&lt;br /&gt;
* [http://terpstrakeyboard.com/play-it-now/ Terpstra Keyboard Web App]: An online web-based application that you can make custom hexagonal keyboards with. It is based on the Terpstra Keyboard. Open this link in Chrome - for some reason, it doesn't work in Firefox.&lt;br /&gt;
* [https://fritzo.org/keys/#style=piano The Rational Keyboard] by Fritz Obermeyer: An &amp;quot;infinitely&amp;quot; large just intonation keyboard that shifts what keys you can see based on what intervals sound good together.&lt;br /&gt;
* REAPER - I didn't have time to experiment with this DAW, but I read that it has microtonal piano roll capabilities.&lt;br /&gt;
&lt;br /&gt;
== Tools used in this project ==&lt;br /&gt;
* Ableton Live Suite - Proprietary DAW used for 72edo. &lt;br /&gt;
* MuseScore - Open-source sheet music program with plugin capabilities, used for 22edo.&lt;br /&gt;
* Inkscape - Open-source SVG editor, used to make the diagram for this project.&lt;br /&gt;
* [https://musescore.org/en/project/2231-edo-retuning-plugins-suite 22/31 EDO Retuning Plugins Suite] by GitHub user &amp;quot;eubwah&amp;quot;. This QML plugin takes a MuseScore file and retunes its notes into 22edo and 31edo based on accidentals.&lt;br /&gt;
* [http://zynaddsubfx.sourceforge.net/ ZynAddSubFX and ZynFusion]: Two open source microtonal synth VST/LV2 plugins with microtonal capabilities (up to 128 notes per octave)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Music (popular, contemporary, non-classical)]]&lt;br /&gt;
[[Category:Foundations of Music Tech (20xx)]]&lt;br /&gt;
[[Category: Advisor:Manzo]]&lt;/div&gt;</summary>
		<author><name>Vsmercola</name></author>
		
	</entry>
	<entry>
		<id>https://vjmedia.wpi.edu/index.php?title=Microtonal_Music_Composition&amp;diff=247034</id>
		<title>Microtonal Music Composition</title>
		<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/index.php?title=Microtonal_Music_Composition&amp;diff=247034"/>
		<updated>2019-12-14T00:59:53Z</updated>

		<summary type="html">&lt;p&gt;Vsmercola: added name&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By Victor Mercola&lt;br /&gt;
&lt;br /&gt;
Microtonal music, by definition, is a type of music that uses intervals between notes smaller than a traditional semitone or half-step. However, it has become an umbrella term for music that doesn't use the standard 12-note tuning system. For my MU2300 final project, I created one original song and made a cover of another song, both of which did not use the standard tuning style.  &lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Recall that music is fundamentally based on ratios of the harmonic series (1, 1/2, 1/3, 1/4, etc.) and that an octave has the frequency ratio of 2/1, a perfect fifth has a ratio of 3/2, and a perfect fourth has a ratio of 4/3. This method of tuning an instrument based on fundamental frequencies is called just intonation, or JI. However, the JI isn't used in modern music because the ratios between notes are not preserved when transposing sound. It also is mathematically impossible to tune a piano with a single rational interval such that the octave's 2/1 ratio is preserved.&lt;br /&gt;
&lt;br /&gt;
For starters, traditional Western music breaks down the octave into 12 logarithmic equally spaced intervals. This tuning method is called 12 equal divisions of the octave, or 12edo. Two notes that are adjacent on a keyboard have the irrational frequency ratio of 2&amp;lt;sup&amp;gt;(1/12)&amp;lt;/sup&amp;gt;/1. We call these twelve notes C, C♯/D♭, D, D♯/E♭, E, F, F♯/G♭, G, G♯/A♭, A, A♯/B♭, and B. The interval spanning two notes is called a whole step or a whole tone, and the interval spanning one note is called a half-step or a semitone. The sharp (♯) and flat (♭) accidentals are used to denote differences of a half step, and the natural (♮) cancels out other accidentals in a measure. Double-sharps and double-flats do exist, but are rarely used. A traditional Western diatonic scale consists of five whole steps and two half steps. For example, the standard C Major diatonic scale consists of the notes C, D, E, F, G, A, B, and C in that order. Other scales do exist (pentatonic, octatonic, etc), but the major scale is the most important.&lt;br /&gt;
&lt;br /&gt;
To better describe intervals, the semitone can be split into 100 equally spaced steps, or cents. Two notes a cent apart have a frequency ratio of 2&amp;lt;sup&amp;gt;(1/1200)&amp;lt;/sup&amp;gt;/1, and there are 1200 cents equally distributed in an octave. This interval is too small for the human ear to differentiate, because human ears can only detect about a 5-10 cent difference between two notes. Using cents is useful in determining how close two notes are to each other. Solving the equation below determines how many cents the rational interval a/b spans. For example, The 3/2 interval is an interval about 701.96 cents. A fifth (C to G) in 12edo has the ratio of 2&amp;lt;sup&amp;gt;(7/12)&amp;lt;/sup&amp;gt;/1; this ratio is about 2 cents flat of the ratio 3/2. The harmonic seventh (C to B♭) has a ratio of 2&amp;lt;sup&amp;gt;(5/6)&amp;lt;/sup&amp;gt;/1 in 12edo, which is 31 cents sharp of its just intonation counterpart, 7/4. More divisions of the octave means that the higher precision for specific intervals. Higher divisions per octave (like 22edo, 31edo, and 53edo) can sometimes provide much better approximations of harmonic series ratios than 12edo. Microtonal music does exist historically in non-Western music. For example, some types of Indian music unequally divides the octave into 22 unequal divisions of the octave. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt; (a/b) = 2&amp;lt;sup&amp;gt;(X/1200)&amp;lt;/sup&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 22edo, in MuseScore ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:22edo test.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Instead of breaking the octave into twelve equally spaced notes per octave, let’s break it into 22 equally spaced notes per octave. The ratio of two adjacent notes on this keyboard would be 2&amp;lt;sup&amp;gt;(1/22)&amp;lt;/sup&amp;gt;/1, or about 54.55 cents. Since 22edo has almost twice the amount of notes as 12edo, new accidentals have to be introduced to denote the interval changes. One way to do this is to introduce &amp;quot;up&amp;quot; (↑) and &amp;quot;down&amp;quot; (↓) to denote shifting the base note up or down by one step, respectively. Sharps and flats can be repurposed to denote increments of three steps. We can combine these two types of accidentals together to get a range of accidents from -4 steps to +4 steps. Just like double-sharps and double-flats in 12edo, sharp-ups and flat-downs might not be used as much as the other accidentals.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Symbol !! Steps Up/Down&lt;br /&gt;
|-&lt;br /&gt;
| ♭↓ || -4&lt;br /&gt;
|-&lt;br /&gt;
| ♭ || -3&lt;br /&gt;
|-&lt;br /&gt;
| ♭↑ || -2&lt;br /&gt;
|-&lt;br /&gt;
| ↓ || -1&lt;br /&gt;
|-&lt;br /&gt;
| ♮ || 0&lt;br /&gt;
|-&lt;br /&gt;
| ↑ || +1&lt;br /&gt;
|-&lt;br /&gt;
| ♯↓ || +2&lt;br /&gt;
|-&lt;br /&gt;
| ♯ || +3&lt;br /&gt;
|-&lt;br /&gt;
| ♯↑ || +4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The standard 12edo scale has the pattern long-long-short-long-long-long-short, which can be denoted as &amp;quot;5L2s&amp;quot;. 22edo has a similar scale with the exact same interval pattern, except long steps span 4 notes, and short steps span 1 note. This scale pattern can be generated with the circle of fifths. Letter names can be given to the notes in this scale, and the other notes' names can be derived with accidentals. &lt;br /&gt;
&lt;br /&gt;
Now, the scale has these 22 notes: &lt;br /&gt;
&lt;br /&gt;
C, D♭/C↑, C♯↓/D♭↑, C♯/D↓, &lt;br /&gt;
&lt;br /&gt;
D, E♭/D↑, D♯↓/E♭↑ D♯/E↓, E, &lt;br /&gt;
&lt;br /&gt;
F, G♭/F↑, F♯↓/G♭↑, F♯/G↓, &lt;br /&gt;
&lt;br /&gt;
G, A♭/G↑, G♯↓/A♭↑, G♯/A↓, &lt;br /&gt;
&lt;br /&gt;
A, B♭/A↑, A♯↓/B♭↑, A♯/B↓, and B.&lt;br /&gt;
&lt;br /&gt;
[[File:22edo_diagram.png|600px|center|Linear comparison between 12edo (top) and 22edo (bottom) scales, with corresponding note names.]]&lt;br /&gt;
&lt;br /&gt;
The 22edo diatonic scale isn't the only scale that can be made with these 22 notes, though. Similar to 12edo, the starting point of the scale can be changed to make the Major, Dorian, Lydian, Mixolydian, Minor, and Locrian modes.  The 22edo Porcupine[7] scale has one long step and six short steps in the pattern &amp;quot;long-short-short-short-short-short-short&amp;quot;, where the long step spans four notes and the short step spans three notes. Porcupine is denoted as &amp;quot;1L6s&amp;quot; - its modes are named &amp;quot;Chinchillian&amp;quot;, &amp;quot;Badgerian&amp;quot;, &amp;quot;Zebrian&amp;quot;, &amp;quot;Dingoian&amp;quot;, &amp;quot;Gazellian&amp;quot;, &amp;quot;Lemurian&amp;quot;, and &amp;quot;Pandian&amp;quot; &amp;lt;sup&amp;gt;[citation/fact-check needed]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
One major notation difference when composing with these note names is that accidental notes that are equivalent in 12edo are not equal in 22edo. For example, A♯ and B♭ are equivalent in 12edo, but are two steps apart in 22edo.&lt;br /&gt;
&lt;br /&gt;
This is an etude I made in A↓ (A-down) minor in MuseScore using the [https://github.com/euwbah/musescore-n-tet-plugins 22edo plugin made by GitHub user eubwah]. The PDF file for the score can be downloaded here: [[File:Etude-in-a-down-minor-score.pdf]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;mp3player&amp;gt;File:Etude-in-a-down-minor.ogg&amp;lt;/mp3player&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Etude-in-a-down-minor-score.png|700px|center|Score]]&lt;br /&gt;
&lt;br /&gt;
== 72edo, in Ableton Live ==&lt;br /&gt;
Equal divisions of the octave that are divisible by 12 are easier to use because they can be represented by multiple piano tracks. This is what I did with my cover piece of [https://www.youtube.com/watch?v=8re6rFj7q10 &amp;quot;Toward the Continuum&amp;quot; by Dolores Catherino], who was one of my inspirations for this project. The original version of &amp;quot;Toward the Continuum&amp;quot; is in 106edo; however, I couldn't perfectly fit that into Ableton Live, so I reduced it down to 72edo. The sheet music for Catherino's works are [https://polychromaticmusic.com/notation-scores-polychromatic-pitchcolor-music/ available online] - this is what I used to create the cover. &lt;br /&gt;
&lt;br /&gt;
The 72edo octave is grouped into 6 sets of 12 scales, each 1/6 of a semitone apart (~16.67 cents) in ascending order: red, orange, yellow, green, blue, violet. The scale starts from C-red, goes across the C's of the other scales, then returns to D-red, and so on.&lt;br /&gt;
&lt;br /&gt;
Using the Simpler tool in Live, I converted an excerpt of me playing piano into a single instrument, used the tuner in Live to tune it to A-432 Hz (as instructed on the sheet music), then adjusted it as closely as possible to the cent difference required for 72edo's six separate scales.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;mp3player&amp;gt;File:Toward-The-Continuum-72edo.mp3&amp;lt;/mp3player&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Final Thoughts ==&lt;br /&gt;
Just like in other forms of art, you have to learn the rules before you can learn how to break them. When I first found microtonal music by accident, I had this weird revelation when I heard a chord change that couldn't exist in standard 12edo tuning. Honestly, it's fun trying to come up with new scales, new tuning methods, and new chords based on how the notes sound good together. The tuning system, scale, and mode all affect how the music sounds, just like how the colors of a piece change how it looks.&lt;br /&gt;
== Sources ==&lt;br /&gt;
* &amp;quot;22edo&amp;quot;. Xenharmonic Wiki, viewed 2019-10-10. https://en.xen.wiki/w/22edo&lt;br /&gt;
* Catherino, Dolores. &amp;quot;What is Polychromoatic Music? - An Introduction with comparison of modern microtonal music.&amp;quot; ''YouTube.'' https://www.youtube.com/watch?v=ZMRUm_CoW-I&lt;br /&gt;
* 12tone. &amp;quot;How Many Notes Are There? The Theory of Quarter Tones&amp;quot;. ''YouTube.'' https://www.youtube.com/watch?v=bWG6CGKMnNA&lt;br /&gt;
* 12tone. &amp;quot;TET for Tat: Why Do We Use 12 Notes?&amp;quot;. ''YouTube.'' https://www.youtube.com/watch?v=ZOLRvbPURXQ&lt;br /&gt;
* Catherino, Dolores. &amp;quot;Implementing PolyChromatic PitchColor with MIDI&amp;quot;. https://polychromaticmusic.com/polychromatic-pitchcolor-and-midi/&lt;br /&gt;
&lt;br /&gt;
== Further Viewing ==&lt;br /&gt;
* [http://terpstrakeyboard.com/play-it-now/ Terpstra Keyboard Web App]: An online web-based application that you can make custom hexagonal keyboards with. It is based on the Terpstra Keyboard. Open this link in Chrome - for some reason, it doesn't work in Firefox.&lt;br /&gt;
* [https://fritzo.org/keys/#style=piano The Rational Keyboard] by Fritz Obermeyer: An &amp;quot;infinitely&amp;quot; large just intonation keyboard that shifts what keys you can see based on what intervals sound good together.&lt;br /&gt;
* REAPER - I didn't have time to experiment with this DAW, but I read that it has microtonal piano roll capabilities.&lt;br /&gt;
&lt;br /&gt;
== Tools used in this project ==&lt;br /&gt;
* Ableton Live Suite - Proprietary DAW used for 72edo. &lt;br /&gt;
* MuseScore - Open-source sheet music program with plugin capabilities, used for 22edo.&lt;br /&gt;
* Inkscape - Open-source SVG editor, used to make the diagram for this project.&lt;br /&gt;
* [https://musescore.org/en/project/2231-edo-retuning-plugins-suite 22/31 EDO Retuning Plugins Suite] by GitHub user &amp;quot;eubwah&amp;quot;. This QML plugin takes a MuseScore file and retunes its notes into 22edo and 31edo based on accidentals.&lt;br /&gt;
* [http://zynaddsubfx.sourceforge.net/ ZynAddSubFX and ZynFusion]: Two open source microtonal synth VST/LV2 plugins with microtonal capabilities (up to 128 notes per octave)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Music (popular, contemporary, non-classical)]]&lt;br /&gt;
[[Category:Foundations of Music Tech (20xx)]]&lt;br /&gt;
[[Category: Advisor:Manzo]]&lt;/div&gt;</summary>
		<author><name>Vsmercola</name></author>
		
	</entry>
	<entry>
		<id>https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247033</id>
		<title>Arrhythmia Data Sonification</title>
		<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247033"/>
		<updated>2019-12-14T00:56:41Z</updated>

		<summary type="html">&lt;p&gt;Vsmercola: /* End Result */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By Victor Mercola&lt;br /&gt;
&lt;br /&gt;
My father, Mark Mercola, is a professor of medicine at Stanford University and the head of the Mercola Lab (as of writing this project). While talking with him about the classes I take at WPI, he mentioned how it would be interesting to use data sonification to educate and/or demonstrate the effectiveness of a new drug that he is working on. I agreed with his proposal and used the data he gave me for my final project in MU3620, Arrhythmia Data Sonification. Using GNU Octave, Ableton Live, and Sonic Pi, I was able to make &amp;quot;music&amp;quot; that would change according to an arrhythmic heartbeat.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
https://upload.wikimedia.org/wikipedia/commons/9/9e/SinusRhythmLabels.svg&lt;br /&gt;
Before working with music, there is some important preliminary background information to go over.&lt;br /&gt;
&lt;br /&gt;
The standard heartbeat seen on electrocardiograms (ECG / EKG) and other heart monitors is comprised of five different sections, named the &amp;quot;P Wave&amp;quot;, the &amp;quot;QRS Complex&amp;quot;, and the &amp;quot;T Wave&amp;quot;. The specific disease my father is working on is Long QT syndrome - as its name suggests, Long QT syndrome is a fatal, congenital cardiac rhythm disorder that where the length of the QT interval is longer than usual, causing arrhythmia patterns. My father is specifically working on Long QT type 3 (a.k.a. Long QT3 syndrome), which is caused by a problem regulating sodium ions in heart cells. He is currently working on a new drug to treat disease, currently named &amp;quot;Mex2A&amp;quot; and nicknamed &amp;quot;Super Mex&amp;quot; by his staff.&lt;br /&gt;
&lt;br /&gt;
== Analyzing &amp;amp; processing the data ==&lt;br /&gt;
&lt;br /&gt;
[[File:Mex2A graph.PNG|800px|center|Series of graphs of the results, from 100uM to 0uM left to right.]]&lt;br /&gt;
&lt;br /&gt;
My father sent me a large spreadsheet that, when graphed, produced the results of the graphs above. These show the results of human heart cells with Long QT3 syndrome given different dose amounts of Mex2A, in micromolar. The graphs' X-axes show the measured time in milliseconds, with measured intervals spaced roughly 30 ms apart. The graphs' Y-axes show the measured intensity - when the heart cells beat, the intensity goes up. One can tell from the graphs that the 100uM dose and 33.333uM dose results do not show any peaks, but the 11.111uM dose shows strikingly regular peaks denoting a heartbeat. When I saw this data, I thought would be neat to make &amp;quot;music&amp;quot; where each peak represented a music measure's bar line, and the tempo of the song would increase or decrease depending on how fast or slow the heart cells beat, respectively. &lt;br /&gt;
&lt;br /&gt;
To turn the heartbeat data into music intervals, I first opened the file in GNU Octave (open-source MATLAB alternative). I first wanted to find the average interval of the 11uM dose beats, because I wanted the average interval's corresponding BPM to be scaled to 120 BPM. After recording the timestamps of all of the important peaks, I made a new array of intervals of unit milliseconds. With those intervals, I could convert the intervals' inverse, in Hz (1 cycle per second). I then converted the intervals' Hz to BPM (beats per minute) by multiplying by 60.  &lt;br /&gt;
&lt;br /&gt;
I figured out that the heart cells when given the 11uM dose could beat at about 43.885 BPM normally. In music terms, that tempo is the faster end of &amp;quot;grave&amp;quot;. I could normalize the interval BPM's by dividing each value by the average. From here, it was rinse and repeat for the other graphs - The interval data for 3.703uM, 1.2345uM, 0.4115uM, 0.1271uM, and 0uM were all normalized with the same 43.885 BPM value.&lt;br /&gt;
&lt;br /&gt;
 %{&lt;br /&gt;
 Octave code for generating music from heartbeats&lt;br /&gt;
 Victor Mercola&lt;br /&gt;
 MU 3620&lt;br /&gt;
 2019-12-09&lt;br /&gt;
 under Prof. Manzo&lt;br /&gt;
 %}&lt;br /&gt;
   &lt;br /&gt;
 pkg load signal;&lt;br /&gt;
 averageInterval = 1367.2; % interval of average heart rate [ms]&lt;br /&gt;
 averageHz = 1 / (1367.2 / 1000); % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 averageBPM = averageHz * 60; % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 % disp(averageBPM) &lt;br /&gt;
 &lt;br /&gt;
 %{ &lt;br /&gt;
 1 beat        1 beat&lt;br /&gt;
 -----       = ------&lt;br /&gt;
 1367.2 ms     1.3672 s&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 x = csvread(&amp;quot;N406K_forMark.csv&amp;quot;,1,0); % original file, a csv &lt;br /&gt;
 &lt;br /&gt;
 %{&lt;br /&gt;
 Mex2A_100uM     = transpose(x(:,2)); % Mex2A - 100 uM&lt;br /&gt;
 Mex2A_33_333uM  = transpose(x(:,3)); % Mex2A - 33.333 uM&lt;br /&gt;
 Mex2A_11_111uM  = transpose(x(:,4)); % Mex2A - 11.111 uM&lt;br /&gt;
 Mex2A_3_703uM   = transpose(x(:,5)); % Mex2A - 3.703 uM&lt;br /&gt;
 Mex2A_1_2345uM  = transpose(x(:,6)); % Mex2A - 1.2345 uM&lt;br /&gt;
 Mex2A_0_4115uM  = transpose(x(:,7)); % Mex2A - 0.4115 uM&lt;br /&gt;
 Mex2A_0_1271uM  = transpose(x(:,8)); % Mex2A - 0.1271 uM&lt;br /&gt;
 Mex2A_0uM       = transpose(x(:,9)); % Mex2A - 0 uM&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 t = transpose(x(:,1)); % time array [ms]&lt;br /&gt;
 Mex2A = [100, 33.333, 11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]; &lt;br /&gt;
 &lt;br /&gt;
 n = 3; &lt;br /&gt;
 &lt;br /&gt;
 % find the peaks in the graph&lt;br /&gt;
 this_row = transpose(x(:,n + 1));&lt;br /&gt;
 [pks idx] = findpeaks(this_row, &amp;quot;MinPeakHeight&amp;quot;,0.015, &amp;quot;MinPeakDistance&amp;quot;, 5); &lt;br /&gt;
 &lt;br /&gt;
 % convert those peak values from findpeaks into coordinates&lt;br /&gt;
 peakX = t(idx);&lt;br /&gt;
 peakY = this_row(idx);&lt;br /&gt;
 disp(peakX);  &lt;br /&gt;
  &lt;br /&gt;
 f = figure;&lt;br /&gt;
 plot(t, this_row, peakX, peakY, 'x');&lt;br /&gt;
 axis([min(t), max(t), 0, 0.03]);&lt;br /&gt;
 title([&amp;quot;Intensity of Mex2A=&amp;quot;, num2str(Mex2A(n)), &amp;quot;uM&amp;quot;]);&lt;br /&gt;
 xlabel(&amp;quot;Time, t [ms]&amp;quot;);&lt;br /&gt;
 ylabel(&amp;quot;Intensity&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
 % calculate peak intervals&lt;br /&gt;
 for i = 2:length(peakX)&lt;br /&gt;
     pkToPkInterval(i - 1) = peakX(i) - peakX(i-1); % time between intervals [ms]&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 pkToPkHz = 1./(pkToPkInterval / 1000);  % interval frequency [Hz]&lt;br /&gt;
 pkToPkBPM = pkToPkHz * 60; % interval frequency [BPM]&lt;br /&gt;
 disp(pkToPkBPM); &lt;br /&gt;
 &lt;br /&gt;
 pkToPkRatio = pkToPkBPM / averageBPM&lt;br /&gt;
&lt;br /&gt;
== Playing the data ==&lt;br /&gt;
&lt;br /&gt;
I could export the data from GNU Octave into Sonic Pi by first pasting it into a simple text editor to format it nicely. Once I made a quick 120 BPM single-measure beat, I could import it into Sonic Pi and change its playback rate in time with the arrays that I generated from GNU Octave. While Sonic Pi is great for live-coding music, I personally think it's missing a couple of key programming elements. Two examples of this that are present is this code is &amp;quot;for&amp;quot; loops with changing variables and not being able to determine the length of an array. I found simple workarounds for both of these, though. &lt;br /&gt;
&lt;br /&gt;
 # Data Sonification with heartbeats&lt;br /&gt;
 # Victor Mercola - MU 3620&lt;br /&gt;
 # Prof. Manzo, 2019-12-09&lt;br /&gt;
 &lt;br /&gt;
 doses = [11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]&lt;br /&gt;
 avgBPM = 43.885&lt;br /&gt;
 &lt;br /&gt;
 dose = 0&lt;br /&gt;
 6.times do&lt;br /&gt;
   if(dose == 0)&lt;br /&gt;
     # 11.111 uM dose&lt;br /&gt;
     intervals = [1.00371, 1.00371, 1.00371, 1.00371, 0.98189, 1.00371]&lt;br /&gt;
     n = 6&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 1)&lt;br /&gt;
     # 3.703 uM dose&lt;br /&gt;
     intervals = [1.1292, 1.0037, 0.98189, 2.5093, 1.0504, 0.98189, 2.5093, 1.0754, 2.3772]&lt;br /&gt;
     n = 9&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 2)&lt;br /&gt;
     # 1.2345 uM dose&lt;br /&gt;
     intervals = [2.5093, 3.7639, 3.7639, 1.1581, 2.5093, 3.7639, 3.7639, 1.1292, 2.6569, 3.7639, 3.7639, 1.1292, 2.5093, 1.0504]&lt;br /&gt;
     n = 14&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 3)&lt;br /&gt;
     # 0.4115 uM dose&lt;br /&gt;
     intervals = [2.8229, 0.961, 2.8229, 0.94098, 2.8229, 4.1061, 3.7639, 0.961, 3.0111, 0.94098, 2.8229]&lt;br /&gt;
     n = 11&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 4)&lt;br /&gt;
     # 0.1271 uM dose&lt;br /&gt;
     intervals = [4.1061, 4.5167, 1.1016, 0.94098, 2.6569, 4.1061, 5.0185, 4.5167, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.1061, 4.1061, 4.5167, 1.1292]&lt;br /&gt;
     n = 21&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 5)&lt;br /&gt;
     # 0 uM dose&lt;br /&gt;
     intervals = [5.0185, 4.5167, 5.0185, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 1.1886, 1.0037, 2.6569, 4.5167, 5.0185, 5.0185, 5.6459, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 4.5167, 5.0185, 5.0185, 4.5167]&lt;br /&gt;
     n = 26&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   # Here's where the actual music happens&lt;br /&gt;
   &lt;br /&gt;
   i = 0&lt;br /&gt;
   n.times do&lt;br /&gt;
     puts(doses[dose],&amp;quot;uM&amp;quot;)&lt;br /&gt;
     puts(intervals[i])&lt;br /&gt;
     puts(&amp;quot;Heart BPM:&amp;quot;,avgBPM*intervals[i])&lt;br /&gt;
     puts(&amp;quot;Music BPM:&amp;quot;,120*intervals[i])&lt;br /&gt;
     sample &amp;quot;D:/OneDrive/Documents/GNU Octave/quick drum loop v2.wav&amp;quot;, rate:intervals[i]&lt;br /&gt;
     wait 2 * (1 / intervals[i])&lt;br /&gt;
     i = i + 1&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   dose = dose + 1&lt;br /&gt;
   wait 1&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
== End Result ==&lt;br /&gt;
&lt;br /&gt;
The first result of the project only had a simple drum pattern as a base loop and was used as a proof-of-proof-of-concept. I sent the results to my father and his staff and he said that they really liked it. After talking with him about it, I added a simple bass to the base loop, which made it sound slightly better.&lt;br /&gt;
&lt;br /&gt;
This video below shows the data sonification from the 11.111uM dose to the control 0uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-11-to-0.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
This video below shows the data sonification from the control 0uM dose to the 11.111uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-0-to-11.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Would nightcore, speedcore, and/or extratone music that varies with an arrhythmic heartbeat sound good? I don't think so. However, I can say for certain that this project was a very effective tool for using sound to compare the control and expected-dosage results of Mex2A.&lt;br /&gt;
&lt;br /&gt;
== Further Reading / Viewing ==&lt;br /&gt;
* [https://www.gnu.org/software/octave/ GNU Octave] - the open-source scientific programming language I used to analyze the data for this project.&lt;br /&gt;
* [https://sonic-pi.net/ Sonic Pi] - the open-source live-coding synth I used to make the music for this project.&lt;br /&gt;
&lt;br /&gt;
== Post-Mortem ==&lt;br /&gt;
This part will be updated once I finish continuing this project over break. If my father's paper on Mex2A is published, I'll definitely leave a link here. Stay tuned!&lt;/div&gt;</summary>
		<author><name>Vsmercola</name></author>
		
	</entry>
	<entry>
		<id>https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247032</id>
		<title>Arrhythmia Data Sonification</title>
		<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247032"/>
		<updated>2019-12-14T00:53:53Z</updated>

		<summary type="html">&lt;p&gt;Vsmercola: /* End Result */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By Victor Mercola&lt;br /&gt;
&lt;br /&gt;
My father, Mark Mercola, is a professor of medicine at Stanford University and the head of the Mercola Lab (as of writing this project). While talking with him about the classes I take at WPI, he mentioned how it would be interesting to use data sonification to educate and/or demonstrate the effectiveness of a new drug that he is working on. I agreed with his proposal and used the data he gave me for my final project in MU3620, Arrhythmia Data Sonification. Using GNU Octave, Ableton Live, and Sonic Pi, I was able to make &amp;quot;music&amp;quot; that would change according to an arrhythmic heartbeat.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
https://upload.wikimedia.org/wikipedia/commons/9/9e/SinusRhythmLabels.svg&lt;br /&gt;
Before working with music, there is some important preliminary background information to go over.&lt;br /&gt;
&lt;br /&gt;
The standard heartbeat seen on electrocardiograms (ECG / EKG) and other heart monitors is comprised of five different sections, named the &amp;quot;P Wave&amp;quot;, the &amp;quot;QRS Complex&amp;quot;, and the &amp;quot;T Wave&amp;quot;. The specific disease my father is working on is Long QT syndrome - as its name suggests, Long QT syndrome is a fatal, congenital cardiac rhythm disorder that where the length of the QT interval is longer than usual, causing arrhythmia patterns. My father is specifically working on Long QT type 3 (a.k.a. Long QT3 syndrome), which is caused by a problem regulating sodium ions in heart cells. He is currently working on a new drug to treat disease, currently named &amp;quot;Mex2A&amp;quot; and nicknamed &amp;quot;Super Mex&amp;quot; by his staff.&lt;br /&gt;
&lt;br /&gt;
== Analyzing &amp;amp; processing the data ==&lt;br /&gt;
&lt;br /&gt;
[[File:Mex2A graph.PNG|800px|center|Series of graphs of the results, from 100uM to 0uM left to right.]]&lt;br /&gt;
&lt;br /&gt;
My father sent me a large spreadsheet that, when graphed, produced the results of the graphs above. These show the results of human heart cells with Long QT3 syndrome given different dose amounts of Mex2A, in micromolar. The graphs' X-axes show the measured time in milliseconds, with measured intervals spaced roughly 30 ms apart. The graphs' Y-axes show the measured intensity - when the heart cells beat, the intensity goes up. One can tell from the graphs that the 100uM dose and 33.333uM dose results do not show any peaks, but the 11.111uM dose shows strikingly regular peaks denoting a heartbeat. When I saw this data, I thought would be neat to make &amp;quot;music&amp;quot; where each peak represented a music measure's bar line, and the tempo of the song would increase or decrease depending on how fast or slow the heart cells beat, respectively. &lt;br /&gt;
&lt;br /&gt;
To turn the heartbeat data into music intervals, I first opened the file in GNU Octave (open-source MATLAB alternative). I first wanted to find the average interval of the 11uM dose beats, because I wanted the average interval's corresponding BPM to be scaled to 120 BPM. After recording the timestamps of all of the important peaks, I made a new array of intervals of unit milliseconds. With those intervals, I could convert the intervals' inverse, in Hz (1 cycle per second). I then converted the intervals' Hz to BPM (beats per minute) by multiplying by 60.  &lt;br /&gt;
&lt;br /&gt;
I figured out that the heart cells when given the 11uM dose could beat at about 43.885 BPM normally. In music terms, that tempo is the faster end of &amp;quot;grave&amp;quot;. I could normalize the interval BPM's by dividing each value by the average. From here, it was rinse and repeat for the other graphs - The interval data for 3.703uM, 1.2345uM, 0.4115uM, 0.1271uM, and 0uM were all normalized with the same 43.885 BPM value.&lt;br /&gt;
&lt;br /&gt;
 %{&lt;br /&gt;
 Octave code for generating music from heartbeats&lt;br /&gt;
 Victor Mercola&lt;br /&gt;
 MU 3620&lt;br /&gt;
 2019-12-09&lt;br /&gt;
 under Prof. Manzo&lt;br /&gt;
 %}&lt;br /&gt;
   &lt;br /&gt;
 pkg load signal;&lt;br /&gt;
 averageInterval = 1367.2; % interval of average heart rate [ms]&lt;br /&gt;
 averageHz = 1 / (1367.2 / 1000); % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 averageBPM = averageHz * 60; % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 % disp(averageBPM) &lt;br /&gt;
 &lt;br /&gt;
 %{ &lt;br /&gt;
 1 beat        1 beat&lt;br /&gt;
 -----       = ------&lt;br /&gt;
 1367.2 ms     1.3672 s&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 x = csvread(&amp;quot;N406K_forMark.csv&amp;quot;,1,0); % original file, a csv &lt;br /&gt;
 &lt;br /&gt;
 %{&lt;br /&gt;
 Mex2A_100uM     = transpose(x(:,2)); % Mex2A - 100 uM&lt;br /&gt;
 Mex2A_33_333uM  = transpose(x(:,3)); % Mex2A - 33.333 uM&lt;br /&gt;
 Mex2A_11_111uM  = transpose(x(:,4)); % Mex2A - 11.111 uM&lt;br /&gt;
 Mex2A_3_703uM   = transpose(x(:,5)); % Mex2A - 3.703 uM&lt;br /&gt;
 Mex2A_1_2345uM  = transpose(x(:,6)); % Mex2A - 1.2345 uM&lt;br /&gt;
 Mex2A_0_4115uM  = transpose(x(:,7)); % Mex2A - 0.4115 uM&lt;br /&gt;
 Mex2A_0_1271uM  = transpose(x(:,8)); % Mex2A - 0.1271 uM&lt;br /&gt;
 Mex2A_0uM       = transpose(x(:,9)); % Mex2A - 0 uM&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 t = transpose(x(:,1)); % time array [ms]&lt;br /&gt;
 Mex2A = [100, 33.333, 11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]; &lt;br /&gt;
 &lt;br /&gt;
 n = 3; &lt;br /&gt;
 &lt;br /&gt;
 % find the peaks in the graph&lt;br /&gt;
 this_row = transpose(x(:,n + 1));&lt;br /&gt;
 [pks idx] = findpeaks(this_row, &amp;quot;MinPeakHeight&amp;quot;,0.015, &amp;quot;MinPeakDistance&amp;quot;, 5); &lt;br /&gt;
 &lt;br /&gt;
 % convert those peak values from findpeaks into coordinates&lt;br /&gt;
 peakX = t(idx);&lt;br /&gt;
 peakY = this_row(idx);&lt;br /&gt;
 disp(peakX);  &lt;br /&gt;
  &lt;br /&gt;
 f = figure;&lt;br /&gt;
 plot(t, this_row, peakX, peakY, 'x');&lt;br /&gt;
 axis([min(t), max(t), 0, 0.03]);&lt;br /&gt;
 title([&amp;quot;Intensity of Mex2A=&amp;quot;, num2str(Mex2A(n)), &amp;quot;uM&amp;quot;]);&lt;br /&gt;
 xlabel(&amp;quot;Time, t [ms]&amp;quot;);&lt;br /&gt;
 ylabel(&amp;quot;Intensity&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
 % calculate peak intervals&lt;br /&gt;
 for i = 2:length(peakX)&lt;br /&gt;
     pkToPkInterval(i - 1) = peakX(i) - peakX(i-1); % time between intervals [ms]&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 pkToPkHz = 1./(pkToPkInterval / 1000);  % interval frequency [Hz]&lt;br /&gt;
 pkToPkBPM = pkToPkHz * 60; % interval frequency [BPM]&lt;br /&gt;
 disp(pkToPkBPM); &lt;br /&gt;
 &lt;br /&gt;
 pkToPkRatio = pkToPkBPM / averageBPM&lt;br /&gt;
&lt;br /&gt;
== Playing the data ==&lt;br /&gt;
&lt;br /&gt;
I could export the data from GNU Octave into Sonic Pi by first pasting it into a simple text editor to format it nicely. Once I made a quick 120 BPM single-measure beat, I could import it into Sonic Pi and change its playback rate in time with the arrays that I generated from GNU Octave. While Sonic Pi is great for live-coding music, I personally think it's missing a couple of key programming elements. Two examples of this that are present is this code is &amp;quot;for&amp;quot; loops with changing variables and not being able to determine the length of an array. I found simple workarounds for both of these, though. &lt;br /&gt;
&lt;br /&gt;
 # Data Sonification with heartbeats&lt;br /&gt;
 # Victor Mercola - MU 3620&lt;br /&gt;
 # Prof. Manzo, 2019-12-09&lt;br /&gt;
 &lt;br /&gt;
 doses = [11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]&lt;br /&gt;
 avgBPM = 43.885&lt;br /&gt;
 &lt;br /&gt;
 dose = 0&lt;br /&gt;
 6.times do&lt;br /&gt;
   if(dose == 0)&lt;br /&gt;
     # 11.111 uM dose&lt;br /&gt;
     intervals = [1.00371, 1.00371, 1.00371, 1.00371, 0.98189, 1.00371]&lt;br /&gt;
     n = 6&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 1)&lt;br /&gt;
     # 3.703 uM dose&lt;br /&gt;
     intervals = [1.1292, 1.0037, 0.98189, 2.5093, 1.0504, 0.98189, 2.5093, 1.0754, 2.3772]&lt;br /&gt;
     n = 9&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 2)&lt;br /&gt;
     # 1.2345 uM dose&lt;br /&gt;
     intervals = [2.5093, 3.7639, 3.7639, 1.1581, 2.5093, 3.7639, 3.7639, 1.1292, 2.6569, 3.7639, 3.7639, 1.1292, 2.5093, 1.0504]&lt;br /&gt;
     n = 14&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 3)&lt;br /&gt;
     # 0.4115 uM dose&lt;br /&gt;
     intervals = [2.8229, 0.961, 2.8229, 0.94098, 2.8229, 4.1061, 3.7639, 0.961, 3.0111, 0.94098, 2.8229]&lt;br /&gt;
     n = 11&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 4)&lt;br /&gt;
     # 0.1271 uM dose&lt;br /&gt;
     intervals = [4.1061, 4.5167, 1.1016, 0.94098, 2.6569, 4.1061, 5.0185, 4.5167, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.1061, 4.1061, 4.5167, 1.1292]&lt;br /&gt;
     n = 21&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 5)&lt;br /&gt;
     # 0 uM dose&lt;br /&gt;
     intervals = [5.0185, 4.5167, 5.0185, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 1.1886, 1.0037, 2.6569, 4.5167, 5.0185, 5.0185, 5.6459, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 4.5167, 5.0185, 5.0185, 4.5167]&lt;br /&gt;
     n = 26&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   # Here's where the actual music happens&lt;br /&gt;
   &lt;br /&gt;
   i = 0&lt;br /&gt;
   n.times do&lt;br /&gt;
     puts(doses[dose],&amp;quot;uM&amp;quot;)&lt;br /&gt;
     puts(intervals[i])&lt;br /&gt;
     puts(&amp;quot;Heart BPM:&amp;quot;,avgBPM*intervals[i])&lt;br /&gt;
     puts(&amp;quot;Music BPM:&amp;quot;,120*intervals[i])&lt;br /&gt;
     sample &amp;quot;D:/OneDrive/Documents/GNU Octave/quick drum loop v2.wav&amp;quot;, rate:intervals[i]&lt;br /&gt;
     wait 2 * (1 / intervals[i])&lt;br /&gt;
     i = i + 1&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   dose = dose + 1&lt;br /&gt;
   wait 1&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
== End Result ==&lt;br /&gt;
&lt;br /&gt;
The first result of the project only had a simple drum pattern as a base loop and was used as a proof-of-proof-of-concept. I sent the results to my father and his staff and he said that they really liked it. After talking with him about it, I added a simple bass to the base loop, which made it sound slightly better.&lt;br /&gt;
&lt;br /&gt;
This video below shows the data sonification from the 11.111uM dose to the control 0uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-11-to-0.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
This video below shows the data sonification from the control 0uM dose to the 11.111uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-0-to-11.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Would nightcore, speedcore, and/or extratone music with arrhythmic heart patterns actually sound like a good music genre? Probably not, but I think it's a pretty effective tool for comparing the control and expected-dosage results of Mex2A.&lt;br /&gt;
&lt;br /&gt;
== Further Reading / Viewing ==&lt;br /&gt;
* [https://www.gnu.org/software/octave/ GNU Octave] - the open-source scientific programming language I used to analyze the data for this project.&lt;br /&gt;
* [https://sonic-pi.net/ Sonic Pi] - the open-source live-coding synth I used to make the music for this project.&lt;br /&gt;
&lt;br /&gt;
== Post-Mortem ==&lt;br /&gt;
This part will be updated once I finish continuing this project over break. If my father's paper on Mex2A is published, I'll definitely leave a link here. Stay tuned!&lt;/div&gt;</summary>
		<author><name>Vsmercola</name></author>
		
	</entry>
	<entry>
		<id>https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247031</id>
		<title>Arrhythmia Data Sonification</title>
		<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247031"/>
		<updated>2019-12-14T00:53:17Z</updated>

		<summary type="html">&lt;p&gt;Vsmercola: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By Victor Mercola&lt;br /&gt;
&lt;br /&gt;
My father, Mark Mercola, is a professor of medicine at Stanford University and the head of the Mercola Lab (as of writing this project). While talking with him about the classes I take at WPI, he mentioned how it would be interesting to use data sonification to educate and/or demonstrate the effectiveness of a new drug that he is working on. I agreed with his proposal and used the data he gave me for my final project in MU3620, Arrhythmia Data Sonification. Using GNU Octave, Ableton Live, and Sonic Pi, I was able to make &amp;quot;music&amp;quot; that would change according to an arrhythmic heartbeat.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
https://upload.wikimedia.org/wikipedia/commons/9/9e/SinusRhythmLabels.svg&lt;br /&gt;
Before working with music, there is some important preliminary background information to go over.&lt;br /&gt;
&lt;br /&gt;
The standard heartbeat seen on electrocardiograms (ECG / EKG) and other heart monitors is comprised of five different sections, named the &amp;quot;P Wave&amp;quot;, the &amp;quot;QRS Complex&amp;quot;, and the &amp;quot;T Wave&amp;quot;. The specific disease my father is working on is Long QT syndrome - as its name suggests, Long QT syndrome is a fatal, congenital cardiac rhythm disorder that where the length of the QT interval is longer than usual, causing arrhythmia patterns. My father is specifically working on Long QT type 3 (a.k.a. Long QT3 syndrome), which is caused by a problem regulating sodium ions in heart cells. He is currently working on a new drug to treat disease, currently named &amp;quot;Mex2A&amp;quot; and nicknamed &amp;quot;Super Mex&amp;quot; by his staff.&lt;br /&gt;
&lt;br /&gt;
== Analyzing &amp;amp; processing the data ==&lt;br /&gt;
&lt;br /&gt;
[[File:Mex2A graph.PNG|800px|center|Series of graphs of the results, from 100uM to 0uM left to right.]]&lt;br /&gt;
&lt;br /&gt;
My father sent me a large spreadsheet that, when graphed, produced the results of the graphs above. These show the results of human heart cells with Long QT3 syndrome given different dose amounts of Mex2A, in micromolar. The graphs' X-axes show the measured time in milliseconds, with measured intervals spaced roughly 30 ms apart. The graphs' Y-axes show the measured intensity - when the heart cells beat, the intensity goes up. One can tell from the graphs that the 100uM dose and 33.333uM dose results do not show any peaks, but the 11.111uM dose shows strikingly regular peaks denoting a heartbeat. When I saw this data, I thought would be neat to make &amp;quot;music&amp;quot; where each peak represented a music measure's bar line, and the tempo of the song would increase or decrease depending on how fast or slow the heart cells beat, respectively. &lt;br /&gt;
&lt;br /&gt;
To turn the heartbeat data into music intervals, I first opened the file in GNU Octave (open-source MATLAB alternative). I first wanted to find the average interval of the 11uM dose beats, because I wanted the average interval's corresponding BPM to be scaled to 120 BPM. After recording the timestamps of all of the important peaks, I made a new array of intervals of unit milliseconds. With those intervals, I could convert the intervals' inverse, in Hz (1 cycle per second). I then converted the intervals' Hz to BPM (beats per minute) by multiplying by 60.  &lt;br /&gt;
&lt;br /&gt;
I figured out that the heart cells when given the 11uM dose could beat at about 43.885 BPM normally. In music terms, that tempo is the faster end of &amp;quot;grave&amp;quot;. I could normalize the interval BPM's by dividing each value by the average. From here, it was rinse and repeat for the other graphs - The interval data for 3.703uM, 1.2345uM, 0.4115uM, 0.1271uM, and 0uM were all normalized with the same 43.885 BPM value.&lt;br /&gt;
&lt;br /&gt;
 %{&lt;br /&gt;
 Octave code for generating music from heartbeats&lt;br /&gt;
 Victor Mercola&lt;br /&gt;
 MU 3620&lt;br /&gt;
 2019-12-09&lt;br /&gt;
 under Prof. Manzo&lt;br /&gt;
 %}&lt;br /&gt;
   &lt;br /&gt;
 pkg load signal;&lt;br /&gt;
 averageInterval = 1367.2; % interval of average heart rate [ms]&lt;br /&gt;
 averageHz = 1 / (1367.2 / 1000); % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 averageBPM = averageHz * 60; % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 % disp(averageBPM) &lt;br /&gt;
 &lt;br /&gt;
 %{ &lt;br /&gt;
 1 beat        1 beat&lt;br /&gt;
 -----       = ------&lt;br /&gt;
 1367.2 ms     1.3672 s&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 x = csvread(&amp;quot;N406K_forMark.csv&amp;quot;,1,0); % original file, a csv &lt;br /&gt;
 &lt;br /&gt;
 %{&lt;br /&gt;
 Mex2A_100uM     = transpose(x(:,2)); % Mex2A - 100 uM&lt;br /&gt;
 Mex2A_33_333uM  = transpose(x(:,3)); % Mex2A - 33.333 uM&lt;br /&gt;
 Mex2A_11_111uM  = transpose(x(:,4)); % Mex2A - 11.111 uM&lt;br /&gt;
 Mex2A_3_703uM   = transpose(x(:,5)); % Mex2A - 3.703 uM&lt;br /&gt;
 Mex2A_1_2345uM  = transpose(x(:,6)); % Mex2A - 1.2345 uM&lt;br /&gt;
 Mex2A_0_4115uM  = transpose(x(:,7)); % Mex2A - 0.4115 uM&lt;br /&gt;
 Mex2A_0_1271uM  = transpose(x(:,8)); % Mex2A - 0.1271 uM&lt;br /&gt;
 Mex2A_0uM       = transpose(x(:,9)); % Mex2A - 0 uM&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 t = transpose(x(:,1)); % time array [ms]&lt;br /&gt;
 Mex2A = [100, 33.333, 11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]; &lt;br /&gt;
 &lt;br /&gt;
 n = 3; &lt;br /&gt;
 &lt;br /&gt;
 % find the peaks in the graph&lt;br /&gt;
 this_row = transpose(x(:,n + 1));&lt;br /&gt;
 [pks idx] = findpeaks(this_row, &amp;quot;MinPeakHeight&amp;quot;,0.015, &amp;quot;MinPeakDistance&amp;quot;, 5); &lt;br /&gt;
 &lt;br /&gt;
 % convert those peak values from findpeaks into coordinates&lt;br /&gt;
 peakX = t(idx);&lt;br /&gt;
 peakY = this_row(idx);&lt;br /&gt;
 disp(peakX);  &lt;br /&gt;
  &lt;br /&gt;
 f = figure;&lt;br /&gt;
 plot(t, this_row, peakX, peakY, 'x');&lt;br /&gt;
 axis([min(t), max(t), 0, 0.03]);&lt;br /&gt;
 title([&amp;quot;Intensity of Mex2A=&amp;quot;, num2str(Mex2A(n)), &amp;quot;uM&amp;quot;]);&lt;br /&gt;
 xlabel(&amp;quot;Time, t [ms]&amp;quot;);&lt;br /&gt;
 ylabel(&amp;quot;Intensity&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
 % calculate peak intervals&lt;br /&gt;
 for i = 2:length(peakX)&lt;br /&gt;
     pkToPkInterval(i - 1) = peakX(i) - peakX(i-1); % time between intervals [ms]&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 pkToPkHz = 1./(pkToPkInterval / 1000);  % interval frequency [Hz]&lt;br /&gt;
 pkToPkBPM = pkToPkHz * 60; % interval frequency [BPM]&lt;br /&gt;
 disp(pkToPkBPM); &lt;br /&gt;
 &lt;br /&gt;
 pkToPkRatio = pkToPkBPM / averageBPM&lt;br /&gt;
&lt;br /&gt;
== Playing the data ==&lt;br /&gt;
&lt;br /&gt;
I could export the data from GNU Octave into Sonic Pi by first pasting it into a simple text editor to format it nicely. Once I made a quick 120 BPM single-measure beat, I could import it into Sonic Pi and change its playback rate in time with the arrays that I generated from GNU Octave. While Sonic Pi is great for live-coding music, I personally think it's missing a couple of key programming elements. Two examples of this that are present is this code is &amp;quot;for&amp;quot; loops with changing variables and not being able to determine the length of an array. I found simple workarounds for both of these, though. &lt;br /&gt;
&lt;br /&gt;
 # Data Sonification with heartbeats&lt;br /&gt;
 # Victor Mercola - MU 3620&lt;br /&gt;
 # Prof. Manzo, 2019-12-09&lt;br /&gt;
 &lt;br /&gt;
 doses = [11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]&lt;br /&gt;
 avgBPM = 43.885&lt;br /&gt;
 &lt;br /&gt;
 dose = 0&lt;br /&gt;
 6.times do&lt;br /&gt;
   if(dose == 0)&lt;br /&gt;
     # 11.111 uM dose&lt;br /&gt;
     intervals = [1.00371, 1.00371, 1.00371, 1.00371, 0.98189, 1.00371]&lt;br /&gt;
     n = 6&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 1)&lt;br /&gt;
     # 3.703 uM dose&lt;br /&gt;
     intervals = [1.1292, 1.0037, 0.98189, 2.5093, 1.0504, 0.98189, 2.5093, 1.0754, 2.3772]&lt;br /&gt;
     n = 9&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 2)&lt;br /&gt;
     # 1.2345 uM dose&lt;br /&gt;
     intervals = [2.5093, 3.7639, 3.7639, 1.1581, 2.5093, 3.7639, 3.7639, 1.1292, 2.6569, 3.7639, 3.7639, 1.1292, 2.5093, 1.0504]&lt;br /&gt;
     n = 14&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 3)&lt;br /&gt;
     # 0.4115 uM dose&lt;br /&gt;
     intervals = [2.8229, 0.961, 2.8229, 0.94098, 2.8229, 4.1061, 3.7639, 0.961, 3.0111, 0.94098, 2.8229]&lt;br /&gt;
     n = 11&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 4)&lt;br /&gt;
     # 0.1271 uM dose&lt;br /&gt;
     intervals = [4.1061, 4.5167, 1.1016, 0.94098, 2.6569, 4.1061, 5.0185, 4.5167, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.1061, 4.1061, 4.5167, 1.1292]&lt;br /&gt;
     n = 21&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 5)&lt;br /&gt;
     # 0 uM dose&lt;br /&gt;
     intervals = [5.0185, 4.5167, 5.0185, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 1.1886, 1.0037, 2.6569, 4.5167, 5.0185, 5.0185, 5.6459, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 4.5167, 5.0185, 5.0185, 4.5167]&lt;br /&gt;
     n = 26&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   # Here's where the actual music happens&lt;br /&gt;
   &lt;br /&gt;
   i = 0&lt;br /&gt;
   n.times do&lt;br /&gt;
     puts(doses[dose],&amp;quot;uM&amp;quot;)&lt;br /&gt;
     puts(intervals[i])&lt;br /&gt;
     puts(&amp;quot;Heart BPM:&amp;quot;,avgBPM*intervals[i])&lt;br /&gt;
     puts(&amp;quot;Music BPM:&amp;quot;,120*intervals[i])&lt;br /&gt;
     sample &amp;quot;D:/OneDrive/Documents/GNU Octave/quick drum loop v2.wav&amp;quot;, rate:intervals[i]&lt;br /&gt;
     wait 2 * (1 / intervals[i])&lt;br /&gt;
     i = i + 1&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   dose = dose + 1&lt;br /&gt;
   wait 1&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
== End Result ==&lt;br /&gt;
&lt;br /&gt;
The first result of the project only had a simple drum pattern as a base loop and was used as a proof-of-proof-of-concept. I sent the results to my father and his staff and he said that they really liked it. After talking with him about it, I added a simple bass to the bass loop, which made it sound slightly better.&lt;br /&gt;
&lt;br /&gt;
This video below shows the data sonification from the 11.111uM dose to the control 0uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-11-to-0.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
This video below shows the data sonification from the control 0uM dose to the 11.111uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-0-to-11.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Would nightcore, speedcore, and/or extratone music with arrhythmic heart patterns actually sound like a good music genre? Probably not, but I think it's a pretty effective tool for comparing the control and expected-dosage results of Mex2A.&lt;br /&gt;
== Further Reading / Viewing ==&lt;br /&gt;
* [https://www.gnu.org/software/octave/ GNU Octave] - the open-source scientific programming language I used to analyze the data for this project.&lt;br /&gt;
* [https://sonic-pi.net/ Sonic Pi] - the open-source live-coding synth I used to make the music for this project.&lt;br /&gt;
&lt;br /&gt;
== Post-Mortem ==&lt;br /&gt;
This part will be updated once I finish continuing this project over break. If my father's paper on Mex2A is published, I'll definitely leave a link here. Stay tuned!&lt;/div&gt;</summary>
		<author><name>Vsmercola</name></author>
		
	</entry>
	<entry>
		<id>https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247029</id>
		<title>Arrhythmia Data Sonification</title>
		<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247029"/>
		<updated>2019-12-14T00:45:43Z</updated>

		<summary type="html">&lt;p&gt;Vsmercola: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By Victor Mercola&lt;br /&gt;
&lt;br /&gt;
My father, Mark Mercola, is a professor of medicine at Stanford University and the head of the Mercola Lab (as of writing this project). While talking with him about the classes I take at WPI, he mentioned how it would be interesting to use data sonification to educate and/or demonstrate the effectiveness of a new drug that he is working on. I agreed with his proposal and used the data he gave me for my final project in MU3620, Arrhythmia Data Sonification. Using GNU Octave, Ableton Live, and Sonic Pi, I was able to make &amp;quot;music&amp;quot; that would change according to an arrhythmic heartbeat.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Before working with music, there is some important preliminary background information to go over.&lt;br /&gt;
&lt;br /&gt;
The standard heartbeat seen on electrocardiograms (ECG / EKG) and other heart monitors is comprised of five different sections, named the &amp;quot;P Wave&amp;quot;, the &amp;quot;QRS Complex&amp;quot;, and the &amp;quot;T Wave&amp;quot;. The specific disease my father is working on is Long QT syndrome - as its name suggests, Long QT syndrome is a fatal, congenital cardiac rhythm disorder that where the length of the QT interval is longer than usual, causing arrhythmia patterns. My father is specifically working on Long QT type 3 (a.k.a. Long QT3 syndrome), which is caused by a problem regulating sodium ions in heart cells. He is currently working on a new drug to treat disease, currently named &amp;quot;Mex2A&amp;quot; and nicknamed &amp;quot;Super Mex&amp;quot; by his staff.&lt;br /&gt;
&lt;br /&gt;
== Analyzing &amp;amp; processing the data ==&lt;br /&gt;
&lt;br /&gt;
[[File:Mex2A graph.PNG|800px|center|Series of graphs of the results, from 100uM to 0uM left to right.]]&lt;br /&gt;
&lt;br /&gt;
My father sent me a large spreadsheet that, when graphed, produced the results of the graphs above. These show the results of human heart cells with Long QT3 syndrome given different dose amounts of Mex2A, in micromolar. The graphs' X-axes show the measured time in milliseconds, with measured intervals spaced roughly 30 ms apart. The graphs' Y-axes show the measured intensity - when the heart cells beat, the intensity goes up. One can tell from the graphs that the 100uM dose and 33.333uM dose results do not show any peaks, but the 11.111uM dose shows strikingly regular peaks denoting a heartbeat. When I saw this data, I thought would be neat to make &amp;quot;music&amp;quot; where each peak represented a music measure's bar line, and the tempo of the song would increase or decrease depending on how fast or slow the heart cells beat, respectively. &lt;br /&gt;
&lt;br /&gt;
To turn the heartbeat data into music intervals, I first opened the file in GNU Octave (open-source MATLAB alternative). I first wanted to find the average interval of the 11uM dose beats, because I wanted the average interval's corresponding BPM to be scaled to 120 BPM. After recording the timestamps of all of the important peaks, I made a new array of intervals of unit milliseconds. With those intervals, I could convert the intervals' inverse, in Hz (1 cycle per second). I then converted the intervals' Hz to BPM (beats per minute) by multiplying by 60.  &lt;br /&gt;
&lt;br /&gt;
I figured out that the heart cells when given the 11uM dose could beat at about 43.885 BPM normally. In music terms, that tempo is the faster end of &amp;quot;grave&amp;quot;. I could normalize the interval BPM's by dividing each value by the average. From here, it was rinse and repeat for the other graphs - The interval data for 3.703uM, 1.2345uM, 0.4115uM, 0.1271uM, and 0uM were all normalized with the same 43.885 BPM value.&lt;br /&gt;
&lt;br /&gt;
 %{&lt;br /&gt;
 Octave code for generating music from heartbeats&lt;br /&gt;
 Victor Mercola&lt;br /&gt;
 MU 3620&lt;br /&gt;
 2019-12-09&lt;br /&gt;
 under Prof. Manzo&lt;br /&gt;
 %}&lt;br /&gt;
   &lt;br /&gt;
 pkg load signal;&lt;br /&gt;
 averageInterval = 1367.2; % interval of average heart rate [ms]&lt;br /&gt;
 averageHz = 1 / (1367.2 / 1000); % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 averageBPM = averageHz * 60; % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 % disp(averageBPM) &lt;br /&gt;
 &lt;br /&gt;
 %{ &lt;br /&gt;
 1 beat        1 beat&lt;br /&gt;
 -----       = ------&lt;br /&gt;
 1367.2 ms     1.3672 s&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 x = csvread(&amp;quot;N406K_forMark.csv&amp;quot;,1,0); % original file, a csv &lt;br /&gt;
 &lt;br /&gt;
 %{&lt;br /&gt;
 Mex2A_100uM     = transpose(x(:,2)); % Mex2A - 100 uM&lt;br /&gt;
 Mex2A_33_333uM  = transpose(x(:,3)); % Mex2A - 33.333 uM&lt;br /&gt;
 Mex2A_11_111uM  = transpose(x(:,4)); % Mex2A - 11.111 uM&lt;br /&gt;
 Mex2A_3_703uM   = transpose(x(:,5)); % Mex2A - 3.703 uM&lt;br /&gt;
 Mex2A_1_2345uM  = transpose(x(:,6)); % Mex2A - 1.2345 uM&lt;br /&gt;
 Mex2A_0_4115uM  = transpose(x(:,7)); % Mex2A - 0.4115 uM&lt;br /&gt;
 Mex2A_0_1271uM  = transpose(x(:,8)); % Mex2A - 0.1271 uM&lt;br /&gt;
 Mex2A_0uM       = transpose(x(:,9)); % Mex2A - 0 uM&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 t = transpose(x(:,1)); % time array [ms]&lt;br /&gt;
 Mex2A = [100, 33.333, 11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]; &lt;br /&gt;
 &lt;br /&gt;
 n = 3; &lt;br /&gt;
 &lt;br /&gt;
 % find the peaks in the graph&lt;br /&gt;
 this_row = transpose(x(:,n + 1));&lt;br /&gt;
 [pks idx] = findpeaks(this_row, &amp;quot;MinPeakHeight&amp;quot;,0.015, &amp;quot;MinPeakDistance&amp;quot;, 5); &lt;br /&gt;
 &lt;br /&gt;
 % convert those peak values from findpeaks into coordinates&lt;br /&gt;
 peakX = t(idx);&lt;br /&gt;
 peakY = this_row(idx);&lt;br /&gt;
 disp(peakX);  &lt;br /&gt;
  &lt;br /&gt;
 f = figure;&lt;br /&gt;
 plot(t, this_row, peakX, peakY, 'x');&lt;br /&gt;
 axis([min(t), max(t), 0, 0.03]);&lt;br /&gt;
 title([&amp;quot;Intensity of Mex2A=&amp;quot;, num2str(Mex2A(n)), &amp;quot;uM&amp;quot;]);&lt;br /&gt;
 xlabel(&amp;quot;Time, t [ms]&amp;quot;);&lt;br /&gt;
 ylabel(&amp;quot;Intensity&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
 % calculate peak intervals&lt;br /&gt;
 for i = 2:length(peakX)&lt;br /&gt;
     pkToPkInterval(i - 1) = peakX(i) - peakX(i-1); % time between intervals [ms]&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 pkToPkHz = 1./(pkToPkInterval / 1000);  % interval frequency [Hz]&lt;br /&gt;
 pkToPkBPM = pkToPkHz * 60; % interval frequency [BPM]&lt;br /&gt;
 disp(pkToPkBPM); &lt;br /&gt;
 &lt;br /&gt;
 pkToPkRatio = pkToPkBPM / averageBPM&lt;br /&gt;
&lt;br /&gt;
== Playing the data ==&lt;br /&gt;
&lt;br /&gt;
I could export the data from GNU Octave into Sonic Pi by first pasting it into a simple text editor to format it nicely. Once I made a quick 120 BPM single-measure beat, I could import it into Sonic Pi and change its playback rate in time with the arrays that I generated from GNU Octave. While Sonic Pi is great for live-coding music, I personally think it's missing a couple of key programming elements. Two examples of this that are present is this code is &amp;quot;for&amp;quot; loops with changing variables and not being able to determine the length of an array. I found simple workarounds for both of these, though. &lt;br /&gt;
&lt;br /&gt;
 # Data Sonification with heartbeats&lt;br /&gt;
 # Victor Mercola - MU 3620&lt;br /&gt;
 # Prof. Manzo, 2019-12-09&lt;br /&gt;
 &lt;br /&gt;
 doses = [11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]&lt;br /&gt;
 avgBPM = 43.885&lt;br /&gt;
 &lt;br /&gt;
 dose = 0&lt;br /&gt;
 6.times do&lt;br /&gt;
   if(dose == 0)&lt;br /&gt;
     # 11.111 uM dose&lt;br /&gt;
     intervals = [1.00371, 1.00371, 1.00371, 1.00371, 0.98189, 1.00371]&lt;br /&gt;
     n = 6&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 1)&lt;br /&gt;
     # 3.703 uM dose&lt;br /&gt;
     intervals = [1.1292, 1.0037, 0.98189, 2.5093, 1.0504, 0.98189, 2.5093, 1.0754, 2.3772]&lt;br /&gt;
     n = 9&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 2)&lt;br /&gt;
     # 1.2345 uM dose&lt;br /&gt;
     intervals = [2.5093, 3.7639, 3.7639, 1.1581, 2.5093, 3.7639, 3.7639, 1.1292, 2.6569, 3.7639, 3.7639, 1.1292, 2.5093, 1.0504]&lt;br /&gt;
     n = 14&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 3)&lt;br /&gt;
     # 0.4115 uM dose&lt;br /&gt;
     intervals = [2.8229, 0.961, 2.8229, 0.94098, 2.8229, 4.1061, 3.7639, 0.961, 3.0111, 0.94098, 2.8229]&lt;br /&gt;
     n = 11&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 4)&lt;br /&gt;
     # 0.1271 uM dose&lt;br /&gt;
     intervals = [4.1061, 4.5167, 1.1016, 0.94098, 2.6569, 4.1061, 5.0185, 4.5167, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.1061, 4.1061, 4.5167, 1.1292]&lt;br /&gt;
     n = 21&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 5)&lt;br /&gt;
     # 0 uM dose&lt;br /&gt;
     intervals = [5.0185, 4.5167, 5.0185, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 1.1886, 1.0037, 2.6569, 4.5167, 5.0185, 5.0185, 5.6459, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 4.5167, 5.0185, 5.0185, 4.5167]&lt;br /&gt;
     n = 26&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   # Here's where the actual music happens&lt;br /&gt;
   &lt;br /&gt;
   i = 0&lt;br /&gt;
   n.times do&lt;br /&gt;
     puts(doses[dose],&amp;quot;uM&amp;quot;)&lt;br /&gt;
     puts(intervals[i])&lt;br /&gt;
     puts(&amp;quot;Heart BPM:&amp;quot;,avgBPM*intervals[i])&lt;br /&gt;
     puts(&amp;quot;Music BPM:&amp;quot;,120*intervals[i])&lt;br /&gt;
     sample &amp;quot;D:/OneDrive/Documents/GNU Octave/quick drum loop v2.wav&amp;quot;, rate:intervals[i]&lt;br /&gt;
     wait 2 * (1 / intervals[i])&lt;br /&gt;
     i = i + 1&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   dose = dose + 1&lt;br /&gt;
   wait 1&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
== End Result ==&lt;br /&gt;
&lt;br /&gt;
The first result of the project only had a simple drum pattern as a base loop and was used as a proof-of-proof-of-concept. I sent the results to my father and his staff and he said that they really liked it. After talking with him about it, I added a simple bass to the bass loop, which made it sound slightly better.&lt;br /&gt;
&lt;br /&gt;
This video below shows the data sonification from the 11.111uM dose to the control 0uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-11-to-0.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
This video below shows the data sonification from the control 0uM dose to the 11.111uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-0-to-11.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Would nightcore, speedcore, and/or extratone music with arrhythmic heart patterns actually sound like a good music genre? Probably not, but I think it's a pretty effective tool for comparing the control and expected-dosage results of Mex2A.&lt;br /&gt;
== Further Reading / Viewing ==&lt;br /&gt;
* [https://www.gnu.org/software/octave/ GNU Octave] - the open-source scientific programming language I used to analyze the data for this project.&lt;br /&gt;
* [https://sonic-pi.net/ Sonic Pi] - the open-source live-coding synth I used to make the music for this project.&lt;br /&gt;
&lt;br /&gt;
== Post-Mortem ==&lt;br /&gt;
This part will be updated once I finish continuing this project over break. If my father's paper on Mex2A is published, I'll definitely leave a link here. Stay tuned!&lt;/div&gt;</summary>
		<author><name>Vsmercola</name></author>
		
	</entry>
	<entry>
		<id>https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247028</id>
		<title>Arrhythmia Data Sonification</title>
		<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247028"/>
		<updated>2019-12-14T00:45:16Z</updated>

		<summary type="html">&lt;p&gt;Vsmercola: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By Victor Mercola&lt;br /&gt;
&lt;br /&gt;
My father, Mark Mercola, is a professor of medicine at Stanford University and the head of the Mercola Lab (as of writing this project). While talking with him about the classes I take at WPI, he mentioned how it would be interesting to use data sonification to educate and/or demonstrate the effectiveness of a new drug that he is working on. I agreed with his proposal and used the data he gave me for my final project in MU3620, Arrhythmia Data Sonification. Using GNU Octave, Ableton Live, and Sonic Pi, I was able to make &amp;quot;music&amp;quot; that would change according to an arrhythmic heartbeat.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Before working with music, there is some important preliminary background information to go over.&lt;br /&gt;
&lt;br /&gt;
The standard heartbeat seen on electrocardiograms (ECG / EKG) and other heart monitors is comprised of five different sections, named the &amp;quot;P Wave&amp;quot;, the &amp;quot;QRS Complex&amp;quot;, and the &amp;quot;T Wave&amp;quot;. The specific disease my father is working on is Long QT syndrome - as its name suggests, Long QT syndrome is a fatal, congenital cardiac rhythm disorder that where the length of the QT interval is longer than usual, causing arrhythmia patterns. My father is specifically working on Long QT type 3 (a.k.a. Long QT3 syndrome), which is caused by a problem regulating sodium ions in heart cells. He is currently working on a new drug to treat disease, currently named &amp;quot;Mex2A&amp;quot; and nicknamed &amp;quot;Super Mex&amp;quot; by his staff.&lt;br /&gt;
&lt;br /&gt;
== Analyzing &amp;amp; processing the data ==&lt;br /&gt;
&lt;br /&gt;
[[File:Mex2A graph.PNG|800px|center|Series of graphs of the results, from 100uM to 0uM left to right.]]&lt;br /&gt;
&lt;br /&gt;
My father sent me a large spreadsheet that, when graphed, produced the results of the graphs above. These show the results of human heart cells with Long QT3 syndrome given different dose amounts of Mex2A, in micromolar. The graphs' X-axes show the measured time in milliseconds, with measured intervals spaced roughly 30 ms apart. The graphs' Y-axes show the measured intensity - when the heart cells beat, the intensity goes up. One can tell from the graphs that the 100uM dose and 33.333uM dose results do not show any peaks, but the 11.111uM dose shows strikingly regular peaks denoting a heartbeat. When I saw this data, I thought would be neat to make &amp;quot;music&amp;quot; where each peak represented a music measure's bar line, and the tempo of the song would increase or decrease depending on how fast or slow the heart cells beat, respectively. &lt;br /&gt;
&lt;br /&gt;
To turn the heartbeat data into music intervals, I first opened the file in GNU Octave (open-source MATLAB alternative). I first wanted to find the average interval of the 11uM dose beats, because I wanted the average interval's corresponding BPM to be scaled to 120 BPM. After recording the timestamps of all of the important peaks, I made a new array of intervals of unit milliseconds. With those intervals, I could convert the intervals' inverse, in Hz (1 cycle per second). I then converted the intervals' Hz to BPM (beats per minute) by multiplying by 60.  &lt;br /&gt;
&lt;br /&gt;
I figured out that the heart cells when given the 11uM dose could beat at about 43.885 BPM normally. In music terms, that tempo is the faster end of &amp;quot;grave&amp;quot;. I could normalize the interval BPM's by dividing each value by the average. From here, it was rinse and repeat for the other graphs - The interval data for 3.703uM, 1.2345uM, 0.4115uM, 0.1271uM, and 0uM were all normalized with the same 43.885 BPM value.&lt;br /&gt;
&lt;br /&gt;
 %{&lt;br /&gt;
 Octave code for generating music from heartbeats&lt;br /&gt;
 Victor Mercola&lt;br /&gt;
 MU 3620&lt;br /&gt;
 2019-12-09&lt;br /&gt;
 under Prof. Manzo&lt;br /&gt;
 %}&lt;br /&gt;
   &lt;br /&gt;
 pkg load signal;&lt;br /&gt;
 averageInterval = 1367.2; % interval of average heart rate [ms]&lt;br /&gt;
 averageHz = 1 / (1367.2 / 1000); % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 averageBPM = averageHz * 60; % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 % disp(averageBPM) &lt;br /&gt;
 &lt;br /&gt;
 %{ &lt;br /&gt;
 1 beat        1 beat&lt;br /&gt;
 -----       = ------&lt;br /&gt;
 1367.2 ms     1.3672 s&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 x = csvread(&amp;quot;N406K_forMark.csv&amp;quot;,1,0); % original file, a csv &lt;br /&gt;
 &lt;br /&gt;
 %{&lt;br /&gt;
 Mex2A_100uM     = transpose(x(:,2)); % Mex2A - 100 uM&lt;br /&gt;
 Mex2A_33_333uM  = transpose(x(:,3)); % Mex2A - 33.333 uM&lt;br /&gt;
 Mex2A_11_111uM  = transpose(x(:,4)); % Mex2A - 11.111 uM&lt;br /&gt;
 Mex2A_3_703uM   = transpose(x(:,5)); % Mex2A - 3.703 uM&lt;br /&gt;
 Mex2A_1_2345uM  = transpose(x(:,6)); % Mex2A - 1.2345 uM&lt;br /&gt;
 Mex2A_0_4115uM  = transpose(x(:,7)); % Mex2A - 0.4115 uM&lt;br /&gt;
 Mex2A_0_1271uM  = transpose(x(:,8)); % Mex2A - 0.1271 uM&lt;br /&gt;
 Mex2A_0uM       = transpose(x(:,9)); % Mex2A - 0 uM&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 t = transpose(x(:,1)); % time array [ms]&lt;br /&gt;
 Mex2A = [100, 33.333, 11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]; &lt;br /&gt;
 &lt;br /&gt;
 n = 3; &lt;br /&gt;
 &lt;br /&gt;
 % find the peaks in the graph&lt;br /&gt;
 this_row = transpose(x(:,n + 1));&lt;br /&gt;
 [pks idx] = findpeaks(this_row, &amp;quot;MinPeakHeight&amp;quot;,0.015, &amp;quot;MinPeakDistance&amp;quot;, 5); &lt;br /&gt;
 &lt;br /&gt;
 % convert those peak values from findpeaks into coordinates&lt;br /&gt;
 peakX = t(idx);&lt;br /&gt;
 peakY = this_row(idx);&lt;br /&gt;
 disp(peakX);  &lt;br /&gt;
  &lt;br /&gt;
 f = figure;&lt;br /&gt;
 plot(t, this_row, peakX, peakY, 'x');&lt;br /&gt;
 axis([min(t), max(t), 0, 0.03]);&lt;br /&gt;
 title([&amp;quot;Intensity of Mex2A=&amp;quot;, num2str(Mex2A(n)), &amp;quot;uM&amp;quot;]);&lt;br /&gt;
 xlabel(&amp;quot;Time, t [ms]&amp;quot;);&lt;br /&gt;
 ylabel(&amp;quot;Intensity&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
 % calculate peak intervals&lt;br /&gt;
 for i = 2:length(peakX)&lt;br /&gt;
     pkToPkInterval(i - 1) = peakX(i) - peakX(i-1); % time between intervals [ms]&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 pkToPkHz = 1./(pkToPkInterval / 1000);  % interval frequency [Hz]&lt;br /&gt;
 pkToPkBPM = pkToPkHz * 60; % interval frequency [BPM]&lt;br /&gt;
 disp(pkToPkBPM); &lt;br /&gt;
 &lt;br /&gt;
 pkToPkRatio = pkToPkBPM / averageBPM&lt;br /&gt;
&lt;br /&gt;
== Playing the data ==&lt;br /&gt;
&lt;br /&gt;
I could export the data from GNU Octave into Sonic Pi by first pasting it into a simple text editor to format it nicely. Once I made a quick 120 BPM single-measure beat, I could import it into Sonic Pi and change its playback rate in time with the arrays that I generated from GNU Octave. While Sonic Pi is great for live-coding music, I personally think it's missing a couple of key programming elements. Two examples of this that are present is this code is &amp;quot;for&amp;quot; loops with changing variables and not being able to determine the length of an array. I found simple workarounds for both of these, though. &lt;br /&gt;
&lt;br /&gt;
 # Data Sonification with heartbeats&lt;br /&gt;
 # Victor Mercola - MU 3620&lt;br /&gt;
 # Prof. Manzo, 2019-12-09&lt;br /&gt;
 &lt;br /&gt;
 doses = [11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]&lt;br /&gt;
 avgBPM = 43.885&lt;br /&gt;
 &lt;br /&gt;
 dose = 0&lt;br /&gt;
 6.times do&lt;br /&gt;
   if(dose == 0)&lt;br /&gt;
     # 11.111 uM dose&lt;br /&gt;
     intervals = [1.00371, 1.00371, 1.00371, 1.00371, 0.98189, 1.00371]&lt;br /&gt;
     n = 6&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 1)&lt;br /&gt;
     # 3.703 uM dose&lt;br /&gt;
     intervals = [1.1292, 1.0037, 0.98189, 2.5093, 1.0504, 0.98189, 2.5093, 1.0754, 2.3772]&lt;br /&gt;
     n = 9&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 2)&lt;br /&gt;
     # 1.2345 uM dose&lt;br /&gt;
     intervals = [2.5093, 3.7639, 3.7639, 1.1581, 2.5093, 3.7639, 3.7639, 1.1292, 2.6569, 3.7639, 3.7639, 1.1292, 2.5093, 1.0504]&lt;br /&gt;
     n = 14&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 3)&lt;br /&gt;
     # 0.4115 uM dose&lt;br /&gt;
     intervals = [2.8229, 0.961, 2.8229, 0.94098, 2.8229, 4.1061, 3.7639, 0.961, 3.0111, 0.94098, 2.8229]&lt;br /&gt;
     n = 11&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 4)&lt;br /&gt;
     # 0.1271 uM dose&lt;br /&gt;
     intervals = [4.1061, 4.5167, 1.1016, 0.94098, 2.6569, 4.1061, 5.0185, 4.5167, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.1061, 4.1061, 4.5167, 1.1292]&lt;br /&gt;
     n = 21&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 5)&lt;br /&gt;
     # 0 uM dose&lt;br /&gt;
     intervals = [5.0185, 4.5167, 5.0185, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 1.1886, 1.0037, 2.6569, 4.5167, 5.0185, 5.0185, 5.6459, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 4.5167, 5.0185, 5.0185, 4.5167]&lt;br /&gt;
     n = 26&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   # Here's where the actual music happens&lt;br /&gt;
   &lt;br /&gt;
   i = 0&lt;br /&gt;
   n.times do&lt;br /&gt;
     puts(doses[dose],&amp;quot;uM&amp;quot;)&lt;br /&gt;
     puts(intervals[i])&lt;br /&gt;
     puts(&amp;quot;Heart BPM:&amp;quot;,avgBPM*intervals[i])&lt;br /&gt;
     puts(&amp;quot;Music BPM:&amp;quot;,120*intervals[i])&lt;br /&gt;
     sample &amp;quot;D:/OneDrive/Documents/GNU Octave/quick drum loop v2.wav&amp;quot;, rate:intervals[i]&lt;br /&gt;
     wait 2 * (1 / intervals[i])&lt;br /&gt;
     i = i + 1&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   dose = dose + 1&lt;br /&gt;
   wait 1&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
== End Result ==&lt;br /&gt;
&lt;br /&gt;
The first result of the project only had a simple drum pattern as a base loop and was used as a proof-of-proof-of-concept. I sent the results to my father and his staff and he said that they really liked it. After talking with him about it, I added a simple bass to the bass loop, which made it sound slightly better.&lt;br /&gt;
&lt;br /&gt;
This video below shows the data sonification from the 11.111uM dose to the control 0uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-11-to-0.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
This video below shows the data sonification from the control 0uM dose to the 11.111uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-0-to-11.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Would nightcore, speedcore, and/or extratone music with arrhythmic heart patterns actually sound like a good music genre? Probably not, but I think it's a pretty effective tool for comparing the control and expected-dosage results of Mex2A.&lt;br /&gt;
== Further Reading / Viewing ==&lt;br /&gt;
* [https://www.gnu.org/software/octave/ GNU Octave] - the open-source scientific programming language I used to analyze the data for this project.&lt;br /&gt;
* [https://sonic-pi.net/ Sonic Pi] - the open-source live-coding synth I used to make the music for this project.&lt;br /&gt;
&lt;br /&gt;
== Post-Mortem ==&lt;br /&gt;
This part will be updated once I finish continuing this project over break. If my father's paper on this is published, I'll definitely leave a link here. Stay tuned!&lt;/div&gt;</summary>
		<author><name>Vsmercola</name></author>
		
	</entry>
	<entry>
		<id>https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247027</id>
		<title>Arrhythmia Data Sonification</title>
		<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247027"/>
		<updated>2019-12-14T00:45:01Z</updated>

		<summary type="html">&lt;p&gt;Vsmercola: /* Further Reading / Viewing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By Victor Mercola&lt;br /&gt;
&lt;br /&gt;
My father, Mark Mercola, is a professor of medicine at Stanford University and the head of the Mercola Lab (as of writing this project). While talking with him about the classes I take at WPI, he mentioned how it would be interesting to use data sonification to educate and/or demonstrate the effectiveness of a new drug that he is working on. I agreed with his proposal and used the data he gave me for my final project in MU3620, Arrhythmia Data Sonification. Using GNU Octave, Ableton Live, and Sonic Pi, I was able to make &amp;quot;music&amp;quot; that would change according to an arrhythmic heartbeat.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Before working with music, there is some important preliminary background information to go over.&lt;br /&gt;
&lt;br /&gt;
The standard heartbeat seen on electrocardiograms (ECG / EKG) and other heart monitors is comprised of five different sections, named the &amp;quot;P Wave&amp;quot;, the &amp;quot;QRS Complex&amp;quot;, and the &amp;quot;T Wave&amp;quot;. The specific disease my father is working on is Long QT syndrome - as its name suggests, Long QT syndrome is a fatal, congenital cardiac rhythm disorder that where the length of the QT interval is longer than usual, causing arrhythmia patterns. My father is specifically working on Long QT type 3 (a.k.a. Long QT3 syndrome), which is caused by a problem regulating sodium ions in heart cells. He is currently working on a new drug to treat disease, currently named &amp;quot;Mex2A&amp;quot; and nicknamed &amp;quot;Super Mex&amp;quot; by his staff.&lt;br /&gt;
&lt;br /&gt;
== Analyzing &amp;amp; processing the data ==&lt;br /&gt;
&lt;br /&gt;
[[File:Mex2A graph.PNG|800px|center|Series of graphs of the results, from 100uM to 0uM left to right.]]&lt;br /&gt;
&lt;br /&gt;
My father sent me a large spreadsheet that, when graphed, produced the results of the graphs above. These show the results of human heart cells with Long QT3 syndrome given different dose amounts of Mex2A, in micromolar. The graphs' X-axes show the measured time in milliseconds, with measured intervals spaced roughly 30 ms apart. The graphs' Y-axes show the measured intensity - when the heart cells beat, the intensity goes up. One can tell from the graphs that the 100uM dose and 33.333uM dose results do not show any peaks, but the 11.111uM dose shows strikingly regular peaks denoting a heartbeat. When I saw this data, I thought would be neat to make &amp;quot;music&amp;quot; where each peak represented a music measure's bar line, and the tempo of the song would increase or decrease depending on how fast or slow the heart cells beat, respectively. &lt;br /&gt;
&lt;br /&gt;
To turn the heartbeat data into music intervals, I first opened the file in GNU Octave (open-source MATLAB alternative). I first wanted to find the average interval of the 11uM dose beats, because I wanted the average interval's corresponding BPM to be scaled to 120 BPM. After recording the timestamps of all of the important peaks, I made a new array of intervals of unit milliseconds. With those intervals, I could convert the intervals' inverse, in Hz (1 cycle per second). I then converted the intervals' Hz to BPM (beats per minute) by multiplying by 60.  &lt;br /&gt;
&lt;br /&gt;
I figured out that the heart cells when given the 11uM dose could beat at about 43.885 BPM normally. In music terms, that tempo is the faster end of &amp;quot;grave&amp;quot;. I could normalize the interval BPM's by dividing each value by the average. From here, it was rinse and repeat for the other graphs - The interval data for 3.703uM, 1.2345uM, 0.4115uM, 0.1271uM, and 0uM were all normalized with the same 43.885 BPM value.&lt;br /&gt;
&lt;br /&gt;
 %{&lt;br /&gt;
 Octave code for generating music from heartbeats&lt;br /&gt;
 Victor Mercola&lt;br /&gt;
 MU 3620&lt;br /&gt;
 2019-12-09&lt;br /&gt;
 under Prof. Manzo&lt;br /&gt;
 %}&lt;br /&gt;
   &lt;br /&gt;
 pkg load signal;&lt;br /&gt;
 averageInterval = 1367.2; % interval of average heart rate [ms]&lt;br /&gt;
 averageHz = 1 / (1367.2 / 1000); % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 averageBPM = averageHz * 60; % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 % disp(averageBPM) &lt;br /&gt;
 &lt;br /&gt;
 %{ &lt;br /&gt;
 1 beat        1 beat&lt;br /&gt;
 -----       = ------&lt;br /&gt;
 1367.2 ms     1.3672 s&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 x = csvread(&amp;quot;N406K_forMark.csv&amp;quot;,1,0); % original file, a csv &lt;br /&gt;
 &lt;br /&gt;
 %{&lt;br /&gt;
 Mex2A_100uM     = transpose(x(:,2)); % Mex2A - 100 uM&lt;br /&gt;
 Mex2A_33_333uM  = transpose(x(:,3)); % Mex2A - 33.333 uM&lt;br /&gt;
 Mex2A_11_111uM  = transpose(x(:,4)); % Mex2A - 11.111 uM&lt;br /&gt;
 Mex2A_3_703uM   = transpose(x(:,5)); % Mex2A - 3.703 uM&lt;br /&gt;
 Mex2A_1_2345uM  = transpose(x(:,6)); % Mex2A - 1.2345 uM&lt;br /&gt;
 Mex2A_0_4115uM  = transpose(x(:,7)); % Mex2A - 0.4115 uM&lt;br /&gt;
 Mex2A_0_1271uM  = transpose(x(:,8)); % Mex2A - 0.1271 uM&lt;br /&gt;
 Mex2A_0uM       = transpose(x(:,9)); % Mex2A - 0 uM&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 t = transpose(x(:,1)); % time array [ms]&lt;br /&gt;
 Mex2A = [100, 33.333, 11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]; &lt;br /&gt;
 &lt;br /&gt;
 n = 3; &lt;br /&gt;
 &lt;br /&gt;
 % find the peaks in the graph&lt;br /&gt;
 this_row = transpose(x(:,n + 1));&lt;br /&gt;
 [pks idx] = findpeaks(this_row, &amp;quot;MinPeakHeight&amp;quot;,0.015, &amp;quot;MinPeakDistance&amp;quot;, 5); &lt;br /&gt;
 &lt;br /&gt;
 % convert those peak values from findpeaks into coordinates&lt;br /&gt;
 peakX = t(idx);&lt;br /&gt;
 peakY = this_row(idx);&lt;br /&gt;
 disp(peakX);  &lt;br /&gt;
  &lt;br /&gt;
 f = figure;&lt;br /&gt;
 plot(t, this_row, peakX, peakY, 'x');&lt;br /&gt;
 axis([min(t), max(t), 0, 0.03]);&lt;br /&gt;
 title([&amp;quot;Intensity of Mex2A=&amp;quot;, num2str(Mex2A(n)), &amp;quot;uM&amp;quot;]);&lt;br /&gt;
 xlabel(&amp;quot;Time, t [ms]&amp;quot;);&lt;br /&gt;
 ylabel(&amp;quot;Intensity&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
 % calculate peak intervals&lt;br /&gt;
 for i = 2:length(peakX)&lt;br /&gt;
     pkToPkInterval(i - 1) = peakX(i) - peakX(i-1); % time between intervals [ms]&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 pkToPkHz = 1./(pkToPkInterval / 1000);  % interval frequency [Hz]&lt;br /&gt;
 pkToPkBPM = pkToPkHz * 60; % interval frequency [BPM]&lt;br /&gt;
 disp(pkToPkBPM); &lt;br /&gt;
 &lt;br /&gt;
 pkToPkRatio = pkToPkBPM / averageBPM&lt;br /&gt;
&lt;br /&gt;
== Playing the data ==&lt;br /&gt;
&lt;br /&gt;
I could export the data from GNU Octave into Sonic Pi by first pasting it into a simple text editor to format it nicely. Once I made a quick 120 BPM single-measure beat, I could import it into Sonic Pi and change its playback rate in time with the arrays that I generated from GNU Octave. While Sonic Pi is great for live-coding music, I personally think it's missing a couple of key programming elements. Two examples of this that are present is this code is &amp;quot;for&amp;quot; loops with changing variables and not being able to determine the length of an array. I found simple workarounds for both of these, though. &lt;br /&gt;
&lt;br /&gt;
 # Data Sonification with heartbeats&lt;br /&gt;
 # Victor Mercola - MU 3620&lt;br /&gt;
 # Prof. Manzo, 2019-12-09&lt;br /&gt;
 &lt;br /&gt;
 doses = [11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]&lt;br /&gt;
 avgBPM = 43.885&lt;br /&gt;
 &lt;br /&gt;
 dose = 0&lt;br /&gt;
 6.times do&lt;br /&gt;
   if(dose == 0)&lt;br /&gt;
     # 11.111 uM dose&lt;br /&gt;
     intervals = [1.00371, 1.00371, 1.00371, 1.00371, 0.98189, 1.00371]&lt;br /&gt;
     n = 6&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 1)&lt;br /&gt;
     # 3.703 uM dose&lt;br /&gt;
     intervals = [1.1292, 1.0037, 0.98189, 2.5093, 1.0504, 0.98189, 2.5093, 1.0754, 2.3772]&lt;br /&gt;
     n = 9&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 2)&lt;br /&gt;
     # 1.2345 uM dose&lt;br /&gt;
     intervals = [2.5093, 3.7639, 3.7639, 1.1581, 2.5093, 3.7639, 3.7639, 1.1292, 2.6569, 3.7639, 3.7639, 1.1292, 2.5093, 1.0504]&lt;br /&gt;
     n = 14&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 3)&lt;br /&gt;
     # 0.4115 uM dose&lt;br /&gt;
     intervals = [2.8229, 0.961, 2.8229, 0.94098, 2.8229, 4.1061, 3.7639, 0.961, 3.0111, 0.94098, 2.8229]&lt;br /&gt;
     n = 11&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 4)&lt;br /&gt;
     # 0.1271 uM dose&lt;br /&gt;
     intervals = [4.1061, 4.5167, 1.1016, 0.94098, 2.6569, 4.1061, 5.0185, 4.5167, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.1061, 4.1061, 4.5167, 1.1292]&lt;br /&gt;
     n = 21&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 5)&lt;br /&gt;
     # 0 uM dose&lt;br /&gt;
     intervals = [5.0185, 4.5167, 5.0185, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 1.1886, 1.0037, 2.6569, 4.5167, 5.0185, 5.0185, 5.6459, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 4.5167, 5.0185, 5.0185, 4.5167]&lt;br /&gt;
     n = 26&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   # Here's where the actual music happens&lt;br /&gt;
   &lt;br /&gt;
   i = 0&lt;br /&gt;
   n.times do&lt;br /&gt;
     puts(doses[dose],&amp;quot;uM&amp;quot;)&lt;br /&gt;
     puts(intervals[i])&lt;br /&gt;
     puts(&amp;quot;Heart BPM:&amp;quot;,avgBPM*intervals[i])&lt;br /&gt;
     puts(&amp;quot;Music BPM:&amp;quot;,120*intervals[i])&lt;br /&gt;
     sample &amp;quot;D:/OneDrive/Documents/GNU Octave/quick drum loop v2.wav&amp;quot;, rate:intervals[i]&lt;br /&gt;
     wait 2 * (1 / intervals[i])&lt;br /&gt;
     i = i + 1&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   dose = dose + 1&lt;br /&gt;
   wait 1&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
== End Result ==&lt;br /&gt;
&lt;br /&gt;
The first result of the project only had a simple drum pattern as a base loop and was used as a proof-of-proof-of-concept. I sent the results to my father and his staff and he said that they really liked it. After talking with him about it, I added a simple bass to the bass loop, which made it sound slightly better.&lt;br /&gt;
&lt;br /&gt;
This video below shows the data sonification from the 11.111uM dose to the control 0uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-11-to-0.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
This video below shows the data sonification from the control 0uM dose to the 11.111uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-0-to-11.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Would nightcore, speedcore, and/or extratone music with arrhythmic heart patterns actually sound like a good music genre? Probably not, but I think it's a pretty effective tool for comparing the control and expected-dosage results of Mex2A.&lt;br /&gt;
== Further Reading / Viewing ==&lt;br /&gt;
* [https://www.gnu.org/software/octave/ GNU Octave] - the open-source scientific programming language I used to analyze the data for this project.&lt;br /&gt;
* [https://sonic-pi.net/ Sonic Pi Homepage] - the open-source live-coding synth I used to make the music for this project.&lt;br /&gt;
&lt;br /&gt;
== Post-Mortem ==&lt;br /&gt;
This part will be updated once I finish continuing this project over break. If my father's paper on this is published, I'll definitely leave a link here. Stay tuned!&lt;/div&gt;</summary>
		<author><name>Vsmercola</name></author>
		
	</entry>
	<entry>
		<id>https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247026</id>
		<title>Arrhythmia Data Sonification</title>
		<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247026"/>
		<updated>2019-12-14T00:44:42Z</updated>

		<summary type="html">&lt;p&gt;Vsmercola: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By Victor Mercola&lt;br /&gt;
&lt;br /&gt;
My father, Mark Mercola, is a professor of medicine at Stanford University and the head of the Mercola Lab (as of writing this project). While talking with him about the classes I take at WPI, he mentioned how it would be interesting to use data sonification to educate and/or demonstrate the effectiveness of a new drug that he is working on. I agreed with his proposal and used the data he gave me for my final project in MU3620, Arrhythmia Data Sonification. Using GNU Octave, Ableton Live, and Sonic Pi, I was able to make &amp;quot;music&amp;quot; that would change according to an arrhythmic heartbeat.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Before working with music, there is some important preliminary background information to go over.&lt;br /&gt;
&lt;br /&gt;
The standard heartbeat seen on electrocardiograms (ECG / EKG) and other heart monitors is comprised of five different sections, named the &amp;quot;P Wave&amp;quot;, the &amp;quot;QRS Complex&amp;quot;, and the &amp;quot;T Wave&amp;quot;. The specific disease my father is working on is Long QT syndrome - as its name suggests, Long QT syndrome is a fatal, congenital cardiac rhythm disorder that where the length of the QT interval is longer than usual, causing arrhythmia patterns. My father is specifically working on Long QT type 3 (a.k.a. Long QT3 syndrome), which is caused by a problem regulating sodium ions in heart cells. He is currently working on a new drug to treat disease, currently named &amp;quot;Mex2A&amp;quot; and nicknamed &amp;quot;Super Mex&amp;quot; by his staff.&lt;br /&gt;
&lt;br /&gt;
== Analyzing &amp;amp; processing the data ==&lt;br /&gt;
&lt;br /&gt;
[[File:Mex2A graph.PNG|800px|center|Series of graphs of the results, from 100uM to 0uM left to right.]]&lt;br /&gt;
&lt;br /&gt;
My father sent me a large spreadsheet that, when graphed, produced the results of the graphs above. These show the results of human heart cells with Long QT3 syndrome given different dose amounts of Mex2A, in micromolar. The graphs' X-axes show the measured time in milliseconds, with measured intervals spaced roughly 30 ms apart. The graphs' Y-axes show the measured intensity - when the heart cells beat, the intensity goes up. One can tell from the graphs that the 100uM dose and 33.333uM dose results do not show any peaks, but the 11.111uM dose shows strikingly regular peaks denoting a heartbeat. When I saw this data, I thought would be neat to make &amp;quot;music&amp;quot; where each peak represented a music measure's bar line, and the tempo of the song would increase or decrease depending on how fast or slow the heart cells beat, respectively. &lt;br /&gt;
&lt;br /&gt;
To turn the heartbeat data into music intervals, I first opened the file in GNU Octave (open-source MATLAB alternative). I first wanted to find the average interval of the 11uM dose beats, because I wanted the average interval's corresponding BPM to be scaled to 120 BPM. After recording the timestamps of all of the important peaks, I made a new array of intervals of unit milliseconds. With those intervals, I could convert the intervals' inverse, in Hz (1 cycle per second). I then converted the intervals' Hz to BPM (beats per minute) by multiplying by 60.  &lt;br /&gt;
&lt;br /&gt;
I figured out that the heart cells when given the 11uM dose could beat at about 43.885 BPM normally. In music terms, that tempo is the faster end of &amp;quot;grave&amp;quot;. I could normalize the interval BPM's by dividing each value by the average. From here, it was rinse and repeat for the other graphs - The interval data for 3.703uM, 1.2345uM, 0.4115uM, 0.1271uM, and 0uM were all normalized with the same 43.885 BPM value.&lt;br /&gt;
&lt;br /&gt;
 %{&lt;br /&gt;
 Octave code for generating music from heartbeats&lt;br /&gt;
 Victor Mercola&lt;br /&gt;
 MU 3620&lt;br /&gt;
 2019-12-09&lt;br /&gt;
 under Prof. Manzo&lt;br /&gt;
 %}&lt;br /&gt;
   &lt;br /&gt;
 pkg load signal;&lt;br /&gt;
 averageInterval = 1367.2; % interval of average heart rate [ms]&lt;br /&gt;
 averageHz = 1 / (1367.2 / 1000); % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 averageBPM = averageHz * 60; % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 % disp(averageBPM) &lt;br /&gt;
 &lt;br /&gt;
 %{ &lt;br /&gt;
 1 beat        1 beat&lt;br /&gt;
 -----       = ------&lt;br /&gt;
 1367.2 ms     1.3672 s&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 x = csvread(&amp;quot;N406K_forMark.csv&amp;quot;,1,0); % original file, a csv &lt;br /&gt;
 &lt;br /&gt;
 %{&lt;br /&gt;
 Mex2A_100uM     = transpose(x(:,2)); % Mex2A - 100 uM&lt;br /&gt;
 Mex2A_33_333uM  = transpose(x(:,3)); % Mex2A - 33.333 uM&lt;br /&gt;
 Mex2A_11_111uM  = transpose(x(:,4)); % Mex2A - 11.111 uM&lt;br /&gt;
 Mex2A_3_703uM   = transpose(x(:,5)); % Mex2A - 3.703 uM&lt;br /&gt;
 Mex2A_1_2345uM  = transpose(x(:,6)); % Mex2A - 1.2345 uM&lt;br /&gt;
 Mex2A_0_4115uM  = transpose(x(:,7)); % Mex2A - 0.4115 uM&lt;br /&gt;
 Mex2A_0_1271uM  = transpose(x(:,8)); % Mex2A - 0.1271 uM&lt;br /&gt;
 Mex2A_0uM       = transpose(x(:,9)); % Mex2A - 0 uM&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 t = transpose(x(:,1)); % time array [ms]&lt;br /&gt;
 Mex2A = [100, 33.333, 11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]; &lt;br /&gt;
 &lt;br /&gt;
 n = 3; &lt;br /&gt;
 &lt;br /&gt;
 % find the peaks in the graph&lt;br /&gt;
 this_row = transpose(x(:,n + 1));&lt;br /&gt;
 [pks idx] = findpeaks(this_row, &amp;quot;MinPeakHeight&amp;quot;,0.015, &amp;quot;MinPeakDistance&amp;quot;, 5); &lt;br /&gt;
 &lt;br /&gt;
 % convert those peak values from findpeaks into coordinates&lt;br /&gt;
 peakX = t(idx);&lt;br /&gt;
 peakY = this_row(idx);&lt;br /&gt;
 disp(peakX);  &lt;br /&gt;
  &lt;br /&gt;
 f = figure;&lt;br /&gt;
 plot(t, this_row, peakX, peakY, 'x');&lt;br /&gt;
 axis([min(t), max(t), 0, 0.03]);&lt;br /&gt;
 title([&amp;quot;Intensity of Mex2A=&amp;quot;, num2str(Mex2A(n)), &amp;quot;uM&amp;quot;]);&lt;br /&gt;
 xlabel(&amp;quot;Time, t [ms]&amp;quot;);&lt;br /&gt;
 ylabel(&amp;quot;Intensity&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
 % calculate peak intervals&lt;br /&gt;
 for i = 2:length(peakX)&lt;br /&gt;
     pkToPkInterval(i - 1) = peakX(i) - peakX(i-1); % time between intervals [ms]&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 pkToPkHz = 1./(pkToPkInterval / 1000);  % interval frequency [Hz]&lt;br /&gt;
 pkToPkBPM = pkToPkHz * 60; % interval frequency [BPM]&lt;br /&gt;
 disp(pkToPkBPM); &lt;br /&gt;
 &lt;br /&gt;
 pkToPkRatio = pkToPkBPM / averageBPM&lt;br /&gt;
&lt;br /&gt;
== Playing the data ==&lt;br /&gt;
&lt;br /&gt;
I could export the data from GNU Octave into Sonic Pi by first pasting it into a simple text editor to format it nicely. Once I made a quick 120 BPM single-measure beat, I could import it into Sonic Pi and change its playback rate in time with the arrays that I generated from GNU Octave. While Sonic Pi is great for live-coding music, I personally think it's missing a couple of key programming elements. Two examples of this that are present is this code is &amp;quot;for&amp;quot; loops with changing variables and not being able to determine the length of an array. I found simple workarounds for both of these, though. &lt;br /&gt;
&lt;br /&gt;
 # Data Sonification with heartbeats&lt;br /&gt;
 # Victor Mercola - MU 3620&lt;br /&gt;
 # Prof. Manzo, 2019-12-09&lt;br /&gt;
 &lt;br /&gt;
 doses = [11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]&lt;br /&gt;
 avgBPM = 43.885&lt;br /&gt;
 &lt;br /&gt;
 dose = 0&lt;br /&gt;
 6.times do&lt;br /&gt;
   if(dose == 0)&lt;br /&gt;
     # 11.111 uM dose&lt;br /&gt;
     intervals = [1.00371, 1.00371, 1.00371, 1.00371, 0.98189, 1.00371]&lt;br /&gt;
     n = 6&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 1)&lt;br /&gt;
     # 3.703 uM dose&lt;br /&gt;
     intervals = [1.1292, 1.0037, 0.98189, 2.5093, 1.0504, 0.98189, 2.5093, 1.0754, 2.3772]&lt;br /&gt;
     n = 9&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 2)&lt;br /&gt;
     # 1.2345 uM dose&lt;br /&gt;
     intervals = [2.5093, 3.7639, 3.7639, 1.1581, 2.5093, 3.7639, 3.7639, 1.1292, 2.6569, 3.7639, 3.7639, 1.1292, 2.5093, 1.0504]&lt;br /&gt;
     n = 14&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 3)&lt;br /&gt;
     # 0.4115 uM dose&lt;br /&gt;
     intervals = [2.8229, 0.961, 2.8229, 0.94098, 2.8229, 4.1061, 3.7639, 0.961, 3.0111, 0.94098, 2.8229]&lt;br /&gt;
     n = 11&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 4)&lt;br /&gt;
     # 0.1271 uM dose&lt;br /&gt;
     intervals = [4.1061, 4.5167, 1.1016, 0.94098, 2.6569, 4.1061, 5.0185, 4.5167, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.1061, 4.1061, 4.5167, 1.1292]&lt;br /&gt;
     n = 21&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 5)&lt;br /&gt;
     # 0 uM dose&lt;br /&gt;
     intervals = [5.0185, 4.5167, 5.0185, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 1.1886, 1.0037, 2.6569, 4.5167, 5.0185, 5.0185, 5.6459, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 4.5167, 5.0185, 5.0185, 4.5167]&lt;br /&gt;
     n = 26&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   # Here's where the actual music happens&lt;br /&gt;
   &lt;br /&gt;
   i = 0&lt;br /&gt;
   n.times do&lt;br /&gt;
     puts(doses[dose],&amp;quot;uM&amp;quot;)&lt;br /&gt;
     puts(intervals[i])&lt;br /&gt;
     puts(&amp;quot;Heart BPM:&amp;quot;,avgBPM*intervals[i])&lt;br /&gt;
     puts(&amp;quot;Music BPM:&amp;quot;,120*intervals[i])&lt;br /&gt;
     sample &amp;quot;D:/OneDrive/Documents/GNU Octave/quick drum loop v2.wav&amp;quot;, rate:intervals[i]&lt;br /&gt;
     wait 2 * (1 / intervals[i])&lt;br /&gt;
     i = i + 1&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   dose = dose + 1&lt;br /&gt;
   wait 1&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
== End Result ==&lt;br /&gt;
&lt;br /&gt;
The first result of the project only had a simple drum pattern as a base loop and was used as a proof-of-proof-of-concept. I sent the results to my father and his staff and he said that they really liked it. After talking with him about it, I added a simple bass to the bass loop, which made it sound slightly better.&lt;br /&gt;
&lt;br /&gt;
This video below shows the data sonification from the 11.111uM dose to the control 0uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-11-to-0.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
This video below shows the data sonification from the control 0uM dose to the 11.111uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-0-to-11.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Would nightcore, speedcore, and/or extratone music with arrhythmic heart patterns actually sound like a good music genre? Probably not, but I think it's a pretty effective tool for comparing the control and expected-dosage results of Mex2A.&lt;br /&gt;
== Further Reading / Viewing ==&lt;br /&gt;
+ [https://www.gnu.org/software/octave/ GNU Octave] - the open-source scientific programming language I used to analyze the data for this project.&lt;br /&gt;
+ [https://sonic-pi.net/ Sonic Pi Homepage] - the open-source live-coding synth I used to make the music for this project.&lt;br /&gt;
== Post-Mortem ==&lt;br /&gt;
This part will be updated once I finish continuing this project over break. If my father's paper on this is published, I'll definitely leave a link here. Stay tuned!&lt;/div&gt;</summary>
		<author><name>Vsmercola</name></author>
		
	</entry>
	<entry>
		<id>https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247025</id>
		<title>Arrhythmia Data Sonification</title>
		<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247025"/>
		<updated>2019-12-14T00:42:11Z</updated>

		<summary type="html">&lt;p&gt;Vsmercola: /* End Result */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By Victor Mercola&lt;br /&gt;
&lt;br /&gt;
My father, Mark Mercola, is a professor of medicine at Stanford University and the head of the Mercola Lab (as of writing this project). While talking with him about the classes I take at WPI, he mentioned how it would be interesting to use data sonification to educate and/or demonstrate the effectiveness of a new drug that he is working on. I agreed with his proposal and used the data he gave me for my final project in MU3620, Arrhythmia Data Sonification. Using GNU Octave, Ableton Live, and Sonic Pi, I was able to make &amp;quot;music&amp;quot; that would change according to an arrhythmic heartbeat.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Before working with music, there is some important preliminary background information to go over.&lt;br /&gt;
&lt;br /&gt;
The standard heartbeat seen on electrocardiograms (ECG / EKG) and other heart monitors is comprised of five different sections, named the &amp;quot;P Wave&amp;quot;, the &amp;quot;QRS Complex&amp;quot;, and the &amp;quot;T Wave&amp;quot;. The specific disease my father is working on is Long QT syndrome - as its name suggests, Long QT syndrome is a fatal, congenital cardiac rhythm disorder that where the length of the QT interval is longer than usual, causing arrhythmia patterns. My father is specifically working on Long QT type 3 (a.k.a. Long QT3 syndrome), which is caused by a problem regulating sodium ions in heart cells. He is currently working on a new drug to treat disease, currently named &amp;quot;Mex2A&amp;quot; and nicknamed &amp;quot;Super Mex&amp;quot; by his staff.&lt;br /&gt;
&lt;br /&gt;
== Analyzing &amp;amp; processing the data ==&lt;br /&gt;
&lt;br /&gt;
[[File:Mex2A graph.PNG|800px|center|Series of graphs of the results, from 100uM to 0uM left to right.]]&lt;br /&gt;
&lt;br /&gt;
My father sent me a large spreadsheet that, when graphed, produced the results of the graphs above. These show the results of human heart cells with Long QT3 syndrome given different dose amounts of Mex2A, in micromolar. The graphs' X-axes show the measured time in milliseconds, with measured intervals spaced roughly 30 ms apart. The graphs' Y-axes show the measured intensity - when the heart cells beat, the intensity goes up. One can tell from the graphs that the 100uM dose and 33.333uM dose results do not show any peaks, but the 11.111uM dose shows strikingly regular peaks denoting a heartbeat. When I saw this data, I thought would be neat to make &amp;quot;music&amp;quot; where each peak represented a music measure's bar line, and the tempo of the song would increase or decrease depending on how fast or slow the heart cells beat, respectively. &lt;br /&gt;
&lt;br /&gt;
To turn the heartbeat data into music intervals, I first opened the file in GNU Octave (open-source MATLAB alternative). I first wanted to find the average interval of the 11uM dose beats, because I wanted the average interval's corresponding BPM to be scaled to 120 BPM. After recording the timestamps of all of the important peaks, I made a new array of intervals of unit milliseconds. With those intervals, I could convert the intervals' inverse, in Hz (1 cycle per second). I then converted the intervals' Hz to BPM (beats per minute) by multiplying by 60.  &lt;br /&gt;
&lt;br /&gt;
I figured out that the heart cells when given the 11uM dose could beat at about 43.885 BPM normally. In music terms, that tempo is the faster end of &amp;quot;grave&amp;quot;. I could normalize the interval BPM's by dividing each value by the average. From here, it was rinse and repeat for the other graphs - The interval data for 3.703uM, 1.2345uM, 0.4115uM, 0.1271uM, and 0uM were all normalized with the same 43.885 BPM value.&lt;br /&gt;
&lt;br /&gt;
 %{&lt;br /&gt;
 Octave code for generating music from heartbeats&lt;br /&gt;
 Victor Mercola&lt;br /&gt;
 MU 3620&lt;br /&gt;
 2019-12-09&lt;br /&gt;
 under Prof. Manzo&lt;br /&gt;
 %}&lt;br /&gt;
   &lt;br /&gt;
 pkg load signal;&lt;br /&gt;
 averageInterval = 1367.2; % interval of average heart rate [ms]&lt;br /&gt;
 averageHz = 1 / (1367.2 / 1000); % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 averageBPM = averageHz * 60; % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 % disp(averageBPM) &lt;br /&gt;
 &lt;br /&gt;
 %{ &lt;br /&gt;
 1 beat        1 beat&lt;br /&gt;
 -----       = ------&lt;br /&gt;
 1367.2 ms     1.3672 s&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 x = csvread(&amp;quot;N406K_forMark.csv&amp;quot;,1,0); % original file, a csv &lt;br /&gt;
 &lt;br /&gt;
 %{&lt;br /&gt;
 Mex2A_100uM     = transpose(x(:,2)); % Mex2A - 100 uM&lt;br /&gt;
 Mex2A_33_333uM  = transpose(x(:,3)); % Mex2A - 33.333 uM&lt;br /&gt;
 Mex2A_11_111uM  = transpose(x(:,4)); % Mex2A - 11.111 uM&lt;br /&gt;
 Mex2A_3_703uM   = transpose(x(:,5)); % Mex2A - 3.703 uM&lt;br /&gt;
 Mex2A_1_2345uM  = transpose(x(:,6)); % Mex2A - 1.2345 uM&lt;br /&gt;
 Mex2A_0_4115uM  = transpose(x(:,7)); % Mex2A - 0.4115 uM&lt;br /&gt;
 Mex2A_0_1271uM  = transpose(x(:,8)); % Mex2A - 0.1271 uM&lt;br /&gt;
 Mex2A_0uM       = transpose(x(:,9)); % Mex2A - 0 uM&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 t = transpose(x(:,1)); % time array [ms]&lt;br /&gt;
 Mex2A = [100, 33.333, 11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]; &lt;br /&gt;
 &lt;br /&gt;
 n = 3; &lt;br /&gt;
 &lt;br /&gt;
 % find the peaks in the graph&lt;br /&gt;
 this_row = transpose(x(:,n + 1));&lt;br /&gt;
 [pks idx] = findpeaks(this_row, &amp;quot;MinPeakHeight&amp;quot;,0.015, &amp;quot;MinPeakDistance&amp;quot;, 5); &lt;br /&gt;
 &lt;br /&gt;
 % convert those peak values from findpeaks into coordinates&lt;br /&gt;
 peakX = t(idx);&lt;br /&gt;
 peakY = this_row(idx);&lt;br /&gt;
 disp(peakX);  &lt;br /&gt;
  &lt;br /&gt;
 f = figure;&lt;br /&gt;
 plot(t, this_row, peakX, peakY, 'x');&lt;br /&gt;
 axis([min(t), max(t), 0, 0.03]);&lt;br /&gt;
 title([&amp;quot;Intensity of Mex2A=&amp;quot;, num2str(Mex2A(n)), &amp;quot;uM&amp;quot;]);&lt;br /&gt;
 xlabel(&amp;quot;Time, t [ms]&amp;quot;);&lt;br /&gt;
 ylabel(&amp;quot;Intensity&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
 % calculate peak intervals&lt;br /&gt;
 for i = 2:length(peakX)&lt;br /&gt;
     pkToPkInterval(i - 1) = peakX(i) - peakX(i-1); % time between intervals [ms]&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 pkToPkHz = 1./(pkToPkInterval / 1000);  % interval frequency [Hz]&lt;br /&gt;
 pkToPkBPM = pkToPkHz * 60; % interval frequency [BPM]&lt;br /&gt;
 disp(pkToPkBPM); &lt;br /&gt;
 &lt;br /&gt;
 pkToPkRatio = pkToPkBPM / averageBPM&lt;br /&gt;
&lt;br /&gt;
== Playing the data ==&lt;br /&gt;
&lt;br /&gt;
I could export the data from GNU Octave into Sonic Pi by first pasting it into a simple text editor to format it nicely. Once I made a quick 120 BPM single-measure beat, I could import it into Sonic Pi and change its playback rate in time with the arrays that I generated from GNU Octave. While Sonic Pi is great for live-coding music, I personally think it's missing a couple of key programming elements. Two examples of this that are present is this code is &amp;quot;for&amp;quot; loops with changing variables and not being able to determine the length of an array. I found simple workarounds for both of these, though. &lt;br /&gt;
&lt;br /&gt;
 # Data Sonification with heartbeats&lt;br /&gt;
 # Victor Mercola - MU 3620&lt;br /&gt;
 # Prof. Manzo, 2019-12-09&lt;br /&gt;
 &lt;br /&gt;
 doses = [11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]&lt;br /&gt;
 avgBPM = 43.885&lt;br /&gt;
 &lt;br /&gt;
 dose = 0&lt;br /&gt;
 6.times do&lt;br /&gt;
   if(dose == 0)&lt;br /&gt;
     # 11.111 uM dose&lt;br /&gt;
     intervals = [1.00371, 1.00371, 1.00371, 1.00371, 0.98189, 1.00371]&lt;br /&gt;
     n = 6&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 1)&lt;br /&gt;
     # 3.703 uM dose&lt;br /&gt;
     intervals = [1.1292, 1.0037, 0.98189, 2.5093, 1.0504, 0.98189, 2.5093, 1.0754, 2.3772]&lt;br /&gt;
     n = 9&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 2)&lt;br /&gt;
     # 1.2345 uM dose&lt;br /&gt;
     intervals = [2.5093, 3.7639, 3.7639, 1.1581, 2.5093, 3.7639, 3.7639, 1.1292, 2.6569, 3.7639, 3.7639, 1.1292, 2.5093, 1.0504]&lt;br /&gt;
     n = 14&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 3)&lt;br /&gt;
     # 0.4115 uM dose&lt;br /&gt;
     intervals = [2.8229, 0.961, 2.8229, 0.94098, 2.8229, 4.1061, 3.7639, 0.961, 3.0111, 0.94098, 2.8229]&lt;br /&gt;
     n = 11&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 4)&lt;br /&gt;
     # 0.1271 uM dose&lt;br /&gt;
     intervals = [4.1061, 4.5167, 1.1016, 0.94098, 2.6569, 4.1061, 5.0185, 4.5167, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.1061, 4.1061, 4.5167, 1.1292]&lt;br /&gt;
     n = 21&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 5)&lt;br /&gt;
     # 0 uM dose&lt;br /&gt;
     intervals = [5.0185, 4.5167, 5.0185, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 1.1886, 1.0037, 2.6569, 4.5167, 5.0185, 5.0185, 5.6459, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 4.5167, 5.0185, 5.0185, 4.5167]&lt;br /&gt;
     n = 26&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   # Here's where the actual music happens&lt;br /&gt;
   &lt;br /&gt;
   i = 0&lt;br /&gt;
   n.times do&lt;br /&gt;
     puts(doses[dose],&amp;quot;uM&amp;quot;)&lt;br /&gt;
     puts(intervals[i])&lt;br /&gt;
     puts(&amp;quot;Heart BPM:&amp;quot;,avgBPM*intervals[i])&lt;br /&gt;
     puts(&amp;quot;Music BPM:&amp;quot;,120*intervals[i])&lt;br /&gt;
     sample &amp;quot;D:/OneDrive/Documents/GNU Octave/quick drum loop v2.wav&amp;quot;, rate:intervals[i]&lt;br /&gt;
     wait 2 * (1 / intervals[i])&lt;br /&gt;
     i = i + 1&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   dose = dose + 1&lt;br /&gt;
   wait 1&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
== End Result ==&lt;br /&gt;
&lt;br /&gt;
The first result of the project only had a simple drum pattern as a base loop and was used as a proof-of-proof-of-concept. I sent the results to my father and his staff and he said that they really liked it. After talking with him about it, I added a simple bass to the bass loop, which made it sound slightly better.&lt;br /&gt;
&lt;br /&gt;
This video below shows the data sonification from the 11.111uM dose to the control 0uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-11-to-0.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
This video below shows the data sonification from the control 0uM dose to the 11.111uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-0-to-11.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Would nightcore, speedcore, and/or extratone music with arrhythmic heart patterns actually sound like a good music genre? Probably not, but I think it's a pretty effective tool for comparing the control and expected-dosage results of Mex2A.&lt;br /&gt;
&lt;br /&gt;
== Post-Mortem ==&lt;br /&gt;
This part will be updated once I finish continuing this project over break. If my father's paper on this is published, I'll definitely leave a link here. Stay tuned!&lt;/div&gt;</summary>
		<author><name>Vsmercola</name></author>
		
	</entry>
	<entry>
		<id>https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247024</id>
		<title>Arrhythmia Data Sonification</title>
		<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247024"/>
		<updated>2019-12-14T00:41:50Z</updated>

		<summary type="html">&lt;p&gt;Vsmercola: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By Victor Mercola&lt;br /&gt;
&lt;br /&gt;
My father, Mark Mercola, is a professor of medicine at Stanford University and the head of the Mercola Lab (as of writing this project). While talking with him about the classes I take at WPI, he mentioned how it would be interesting to use data sonification to educate and/or demonstrate the effectiveness of a new drug that he is working on. I agreed with his proposal and used the data he gave me for my final project in MU3620, Arrhythmia Data Sonification. Using GNU Octave, Ableton Live, and Sonic Pi, I was able to make &amp;quot;music&amp;quot; that would change according to an arrhythmic heartbeat.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Before working with music, there is some important preliminary background information to go over.&lt;br /&gt;
&lt;br /&gt;
The standard heartbeat seen on electrocardiograms (ECG / EKG) and other heart monitors is comprised of five different sections, named the &amp;quot;P Wave&amp;quot;, the &amp;quot;QRS Complex&amp;quot;, and the &amp;quot;T Wave&amp;quot;. The specific disease my father is working on is Long QT syndrome - as its name suggests, Long QT syndrome is a fatal, congenital cardiac rhythm disorder that where the length of the QT interval is longer than usual, causing arrhythmia patterns. My father is specifically working on Long QT type 3 (a.k.a. Long QT3 syndrome), which is caused by a problem regulating sodium ions in heart cells. He is currently working on a new drug to treat disease, currently named &amp;quot;Mex2A&amp;quot; and nicknamed &amp;quot;Super Mex&amp;quot; by his staff.&lt;br /&gt;
&lt;br /&gt;
== Analyzing &amp;amp; processing the data ==&lt;br /&gt;
&lt;br /&gt;
[[File:Mex2A graph.PNG|800px|center|Series of graphs of the results, from 100uM to 0uM left to right.]]&lt;br /&gt;
&lt;br /&gt;
My father sent me a large spreadsheet that, when graphed, produced the results of the graphs above. These show the results of human heart cells with Long QT3 syndrome given different dose amounts of Mex2A, in micromolar. The graphs' X-axes show the measured time in milliseconds, with measured intervals spaced roughly 30 ms apart. The graphs' Y-axes show the measured intensity - when the heart cells beat, the intensity goes up. One can tell from the graphs that the 100uM dose and 33.333uM dose results do not show any peaks, but the 11.111uM dose shows strikingly regular peaks denoting a heartbeat. When I saw this data, I thought would be neat to make &amp;quot;music&amp;quot; where each peak represented a music measure's bar line, and the tempo of the song would increase or decrease depending on how fast or slow the heart cells beat, respectively. &lt;br /&gt;
&lt;br /&gt;
To turn the heartbeat data into music intervals, I first opened the file in GNU Octave (open-source MATLAB alternative). I first wanted to find the average interval of the 11uM dose beats, because I wanted the average interval's corresponding BPM to be scaled to 120 BPM. After recording the timestamps of all of the important peaks, I made a new array of intervals of unit milliseconds. With those intervals, I could convert the intervals' inverse, in Hz (1 cycle per second). I then converted the intervals' Hz to BPM (beats per minute) by multiplying by 60.  &lt;br /&gt;
&lt;br /&gt;
I figured out that the heart cells when given the 11uM dose could beat at about 43.885 BPM normally. In music terms, that tempo is the faster end of &amp;quot;grave&amp;quot;. I could normalize the interval BPM's by dividing each value by the average. From here, it was rinse and repeat for the other graphs - The interval data for 3.703uM, 1.2345uM, 0.4115uM, 0.1271uM, and 0uM were all normalized with the same 43.885 BPM value.&lt;br /&gt;
&lt;br /&gt;
 %{&lt;br /&gt;
 Octave code for generating music from heartbeats&lt;br /&gt;
 Victor Mercola&lt;br /&gt;
 MU 3620&lt;br /&gt;
 2019-12-09&lt;br /&gt;
 under Prof. Manzo&lt;br /&gt;
 %}&lt;br /&gt;
   &lt;br /&gt;
 pkg load signal;&lt;br /&gt;
 averageInterval = 1367.2; % interval of average heart rate [ms]&lt;br /&gt;
 averageHz = 1 / (1367.2 / 1000); % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 averageBPM = averageHz * 60; % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 % disp(averageBPM) &lt;br /&gt;
 &lt;br /&gt;
 %{ &lt;br /&gt;
 1 beat        1 beat&lt;br /&gt;
 -----       = ------&lt;br /&gt;
 1367.2 ms     1.3672 s&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 x = csvread(&amp;quot;N406K_forMark.csv&amp;quot;,1,0); % original file, a csv &lt;br /&gt;
 &lt;br /&gt;
 %{&lt;br /&gt;
 Mex2A_100uM     = transpose(x(:,2)); % Mex2A - 100 uM&lt;br /&gt;
 Mex2A_33_333uM  = transpose(x(:,3)); % Mex2A - 33.333 uM&lt;br /&gt;
 Mex2A_11_111uM  = transpose(x(:,4)); % Mex2A - 11.111 uM&lt;br /&gt;
 Mex2A_3_703uM   = transpose(x(:,5)); % Mex2A - 3.703 uM&lt;br /&gt;
 Mex2A_1_2345uM  = transpose(x(:,6)); % Mex2A - 1.2345 uM&lt;br /&gt;
 Mex2A_0_4115uM  = transpose(x(:,7)); % Mex2A - 0.4115 uM&lt;br /&gt;
 Mex2A_0_1271uM  = transpose(x(:,8)); % Mex2A - 0.1271 uM&lt;br /&gt;
 Mex2A_0uM       = transpose(x(:,9)); % Mex2A - 0 uM&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 t = transpose(x(:,1)); % time array [ms]&lt;br /&gt;
 Mex2A = [100, 33.333, 11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]; &lt;br /&gt;
 &lt;br /&gt;
 n = 3; &lt;br /&gt;
 &lt;br /&gt;
 % find the peaks in the graph&lt;br /&gt;
 this_row = transpose(x(:,n + 1));&lt;br /&gt;
 [pks idx] = findpeaks(this_row, &amp;quot;MinPeakHeight&amp;quot;,0.015, &amp;quot;MinPeakDistance&amp;quot;, 5); &lt;br /&gt;
 &lt;br /&gt;
 % convert those peak values from findpeaks into coordinates&lt;br /&gt;
 peakX = t(idx);&lt;br /&gt;
 peakY = this_row(idx);&lt;br /&gt;
 disp(peakX);  &lt;br /&gt;
  &lt;br /&gt;
 f = figure;&lt;br /&gt;
 plot(t, this_row, peakX, peakY, 'x');&lt;br /&gt;
 axis([min(t), max(t), 0, 0.03]);&lt;br /&gt;
 title([&amp;quot;Intensity of Mex2A=&amp;quot;, num2str(Mex2A(n)), &amp;quot;uM&amp;quot;]);&lt;br /&gt;
 xlabel(&amp;quot;Time, t [ms]&amp;quot;);&lt;br /&gt;
 ylabel(&amp;quot;Intensity&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
 % calculate peak intervals&lt;br /&gt;
 for i = 2:length(peakX)&lt;br /&gt;
     pkToPkInterval(i - 1) = peakX(i) - peakX(i-1); % time between intervals [ms]&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 pkToPkHz = 1./(pkToPkInterval / 1000);  % interval frequency [Hz]&lt;br /&gt;
 pkToPkBPM = pkToPkHz * 60; % interval frequency [BPM]&lt;br /&gt;
 disp(pkToPkBPM); &lt;br /&gt;
 &lt;br /&gt;
 pkToPkRatio = pkToPkBPM / averageBPM&lt;br /&gt;
&lt;br /&gt;
== Playing the data ==&lt;br /&gt;
&lt;br /&gt;
I could export the data from GNU Octave into Sonic Pi by first pasting it into a simple text editor to format it nicely. Once I made a quick 120 BPM single-measure beat, I could import it into Sonic Pi and change its playback rate in time with the arrays that I generated from GNU Octave. While Sonic Pi is great for live-coding music, I personally think it's missing a couple of key programming elements. Two examples of this that are present is this code is &amp;quot;for&amp;quot; loops with changing variables and not being able to determine the length of an array. I found simple workarounds for both of these, though. &lt;br /&gt;
&lt;br /&gt;
 # Data Sonification with heartbeats&lt;br /&gt;
 # Victor Mercola - MU 3620&lt;br /&gt;
 # Prof. Manzo, 2019-12-09&lt;br /&gt;
 &lt;br /&gt;
 doses = [11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]&lt;br /&gt;
 avgBPM = 43.885&lt;br /&gt;
 &lt;br /&gt;
 dose = 0&lt;br /&gt;
 6.times do&lt;br /&gt;
   if(dose == 0)&lt;br /&gt;
     # 11.111 uM dose&lt;br /&gt;
     intervals = [1.00371, 1.00371, 1.00371, 1.00371, 0.98189, 1.00371]&lt;br /&gt;
     n = 6&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 1)&lt;br /&gt;
     # 3.703 uM dose&lt;br /&gt;
     intervals = [1.1292, 1.0037, 0.98189, 2.5093, 1.0504, 0.98189, 2.5093, 1.0754, 2.3772]&lt;br /&gt;
     n = 9&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 2)&lt;br /&gt;
     # 1.2345 uM dose&lt;br /&gt;
     intervals = [2.5093, 3.7639, 3.7639, 1.1581, 2.5093, 3.7639, 3.7639, 1.1292, 2.6569, 3.7639, 3.7639, 1.1292, 2.5093, 1.0504]&lt;br /&gt;
     n = 14&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 3)&lt;br /&gt;
     # 0.4115 uM dose&lt;br /&gt;
     intervals = [2.8229, 0.961, 2.8229, 0.94098, 2.8229, 4.1061, 3.7639, 0.961, 3.0111, 0.94098, 2.8229]&lt;br /&gt;
     n = 11&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 4)&lt;br /&gt;
     # 0.1271 uM dose&lt;br /&gt;
     intervals = [4.1061, 4.5167, 1.1016, 0.94098, 2.6569, 4.1061, 5.0185, 4.5167, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.1061, 4.1061, 4.5167, 1.1292]&lt;br /&gt;
     n = 21&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 5)&lt;br /&gt;
     # 0 uM dose&lt;br /&gt;
     intervals = [5.0185, 4.5167, 5.0185, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 1.1886, 1.0037, 2.6569, 4.5167, 5.0185, 5.0185, 5.6459, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 4.5167, 5.0185, 5.0185, 4.5167]&lt;br /&gt;
     n = 26&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   # Here's where the actual music happens&lt;br /&gt;
   &lt;br /&gt;
   i = 0&lt;br /&gt;
   n.times do&lt;br /&gt;
     puts(doses[dose],&amp;quot;uM&amp;quot;)&lt;br /&gt;
     puts(intervals[i])&lt;br /&gt;
     puts(&amp;quot;Heart BPM:&amp;quot;,avgBPM*intervals[i])&lt;br /&gt;
     puts(&amp;quot;Music BPM:&amp;quot;,120*intervals[i])&lt;br /&gt;
     sample &amp;quot;D:/OneDrive/Documents/GNU Octave/quick drum loop v2.wav&amp;quot;, rate:intervals[i]&lt;br /&gt;
     wait 2 * (1 / intervals[i])&lt;br /&gt;
     i = i + 1&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   dose = dose + 1&lt;br /&gt;
   wait 1&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
== End Result ==&lt;br /&gt;
&lt;br /&gt;
The first result of the project only had a simple drum pattern as a base loop and was used as a proof-of-proof-of-concept. I sent the results to my father and his staff and he said that they really liked it. After talking with him about it, I added a simple bass to the bass loop, which made it sound slightly better.&lt;br /&gt;
&lt;br /&gt;
This video below shows the data sonification from 11.111uM dose to the control 0uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-11-to-0.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
This video below shows the data sonification from control 0uM dose to the 11.111uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-0-to-11.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Would nightcore, speedcore, and/or extratone music with arrhythmic heart patterns actually sound like a good music genre? Probably not, but I think it's a pretty effective tool for comparing the control and expected-dosage results of Mex2A.&lt;br /&gt;
&lt;br /&gt;
== Post-Mortem ==&lt;br /&gt;
This part will be updated once I finish continuing this project over break. If my father's paper on this is published, I'll definitely leave a link here. Stay tuned!&lt;/div&gt;</summary>
		<author><name>Vsmercola</name></author>
		
	</entry>
	<entry>
		<id>https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247023</id>
		<title>Arrhythmia Data Sonification</title>
		<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247023"/>
		<updated>2019-12-14T00:41:20Z</updated>

		<summary type="html">&lt;p&gt;Vsmercola: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By Victor Mercola&lt;br /&gt;
&lt;br /&gt;
My father, Mark Mercola, is a professor of medicine at Stanford University and the head of the Mercola Lab (as of writing this project). While talking with him about the classes I take at WPI, he mentioned how it would be interesting to use data sonification to educate and/or demonstrate the effectiveness of a new drug that he is working on. I agreed with his proposal and used the data he gave me for my final project in MU3620, Arrhythmia Data Sonification. Using GNU Octave, Ableton Live, and Sonic Pi, I was able to make &amp;quot;music&amp;quot; that would change according to an arrhythmic heartbeat.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Before working with music, there is some important preliminary background information to go over.&lt;br /&gt;
&lt;br /&gt;
The standard heartbeat seen on electrocardiograms (ECG / EKG) and other heart monitors is comprised of five different sections, named the &amp;quot;P Wave&amp;quot;, the &amp;quot;QRS Complex&amp;quot;, and the &amp;quot;T Wave&amp;quot;. The specific disease my father is working on is Long QT syndrome - as its name suggests, Long QT syndrome is a fatal, congenital cardiac rhythm disorder that where the length of the QT interval is longer than usual, causing arrhythmia patterns. My father is specifically working on Long QT type 3 (a.k.a. Long QT3 syndrome), which is caused by a problem regulating sodium ions in heart cells. He is currently working on a new drug to treat disease, currently named &amp;quot;Mex2A&amp;quot; and nicknamed &amp;quot;Super Mex&amp;quot; by his staff.&lt;br /&gt;
&lt;br /&gt;
== Analyzing &amp;amp; processing the data ==&lt;br /&gt;
&lt;br /&gt;
[[File:Mex2A graph.PNG|800px|center|Series of graphs of the results, from 100uM to 0uM left to right.]]&lt;br /&gt;
&lt;br /&gt;
My father sent me a large spreadsheet that, when graphed, produced the results of the graphs above. These show the results of human heart cells with Long QT3 syndrome given different dose amounts of Mex2A, in micromolar. The graphs' X-axes show the measured time in milliseconds, with measured intervals spaced roughly 30 ms apart. The graphs' Y-axes show the measured intensity - when the heart cells beat, the intensity goes up. One can tell from the graphs that the 100uM dose and 33.333uM dose results do not show any peaks, but the 11.111uM dose shows strikingly regular peaks denoting a heartbeat. When I saw this data, I thought would be neat to make &amp;quot;music&amp;quot; where each peak represented a music measure's bar line, and the tempo of the song would increase or decrease depending on how fast or slow the heart cells beat, respectively. &lt;br /&gt;
&lt;br /&gt;
To turn the heartbeat data into music intervals, I first opened the file in GNU Octave (open-source MATLAB alternative). I first wanted to find the average interval of the 11uM dose beats, because I wanted the average interval's corresponding BPM to be scaled to 120 BPM. After recording the timestamps of all of the important peaks, I made a new array of intervals of unit milliseconds. With those intervals, I could convert the intervals' inverse, in Hz (1 cycle per second). I then converted the intervals' Hz to BPM (beats per minute) by multiplying by 60.  &lt;br /&gt;
&lt;br /&gt;
I figured out that the heart cells when given the 11uM dose could beat at about 43.885 BPM normally. In music terms, that tempo is the faster end of &amp;quot;grave&amp;quot;. I could normalize the interval BPM's by dividing each value by the average. From here, it was rinse and repeat for the other graphs - The interval data for 3.703uM, 1.2345uM, 0.4115uM, 0.1271uM, and 0uM were all normalized with the same 43.885 BPM value.&lt;br /&gt;
&lt;br /&gt;
 %{&lt;br /&gt;
 Octave code for generating music from heartbeats&lt;br /&gt;
 Victor Mercola&lt;br /&gt;
 MU 3620&lt;br /&gt;
 2019-12-09&lt;br /&gt;
 under Prof. Manzo&lt;br /&gt;
 %}&lt;br /&gt;
   &lt;br /&gt;
 pkg load signal;&lt;br /&gt;
 averageInterval = 1367.2; % interval of average heart rate [ms]&lt;br /&gt;
 averageHz = 1 / (1367.2 / 1000); % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 averageBPM = averageHz * 60; % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 % disp(averageBPM) &lt;br /&gt;
 &lt;br /&gt;
 %{ &lt;br /&gt;
 1 beat        1 beat&lt;br /&gt;
 -----       = ------&lt;br /&gt;
 1367.2 ms     1.3672 s&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 x = csvread(&amp;quot;N406K_forMark.csv&amp;quot;,1,0); % original file, a csv &lt;br /&gt;
 &lt;br /&gt;
 %{&lt;br /&gt;
 Mex2A_100uM     = transpose(x(:,2)); % Mex2A - 100 uM&lt;br /&gt;
 Mex2A_33_333uM  = transpose(x(:,3)); % Mex2A - 33.333 uM&lt;br /&gt;
 Mex2A_11_111uM  = transpose(x(:,4)); % Mex2A - 11.111 uM&lt;br /&gt;
 Mex2A_3_703uM   = transpose(x(:,5)); % Mex2A - 3.703 uM&lt;br /&gt;
 Mex2A_1_2345uM  = transpose(x(:,6)); % Mex2A - 1.2345 uM&lt;br /&gt;
 Mex2A_0_4115uM  = transpose(x(:,7)); % Mex2A - 0.4115 uM&lt;br /&gt;
 Mex2A_0_1271uM  = transpose(x(:,8)); % Mex2A - 0.1271 uM&lt;br /&gt;
 Mex2A_0uM       = transpose(x(:,9)); % Mex2A - 0 uM&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 t = transpose(x(:,1)); % time array [ms]&lt;br /&gt;
 Mex2A = [100, 33.333, 11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]; &lt;br /&gt;
 &lt;br /&gt;
 n = 3; &lt;br /&gt;
 &lt;br /&gt;
 % find the peaks in the graph&lt;br /&gt;
 this_row = transpose(x(:,n + 1));&lt;br /&gt;
 [pks idx] = findpeaks(this_row, &amp;quot;MinPeakHeight&amp;quot;,0.015, &amp;quot;MinPeakDistance&amp;quot;, 5); &lt;br /&gt;
 &lt;br /&gt;
 % convert those peak values from findpeaks into coordinates&lt;br /&gt;
 peakX = t(idx);&lt;br /&gt;
 peakY = this_row(idx);&lt;br /&gt;
 disp(peakX);  &lt;br /&gt;
  &lt;br /&gt;
 f = figure;&lt;br /&gt;
 plot(t, this_row, peakX, peakY, 'x');&lt;br /&gt;
 axis([min(t), max(t), 0, 0.03]);&lt;br /&gt;
 title([&amp;quot;Intensity of Mex2A=&amp;quot;, num2str(Mex2A(n)), &amp;quot;uM&amp;quot;]);&lt;br /&gt;
 xlabel(&amp;quot;Time, t [ms]&amp;quot;);&lt;br /&gt;
 ylabel(&amp;quot;Intensity&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
 % calculate peak intervals&lt;br /&gt;
 for i = 2:length(peakX)&lt;br /&gt;
     pkToPkInterval(i - 1) = peakX(i) - peakX(i-1); % time between intervals [ms]&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 pkToPkHz = 1./(pkToPkInterval / 1000);  % interval frequency [Hz]&lt;br /&gt;
 pkToPkBPM = pkToPkHz * 60; % interval frequency [BPM]&lt;br /&gt;
 disp(pkToPkBPM); &lt;br /&gt;
 &lt;br /&gt;
 pkToPkRatio = pkToPkBPM / averageBPM&lt;br /&gt;
&lt;br /&gt;
== Playing the data ==&lt;br /&gt;
&lt;br /&gt;
I could export the data from GNU Octave into Sonic Pi by first pasting it into a simple text editor to format it nicely. Once I made a quick 120 BPM single-measure beat, I could import it into Sonic Pi and change its playback rate in time with the arrays that I generated from GNU Octave. While Sonic Pi is great for live-coding music, I personally think it's missing a couple of key programming elements. Two examples that are present is this code is for loops with changing variables and not being able to determine the length of an array. I found simple workarounds for both of these, though. I definitely want to see more usage of Sonic Pi in the future.&lt;br /&gt;
&lt;br /&gt;
 # Data Sonification with heartbeats&lt;br /&gt;
 # Victor Mercola - MU 3620&lt;br /&gt;
 # Prof. Manzo, 2019-12-09&lt;br /&gt;
 &lt;br /&gt;
 doses = [11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]&lt;br /&gt;
 avgBPM = 43.885&lt;br /&gt;
 &lt;br /&gt;
 dose = 0&lt;br /&gt;
 6.times do&lt;br /&gt;
   if(dose == 0)&lt;br /&gt;
     # 11.111 uM dose&lt;br /&gt;
     intervals = [1.00371, 1.00371, 1.00371, 1.00371, 0.98189, 1.00371]&lt;br /&gt;
     n = 6&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 1)&lt;br /&gt;
     # 3.703 uM dose&lt;br /&gt;
     intervals = [1.1292, 1.0037, 0.98189, 2.5093, 1.0504, 0.98189, 2.5093, 1.0754, 2.3772]&lt;br /&gt;
     n = 9&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 2)&lt;br /&gt;
     # 1.2345 uM dose&lt;br /&gt;
     intervals = [2.5093, 3.7639, 3.7639, 1.1581, 2.5093, 3.7639, 3.7639, 1.1292, 2.6569, 3.7639, 3.7639, 1.1292, 2.5093, 1.0504]&lt;br /&gt;
     n = 14&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 3)&lt;br /&gt;
     # 0.4115 uM dose&lt;br /&gt;
     intervals = [2.8229, 0.961, 2.8229, 0.94098, 2.8229, 4.1061, 3.7639, 0.961, 3.0111, 0.94098, 2.8229]&lt;br /&gt;
     n = 11&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 4)&lt;br /&gt;
     # 0.1271 uM dose&lt;br /&gt;
     intervals = [4.1061, 4.5167, 1.1016, 0.94098, 2.6569, 4.1061, 5.0185, 4.5167, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.1061, 4.1061, 4.5167, 1.1292]&lt;br /&gt;
     n = 21&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 5)&lt;br /&gt;
     # 0 uM dose&lt;br /&gt;
     intervals = [5.0185, 4.5167, 5.0185, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 1.1886, 1.0037, 2.6569, 4.5167, 5.0185, 5.0185, 5.6459, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 4.5167, 5.0185, 5.0185, 4.5167]&lt;br /&gt;
     n = 26&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   # Here's where the actual music happens&lt;br /&gt;
   &lt;br /&gt;
   i = 0&lt;br /&gt;
   n.times do&lt;br /&gt;
     puts(doses[dose],&amp;quot;uM&amp;quot;)&lt;br /&gt;
     puts(intervals[i])&lt;br /&gt;
     puts(&amp;quot;Heart BPM:&amp;quot;,avgBPM*intervals[i])&lt;br /&gt;
     puts(&amp;quot;Music BPM:&amp;quot;,120*intervals[i])&lt;br /&gt;
     sample &amp;quot;D:/OneDrive/Documents/GNU Octave/quick drum loop v2.wav&amp;quot;, rate:intervals[i]&lt;br /&gt;
     wait 2 * (1 / intervals[i])&lt;br /&gt;
     i = i + 1&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   dose = dose + 1&lt;br /&gt;
   wait 1&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
== End Result ==&lt;br /&gt;
&lt;br /&gt;
The first result of the project only had a simple drum pattern as a base loop and was used as a proof-of-proof-of-concept. I sent the results to my father and his staff and he said that they really liked it. After talking with him about it, I added a simple bass to the bass loop, which made it sound slightly better.&lt;br /&gt;
&lt;br /&gt;
This video below shows the data sonification from 11.111uM dose to the control 0uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-11-to-0.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
This video below shows the data sonification from control 0uM dose to the 11.111uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-0-to-11.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Would nightcore, speedcore, and/or extratone music with arrhythmic heart patterns actually sound like a good music genre? Probably not, but I think it's a pretty effective tool for comparing the control and expected-dosage results of Mex2A.&lt;br /&gt;
&lt;br /&gt;
== Post-Mortem ==&lt;br /&gt;
This part will be updated once I finish continuing this project over break. If my father's paper on this is published, I'll definitely leave a link here. Stay tuned!&lt;/div&gt;</summary>
		<author><name>Vsmercola</name></author>
		
	</entry>
	<entry>
		<id>https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247022</id>
		<title>Arrhythmia Data Sonification</title>
		<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247022"/>
		<updated>2019-12-14T00:40:54Z</updated>

		<summary type="html">&lt;p&gt;Vsmercola: /* Processing the data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By Victor Mercola&lt;br /&gt;
&lt;br /&gt;
My father, Mark Mercola, is a professor of medicine at Stanford University and the head of the Mercola Lab (as of writing this project). While talking with him about the classes I take at WPI, he mentioned how it would be interesting to use data sonification to educate and/or demonstrate the effectiveness of a new drug that he is working on. I agreed with his proposal and used the data he gave me for my final project in MU3620, Arrhythmia Data Sonification. Using GNU Octave, Ableton Live, and Sonic Pi, I was able to make &amp;quot;music&amp;quot; that would change according to an arrhythmic heartbeat.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Before working with music, there is some important preliminary background information to go over.&lt;br /&gt;
&lt;br /&gt;
The standard heartbeat seen on electrocardiograms (ECG / EKG) and other heart monitors is comprised of five different sections, named the &amp;quot;P Wave&amp;quot;, the &amp;quot;QRS Complex&amp;quot;, and the &amp;quot;T Wave&amp;quot;. The specific disease my father is working on is Long QT syndrome - as its name suggests, Long QT syndrome is a fatal, congenital cardiac rhythm disorder that where the length of the QT interval is longer than usual, causing arrhythmia patterns. My father is specifically working on Long QT type 3 (a.k.a. Long QT3 syndrome), which is caused by a problem regulating sodium ions in heart cells. He is currently working on a new drug to treat disease, currently named &amp;quot;Mex2A&amp;quot; and nicknamed &amp;quot;Super Mex&amp;quot; by his staff.&lt;br /&gt;
&lt;br /&gt;
== Analyzing &amp;amp; processing the data ==&lt;br /&gt;
&lt;br /&gt;
[[File:Mex2A graph.PNG|800px|center|Series of graphs of the results, from 100uM to 0uM left to right.]]&lt;br /&gt;
&lt;br /&gt;
My father sent me a large spreadsheet that, when graphed, produced the results of the graphs above. These show the results of human heart cells with Long QT3 syndrome given different dose amounts of Mex2A, in micromolar. The graphs' X-axes show the measured time in milliseconds, with measured intervals spaced roughly 30 ms apart. The graphs' Y-axes show the measured intensity - when the heart cells beat, the intensity goes up. One can tell from the graphs that the 100uM dose and 33.333uM dose results do not show any peaks, but the 11.111uM dose shows strikingly regular peaks denoting a heartbeat. When I saw this data, I thought would be neat to make &amp;quot;music&amp;quot; where each peak represented a music measure's bar line, and the tempo of the song would increase or decrease depending on how fast or slow the heart cells beat, respectively. &lt;br /&gt;
&lt;br /&gt;
To turn the heartbeat data into music intervals, I first opened the file in GNU Octave (open-source MATLAB alternative). I first wanted to find the average interval of the 11uM dose beats, because I wanted the average interval's corresponding BPM to be scaled to 120 BPM. After recording the timestamps of all of the important peaks, I made a new array of intervals of unit milliseconds. With those intervals, I could convert the intervals' inverse, in Hz (1 cycle per second). I then converted the intervals' Hz to BPM (beats per minute) by multiplying by 60.  &lt;br /&gt;
&lt;br /&gt;
I figured out that the heart cells when given the 11uM dose could beat at about 43.885 BPM normally. In music terms, that tempo is the faster end of &amp;quot;grave&amp;quot;. I could normalize the interval BPM's by dividing each value by the average. From here, it was rinse and repeat for the other graphs - The interval data for 3.703uM, 1.2345uM, 0.4115uM, 0.1271uM, and 0uM were all normalized with the same 43.885 BPM value.&lt;br /&gt;
&lt;br /&gt;
 %{&lt;br /&gt;
 Octave code for generating music from heartbeats&lt;br /&gt;
 Victor Mercola&lt;br /&gt;
 MU 3620&lt;br /&gt;
 2019-12-09&lt;br /&gt;
 under Prof. Manzo&lt;br /&gt;
 %}&lt;br /&gt;
   &lt;br /&gt;
 pkg load signal;&lt;br /&gt;
 averageInterval = 1367.2; % interval of average heart rate [ms]&lt;br /&gt;
 averageHz = 1 / (1367.2 / 1000); % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 averageBPM = averageHz * 60; % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 % disp(averageBPM) &lt;br /&gt;
 &lt;br /&gt;
 %{ &lt;br /&gt;
 1 beat        1 beat&lt;br /&gt;
 -----       = ------&lt;br /&gt;
 1367.2 ms     1.3672 s&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 x = csvread(&amp;quot;N406K_forMark.csv&amp;quot;,1,0); % original file, a csv &lt;br /&gt;
 &lt;br /&gt;
 %{&lt;br /&gt;
 Mex2A_100uM     = transpose(x(:,2)); % Mex2A - 100 uM&lt;br /&gt;
 Mex2A_33_333uM  = transpose(x(:,3)); % Mex2A - 33.333 uM&lt;br /&gt;
 Mex2A_11_111uM  = transpose(x(:,4)); % Mex2A - 11.111 uM&lt;br /&gt;
 Mex2A_3_703uM   = transpose(x(:,5)); % Mex2A - 3.703 uM&lt;br /&gt;
 Mex2A_1_2345uM  = transpose(x(:,6)); % Mex2A - 1.2345 uM&lt;br /&gt;
 Mex2A_0_4115uM  = transpose(x(:,7)); % Mex2A - 0.4115 uM&lt;br /&gt;
 Mex2A_0_1271uM  = transpose(x(:,8)); % Mex2A - 0.1271 uM&lt;br /&gt;
 Mex2A_0uM       = transpose(x(:,9)); % Mex2A - 0 uM&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 t = transpose(x(:,1)); % time array [ms]&lt;br /&gt;
 Mex2A = [100, 33.333, 11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]; &lt;br /&gt;
 &lt;br /&gt;
 n = 3; &lt;br /&gt;
 &lt;br /&gt;
 % find the peaks in the graph&lt;br /&gt;
 this_row = transpose(x(:,n + 1));&lt;br /&gt;
 [pks idx] = findpeaks(this_row, &amp;quot;MinPeakHeight&amp;quot;,0.015, &amp;quot;MinPeakDistance&amp;quot;, 5); &lt;br /&gt;
 &lt;br /&gt;
 % convert those peak values from findpeaks into coordinates&lt;br /&gt;
 peakX = t(idx);&lt;br /&gt;
 peakY = this_row(idx);&lt;br /&gt;
 disp(peakX);  &lt;br /&gt;
  &lt;br /&gt;
 f = figure;&lt;br /&gt;
 plot(t, this_row, peakX, peakY, 'x');&lt;br /&gt;
 axis([min(t), max(t), 0, 0.03]);&lt;br /&gt;
 title([&amp;quot;Intensity of Mex2A=&amp;quot;, num2str(Mex2A(n)), &amp;quot;uM&amp;quot;]);&lt;br /&gt;
 xlabel(&amp;quot;Time, t [ms]&amp;quot;);&lt;br /&gt;
 ylabel(&amp;quot;Intensity&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
 % calculate peak intervals&lt;br /&gt;
 for i = 2:length(peakX)&lt;br /&gt;
     pkToPkInterval(i - 1) = peakX(i) - peakX(i-1); % time between intervals [ms]&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 pkToPkHz = 1./(pkToPkInterval / 1000);  % interval frequency [Hz]&lt;br /&gt;
 pkToPkBPM = pkToPkHz * 60; % interval frequency [BPM]&lt;br /&gt;
 disp(pkToPkBPM); &lt;br /&gt;
 &lt;br /&gt;
 pkToPkRatio = pkToPkBPM / averageBPM&lt;br /&gt;
&lt;br /&gt;
== Playing the data ==&lt;br /&gt;
&lt;br /&gt;
I could export the data from GNU Octave into Sonic Pi by first pasting it into a simple text editor to format it nicely. Once I made a quick 120 BPM single-measure beat, I could import it into Sonic Pi and change its playback rate in time with the arrays that I generated from GNU Octave.&lt;br /&gt;
&lt;br /&gt;
While Sonic Pi is great for live-coding music, I personally think it's missing a couple of key programming elements. Two examples that are present is this code is for loops with changing variables and not being able to determine the length of an array. I found simple workarounds for both of these, though. I definitely want to see more usage of Sonic Pi in the future.&lt;br /&gt;
&lt;br /&gt;
 # Data Sonification with heartbeats&lt;br /&gt;
 # Victor Mercola - MU 3620&lt;br /&gt;
 # Prof. Manzo, 2019-12-09&lt;br /&gt;
 &lt;br /&gt;
 doses = [11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]&lt;br /&gt;
 avgBPM = 43.885&lt;br /&gt;
 &lt;br /&gt;
 dose = 0&lt;br /&gt;
 6.times do&lt;br /&gt;
   if(dose == 0)&lt;br /&gt;
     # 11.111 uM dose&lt;br /&gt;
     intervals = [1.00371, 1.00371, 1.00371, 1.00371, 0.98189, 1.00371]&lt;br /&gt;
     n = 6&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 1)&lt;br /&gt;
     # 3.703 uM dose&lt;br /&gt;
     intervals = [1.1292, 1.0037, 0.98189, 2.5093, 1.0504, 0.98189, 2.5093, 1.0754, 2.3772]&lt;br /&gt;
     n = 9&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 2)&lt;br /&gt;
     # 1.2345 uM dose&lt;br /&gt;
     intervals = [2.5093, 3.7639, 3.7639, 1.1581, 2.5093, 3.7639, 3.7639, 1.1292, 2.6569, 3.7639, 3.7639, 1.1292, 2.5093, 1.0504]&lt;br /&gt;
     n = 14&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 3)&lt;br /&gt;
     # 0.4115 uM dose&lt;br /&gt;
     intervals = [2.8229, 0.961, 2.8229, 0.94098, 2.8229, 4.1061, 3.7639, 0.961, 3.0111, 0.94098, 2.8229]&lt;br /&gt;
     n = 11&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 4)&lt;br /&gt;
     # 0.1271 uM dose&lt;br /&gt;
     intervals = [4.1061, 4.5167, 1.1016, 0.94098, 2.6569, 4.1061, 5.0185, 4.5167, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.1061, 4.1061, 4.5167, 1.1292]&lt;br /&gt;
     n = 21&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 5)&lt;br /&gt;
     # 0 uM dose&lt;br /&gt;
     intervals = [5.0185, 4.5167, 5.0185, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 1.1886, 1.0037, 2.6569, 4.5167, 5.0185, 5.0185, 5.6459, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 4.5167, 5.0185, 5.0185, 4.5167]&lt;br /&gt;
     n = 26&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   # Here's where the actual music happens&lt;br /&gt;
   &lt;br /&gt;
   i = 0&lt;br /&gt;
   n.times do&lt;br /&gt;
     puts(doses[dose],&amp;quot;uM&amp;quot;)&lt;br /&gt;
     puts(intervals[i])&lt;br /&gt;
     puts(&amp;quot;Heart BPM:&amp;quot;,avgBPM*intervals[i])&lt;br /&gt;
     puts(&amp;quot;Music BPM:&amp;quot;,120*intervals[i])&lt;br /&gt;
     sample &amp;quot;D:/OneDrive/Documents/GNU Octave/quick drum loop v2.wav&amp;quot;, rate:intervals[i]&lt;br /&gt;
     wait 2 * (1 / intervals[i])&lt;br /&gt;
     i = i + 1&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   dose = dose + 1&lt;br /&gt;
   wait 1&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
== End Result ==&lt;br /&gt;
&lt;br /&gt;
The first result of the project only had a simple drum pattern as a base loop and was used as a proof-of-proof-of-concept. I sent the results to my father and his staff and he said that they really liked it. After talking with him about it, I added a simple bass to the bass loop, which made it sound slightly better.&lt;br /&gt;
&lt;br /&gt;
This video below shows the data sonification from 11.111uM dose to the control 0uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-11-to-0.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
This video below shows the data sonification from control 0uM dose to the 11.111uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-0-to-11.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Would nightcore, speedcore, and/or extratone music with arrhythmic heart patterns actually sound like a good music genre? Probably not, but I think it's a pretty effective tool for comparing the control and expected-dosage results of Mex2A.&lt;br /&gt;
&lt;br /&gt;
== Post-Mortem ==&lt;br /&gt;
This part will be updated once I finish continuing this project over break. If my father's paper on this is published, I'll definitely leave a link here. Stay tuned!&lt;/div&gt;</summary>
		<author><name>Vsmercola</name></author>
		
	</entry>
	<entry>
		<id>https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247021</id>
		<title>Arrhythmia Data Sonification</title>
		<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247021"/>
		<updated>2019-12-14T00:40:27Z</updated>

		<summary type="html">&lt;p&gt;Vsmercola: /* Processing the Data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By Victor Mercola&lt;br /&gt;
&lt;br /&gt;
My father, Mark Mercola, is a professor of medicine at Stanford University and the head of the Mercola Lab (as of writing this project). While talking with him about the classes I take at WPI, he mentioned how it would be interesting to use data sonification to educate and/or demonstrate the effectiveness of a new drug that he is working on. I agreed with his proposal and used the data he gave me for my final project in MU3620, Arrhythmia Data Sonification. Using GNU Octave, Ableton Live, and Sonic Pi, I was able to make &amp;quot;music&amp;quot; that would change according to an arrhythmic heartbeat.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Before working with music, there is some important preliminary background information to go over.&lt;br /&gt;
&lt;br /&gt;
The standard heartbeat seen on electrocardiograms (ECG / EKG) and other heart monitors is comprised of five different sections, named the &amp;quot;P Wave&amp;quot;, the &amp;quot;QRS Complex&amp;quot;, and the &amp;quot;T Wave&amp;quot;. The specific disease my father is working on is Long QT syndrome - as its name suggests, Long QT syndrome is a fatal, congenital cardiac rhythm disorder that where the length of the QT interval is longer than usual, causing arrhythmia patterns. My father is specifically working on Long QT type 3 (a.k.a. Long QT3 syndrome), which is caused by a problem regulating sodium ions in heart cells. He is currently working on a new drug to treat disease, currently named &amp;quot;Mex2A&amp;quot; and nicknamed &amp;quot;Super Mex&amp;quot; by his staff.&lt;br /&gt;
&lt;br /&gt;
== Processing the data ==&lt;br /&gt;
&lt;br /&gt;
[[File:Mex2A graph.PNG|800px|center|Series of graphs of the results, from 100uM to 0uM left to right.]]&lt;br /&gt;
&lt;br /&gt;
My father sent me a large spreadsheet that, when graphed, produced the results of the graphs above. These show the results of human heart cells with Long QT3 syndrome given different dose amounts of Mex2A, in micromolar. The graphs' X-axes show the measured time in milliseconds, with measured intervals spaced roughly 30 ms apart. The graphs' Y-axes show the measured intensity - when the heart cells beat, the intensity goes up. One can tell from the graphs that the 100uM dose and 33.333uM dose results do not show any peaks, but the 11.111uM dose shows strikingly regular peaks denoting a heartbeat. When I saw this data, I thought would be neat to make &amp;quot;music&amp;quot; where each peak represented a music measure's bar line, and the tempo of the song would increase or decrease depending on how fast or slow the heart cells beat, respectively. &lt;br /&gt;
&lt;br /&gt;
To turn the heartbeat data into music intervals, I first opened the file in GNU Octave (open-source MATLAB alternative). I first wanted to find the average interval of the 11uM dose beats, because I wanted the average interval's corresponding BPM to be scaled to 120 BPM. After recording the timestamps of all of the important peaks, I made a new array of intervals of unit milliseconds. With those intervals, I could convert the intervals' inverse, in Hz (1 cycle per second). I then converted the intervals' Hz to BPM (beats per minute) by multiplying by 60.  &lt;br /&gt;
&lt;br /&gt;
I figured out that the heart cells when given the 11uM dose could beat at about 43.885 BPM normally. In music terms, that tempo is the faster end of &amp;quot;grave&amp;quot;. I could normalize the interval BPM's by dividing each value by the average. From here, it was rinse and repeat for the other graphs - The interval data for 3.703uM, 1.2345uM, 0.4115uM, 0.1271uM, and 0uM were all normalized with the same 43.885 BPM value.&lt;br /&gt;
&lt;br /&gt;
 %{&lt;br /&gt;
 Octave code for generating music from heartbeats&lt;br /&gt;
 Victor Mercola&lt;br /&gt;
 MU 3620&lt;br /&gt;
 2019-12-09&lt;br /&gt;
 under Prof. Manzo&lt;br /&gt;
 %}&lt;br /&gt;
   &lt;br /&gt;
 pkg load signal;&lt;br /&gt;
 averageInterval = 1367.2; % interval of average heart rate [ms]&lt;br /&gt;
 averageHz = 1 / (1367.2 / 1000); % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 averageBPM = averageHz * 60; % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 % disp(averageBPM) &lt;br /&gt;
 &lt;br /&gt;
 %{ &lt;br /&gt;
 1 beat        1 beat&lt;br /&gt;
 -----       = ------&lt;br /&gt;
 1367.2 ms     1.3672 s&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 x = csvread(&amp;quot;N406K_forMark.csv&amp;quot;,1,0); % original file, a csv &lt;br /&gt;
 &lt;br /&gt;
 %{&lt;br /&gt;
 Mex2A_100uM     = transpose(x(:,2)); % Mex2A - 100 uM&lt;br /&gt;
 Mex2A_33_333uM  = transpose(x(:,3)); % Mex2A - 33.333 uM&lt;br /&gt;
 Mex2A_11_111uM  = transpose(x(:,4)); % Mex2A - 11.111 uM&lt;br /&gt;
 Mex2A_3_703uM   = transpose(x(:,5)); % Mex2A - 3.703 uM&lt;br /&gt;
 Mex2A_1_2345uM  = transpose(x(:,6)); % Mex2A - 1.2345 uM&lt;br /&gt;
 Mex2A_0_4115uM  = transpose(x(:,7)); % Mex2A - 0.4115 uM&lt;br /&gt;
 Mex2A_0_1271uM  = transpose(x(:,8)); % Mex2A - 0.1271 uM&lt;br /&gt;
 Mex2A_0uM       = transpose(x(:,9)); % Mex2A - 0 uM&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 t = transpose(x(:,1)); % time array [ms]&lt;br /&gt;
 Mex2A = [100, 33.333, 11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]; &lt;br /&gt;
 &lt;br /&gt;
 n = 3; &lt;br /&gt;
 &lt;br /&gt;
 % find the peaks in the graph&lt;br /&gt;
 this_row = transpose(x(:,n + 1));&lt;br /&gt;
 [pks idx] = findpeaks(this_row, &amp;quot;MinPeakHeight&amp;quot;,0.015, &amp;quot;MinPeakDistance&amp;quot;, 5); &lt;br /&gt;
 &lt;br /&gt;
 % convert those peak values from findpeaks into coordinates&lt;br /&gt;
 peakX = t(idx);&lt;br /&gt;
 peakY = this_row(idx);&lt;br /&gt;
 disp(peakX);  &lt;br /&gt;
  &lt;br /&gt;
 f = figure;&lt;br /&gt;
 plot(t, this_row, peakX, peakY, 'x');&lt;br /&gt;
 axis([min(t), max(t), 0, 0.03]);&lt;br /&gt;
 title([&amp;quot;Intensity of Mex2A=&amp;quot;, num2str(Mex2A(n)), &amp;quot;uM&amp;quot;]);&lt;br /&gt;
 xlabel(&amp;quot;Time, t [ms]&amp;quot;);&lt;br /&gt;
 ylabel(&amp;quot;Intensity&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
 % calculate peak intervals&lt;br /&gt;
 for i = 2:length(peakX)&lt;br /&gt;
     pkToPkInterval(i - 1) = peakX(i) - peakX(i-1); % time between intervals [ms]&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 pkToPkHz = 1./(pkToPkInterval / 1000);  % interval frequency [Hz]&lt;br /&gt;
 pkToPkBPM = pkToPkHz * 60; % interval frequency [BPM]&lt;br /&gt;
 disp(pkToPkBPM); &lt;br /&gt;
 &lt;br /&gt;
 pkToPkRatio = pkToPkBPM / averageBPM&lt;br /&gt;
&lt;br /&gt;
== Playing the data ==&lt;br /&gt;
&lt;br /&gt;
I could export the data from GNU Octave into Sonic Pi by first pasting it into a simple text editor to format it nicely. Once I made a quick 120 BPM single-measure beat, I could import it into Sonic Pi and change its playback rate in time with the arrays that I generated from GNU Octave.&lt;br /&gt;
&lt;br /&gt;
While Sonic Pi is great for live-coding music, I personally think it's missing a couple of key programming elements. Two examples that are present is this code is for loops with changing variables and not being able to determine the length of an array. I found simple workarounds for both of these, though. I definitely want to see more usage of Sonic Pi in the future.&lt;br /&gt;
&lt;br /&gt;
 # Data Sonification with heartbeats&lt;br /&gt;
 # Victor Mercola - MU 3620&lt;br /&gt;
 # Prof. Manzo, 2019-12-09&lt;br /&gt;
 &lt;br /&gt;
 doses = [11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]&lt;br /&gt;
 avgBPM = 43.885&lt;br /&gt;
 &lt;br /&gt;
 dose = 0&lt;br /&gt;
 6.times do&lt;br /&gt;
   if(dose == 0)&lt;br /&gt;
     # 11.111 uM dose&lt;br /&gt;
     intervals = [1.00371, 1.00371, 1.00371, 1.00371, 0.98189, 1.00371]&lt;br /&gt;
     n = 6&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 1)&lt;br /&gt;
     # 3.703 uM dose&lt;br /&gt;
     intervals = [1.1292, 1.0037, 0.98189, 2.5093, 1.0504, 0.98189, 2.5093, 1.0754, 2.3772]&lt;br /&gt;
     n = 9&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 2)&lt;br /&gt;
     # 1.2345 uM dose&lt;br /&gt;
     intervals = [2.5093, 3.7639, 3.7639, 1.1581, 2.5093, 3.7639, 3.7639, 1.1292, 2.6569, 3.7639, 3.7639, 1.1292, 2.5093, 1.0504]&lt;br /&gt;
     n = 14&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 3)&lt;br /&gt;
     # 0.4115 uM dose&lt;br /&gt;
     intervals = [2.8229, 0.961, 2.8229, 0.94098, 2.8229, 4.1061, 3.7639, 0.961, 3.0111, 0.94098, 2.8229]&lt;br /&gt;
     n = 11&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 4)&lt;br /&gt;
     # 0.1271 uM dose&lt;br /&gt;
     intervals = [4.1061, 4.5167, 1.1016, 0.94098, 2.6569, 4.1061, 5.0185, 4.5167, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.1061, 4.1061, 4.5167, 1.1292]&lt;br /&gt;
     n = 21&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 5)&lt;br /&gt;
     # 0 uM dose&lt;br /&gt;
     intervals = [5.0185, 4.5167, 5.0185, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 1.1886, 1.0037, 2.6569, 4.5167, 5.0185, 5.0185, 5.6459, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 4.5167, 5.0185, 5.0185, 4.5167]&lt;br /&gt;
     n = 26&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   # Here's where the actual music happens&lt;br /&gt;
   &lt;br /&gt;
   i = 0&lt;br /&gt;
   n.times do&lt;br /&gt;
     puts(doses[dose],&amp;quot;uM&amp;quot;)&lt;br /&gt;
     puts(intervals[i])&lt;br /&gt;
     puts(&amp;quot;Heart BPM:&amp;quot;,avgBPM*intervals[i])&lt;br /&gt;
     puts(&amp;quot;Music BPM:&amp;quot;,120*intervals[i])&lt;br /&gt;
     sample &amp;quot;D:/OneDrive/Documents/GNU Octave/quick drum loop v2.wav&amp;quot;, rate:intervals[i]&lt;br /&gt;
     wait 2 * (1 / intervals[i])&lt;br /&gt;
     i = i + 1&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   dose = dose + 1&lt;br /&gt;
   wait 1&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
== End Result ==&lt;br /&gt;
&lt;br /&gt;
The first result of the project only had a simple drum pattern as a base loop and was used as a proof-of-proof-of-concept. I sent the results to my father and his staff and he said that they really liked it. After talking with him about it, I added a simple bass to the bass loop, which made it sound slightly better.&lt;br /&gt;
&lt;br /&gt;
This video below shows the data sonification from 11.111uM dose to the control 0uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-11-to-0.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
This video below shows the data sonification from control 0uM dose to the 11.111uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-0-to-11.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Would nightcore, speedcore, and/or extratone music with arrhythmic heart patterns actually sound like a good music genre? Probably not, but I think it's a pretty effective tool for comparing the control and expected-dosage results of Mex2A.&lt;br /&gt;
&lt;br /&gt;
== Post-Mortem ==&lt;br /&gt;
This part will be updated once I finish continuing this project over break. If my father's paper on this is published, I'll definitely leave a link here. Stay tuned!&lt;/div&gt;</summary>
		<author><name>Vsmercola</name></author>
		
	</entry>
	<entry>
		<id>https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247020</id>
		<title>Arrhythmia Data Sonification</title>
		<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247020"/>
		<updated>2019-12-14T00:40:10Z</updated>

		<summary type="html">&lt;p&gt;Vsmercola: /* Playing the data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By Victor Mercola&lt;br /&gt;
&lt;br /&gt;
My father, Mark Mercola, is a professor of medicine at Stanford University and the head of the Mercola Lab (as of writing this project). While talking with him about the classes I take at WPI, he mentioned how it would be interesting to use data sonification to educate and/or demonstrate the effectiveness of a new drug that he is working on. I agreed with his proposal and used the data he gave me for my final project in MU3620, Arrhythmia Data Sonification. Using GNU Octave, Ableton Live, and Sonic Pi, I was able to make &amp;quot;music&amp;quot; that would change according to an arrhythmic heartbeat.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Before working with music, there is some important preliminary background information to go over.&lt;br /&gt;
&lt;br /&gt;
The standard heartbeat seen on electrocardiograms (ECG / EKG) and other heart monitors is comprised of five different sections, named the &amp;quot;P Wave&amp;quot;, the &amp;quot;QRS Complex&amp;quot;, and the &amp;quot;T Wave&amp;quot;. The specific disease my father is working on is Long QT syndrome - as its name suggests, Long QT syndrome is a fatal, congenital cardiac rhythm disorder that where the length of the QT interval is longer than usual, causing arrhythmia patterns. My father is specifically working on Long QT type 3 (a.k.a. Long QT3 syndrome), which is caused by a problem regulating sodium ions in heart cells. He is currently working on a new drug to treat disease, currently named &amp;quot;Mex2A&amp;quot; and nicknamed &amp;quot;Super Mex&amp;quot; by his staff.&lt;br /&gt;
&lt;br /&gt;
== Processing the Data ==&lt;br /&gt;
&lt;br /&gt;
[[File:Mex2A graph.PNG|800px|center|Series of graphs of the results, from 100uM to 0uM left to right.]]&lt;br /&gt;
&lt;br /&gt;
My father sent me a large spreadsheet that, when graphed, produced the results of the graphs above. These show the results of human heart cells with Long QT3 syndrome given different dose amounts of Mex2A, in micromolar. The graphs' X-axes show the measured time in milliseconds, with measured intervals spaced roughly 30 ms apart. The graphs' Y-axes show the measured intensity - when the heart cells beat, the intensity goes up. One can tell from the graphs that the 100uM dose and 33.333uM dose results do not show any peaks, but the 11.111uM dose shows strikingly regular peaks denoting a heartbeat. When I saw this data, I thought would be neat to make &amp;quot;music&amp;quot; where each peak represented a music measure's bar line, and the tempo of the song would increase or decrease depending on how fast or slow the heart cells beat, respectively. &lt;br /&gt;
&lt;br /&gt;
To turn the heartbeat data into music intervals, I first opened the file in GNU Octave (open-source MATLAB alternative). I first wanted to find the average interval of the 11uM dose beats, because I wanted the average interval's corresponding BPM to be scaled to 120 BPM. After recording the timestamps of all of the important peaks, I made a new array of intervals of unit milliseconds. With those intervals, I could convert the intervals' inverse, in Hz (1 cycle per second). I then converted the intervals' Hz to BPM (beats per minute) by multiplying by 60.  &lt;br /&gt;
&lt;br /&gt;
I figured out that the heart cells when given the 11uM dose could beat at about 43.885 BPM normally. In music terms, that tempo is the faster end of &amp;quot;grave&amp;quot;. I could normalize the interval BPM's by dividing each value by the average. From here, it was rinse and repeat for the other graphs - The interval data for 3.703uM, 1.2345uM, 0.4115uM, 0.1271uM, and 0uM were all normalized with the same 43.885 BPM value.&lt;br /&gt;
&lt;br /&gt;
 %{&lt;br /&gt;
 Octave code for generating music from heartbeats&lt;br /&gt;
 Victor Mercola&lt;br /&gt;
 MU 3620&lt;br /&gt;
 2019-12-09&lt;br /&gt;
 under Prof. Manzo&lt;br /&gt;
 %}&lt;br /&gt;
   &lt;br /&gt;
 pkg load signal;&lt;br /&gt;
 averageInterval = 1367.2; % interval of average heart rate [ms]&lt;br /&gt;
 averageHz = 1 / (1367.2 / 1000); % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 averageBPM = averageHz * 60; % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 % disp(averageBPM) &lt;br /&gt;
 &lt;br /&gt;
 %{ &lt;br /&gt;
 1 beat        1 beat&lt;br /&gt;
 -----       = ------&lt;br /&gt;
 1367.2 ms     1.3672 s&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 x = csvread(&amp;quot;N406K_forMark.csv&amp;quot;,1,0); % original file, a csv &lt;br /&gt;
 &lt;br /&gt;
 %{&lt;br /&gt;
 Mex2A_100uM     = transpose(x(:,2)); % Mex2A - 100 uM&lt;br /&gt;
 Mex2A_33_333uM  = transpose(x(:,3)); % Mex2A - 33.333 uM&lt;br /&gt;
 Mex2A_11_111uM  = transpose(x(:,4)); % Mex2A - 11.111 uM&lt;br /&gt;
 Mex2A_3_703uM   = transpose(x(:,5)); % Mex2A - 3.703 uM&lt;br /&gt;
 Mex2A_1_2345uM  = transpose(x(:,6)); % Mex2A - 1.2345 uM&lt;br /&gt;
 Mex2A_0_4115uM  = transpose(x(:,7)); % Mex2A - 0.4115 uM&lt;br /&gt;
 Mex2A_0_1271uM  = transpose(x(:,8)); % Mex2A - 0.1271 uM&lt;br /&gt;
 Mex2A_0uM       = transpose(x(:,9)); % Mex2A - 0 uM&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 t = transpose(x(:,1)); % time array [ms]&lt;br /&gt;
 Mex2A = [100, 33.333, 11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]; &lt;br /&gt;
 &lt;br /&gt;
 n = 3; &lt;br /&gt;
 &lt;br /&gt;
 % find the peaks in the graph&lt;br /&gt;
 this_row = transpose(x(:,n + 1));&lt;br /&gt;
 [pks idx] = findpeaks(this_row, &amp;quot;MinPeakHeight&amp;quot;,0.015, &amp;quot;MinPeakDistance&amp;quot;, 5); &lt;br /&gt;
 &lt;br /&gt;
 % convert those peak values from findpeaks into coordinates&lt;br /&gt;
 peakX = t(idx);&lt;br /&gt;
 peakY = this_row(idx);&lt;br /&gt;
 disp(peakX);  &lt;br /&gt;
  &lt;br /&gt;
 f = figure;&lt;br /&gt;
 plot(t, this_row, peakX, peakY, 'x');&lt;br /&gt;
 axis([min(t), max(t), 0, 0.03]);&lt;br /&gt;
 title([&amp;quot;Intensity of Mex2A=&amp;quot;, num2str(Mex2A(n)), &amp;quot;uM&amp;quot;]);&lt;br /&gt;
 xlabel(&amp;quot;Time, t [ms]&amp;quot;);&lt;br /&gt;
 ylabel(&amp;quot;Intensity&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
 % calculate peak intervals&lt;br /&gt;
 for i = 2:length(peakX)&lt;br /&gt;
     pkToPkInterval(i - 1) = peakX(i) - peakX(i-1); % time between intervals [ms]&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 pkToPkHz = 1./(pkToPkInterval / 1000);  % interval frequency [Hz]&lt;br /&gt;
 pkToPkBPM = pkToPkHz * 60; % interval frequency [BPM]&lt;br /&gt;
 disp(pkToPkBPM); &lt;br /&gt;
 &lt;br /&gt;
 pkToPkRatio = pkToPkBPM / averageBPM&lt;br /&gt;
&lt;br /&gt;
== Playing the data ==&lt;br /&gt;
&lt;br /&gt;
I could export the data from GNU Octave into Sonic Pi by first pasting it into a simple text editor to format it nicely. Once I made a quick 120 BPM single-measure beat, I could import it into Sonic Pi and change its playback rate in time with the arrays that I generated from GNU Octave.&lt;br /&gt;
&lt;br /&gt;
While Sonic Pi is great for live-coding music, I personally think it's missing a couple of key programming elements. Two examples that are present is this code is for loops with changing variables and not being able to determine the length of an array. I found simple workarounds for both of these, though. I definitely want to see more usage of Sonic Pi in the future.&lt;br /&gt;
&lt;br /&gt;
 # Data Sonification with heartbeats&lt;br /&gt;
 # Victor Mercola - MU 3620&lt;br /&gt;
 # Prof. Manzo, 2019-12-09&lt;br /&gt;
 &lt;br /&gt;
 doses = [11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]&lt;br /&gt;
 avgBPM = 43.885&lt;br /&gt;
 &lt;br /&gt;
 dose = 0&lt;br /&gt;
 6.times do&lt;br /&gt;
   if(dose == 0)&lt;br /&gt;
     # 11.111 uM dose&lt;br /&gt;
     intervals = [1.00371, 1.00371, 1.00371, 1.00371, 0.98189, 1.00371]&lt;br /&gt;
     n = 6&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 1)&lt;br /&gt;
     # 3.703 uM dose&lt;br /&gt;
     intervals = [1.1292, 1.0037, 0.98189, 2.5093, 1.0504, 0.98189, 2.5093, 1.0754, 2.3772]&lt;br /&gt;
     n = 9&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 2)&lt;br /&gt;
     # 1.2345 uM dose&lt;br /&gt;
     intervals = [2.5093, 3.7639, 3.7639, 1.1581, 2.5093, 3.7639, 3.7639, 1.1292, 2.6569, 3.7639, 3.7639, 1.1292, 2.5093, 1.0504]&lt;br /&gt;
     n = 14&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 3)&lt;br /&gt;
     # 0.4115 uM dose&lt;br /&gt;
     intervals = [2.8229, 0.961, 2.8229, 0.94098, 2.8229, 4.1061, 3.7639, 0.961, 3.0111, 0.94098, 2.8229]&lt;br /&gt;
     n = 11&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 4)&lt;br /&gt;
     # 0.1271 uM dose&lt;br /&gt;
     intervals = [4.1061, 4.5167, 1.1016, 0.94098, 2.6569, 4.1061, 5.0185, 4.5167, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.1061, 4.1061, 4.5167, 1.1292]&lt;br /&gt;
     n = 21&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 5)&lt;br /&gt;
     # 0 uM dose&lt;br /&gt;
     intervals = [5.0185, 4.5167, 5.0185, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 1.1886, 1.0037, 2.6569, 4.5167, 5.0185, 5.0185, 5.6459, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 4.5167, 5.0185, 5.0185, 4.5167]&lt;br /&gt;
     n = 26&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   # Here's where the actual music happens&lt;br /&gt;
   &lt;br /&gt;
   i = 0&lt;br /&gt;
   n.times do&lt;br /&gt;
     puts(doses[dose],&amp;quot;uM&amp;quot;)&lt;br /&gt;
     puts(intervals[i])&lt;br /&gt;
     puts(&amp;quot;Heart BPM:&amp;quot;,avgBPM*intervals[i])&lt;br /&gt;
     puts(&amp;quot;Music BPM:&amp;quot;,120*intervals[i])&lt;br /&gt;
     sample &amp;quot;D:/OneDrive/Documents/GNU Octave/quick drum loop v2.wav&amp;quot;, rate:intervals[i]&lt;br /&gt;
     wait 2 * (1 / intervals[i])&lt;br /&gt;
     i = i + 1&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   dose = dose + 1&lt;br /&gt;
   wait 1&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
== End Result ==&lt;br /&gt;
&lt;br /&gt;
The first result of the project only had a simple drum pattern as a base loop and was used as a proof-of-proof-of-concept. I sent the results to my father and his staff and he said that they really liked it. After talking with him about it, I added a simple bass to the bass loop, which made it sound slightly better.&lt;br /&gt;
&lt;br /&gt;
This video below shows the data sonification from 11.111uM dose to the control 0uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-11-to-0.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
This video below shows the data sonification from control 0uM dose to the 11.111uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-0-to-11.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Would nightcore, speedcore, and/or extratone music with arrhythmic heart patterns actually sound like a good music genre? Probably not, but I think it's a pretty effective tool for comparing the control and expected-dosage results of Mex2A.&lt;br /&gt;
&lt;br /&gt;
== Post-Mortem ==&lt;br /&gt;
This part will be updated once I finish continuing this project over break. If my father's paper on this is published, I'll definitely leave a link here. Stay tuned!&lt;/div&gt;</summary>
		<author><name>Vsmercola</name></author>
		
	</entry>
	<entry>
		<id>https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247019</id>
		<title>Arrhythmia Data Sonification</title>
		<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247019"/>
		<updated>2019-12-14T00:38:33Z</updated>

		<summary type="html">&lt;p&gt;Vsmercola: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By Victor Mercola&lt;br /&gt;
&lt;br /&gt;
My father, Mark Mercola, is a professor of medicine at Stanford University and the head of the Mercola Lab (as of writing this project). While talking with him about the classes I take at WPI, he mentioned how it would be interesting to use data sonification to educate and/or demonstrate the effectiveness of a new drug that he is working on. I agreed with his proposal and used the data he gave me for my final project in MU3620, Arrhythmia Data Sonification. Using GNU Octave, Ableton Live, and Sonic Pi, I was able to make &amp;quot;music&amp;quot; that would change according to an arrhythmic heartbeat.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Before working with music, there is some important preliminary background information to go over.&lt;br /&gt;
&lt;br /&gt;
The standard heartbeat seen on electrocardiograms (ECG / EKG) and other heart monitors is comprised of five different sections, named the &amp;quot;P Wave&amp;quot;, the &amp;quot;QRS Complex&amp;quot;, and the &amp;quot;T Wave&amp;quot;. The specific disease my father is working on is Long QT syndrome - as its name suggests, Long QT syndrome is a fatal, congenital cardiac rhythm disorder that where the length of the QT interval is longer than usual, causing arrhythmia patterns. My father is specifically working on Long QT type 3 (a.k.a. Long QT3 syndrome), which is caused by a problem regulating sodium ions in heart cells. He is currently working on a new drug to treat disease, currently named &amp;quot;Mex2A&amp;quot; and nicknamed &amp;quot;Super Mex&amp;quot; by his staff.&lt;br /&gt;
&lt;br /&gt;
== Processing the Data ==&lt;br /&gt;
&lt;br /&gt;
[[File:Mex2A graph.PNG|800px|center|Series of graphs of the results, from 100uM to 0uM left to right.]]&lt;br /&gt;
&lt;br /&gt;
My father sent me a large spreadsheet that, when graphed, produced the results of the graphs above. These show the results of human heart cells with Long QT3 syndrome given different dose amounts of Mex2A, in micromolar. The graphs' X-axes show the measured time in milliseconds, with measured intervals spaced roughly 30 ms apart. The graphs' Y-axes show the measured intensity - when the heart cells beat, the intensity goes up. One can tell from the graphs that the 100uM dose and 33.333uM dose results do not show any peaks, but the 11.111uM dose shows strikingly regular peaks denoting a heartbeat. When I saw this data, I thought would be neat to make &amp;quot;music&amp;quot; where each peak represented a music measure's bar line, and the tempo of the song would increase or decrease depending on how fast or slow the heart cells beat, respectively. &lt;br /&gt;
&lt;br /&gt;
To turn the heartbeat data into music intervals, I first opened the file in GNU Octave (open-source MATLAB alternative). I first wanted to find the average interval of the 11uM dose beats, because I wanted the average interval's corresponding BPM to be scaled to 120 BPM. After recording the timestamps of all of the important peaks, I made a new array of intervals of unit milliseconds. With those intervals, I could convert the intervals' inverse, in Hz (1 cycle per second). I then converted the intervals' Hz to BPM (beats per minute) by multiplying by 60.  &lt;br /&gt;
&lt;br /&gt;
I figured out that the heart cells when given the 11uM dose could beat at about 43.885 BPM normally. In music terms, that tempo is the faster end of &amp;quot;grave&amp;quot;. I could normalize the interval BPM's by dividing each value by the average. From here, it was rinse and repeat for the other graphs - The interval data for 3.703uM, 1.2345uM, 0.4115uM, 0.1271uM, and 0uM were all normalized with the same 43.885 BPM value.&lt;br /&gt;
&lt;br /&gt;
 %{&lt;br /&gt;
 Octave code for generating music from heartbeats&lt;br /&gt;
 Victor Mercola&lt;br /&gt;
 MU 3620&lt;br /&gt;
 2019-12-09&lt;br /&gt;
 under Prof. Manzo&lt;br /&gt;
 %}&lt;br /&gt;
   &lt;br /&gt;
 pkg load signal;&lt;br /&gt;
 averageInterval = 1367.2; % interval of average heart rate [ms]&lt;br /&gt;
 averageHz = 1 / (1367.2 / 1000); % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 averageBPM = averageHz * 60; % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 % disp(averageBPM) &lt;br /&gt;
 &lt;br /&gt;
 %{ &lt;br /&gt;
 1 beat        1 beat&lt;br /&gt;
 -----       = ------&lt;br /&gt;
 1367.2 ms     1.3672 s&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 x = csvread(&amp;quot;N406K_forMark.csv&amp;quot;,1,0); % original file, a csv &lt;br /&gt;
 &lt;br /&gt;
 %{&lt;br /&gt;
 Mex2A_100uM     = transpose(x(:,2)); % Mex2A - 100 uM&lt;br /&gt;
 Mex2A_33_333uM  = transpose(x(:,3)); % Mex2A - 33.333 uM&lt;br /&gt;
 Mex2A_11_111uM  = transpose(x(:,4)); % Mex2A - 11.111 uM&lt;br /&gt;
 Mex2A_3_703uM   = transpose(x(:,5)); % Mex2A - 3.703 uM&lt;br /&gt;
 Mex2A_1_2345uM  = transpose(x(:,6)); % Mex2A - 1.2345 uM&lt;br /&gt;
 Mex2A_0_4115uM  = transpose(x(:,7)); % Mex2A - 0.4115 uM&lt;br /&gt;
 Mex2A_0_1271uM  = transpose(x(:,8)); % Mex2A - 0.1271 uM&lt;br /&gt;
 Mex2A_0uM       = transpose(x(:,9)); % Mex2A - 0 uM&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 t = transpose(x(:,1)); % time array [ms]&lt;br /&gt;
 Mex2A = [100, 33.333, 11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]; &lt;br /&gt;
 &lt;br /&gt;
 n = 3; &lt;br /&gt;
 &lt;br /&gt;
 % find the peaks in the graph&lt;br /&gt;
 this_row = transpose(x(:,n + 1));&lt;br /&gt;
 [pks idx] = findpeaks(this_row, &amp;quot;MinPeakHeight&amp;quot;,0.015, &amp;quot;MinPeakDistance&amp;quot;, 5); &lt;br /&gt;
 &lt;br /&gt;
 % convert those peak values from findpeaks into coordinates&lt;br /&gt;
 peakX = t(idx);&lt;br /&gt;
 peakY = this_row(idx);&lt;br /&gt;
 disp(peakX);  &lt;br /&gt;
  &lt;br /&gt;
 f = figure;&lt;br /&gt;
 plot(t, this_row, peakX, peakY, 'x');&lt;br /&gt;
 axis([min(t), max(t), 0, 0.03]);&lt;br /&gt;
 title([&amp;quot;Intensity of Mex2A=&amp;quot;, num2str(Mex2A(n)), &amp;quot;uM&amp;quot;]);&lt;br /&gt;
 xlabel(&amp;quot;Time, t [ms]&amp;quot;);&lt;br /&gt;
 ylabel(&amp;quot;Intensity&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
 % calculate peak intervals&lt;br /&gt;
 for i = 2:length(peakX)&lt;br /&gt;
     pkToPkInterval(i - 1) = peakX(i) - peakX(i-1); % time between intervals [ms]&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 pkToPkHz = 1./(pkToPkInterval / 1000);  % interval frequency [Hz]&lt;br /&gt;
 pkToPkBPM = pkToPkHz * 60; % interval frequency [BPM]&lt;br /&gt;
 disp(pkToPkBPM); &lt;br /&gt;
 &lt;br /&gt;
 pkToPkRatio = pkToPkBPM / averageBPM&lt;br /&gt;
&lt;br /&gt;
== Playing the data ==&lt;br /&gt;
&lt;br /&gt;
I could export the data from GNU Octave into Sonic Pi by first pasting it into a simple text editor to format it nicely. Once I made a quick 120 BPM single-measure beat, I could import it into Sonic Pi and change its playback rate in time with the arrays that I generated from GNU Octave.&lt;br /&gt;
&lt;br /&gt;
While Sonic Pi is great for live-coding music, I personally think it's missing a couple of key programming elements. Two examples that are present is this code is for loops with changing variables and not being able to determine the length of an array. I found simple workarounds for both of these, though. I definitely want to see more usage of Sonic Pi in the future.&lt;br /&gt;
&lt;br /&gt;
 # Data Sonification with heartbeats&lt;br /&gt;
 # Victor Mercola - MU 3620&lt;br /&gt;
 # Prof. Manzo, 2019-12-09&lt;br /&gt;
 &lt;br /&gt;
 doses = [11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]&lt;br /&gt;
 &lt;br /&gt;
 dose = 0&lt;br /&gt;
 6.times do&lt;br /&gt;
   if(dose == 0)&lt;br /&gt;
     # 11.111 uM dose&lt;br /&gt;
     intervals = [1.00371, 1.00371, 1.00371, 1.00371, 0.98189, 1.00371]&lt;br /&gt;
     n = 6&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 1)&lt;br /&gt;
     # 3.703 uM dose&lt;br /&gt;
     intervals = [1.1292, 1.0037, 0.98189, 2.5093, 1.0504, 0.98189, 2.5093, 1.0754, 2.3772]&lt;br /&gt;
     n = 9&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 2)&lt;br /&gt;
     # 1.2345 uM dose&lt;br /&gt;
     intervals = [2.5093, 3.7639, 3.7639, 1.1581, 2.5093, 3.7639, 3.7639, 1.1292, 2.6569, 3.7639, 3.7639, 1.1292, 2.5093, 1.0504]&lt;br /&gt;
     n = 14&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 3)&lt;br /&gt;
     # 0.4115 uM dose&lt;br /&gt;
     intervals = [2.8229, 0.961, 2.8229, 0.94098, 2.8229, 4.1061, 3.7639, 0.961, 3.0111, 0.94098, 2.8229]&lt;br /&gt;
     n = 11&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 4)&lt;br /&gt;
     # 0.1271 uM dose&lt;br /&gt;
     intervals = [4.1061, 4.5167, 1.1016, 0.94098, 2.6569, 4.1061, 5.0185, 4.5167, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.1061, 4.1061, 4.5167, 1.1292]&lt;br /&gt;
     n = 21&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 5)&lt;br /&gt;
     # 0 uM dose&lt;br /&gt;
     intervals = [5.0185, 4.5167, 5.0185, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 1.1886, 1.0037, 2.6569, 4.5167, 5.0185, 5.0185, 5.6459, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 4.5167, 5.0185, 5.0185, 4.5167]&lt;br /&gt;
     n = 26&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   # Here's where the actual music happens&lt;br /&gt;
   &lt;br /&gt;
   i = 0&lt;br /&gt;
   n.times do&lt;br /&gt;
     puts(doses[dose],&amp;quot;uM&amp;quot;)&lt;br /&gt;
     puts(intervals[i])&lt;br /&gt;
     sample &amp;quot;D:/OneDrive/Documents/GNU Octave/quick drum loop v2.wav&amp;quot;, rate:intervals[i]&lt;br /&gt;
     wait 2 * (1 / intervals[i])&lt;br /&gt;
     i = i + 1&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   dose = dose + 1&lt;br /&gt;
   wait 1&lt;br /&gt;
 end&lt;br /&gt;
== End Result ==&lt;br /&gt;
&lt;br /&gt;
The first result of the project only had a simple drum pattern as a base loop and was used as a proof-of-proof-of-concept. I sent the results to my father and his staff and he said that they really liked it. After talking with him about it, I added a simple bass to the bass loop, which made it sound slightly better.&lt;br /&gt;
&lt;br /&gt;
This video below shows the data sonification from 11.111uM dose to the control 0uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-11-to-0.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
This video below shows the data sonification from control 0uM dose to the 11.111uM dose.&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-0-to-11.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Would nightcore, speedcore, and/or extratone music with arrhythmic heart patterns actually sound like a good music genre? Probably not, but I think it's a pretty effective tool for comparing the control and expected-dosage results of Mex2A.&lt;br /&gt;
&lt;br /&gt;
== Post-Mortem ==&lt;br /&gt;
This part will be updated once I finish continuing this project over break. If my father's paper on this is published, I'll definitely leave a link here. Stay tuned!&lt;/div&gt;</summary>
		<author><name>Vsmercola</name></author>
		
	</entry>
	<entry>
		<id>https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247017</id>
		<title>Arrhythmia Data Sonification</title>
		<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247017"/>
		<updated>2019-12-14T00:37:35Z</updated>

		<summary type="html">&lt;p&gt;Vsmercola: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By Victor Mercola&lt;br /&gt;
&lt;br /&gt;
My father, Mark Mercola, is a professor of medicine at Stanford University and the head of the Mercola Lab (as of writing this project). While talking with him about the classes I take at WPI, he mentioned how it would be interesting to use data sonification to educate and/or demonstrate the effectiveness of a new drug that he is working on. I agreed with his proposal and used the data he gave me for my final project in MU3620, Arrhythmia Data Sonification. Using GNU Octave, Ableton Live, and Sonic Pi, I was able to make &amp;quot;music&amp;quot; that would change according to an arrhythmic heartbeat.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Before working with music, there is some important preliminary background information to go over.&lt;br /&gt;
&lt;br /&gt;
The standard heartbeat seen on electrocardiograms (ECG / EKG) and other heart monitors is comprised of five different sections, named the &amp;quot;P Wave&amp;quot;, the &amp;quot;QRS Complex&amp;quot;, and the &amp;quot;T Wave&amp;quot;. The specific disease my father is working on is Long QT syndrome - as its name suggests, Long QT syndrome is a fatal, congenital cardiac rhythm disorder that where the length of the QT interval is longer than usual, causing arrhythmia patterns. My father is specifically working on Long QT type 3 (a.k.a. Long QT3 syndrome), which is caused by a problem regulating sodium ions in heart cells. He is currently working on a new drug to treat disease, currently named &amp;quot;Mex2A&amp;quot; and nicknamed &amp;quot;Super Mex&amp;quot; by his staff.&lt;br /&gt;
&lt;br /&gt;
== Processing the Data ==&lt;br /&gt;
&lt;br /&gt;
[[File:Mex2A graph.PNG|800px|center|Series of graphs of the results, from 100uM to 0uM left to right.]]&lt;br /&gt;
&lt;br /&gt;
My father sent me a large spreadsheet that, when graphed, produced the results of the graphs above. These show the results of human heart cells with Long QT3 syndrome given different dose amounts of Mex2A, in micromolar. The graphs' X-axes show the measured time in milliseconds, with measured intervals spaced roughly 30 ms apart. The graphs' Y-axes show the measured intensity - when the heart cells beat, the intensity goes up. One can tell from the graphs that the 100uM dose and 33.333uM dose results do not show any peaks, but the 11.111uM dose shows strikingly regular peaks denoting a heartbeat. When I saw this data, I thought would be neat to make &amp;quot;music&amp;quot; where each peak represented a music measure's bar line, and the tempo of the song would increase or decrease depending on how fast or slow the heart cells beat, respectively. &lt;br /&gt;
&lt;br /&gt;
To turn the heartbeat data into music intervals, I first opened the file in GNU Octave (open-source MATLAB alternative). I first wanted to find the average interval of the 11uM dose beats, because I wanted the average interval's corresponding BPM to be scaled to 120 BPM. After recording the timestamps of all of the important peaks, I made a new array of intervals of unit milliseconds. With those intervals, I could convert the intervals' inverse, in Hz (1 cycle per second). I then converted the intervals' Hz to BPM (beats per minute) by multiplying by 60.  &lt;br /&gt;
&lt;br /&gt;
I figured out that the heart cells when given the 11uM dose could beat at about 43.885 BPM normally. In music terms, that tempo is the faster end of &amp;quot;grave&amp;quot;. I could normalize the interval BPM's by dividing each value by the average. From here, it was rinse and repeat for the other graphs - The interval data for 3.703uM, 1.2345uM, 0.4115uM, 0.1271uM, and 0uM were all normalized with the same 43.885 BPM value.&lt;br /&gt;
&lt;br /&gt;
 %{&lt;br /&gt;
 Octave code for generating music from heartbeats&lt;br /&gt;
 Victor Mercola&lt;br /&gt;
 MU 3620&lt;br /&gt;
 2019-12-09&lt;br /&gt;
 under Prof. Manzo&lt;br /&gt;
 %}&lt;br /&gt;
   &lt;br /&gt;
 pkg load signal;&lt;br /&gt;
 averageInterval = 1367.2; % interval of average heart rate [ms]&lt;br /&gt;
 averageHz = 1 / (1367.2 / 1000); % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 averageBPM = averageHz * 60; % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 % disp(averageBPM) &lt;br /&gt;
 &lt;br /&gt;
 %{ &lt;br /&gt;
 1 beat        1 beat&lt;br /&gt;
 -----       = ------&lt;br /&gt;
 1367.2 ms     1.3672 s&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 x = csvread(&amp;quot;N406K_forMark.csv&amp;quot;,1,0); % original file, a csv &lt;br /&gt;
 &lt;br /&gt;
 %{&lt;br /&gt;
 Mex2A_100uM     = transpose(x(:,2)); % Mex2A - 100 uM&lt;br /&gt;
 Mex2A_33_333uM  = transpose(x(:,3)); % Mex2A - 33.333 uM&lt;br /&gt;
 Mex2A_11_111uM  = transpose(x(:,4)); % Mex2A - 11.111 uM&lt;br /&gt;
 Mex2A_3_703uM   = transpose(x(:,5)); % Mex2A - 3.703 uM&lt;br /&gt;
 Mex2A_1_2345uM  = transpose(x(:,6)); % Mex2A - 1.2345 uM&lt;br /&gt;
 Mex2A_0_4115uM  = transpose(x(:,7)); % Mex2A - 0.4115 uM&lt;br /&gt;
 Mex2A_0_1271uM  = transpose(x(:,8)); % Mex2A - 0.1271 uM&lt;br /&gt;
 Mex2A_0uM       = transpose(x(:,9)); % Mex2A - 0 uM&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 t = transpose(x(:,1)); % time array [ms]&lt;br /&gt;
 Mex2A = [100, 33.333, 11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]; &lt;br /&gt;
 &lt;br /&gt;
 n = 3; &lt;br /&gt;
 &lt;br /&gt;
 % find the peaks in the graph&lt;br /&gt;
 this_row = transpose(x(:,n + 1));&lt;br /&gt;
 [pks idx] = findpeaks(this_row, &amp;quot;MinPeakHeight&amp;quot;,0.015, &amp;quot;MinPeakDistance&amp;quot;, 5); &lt;br /&gt;
 &lt;br /&gt;
 % convert those peak values from findpeaks into coordinates&lt;br /&gt;
 peakX = t(idx);&lt;br /&gt;
 peakY = this_row(idx);&lt;br /&gt;
 disp(peakX);  &lt;br /&gt;
  &lt;br /&gt;
 f = figure;&lt;br /&gt;
 plot(t, this_row, peakX, peakY, 'x');&lt;br /&gt;
 axis([min(t), max(t), 0, 0.03]);&lt;br /&gt;
 title([&amp;quot;Intensity of Mex2A=&amp;quot;, num2str(Mex2A(n)), &amp;quot;uM&amp;quot;]);&lt;br /&gt;
 xlabel(&amp;quot;Time, t [ms]&amp;quot;);&lt;br /&gt;
 ylabel(&amp;quot;Intensity&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
 % calculate peak intervals&lt;br /&gt;
 for i = 2:length(peakX)&lt;br /&gt;
     pkToPkInterval(i - 1) = peakX(i) - peakX(i-1); % time between intervals [ms]&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 pkToPkHz = 1./(pkToPkInterval / 1000);  % interval frequency [Hz]&lt;br /&gt;
 pkToPkBPM = pkToPkHz * 60; % interval frequency [BPM]&lt;br /&gt;
 disp(pkToPkBPM); &lt;br /&gt;
 &lt;br /&gt;
 pkToPkRatio = pkToPkBPM / averageBPM&lt;br /&gt;
&lt;br /&gt;
== Playing the data ==&lt;br /&gt;
&lt;br /&gt;
I could export the data from GNU Octave into Sonic Pi by first pasting it into a simple text editor to format it nicely. Once I made a quick 120 BPM single-measure beat, I could import it into Sonic Pi and change its playback rate in time with the arrays that I generated from GNU Octave.&lt;br /&gt;
&lt;br /&gt;
While Sonic Pi is great for live-coding music, I personally think it's missing a couple of key programming elements. Two examples that are present is this code is for loops with changing variables and not being able to determine the length of an array. I found simple workarounds for both of these, though. I definitely want to see more usage of Sonic Pi in the future.&lt;br /&gt;
&lt;br /&gt;
 # Data Sonification with heartbeats&lt;br /&gt;
 # Victor Mercola - MU 3620&lt;br /&gt;
 # Prof. Manzo, 2019-12-09&lt;br /&gt;
 &lt;br /&gt;
 doses = [11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]&lt;br /&gt;
 &lt;br /&gt;
 dose = 0&lt;br /&gt;
 6.times do&lt;br /&gt;
   if(dose == 0)&lt;br /&gt;
     # 11.111 uM dose&lt;br /&gt;
     intervals = [1.00371, 1.00371, 1.00371, 1.00371, 0.98189, 1.00371]&lt;br /&gt;
     n = 6&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 1)&lt;br /&gt;
     # 3.703 uM dose&lt;br /&gt;
     intervals = [1.1292, 1.0037, 0.98189, 2.5093, 1.0504, 0.98189, 2.5093, 1.0754, 2.3772]&lt;br /&gt;
     n = 9&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 2)&lt;br /&gt;
     # 1.2345 uM dose&lt;br /&gt;
     intervals = [2.5093, 3.7639, 3.7639, 1.1581, 2.5093, 3.7639, 3.7639, 1.1292, 2.6569, 3.7639, 3.7639, 1.1292, 2.5093, 1.0504]&lt;br /&gt;
     n = 14&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 3)&lt;br /&gt;
     # 0.4115 uM dose&lt;br /&gt;
     intervals = [2.8229, 0.961, 2.8229, 0.94098, 2.8229, 4.1061, 3.7639, 0.961, 3.0111, 0.94098, 2.8229]&lt;br /&gt;
     n = 11&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 4)&lt;br /&gt;
     # 0.1271 uM dose&lt;br /&gt;
     intervals = [4.1061, 4.5167, 1.1016, 0.94098, 2.6569, 4.1061, 5.0185, 4.5167, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.1061, 4.1061, 4.5167, 1.1292]&lt;br /&gt;
     n = 21&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 5)&lt;br /&gt;
     # 0 uM dose&lt;br /&gt;
     intervals = [5.0185, 4.5167, 5.0185, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 1.1886, 1.0037, 2.6569, 4.5167, 5.0185, 5.0185, 5.6459, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 4.5167, 5.0185, 5.0185, 4.5167]&lt;br /&gt;
     n = 26&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   # Here's where the actual music happens&lt;br /&gt;
   &lt;br /&gt;
   i = 0&lt;br /&gt;
   n.times do&lt;br /&gt;
     puts(doses[dose],&amp;quot;uM&amp;quot;)&lt;br /&gt;
     puts(intervals[i])&lt;br /&gt;
     sample &amp;quot;D:/OneDrive/Documents/GNU Octave/quick drum loop v2.wav&amp;quot;, rate:intervals[i]&lt;br /&gt;
     wait 2 * (1 / intervals[i])&lt;br /&gt;
     i = i + 1&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   dose = dose + 1&lt;br /&gt;
   wait 1&lt;br /&gt;
 end&lt;br /&gt;
== End Result ==&lt;br /&gt;
&lt;br /&gt;
The first result of the project only had a simple drum pattern as a base loop and was used as a proof-of-proof-of-concept. I sent the results to my father and his staff and he said that they really liked it. After talking with him about it, I added a simple bass to the bass loop, which made it sound slightly better.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-11-to-0.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-0-to-11.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Would nightcore, speedcore, and/or extratone music with arrhythmic heart patterns actually sound like a good music genre? Probably not, but I think it's a pretty effective tool for comparing the control and expected-dosage results of Mex2A.&lt;br /&gt;
&lt;br /&gt;
== Post-Mortem ==&lt;br /&gt;
This part will be updated once I finish continuing this project over break. If my father's paper on this is published, I'll definitely leave a link here. Stay tuned!&lt;/div&gt;</summary>
		<author><name>Vsmercola</name></author>
		
	</entry>
	<entry>
		<id>https://vjmedia.wpi.edu/index.php?title=File:Arrhythmia-Data-Sonification-0-to-11.mp4&amp;diff=247016</id>
		<title>File:Arrhythmia-Data-Sonification-0-to-11.mp4</title>
		<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/index.php?title=File:Arrhythmia-Data-Sonification-0-to-11.mp4&amp;diff=247016"/>
		<updated>2019-12-14T00:36:55Z</updated>

		<summary type="html">&lt;p&gt;Vsmercola: Arrhythmia Data Sonification Project by Victor Mercola&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Arrhythmia Data Sonification Project by Victor Mercola&lt;/div&gt;</summary>
		<author><name>Vsmercola</name></author>
		
	</entry>
	<entry>
		<id>https://vjmedia.wpi.edu/index.php?title=File:Arrhythmia-Data-Sonification-11-to-0.mp4&amp;diff=247015</id>
		<title>File:Arrhythmia-Data-Sonification-11-to-0.mp4</title>
		<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/index.php?title=File:Arrhythmia-Data-Sonification-11-to-0.mp4&amp;diff=247015"/>
		<updated>2019-12-14T00:36:16Z</updated>

		<summary type="html">&lt;p&gt;Vsmercola: Vsmercola uploaded a new version of File:Arrhythmia-Data-Sonification-11-to-0.mp4&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Arrhythmia Data Sonification Project by Victor Mercola&lt;/div&gt;</summary>
		<author><name>Vsmercola</name></author>
		
	</entry>
	<entry>
		<id>https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247014</id>
		<title>Arrhythmia Data Sonification</title>
		<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247014"/>
		<updated>2019-12-14T00:20:23Z</updated>

		<summary type="html">&lt;p&gt;Vsmercola: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By Victor Mercola&lt;br /&gt;
&lt;br /&gt;
My father, Mark Mercola, is a professor of medicine at Stanford University and the head of the Mercola Lab (as of writing this project). While talking with him about the classes I take at WPI, he mentioned how it would be interesting to use data sonification to educate and/or demonstrate the effectiveness of a new drug that he is working on. I agreed with his proposal and used the data he gave me for my final project in MU3620, Arrhythmia Data Sonification. Using GNU Octave, Ableton Live, and Sonic Pi, I was able to make &amp;quot;music&amp;quot; that would change according to an arrhythmic heartbeat.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Before working with music, there is some important preliminary background information to go over.&lt;br /&gt;
&lt;br /&gt;
The standard heartbeat seen on electrocardiograms (ECG / EKG) and other heart monitors is comprised of five different sections, named the &amp;quot;P Wave&amp;quot;, the &amp;quot;QRS Complex&amp;quot;, and the &amp;quot;T Wave&amp;quot;. The specific disease my father is working on is Long QT syndrome - as its name suggests, Long QT syndrome is a fatal, congenital cardiac rhythm disorder that where the length of the QT interval is longer than usual, causing arrhythmia patterns. My father is specifically working on Long QT type 3 (a.k.a. Long QT3 syndrome), which is caused by a problem regulating sodium ions in heart cells. He is currently working on a new drug to treat disease, currently named &amp;quot;Mex2A&amp;quot; and nicknamed &amp;quot;Super Mex&amp;quot; by his staff.&lt;br /&gt;
&lt;br /&gt;
== Processing the Data ==&lt;br /&gt;
&lt;br /&gt;
[[File:Mex2A graph.PNG|800px|center|Series of graphs of the results, from 100uM to 0uM left to right.]]&lt;br /&gt;
&lt;br /&gt;
My father sent me a large spreadsheet that, when graphed, produced the results of the graphs above. These show the results of human heart cells with Long QT3 syndrome given different dose amounts of Mex2A, in micromolar. The graphs' X-axes show the measured time in milliseconds, with measured intervals spaced roughly 30 ms apart. The graphs' Y-axes show the measured intensity - when the heart cells beat, the intensity goes up. One can tell from the graphs that the 100uM dose and 33.333uM dose results do not show any peaks, but the 11.111uM dose shows strikingly regular peaks denoting a heartbeat. When I saw this data, I thought would be neat to make &amp;quot;music&amp;quot; where each peak represented a music measure's bar line, and the tempo of the song would increase or decrease depending on how fast or slow the heart cells beat, respectively. &lt;br /&gt;
&lt;br /&gt;
To turn the heartbeat data into music intervals, I first opened the file in GNU Octave (open-source MATLAB alternative). I first wanted to find the average interval of the 11uM dose beats, because I wanted the average interval's corresponding BPM to be scaled to 120 BPM. After recording the timestamps of all of the important peaks, I made a new array of intervals of unit milliseconds. With those intervals, I could convert the intervals' inverse, in Hz (1 cycle per second). I then converted the intervals' Hz to BPM (beats per minute) by multiplying by 60.  &lt;br /&gt;
&lt;br /&gt;
I figured out that the heart cells when given the 11uM dose could beat at about 43.885 BPM normally. In music terms, that tempo is the faster end of &amp;quot;grave&amp;quot;. I could normalize the interval BPM's by dividing each value by the average. From here, it was rinse and repeat for the other graphs - The interval data for 3.703uM, 1.2345uM, 0.4115uM, 0.1271uM, and 0uM were all normalized with the same 43.885 BPM value.&lt;br /&gt;
&lt;br /&gt;
 %{&lt;br /&gt;
 Octave code for generating music from heartbeats&lt;br /&gt;
 Victor Mercola&lt;br /&gt;
 MU 3620&lt;br /&gt;
 2019-12-09&lt;br /&gt;
 under Prof. Manzo&lt;br /&gt;
 %}&lt;br /&gt;
   &lt;br /&gt;
 pkg load signal;&lt;br /&gt;
 averageInterval = 1367.2; % interval of average heart rate [ms]&lt;br /&gt;
 averageHz = 1 / (1367.2 / 1000); % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 averageBPM = averageHz * 60; % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 % disp(averageBPM) &lt;br /&gt;
 &lt;br /&gt;
 %{ &lt;br /&gt;
 1 beat        1 beat&lt;br /&gt;
 -----       = ------&lt;br /&gt;
 1367.2 ms     1.3672 s&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 x = csvread(&amp;quot;N406K_forMark.csv&amp;quot;,1,0); % original file, a csv &lt;br /&gt;
 &lt;br /&gt;
 %{&lt;br /&gt;
 Mex2A_100uM     = transpose(x(:,2)); % Mex2A - 100 uM&lt;br /&gt;
 Mex2A_33_333uM  = transpose(x(:,3)); % Mex2A - 33.333 uM&lt;br /&gt;
 Mex2A_11_111uM  = transpose(x(:,4)); % Mex2A - 11.111 uM&lt;br /&gt;
 Mex2A_3_703uM   = transpose(x(:,5)); % Mex2A - 3.703 uM&lt;br /&gt;
 Mex2A_1_2345uM  = transpose(x(:,6)); % Mex2A - 1.2345 uM&lt;br /&gt;
 Mex2A_0_4115uM  = transpose(x(:,7)); % Mex2A - 0.4115 uM&lt;br /&gt;
 Mex2A_0_1271uM  = transpose(x(:,8)); % Mex2A - 0.1271 uM&lt;br /&gt;
 Mex2A_0uM       = transpose(x(:,9)); % Mex2A - 0 uM&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 t = transpose(x(:,1)); % time array [ms]&lt;br /&gt;
 Mex2A = [100, 33.333, 11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]; &lt;br /&gt;
 &lt;br /&gt;
 n = 3; &lt;br /&gt;
 &lt;br /&gt;
 % find the peaks in the graph&lt;br /&gt;
 this_row = transpose(x(:,n + 1));&lt;br /&gt;
 [pks idx] = findpeaks(this_row, &amp;quot;MinPeakHeight&amp;quot;,0.015, &amp;quot;MinPeakDistance&amp;quot;, 5); &lt;br /&gt;
 &lt;br /&gt;
 % convert those peak values from findpeaks into coordinates&lt;br /&gt;
 peakX = t(idx);&lt;br /&gt;
 peakY = this_row(idx);&lt;br /&gt;
 disp(peakX);  &lt;br /&gt;
  &lt;br /&gt;
 f = figure;&lt;br /&gt;
 plot(t, this_row, peakX, peakY, 'x');&lt;br /&gt;
 axis([min(t), max(t), 0, 0.03]);&lt;br /&gt;
 title([&amp;quot;Intensity of Mex2A=&amp;quot;, num2str(Mex2A(n)), &amp;quot;uM&amp;quot;]);&lt;br /&gt;
 xlabel(&amp;quot;Time, t [ms]&amp;quot;);&lt;br /&gt;
 ylabel(&amp;quot;Intensity&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
 % calculate peak intervals&lt;br /&gt;
 for i = 2:length(peakX)&lt;br /&gt;
     pkToPkInterval(i - 1) = peakX(i) - peakX(i-1); % time between intervals [ms]&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 pkToPkHz = 1./(pkToPkInterval / 1000);  % interval frequency [Hz]&lt;br /&gt;
 pkToPkBPM = pkToPkHz * 60; % interval frequency [BPM]&lt;br /&gt;
 disp(pkToPkBPM); &lt;br /&gt;
 &lt;br /&gt;
 pkToPkRatio = pkToPkBPM / averageBPM&lt;br /&gt;
&lt;br /&gt;
== Playing the data ==&lt;br /&gt;
&lt;br /&gt;
I could export the data from GNU Octave into Sonic Pi by first pasting it into a simple text editor to format it nicely. Once I made a quick 120 BPM single-measure beat, I could import it into Sonic Pi and change its playback rate in time with the arrays that I generated from GNU Octave.&lt;br /&gt;
&lt;br /&gt;
While Sonic Pi is great for live-coding music, I personally think it's missing a couple of key programming elements. Two examples that are present is this code is for loops with changing variables and not being able to determine the length of an array. I found simple workarounds for both of these, though. I definitely want to see more usage of Sonic Pi in the future.&lt;br /&gt;
&lt;br /&gt;
 # Data Sonification with heartbeats&lt;br /&gt;
 # Victor Mercola - MU 3620&lt;br /&gt;
 # Prof. Manzo, 2019-12-09&lt;br /&gt;
 &lt;br /&gt;
 doses = [11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]&lt;br /&gt;
 &lt;br /&gt;
 dose = 0&lt;br /&gt;
 6.times do&lt;br /&gt;
   if(dose == 0)&lt;br /&gt;
     # 11.111 uM dose&lt;br /&gt;
     intervals = [1.00371, 1.00371, 1.00371, 1.00371, 0.98189, 1.00371]&lt;br /&gt;
     n = 6&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 1)&lt;br /&gt;
     # 3.703 uM dose&lt;br /&gt;
     intervals = [1.1292, 1.0037, 0.98189, 2.5093, 1.0504, 0.98189, 2.5093, 1.0754, 2.3772]&lt;br /&gt;
     n = 9&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 2)&lt;br /&gt;
     # 1.2345 uM dose&lt;br /&gt;
     intervals = [2.5093, 3.7639, 3.7639, 1.1581, 2.5093, 3.7639, 3.7639, 1.1292, 2.6569, 3.7639, 3.7639, 1.1292, 2.5093, 1.0504]&lt;br /&gt;
     n = 14&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 3)&lt;br /&gt;
     # 0.4115 uM dose&lt;br /&gt;
     intervals = [2.8229, 0.961, 2.8229, 0.94098, 2.8229, 4.1061, 3.7639, 0.961, 3.0111, 0.94098, 2.8229]&lt;br /&gt;
     n = 11&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 4)&lt;br /&gt;
     # 0.1271 uM dose&lt;br /&gt;
     intervals = [4.1061, 4.5167, 1.1016, 0.94098, 2.6569, 4.1061, 5.0185, 4.5167, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.1061, 4.1061, 4.5167, 1.1292]&lt;br /&gt;
     n = 21&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 5)&lt;br /&gt;
     # 0 uM dose&lt;br /&gt;
     intervals = [5.0185, 4.5167, 5.0185, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 1.1886, 1.0037, 2.6569, 4.5167, 5.0185, 5.0185, 5.6459, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 4.5167, 5.0185, 5.0185, 4.5167]&lt;br /&gt;
     n = 26&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   # Here's where the actual music happens&lt;br /&gt;
   &lt;br /&gt;
   i = 0&lt;br /&gt;
   n.times do&lt;br /&gt;
     puts(doses[dose],&amp;quot;uM&amp;quot;)&lt;br /&gt;
     puts(intervals[i])&lt;br /&gt;
     sample &amp;quot;D:/OneDrive/Documents/GNU Octave/quick drum loop v2.wav&amp;quot;, rate:intervals[i]&lt;br /&gt;
     wait 2 * (1 / intervals[i])&lt;br /&gt;
     i = i + 1&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   dose = dose + 1&lt;br /&gt;
   wait 1&lt;br /&gt;
 end&lt;br /&gt;
== End Result ==&lt;br /&gt;
&lt;br /&gt;
The first result of the project only had a simple drum pattern as a base loop and was used as a proof-of-proof-of-concept. I sent the results to my father and his staff and he said that they really liked it. After talking with him about it, I added a simple bass to the bass loop, which made it sound slightly better.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-11-to-0.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Would nightcore, speedcore, and/or extratone music with arrhythmic heart patterns actually sound like a good music genre? Probably not, but I think it's a pretty effective tool for comparing the control and expected-dosage results of Mex2A.&lt;br /&gt;
&lt;br /&gt;
== Post-Mortem ==&lt;br /&gt;
This part will be updated once I finish continuing this project over break. If my father's paper on this is published, I'll definitely leave a link here. Stay tuned!&lt;/div&gt;</summary>
		<author><name>Vsmercola</name></author>
		
	</entry>
	<entry>
		<id>https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247013</id>
		<title>Arrhythmia Data Sonification</title>
		<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247013"/>
		<updated>2019-12-14T00:18:50Z</updated>

		<summary type="html">&lt;p&gt;Vsmercola: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By Victor Mercola&lt;br /&gt;
&lt;br /&gt;
My father, Mark Mercola, is a professor of medicine at Stanford University and the head of the Mercola Lab (as of writing this project). While talking with him about the classes I take at WPI, he mentioned how it would be interesting to use data sonification to educate and/or demonstrate the effectiveness of a new drug that he is working on. I agreed with his proposal and used the data he gave me for my final project in MU3620, Arrhythmia Data Sonification. Using GNU Octave, Ableton Live, and Sonic Pi, I was able to make &amp;quot;music&amp;quot; that would change according to an arrhythmic heartbeat.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Before working with music, there is some important preliminary background information to go over.&lt;br /&gt;
&lt;br /&gt;
The standard heartbeat seen on electrocardiograms (ECG / EKG) and other heart monitors is comprised of five different sections, named the &amp;quot;P Wave&amp;quot;, the &amp;quot;QRS Complex&amp;quot;, and the &amp;quot;T Wave&amp;quot;. The specific disease my father is working on is Long QT syndrome - as its name suggests, Long QT syndrome is a fatal, congenital cardiac rhythm disorder that where the length of the QT interval is longer than usual, causing arrhythmia patterns. My father is specifically working on Long QT type 3 (a.k.a. Long QT3 syndrome), which is caused by a problem regulating sodium ions in heart cells. He is currently working on a new drug to treat disease, currently named &amp;quot;Mex2A&amp;quot; and nicknamed &amp;quot;Super Mex&amp;quot; by his staff.&lt;br /&gt;
&lt;br /&gt;
== Processing the Data, with GNU Octave ==&lt;br /&gt;
&lt;br /&gt;
[[File:Mex2A graph.PNG|800px|center|Series of graphs of the results, from 100uM to 0uM left to right.]]&lt;br /&gt;
&lt;br /&gt;
My father sent me a large spreadsheet that, when graphed, produced the results of the graphs above. These show the results of human heart cells with Long QT3 syndrome given different dose amounts of Mex2A, in micromolar. The graphs' X-axes show the measured time in milliseconds, with measured intervals spaced roughly 30 ms apart. The graphs' Y-axes show the measured intensity - when the heart cells beat, the intensity goes up. One can tell from the graphs that the 100uM dose and 33.333uM dose results do not show any peaks, but the 11.111uM dose shows strikingly regular peaks denoting a heartbeat. When I saw this data, I thought would be neat to make &amp;quot;music&amp;quot; where each peak represented a music measure's bar line, and the tempo of the song would increase or decrease depending on how fast or slow the heart cells beat, respectively. &lt;br /&gt;
&lt;br /&gt;
To turn the heartbeat data into music intervals, I first opened the file in GNU Octave (open-source MATLAB alternative). I first wanted to find the average interval of the 11uM dose beats, because I wanted the average interval's corresponding BPM to be scaled to 120 BPM. After recording the timestamps of all of the important peaks, I made a new array of intervals of unit milliseconds. With those intervals, I could convert the intervals' inverse, in Hz (1 cycle per second). I then converted the intervals' Hz to BPM (beats per minute) by multiplying by 60.  &lt;br /&gt;
&lt;br /&gt;
I figured out that the heart cells when given the 11uM dose could beat at about 43.885 BPM normally. In music terms, that tempo is the faster end of &amp;quot;grave&amp;quot;. I could normalize the interval BPM's by dividing each value by the average. From here, it was rinse and repeat for the other graphs - The interval data for 3.703uM, 1.2345uM, 0.4115uM, 0.1271uM, and 0uM were all normalized with the same 43.885 BPM value.&lt;br /&gt;
&lt;br /&gt;
 %{&lt;br /&gt;
 Octave code for generating music from heartbeats&lt;br /&gt;
 Victor Mercola&lt;br /&gt;
 MU 3620&lt;br /&gt;
 2019-12-09&lt;br /&gt;
 under Prof. Manzo&lt;br /&gt;
 %}&lt;br /&gt;
   &lt;br /&gt;
 pkg load signal;&lt;br /&gt;
 averageInterval = 1367.2; % interval of average heart rate [ms]&lt;br /&gt;
 averageHz = 1 / (1367.2 / 1000); % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 averageBPM = averageHz * 60; % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 % disp(averageBPM) &lt;br /&gt;
 &lt;br /&gt;
 %{ &lt;br /&gt;
 1 beat        1 beat&lt;br /&gt;
 -----       = ------&lt;br /&gt;
 1367.2 ms     1.3672 s&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 x = csvread(&amp;quot;N406K_forMark.csv&amp;quot;,1,0); % original file, a csv &lt;br /&gt;
 &lt;br /&gt;
 %{&lt;br /&gt;
 Mex2A_100uM     = transpose(x(:,2)); % Mex2A - 100 uM&lt;br /&gt;
 Mex2A_33_333uM  = transpose(x(:,3)); % Mex2A - 33.333 uM&lt;br /&gt;
 Mex2A_11_111uM  = transpose(x(:,4)); % Mex2A - 11.111 uM&lt;br /&gt;
 Mex2A_3_703uM   = transpose(x(:,5)); % Mex2A - 3.703 uM&lt;br /&gt;
 Mex2A_1_2345uM  = transpose(x(:,6)); % Mex2A - 1.2345 uM&lt;br /&gt;
 Mex2A_0_4115uM  = transpose(x(:,7)); % Mex2A - 0.4115 uM&lt;br /&gt;
 Mex2A_0_1271uM  = transpose(x(:,8)); % Mex2A - 0.1271 uM&lt;br /&gt;
 Mex2A_0uM       = transpose(x(:,9)); % Mex2A - 0 uM&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 t = transpose(x(:,1)); % time array [ms]&lt;br /&gt;
 Mex2A = [100, 33.333, 11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]; &lt;br /&gt;
 &lt;br /&gt;
 n = 3; &lt;br /&gt;
 &lt;br /&gt;
 % find the peaks in the graph&lt;br /&gt;
 this_row = transpose(x(:,n + 1));&lt;br /&gt;
 [pks idx] = findpeaks(this_row, &amp;quot;MinPeakHeight&amp;quot;,0.015, &amp;quot;MinPeakDistance&amp;quot;, 5); &lt;br /&gt;
 &lt;br /&gt;
 % convert those peak values from findpeaks into coordinates&lt;br /&gt;
 peakX = t(idx);&lt;br /&gt;
 peakY = this_row(idx);&lt;br /&gt;
 disp(peakX);  &lt;br /&gt;
  &lt;br /&gt;
 f = figure;&lt;br /&gt;
 plot(t, this_row, peakX, peakY, 'x');&lt;br /&gt;
 axis([min(t), max(t), 0, 0.03]);&lt;br /&gt;
 title([&amp;quot;Intensity of Mex2A=&amp;quot;, num2str(Mex2A(n)), &amp;quot;uM&amp;quot;]);&lt;br /&gt;
 xlabel(&amp;quot;Time, t [ms]&amp;quot;);&lt;br /&gt;
 ylabel(&amp;quot;Intensity&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
 % calculate peak intervals&lt;br /&gt;
 for i = 2:length(peakX)&lt;br /&gt;
     pkToPkInterval(i - 1) = peakX(i) - peakX(i-1); % time between intervals [ms]&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 pkToPkHz = 1./(pkToPkInterval / 1000);  % interval frequency [Hz]&lt;br /&gt;
 pkToPkBPM = pkToPkHz * 60; % interval frequency [BPM]&lt;br /&gt;
 disp(pkToPkBPM); &lt;br /&gt;
 &lt;br /&gt;
 pkToPkRatio = pkToPkBPM / averageBPM&lt;br /&gt;
&lt;br /&gt;
== Playing the data, with Sonic Pi ==&lt;br /&gt;
&lt;br /&gt;
I could export the data from GNU Octave into Sonic Pi by first pasting it into a simple text editor to format it nicely. Once I made a quick 120 BPM single-measure beat, I could import it into Sonic Pi and change its playback rate in time with the arrays that I generated from GNU Octave.&lt;br /&gt;
&lt;br /&gt;
While Sonic Pi is great for live-coding music, I personally think it's missing a couple of key programming elements. Two examples that are present is this code is for loops with changing variables and not being able to determine the length of an array. I found simple workarounds for both of these, though. I definitely want to see more usage of Sonic Pi in the future.&lt;br /&gt;
&lt;br /&gt;
 # Data Sonification with heartbeats&lt;br /&gt;
 # Victor Mercola - MU 3620&lt;br /&gt;
 # Prof. Manzo, 2019-12-09&lt;br /&gt;
 &lt;br /&gt;
 doses = [11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]&lt;br /&gt;
 &lt;br /&gt;
 dose = 0&lt;br /&gt;
 6.times do&lt;br /&gt;
   if(dose == 0)&lt;br /&gt;
     # 11.111 uM dose&lt;br /&gt;
     intervals = [1.00371, 1.00371, 1.00371, 1.00371, 0.98189, 1.00371]&lt;br /&gt;
     n = 6&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 1)&lt;br /&gt;
     # 3.703 uM dose&lt;br /&gt;
     intervals = [1.1292, 1.0037, 0.98189, 2.5093, 1.0504, 0.98189, 2.5093, 1.0754, 2.3772]&lt;br /&gt;
     n = 9&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 2)&lt;br /&gt;
     # 1.2345 uM dose&lt;br /&gt;
     intervals = [2.5093, 3.7639, 3.7639, 1.1581, 2.5093, 3.7639, 3.7639, 1.1292, 2.6569, 3.7639, 3.7639, 1.1292, 2.5093, 1.0504]&lt;br /&gt;
     n = 14&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 3)&lt;br /&gt;
     # 0.4115 uM dose&lt;br /&gt;
     intervals = [2.8229, 0.961, 2.8229, 0.94098, 2.8229, 4.1061, 3.7639, 0.961, 3.0111, 0.94098, 2.8229]&lt;br /&gt;
     n = 11&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 4)&lt;br /&gt;
     # 0.1271 uM dose&lt;br /&gt;
     intervals = [4.1061, 4.5167, 1.1016, 0.94098, 2.6569, 4.1061, 5.0185, 4.5167, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.1061, 4.1061, 4.5167, 1.1292]&lt;br /&gt;
     n = 21&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 5)&lt;br /&gt;
     # 0 uM dose&lt;br /&gt;
     intervals = [5.0185, 4.5167, 5.0185, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 1.1886, 1.0037, 2.6569, 4.5167, 5.0185, 5.0185, 5.6459, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 4.5167, 5.0185, 5.0185, 4.5167]&lt;br /&gt;
     n = 26&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   # Here's where the actual music happens&lt;br /&gt;
   &lt;br /&gt;
   i = 0&lt;br /&gt;
   n.times do&lt;br /&gt;
     puts(doses[dose],&amp;quot;uM&amp;quot;)&lt;br /&gt;
     puts(intervals[i])&lt;br /&gt;
     sample &amp;quot;D:/OneDrive/Documents/GNU Octave/quick drum loop v2.wav&amp;quot;, rate:intervals[i]&lt;br /&gt;
     wait 2 * (1 / intervals[i])&lt;br /&gt;
     i = i + 1&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   dose = dose + 1&lt;br /&gt;
   wait 1&lt;br /&gt;
 end&lt;br /&gt;
== End Result ==&lt;br /&gt;
&lt;br /&gt;
The first result of the project only had a simple drum pattern as a base loop and was used as a proof-of-proof-of-concept. I sent the results to my father and his staff and he said that they really liked it. After talking with him about it, I added a simple bass to the bass loop, which made it sound slightly better.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-11-to-0.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Would nightcore, speedcore, and/or extratone music with arrhythmic heart patterns actually sound like a good music genre? Probably not, but I think it's a pretty effective tool for comparing the control and expected-dosage results of Mex2A.&lt;br /&gt;
&lt;br /&gt;
== Post-Mortem ==&lt;br /&gt;
This part will be updated once I finish continuing this project over break. If my father's paper on this is published, I'll definitely leave a link here. Stay tuned!&lt;/div&gt;</summary>
		<author><name>Vsmercola</name></author>
		
	</entry>
	<entry>
		<id>https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247012</id>
		<title>Arrhythmia Data Sonification</title>
		<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/index.php?title=Arrhythmia_Data_Sonification&amp;diff=247012"/>
		<updated>2019-12-13T23:58:37Z</updated>

		<summary type="html">&lt;p&gt;Vsmercola: Created page with &amp;quot;By Victor Mercola  My father, Mark Mercola, is a professor of medicine at Stanford University and the head of the Mercola Lab (as of writing this project). While talking with...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By Victor Mercola&lt;br /&gt;
&lt;br /&gt;
My father, Mark Mercola, is a professor of medicine at Stanford University and the head of the Mercola Lab (as of writing this project). While talking with him about the classes I take at WPI, he mentioned how it would be interesting to use data sonification to educate and/or demonstrate the effectiveness of a new drug that he is working on. I agreed with his proposal and used the data he gave me for my final project in MU3620, Arrhythmia Data Sonification. Using GNU Octave, Ableton Live, and Sonic Pi, I was able to make &amp;quot;music&amp;quot; that would change according to an arrhythmic heartbeat.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Before working with music, there is some important preliminary background information to go over.&lt;br /&gt;
&lt;br /&gt;
The standard heartbeat seen on electrocardiograms (ECG / EKG) and other heart monitors is comprised of five different sections, named the &amp;quot;P Wave&amp;quot;, the &amp;quot;QRS Complex&amp;quot;, and the &amp;quot;T Wave&amp;quot;. The specific disease my father is working on is Long QT syndrome - as its name suggests, Long QT syndrome is a fatal, congenital cardiac rhythm disorder that where the length of the QT interval is longer than usual, causing arrhythmia patterns. My father is specifically working on Long QT type 3 (a.k.a. Long QT3 syndrome), which is caused by a problem regulating sodium ions in heart cells. My father is currently working on a new drug to treat disease, named &amp;quot;Mex2A&amp;quot; and nicknamed &amp;quot;Super Mex&amp;quot; by his staff.&lt;br /&gt;
&lt;br /&gt;
== Processing the Data, with GNU Octave ==&lt;br /&gt;
&lt;br /&gt;
[[File:Mex2A graph.PNG|800px|center|Series of graphs of the results, from 100uM to 0uM left to right.]]&lt;br /&gt;
&lt;br /&gt;
My father sent me a large spreadsheet that, when graphed, produced the results of the graphs above. These show the results of human heart cells with Long QT3 syndrome given different dose amounts of Mex2A, in micromolar. The graphs' X-axes show the measured time in milliseconds, with measured intervals spaced roughly 30 ms apart. The graphs' Y-axes show the measured intensity - when the heart cells beat, the intensity goes up. One can tell from the graphs that the 100uM dose and 33.333uM dose results do not show any peaks, but the 11.111uM dose shows strikingly regular peaks denoting a heartbeat. When I saw this data, I thought would be neat to make &amp;quot;music&amp;quot; where each peak represented a music measure's bar line, and the tempo of the song would increase or decrease depending on how fast or slow the heart cells beat, respectively. &lt;br /&gt;
&lt;br /&gt;
To turn the heartbeat data into music intervals, I first opened the file in GNU Octave (open-source MATLAB alternative). I first wanted to find the average interval of the 11uM dose beats, because I wanted the average interval's corresponding BPM to be scaled to 120 BPM. After recording the timestamps of all of the important peaks, I made a new array of intervals of unit milliseconds. With those intervals, I could convert the intervals' inverse, in Hz (1 cycle per second). I then converted the intervals' Hz to BPM (beats per minute) by multiplying by 60.  &lt;br /&gt;
&lt;br /&gt;
I figured out that the heart cells when given the 11uM dose could beat at about 43.885 BPM normally. In music terms, that tempo is the faster end of &amp;quot;grave&amp;quot;. I could normalize the interval BPM's by dividing each value by the average. From here, it was rinse and repeat for the other graphs - The interval data for 3.703uM, 1.2345uM, 0.4115uM, 0.1271uM, and 0uM were all normalized with the same 43.885 BPM value.&lt;br /&gt;
&lt;br /&gt;
 %{&lt;br /&gt;
 Octave code for generating music from heartbeats&lt;br /&gt;
 Victor Mercola&lt;br /&gt;
 MU 3620&lt;br /&gt;
 2019-12-09&lt;br /&gt;
 under Prof. Manzo&lt;br /&gt;
 %}&lt;br /&gt;
   &lt;br /&gt;
 pkg load signal;&lt;br /&gt;
 averageInterval = 1367.2; % interval of average heart rate [ms]&lt;br /&gt;
 averageHz = 1 / (1367.2 / 1000); % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 averageBPM = averageHz * 60; % beats-per-minute of average heart rate [Hz]&lt;br /&gt;
 % disp(averageBPM) &lt;br /&gt;
 &lt;br /&gt;
 %{ &lt;br /&gt;
 1 beat        1 beat&lt;br /&gt;
 -----       = ------&lt;br /&gt;
 1367.2 ms     1.3672 s&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 x = csvread(&amp;quot;N406K_forMark.csv&amp;quot;,1,0); % original file, a csv &lt;br /&gt;
 &lt;br /&gt;
 %{&lt;br /&gt;
 Mex2A_100uM     = transpose(x(:,2)); % Mex2A - 100 uM&lt;br /&gt;
 Mex2A_33_333uM  = transpose(x(:,3)); % Mex2A - 33.333 uM&lt;br /&gt;
 Mex2A_11_111uM  = transpose(x(:,4)); % Mex2A - 11.111 uM&lt;br /&gt;
 Mex2A_3_703uM   = transpose(x(:,5)); % Mex2A - 3.703 uM&lt;br /&gt;
 Mex2A_1_2345uM  = transpose(x(:,6)); % Mex2A - 1.2345 uM&lt;br /&gt;
 Mex2A_0_4115uM  = transpose(x(:,7)); % Mex2A - 0.4115 uM&lt;br /&gt;
 Mex2A_0_1271uM  = transpose(x(:,8)); % Mex2A - 0.1271 uM&lt;br /&gt;
 Mex2A_0uM       = transpose(x(:,9)); % Mex2A - 0 uM&lt;br /&gt;
 %} &lt;br /&gt;
 &lt;br /&gt;
 t = transpose(x(:,1)); % time array [ms]&lt;br /&gt;
 Mex2A = [100, 33.333, 11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]; &lt;br /&gt;
 &lt;br /&gt;
 n = 3; &lt;br /&gt;
 &lt;br /&gt;
 % find the peaks in the graph&lt;br /&gt;
 this_row = transpose(x(:,n + 1));&lt;br /&gt;
 [pks idx] = findpeaks(this_row, &amp;quot;MinPeakHeight&amp;quot;,0.015, &amp;quot;MinPeakDistance&amp;quot;, 5); &lt;br /&gt;
 &lt;br /&gt;
 % convert those peak values from findpeaks into coordinates&lt;br /&gt;
 peakX = t(idx);&lt;br /&gt;
 peakY = this_row(idx);&lt;br /&gt;
 disp(peakX);  &lt;br /&gt;
  &lt;br /&gt;
 f = figure;&lt;br /&gt;
 plot(t, this_row, peakX, peakY, 'x');&lt;br /&gt;
 axis([min(t), max(t), 0, 0.03]);&lt;br /&gt;
 title([&amp;quot;Intensity of Mex2A=&amp;quot;, num2str(Mex2A(n)), &amp;quot;uM&amp;quot;]);&lt;br /&gt;
 xlabel(&amp;quot;Time, t [ms]&amp;quot;);&lt;br /&gt;
 ylabel(&amp;quot;Intensity&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
 % calculate peak intervals&lt;br /&gt;
 for i = 2:length(peakX)&lt;br /&gt;
     pkToPkInterval(i - 1) = peakX(i) - peakX(i-1); % time between intervals [ms]&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 pkToPkHz = 1./(pkToPkInterval / 1000);  % interval frequency [Hz]&lt;br /&gt;
 pkToPkBPM = pkToPkHz * 60; % interval frequency [BPM]&lt;br /&gt;
 disp(pkToPkBPM); &lt;br /&gt;
 &lt;br /&gt;
 pkToPkRatio = pkToPkBPM / averageBPM&lt;br /&gt;
&lt;br /&gt;
Now that the data was calculated, I moved it from Octave into Sonic Pi.&lt;br /&gt;
&lt;br /&gt;
== Playing the data, with Sonic Pi ==&lt;br /&gt;
&lt;br /&gt;
 # Data Sonification with heartbeats&lt;br /&gt;
 # Victor Mercola - MU 3620&lt;br /&gt;
 # Prof. Manzo, 2019-12-09&lt;br /&gt;
 &lt;br /&gt;
 doses = [11.111, 3.703, 1.2345, 0.4115, 0.1271, 0]&lt;br /&gt;
 &lt;br /&gt;
 dose = 0&lt;br /&gt;
 6.times do&lt;br /&gt;
   if(dose == 0)&lt;br /&gt;
     # 11.111 uM dose&lt;br /&gt;
     intervals = [1.00371, 1.00371, 1.00371, 1.00371, 0.98189, 1.00371]&lt;br /&gt;
     n = 6&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 1)&lt;br /&gt;
     # 3.703 uM dose&lt;br /&gt;
     intervals = [1.1292, 1.0037, 0.98189, 2.5093, 1.0504, 0.98189, 2.5093, 1.0754, 2.3772]&lt;br /&gt;
     n = 9&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 2)&lt;br /&gt;
     # 1.2345 uM dose&lt;br /&gt;
     intervals = [2.5093, 3.7639, 3.7639, 1.1581, 2.5093, 3.7639, 3.7639, 1.1292, 2.6569, 3.7639, 3.7639, 1.1292, 2.5093, 1.0504]&lt;br /&gt;
     n = 14&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 3)&lt;br /&gt;
     # 0.4115 uM dose&lt;br /&gt;
     intervals = [2.8229, 0.961, 2.8229, 0.94098, 2.8229, 4.1061, 3.7639, 0.961, 3.0111, 0.94098, 2.8229]&lt;br /&gt;
     n = 11&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 4)&lt;br /&gt;
     # 0.1271 uM dose&lt;br /&gt;
     intervals = [4.1061, 4.5167, 1.1016, 0.94098, 2.6569, 4.1061, 5.0185, 4.5167, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.5167, 4.1061, 4.1061, 4.5167, 1.1292]&lt;br /&gt;
     n = 21&lt;br /&gt;
   end&lt;br /&gt;
   if(dose == 5)&lt;br /&gt;
     # 0 uM dose&lt;br /&gt;
     intervals = [5.0185, 4.5167, 5.0185, 5.0185, 4.5167, 5.0185, 4.5167, 4.5167, 1.1886, 1.0037, 2.6569, 4.5167, 5.0185, 5.0185,  5.6459, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 5.0185, 4.5167, 5.0185, 5.0185, 4.5167]&lt;br /&gt;
     n = 26&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   # Here's where the actual music happens&lt;br /&gt;
   &lt;br /&gt;
   i = 0&lt;br /&gt;
   n.times do&lt;br /&gt;
     puts(doses[dose],&amp;quot;uM&amp;quot;)&lt;br /&gt;
     puts(intervals[i])&lt;br /&gt;
     sample &amp;quot;D:/OneDrive/Documents/GNU Octave/quick drum loop v2.wav&amp;quot;, rate:intervals[i]&lt;br /&gt;
     wait 2 * (1 / intervals[i])&lt;br /&gt;
     i = i + 1&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   dose = dose + 1&lt;br /&gt;
   wait 1&lt;br /&gt;
 end&lt;br /&gt;
== Final Results (and Reception) ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;File:Arrhythmia-Data-Sonification-11-to-0.mp4&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Post-Mortem ==&lt;/div&gt;</summary>
		<author><name>Vsmercola</name></author>
		
	</entry>
	<entry>
		<id>https://vjmedia.wpi.edu/index.php?title=File:Mex2A_graph.PNG&amp;diff=247011</id>
		<title>File:Mex2A graph.PNG</title>
		<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/index.php?title=File:Mex2A_graph.PNG&amp;diff=247011"/>
		<updated>2019-12-13T22:44:39Z</updated>

		<summary type="html">&lt;p&gt;Vsmercola: Heart cell intensity data of Long QT syndrome (type 3) when given varying doses of Mex2A. Units of dosage are in micromolars (written as uM or μM).&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Heart cell intensity data of Long QT syndrome (type 3) when given varying doses of Mex2A. Units of dosage are in micromolars (written as uM or μM).&lt;/div&gt;</summary>
		<author><name>Vsmercola</name></author>
		
	</entry>
	<entry>
		<id>https://vjmedia.wpi.edu/index.php?title=File:Arrhythmia-Data-Sonification-11-to-0.mp4&amp;diff=247010</id>
		<title>File:Arrhythmia-Data-Sonification-11-to-0.mp4</title>
		<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/index.php?title=File:Arrhythmia-Data-Sonification-11-to-0.mp4&amp;diff=247010"/>
		<updated>2019-12-13T22:36:35Z</updated>

		<summary type="html">&lt;p&gt;Vsmercola: Arrhythmia Data Sonification Project by Victor Mercola&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Arrhythmia Data Sonification Project by Victor Mercola&lt;/div&gt;</summary>
		<author><name>Vsmercola</name></author>
		
	</entry>
	<entry>
		<id>https://vjmedia.wpi.edu/index.php?title=File:VSMercola_Call_To_Arms_Loop.mp3&amp;diff=246898</id>
		<title>File:VSMercola Call To Arms Loop.mp3</title>
		<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/index.php?title=File:VSMercola_Call_To_Arms_Loop.mp3&amp;diff=246898"/>
		<updated>2019-11-20T16:08:45Z</updated>

		<summary type="html">&lt;p&gt;Vsmercola: Vsmercola uploaded a new version of File:VSMercola Call To Arms Loop.mp3&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Call To Arms, looped version&lt;br /&gt;
&lt;br /&gt;
Key: F# Minor&lt;br /&gt;
BPM: 176&lt;br /&gt;
Time signature: 13/8&lt;/div&gt;</summary>
		<author><name>Vsmercola</name></author>
		
	</entry>
	<entry>
		<id>https://vjmedia.wpi.edu/index.php?title=File:VSMercola_Call_To_Arms_OST.mp3&amp;diff=246897</id>
		<title>File:VSMercola Call To Arms OST.mp3</title>
		<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/index.php?title=File:VSMercola_Call_To_Arms_OST.mp3&amp;diff=246897"/>
		<updated>2019-11-20T16:08:41Z</updated>

		<summary type="html">&lt;p&gt;Vsmercola: Vsmercola uploaded a new version of File:VSMercola Call To Arms OST.mp3&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Call To Arms, OST (non-looping) version&lt;br /&gt;
&lt;br /&gt;
Key: F# Minor&lt;br /&gt;
BPM: 176&lt;br /&gt;
Time signature: 13/8&lt;/div&gt;</summary>
		<author><name>Vsmercola</name></author>
		
	</entry>
	<entry>
		<id>https://vjmedia.wpi.edu/index.php?title=File:VSMercola_Call_To_Arms_OST.mp3&amp;diff=246829</id>
		<title>File:VSMercola Call To Arms OST.mp3</title>
		<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/index.php?title=File:VSMercola_Call_To_Arms_OST.mp3&amp;diff=246829"/>
		<updated>2019-11-19T03:32:36Z</updated>

		<summary type="html">&lt;p&gt;Vsmercola: Vsmercola uploaded a new version of File:VSMercola Call To Arms OST.mp3&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Call To Arms, OST (non-looping) version&lt;br /&gt;
&lt;br /&gt;
Key: F# Minor&lt;br /&gt;
BPM: 176&lt;br /&gt;
Time signature: 13/8&lt;/div&gt;</summary>
		<author><name>Vsmercola</name></author>
		
	</entry>
	<entry>
		<id>https://vjmedia.wpi.edu/index.php?title=File:VSMercola_Call_To_Arms_Loop.mp3&amp;diff=246828</id>
		<title>File:VSMercola Call To Arms Loop.mp3</title>
		<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/index.php?title=File:VSMercola_Call_To_Arms_Loop.mp3&amp;diff=246828"/>
		<updated>2019-11-19T03:32:19Z</updated>

		<summary type="html">&lt;p&gt;Vsmercola: Vsmercola uploaded a new version of File:VSMercola Call To Arms Loop.mp3&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Call To Arms, looped version&lt;br /&gt;
&lt;br /&gt;
Key: F# Minor&lt;br /&gt;
BPM: 176&lt;br /&gt;
Time signature: 13/8&lt;/div&gt;</summary>
		<author><name>Vsmercola</name></author>
		
	</entry>
	<entry>
		<id>https://vjmedia.wpi.edu/index.php?title=File:VSMercola_Call_To_Arms_Loop.mp3&amp;diff=246823</id>
		<title>File:VSMercola Call To Arms Loop.mp3</title>
		<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/index.php?title=File:VSMercola_Call_To_Arms_Loop.mp3&amp;diff=246823"/>
		<updated>2019-11-19T03:08:22Z</updated>

		<summary type="html">&lt;p&gt;Vsmercola: Vsmercola uploaded a new version of File:VSMercola Call To Arms Loop.mp3&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Call To Arms, looped version&lt;br /&gt;
&lt;br /&gt;
Key: F# Minor&lt;br /&gt;
BPM: 176&lt;br /&gt;
Time signature: 13/8&lt;/div&gt;</summary>
		<author><name>Vsmercola</name></author>
		
	</entry>
	<entry>
		<id>https://vjmedia.wpi.edu/index.php?title=File:VSMercola_Call_To_Arms_OST.mp3&amp;diff=246796</id>
		<title>File:VSMercola Call To Arms OST.mp3</title>
		<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/index.php?title=File:VSMercola_Call_To_Arms_OST.mp3&amp;diff=246796"/>
		<updated>2019-11-18T03:14:14Z</updated>

		<summary type="html">&lt;p&gt;Vsmercola: Vsmercola uploaded a new version of File:VSMercola Call To Arms OST.mp3&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Call To Arms, OST (non-looping) version&lt;br /&gt;
&lt;br /&gt;
Key: F# Minor&lt;br /&gt;
BPM: 176&lt;br /&gt;
Time signature: 13/8&lt;/div&gt;</summary>
		<author><name>Vsmercola</name></author>
		
	</entry>
	<entry>
		<id>https://vjmedia.wpi.edu/index.php?title=File:VSMercola_Call_To_Arms_Loop.mp3&amp;diff=246795</id>
		<title>File:VSMercola Call To Arms Loop.mp3</title>
		<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/index.php?title=File:VSMercola_Call_To_Arms_Loop.mp3&amp;diff=246795"/>
		<updated>2019-11-18T03:14:03Z</updated>

		<summary type="html">&lt;p&gt;Vsmercola: Vsmercola uploaded a new version of File:VSMercola Call To Arms Loop.mp3&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Call To Arms, looped version&lt;br /&gt;
&lt;br /&gt;
Key: F# Minor&lt;br /&gt;
BPM: 176&lt;br /&gt;
Time signature: 13/8&lt;/div&gt;</summary>
		<author><name>Vsmercola</name></author>
		
	</entry>
	<entry>
		<id>https://vjmedia.wpi.edu/index.php?title=File:VSMercola_Call_To_Arms_OST.mp3&amp;diff=246794</id>
		<title>File:VSMercola Call To Arms OST.mp3</title>
		<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/index.php?title=File:VSMercola_Call_To_Arms_OST.mp3&amp;diff=246794"/>
		<updated>2019-11-18T03:03:07Z</updated>

		<summary type="html">&lt;p&gt;Vsmercola: Vsmercola uploaded a new version of File:VSMercola Call To Arms OST.mp3&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Call To Arms, OST (non-looping) version&lt;br /&gt;
&lt;br /&gt;
Key: F# Minor&lt;br /&gt;
BPM: 176&lt;br /&gt;
Time signature: 13/8&lt;/div&gt;</summary>
		<author><name>Vsmercola</name></author>
		
	</entry>
	<entry>
		<id>https://vjmedia.wpi.edu/index.php?title=File:VSMercola_Call_To_Arms_Loop.mp3&amp;diff=246793</id>
		<title>File:VSMercola Call To Arms Loop.mp3</title>
		<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/index.php?title=File:VSMercola_Call_To_Arms_Loop.mp3&amp;diff=246793"/>
		<updated>2019-11-18T03:02:34Z</updated>

		<summary type="html">&lt;p&gt;Vsmercola: Vsmercola uploaded a new version of File:VSMercola Call To Arms Loop.mp3&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Call To Arms, looped version&lt;br /&gt;
&lt;br /&gt;
Key: F# Minor&lt;br /&gt;
BPM: 176&lt;br /&gt;
Time signature: 13/8&lt;/div&gt;</summary>
		<author><name>Vsmercola</name></author>
		
	</entry>
	<entry>
		<id>https://vjmedia.wpi.edu/index.php?title=User_talk:Vsmercola&amp;diff=246792</id>
		<title>User talk:Vsmercola</title>
		<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/index.php?title=User_talk:Vsmercola&amp;diff=246792"/>
		<updated>2019-11-18T03:01:43Z</updated>

		<summary type="html">&lt;p&gt;Vsmercola: Blanked the page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Vsmercola</name></author>
		
	</entry>
	<entry>
		<id>https://vjmedia.wpi.edu/index.php?title=User_talk:Vsmercola&amp;diff=246791</id>
		<title>User talk:Vsmercola</title>
		<link rel="alternate" type="text/html" href="https://vjmedia.wpi.edu/index.php?title=User_talk:Vsmercola&amp;diff=246791"/>
		<updated>2019-11-18T03:01:31Z</updated>

		<summary type="html">&lt;p&gt;Vsmercola: Created page with &amp;quot;Aw crap, I screwed up - BPM is now 168&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Aw crap, I screwed up - BPM is now 168&lt;/div&gt;</summary>
		<author><name>Vsmercola</name></author>
		
	</entry>
</feed>