{"id":1474,"date":"2020-12-20T09:17:01","date_gmt":"2020-12-20T16:17:01","guid":{"rendered":"http:\/\/www.timsummers.org\/?p=1474"},"modified":"2020-12-30T01:49:31","modified_gmt":"2020-12-30T08:49:31","slug":"harmony-and-audio","status":"publish","type":"post","link":"http:\/\/www.timsummers.org\/?p=1474","title":{"rendered":"audio => harmony"},"content":{"rendered":"\n<p><em>harmonypartition<\/em> can harmonically analyze audio files by dynamically seeking and organizing tonal continuities.<\/p>\n\n\n\n<p>In a great many musical cases, these continuities take the form of familiar keys and chords. <\/p>\n\n\n\n<h2>example: vi-ii-V-I<\/h2>\n\n\n\n<p>Here, for example, is a vi-ii-V-I progression in C major, generated from fourier analysis of a .wav file:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1024\" height=\"184\" src=\"http:\/\/www.timsummers.org\/wp-content\/uploads\/2020\/12\/C_6251-1024x184.png\" alt=\"\" class=\"wp-image-1482\" srcset=\"http:\/\/www.timsummers.org\/wp-content\/uploads\/2020\/12\/C_6251-1024x184.png 1024w, http:\/\/www.timsummers.org\/wp-content\/uploads\/2020\/12\/C_6251-300x54.png 300w, http:\/\/www.timsummers.org\/wp-content\/uploads\/2020\/12\/C_6251-768x138.png 768w, http:\/\/www.timsummers.org\/wp-content\/uploads\/2020\/12\/C_6251-1536x276.png 1536w, http:\/\/www.timsummers.org\/wp-content\/uploads\/2020\/12\/C_6251-1200x216.png 1200w, http:\/\/www.timsummers.org\/wp-content\/uploads\/2020\/12\/C_6251.png 1756w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption>C Major vi-ii-V-I in sine waves, derived from synthesized audio<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-audio\"><audio controls src=\"http:\/\/www.timsummers.org\/wp-content\/uploads\/2020\/12\/C_6251-1.mp3\"><\/audio><\/figure>\n\n\n\n<p>Here is the same progression, analyzed from my own lightly out-of-tune piano, with a different voicing:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1024\" height=\"184\" src=\"http:\/\/www.timsummers.org\/wp-content\/uploads\/2020\/12\/C_6251_live-1024x184.png\" alt=\"\" class=\"wp-image-1484\" srcset=\"http:\/\/www.timsummers.org\/wp-content\/uploads\/2020\/12\/C_6251_live-1024x184.png 1024w, http:\/\/www.timsummers.org\/wp-content\/uploads\/2020\/12\/C_6251_live-300x54.png 300w, http:\/\/www.timsummers.org\/wp-content\/uploads\/2020\/12\/C_6251_live-768x138.png 768w, http:\/\/www.timsummers.org\/wp-content\/uploads\/2020\/12\/C_6251_live-1536x276.png 1536w, http:\/\/www.timsummers.org\/wp-content\/uploads\/2020\/12\/C_6251_live-1200x216.png 1200w, http:\/\/www.timsummers.org\/wp-content\/uploads\/2020\/12\/C_6251_live.png 1756w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption>C Major vi-ii-V-I on piano, live audio<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-audio\"><audio controls src=\"http:\/\/www.timsummers.org\/wp-content\/uploads\/2020\/12\/C_6251_live.mp3\"><\/audio><\/figure>\n\n\n\n<p>Although the underpinnings and overtones (shown below and atop the central graphs) are shaken by the realities of live sound, the central analysis holds equally.<\/p>\n\n\n\n<h2>generating graphs<\/h2>\n\n\n\n<p>We can generate graphs with the following python code from the <em>harmonypartition<\/em> modules:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>audio_kpdve_graph.graph_audio_file(\"C_6251_live.wav\", chroma_threshold=0.3)<\/code><\/pre>\n\n\n\n<p>A firm, unchanging mathematical system undergirds the analysis, working within the idea of number, group, and ternary rather than with statistical operations. In the course of this method, the harmonic system functions as a hybrid, highly efficient form of neural network, using a miniature backpropagation to find meaningful (and maximally lazy) tonal centers.<\/p>\n\n\n\n<p>It is possible in this manner to analyze any audio file for music-harmonic content, exposing large-scale structures in the musical works. Examples of this type of analysis can be seen in the &#8220;Audio and Insights&#8221; pages at the <em><a href=\"http:\/\/www.cvillechambermusic.org\/listening-room.html\">Charlottesville Chamber Music Festival<\/a><\/em>.<\/p>\n\n\n\n<p><a href=\"http:\/\/www.cvillechambermusic.org\/op-12-no-1-analysis.html\">Beethoven: Sonata No. 1 for Violin and Piano in D Major, Op. 12, No. 1, Mvt. 3<\/a> with Jennifer Frautschi, violin, and Max Levinson, piano<\/p>\n\n\n\n<p><a href=\"http:\/\/www.cvillechambermusic.org\/schubert-fantasie-insights.html\">Schubert: Fantasie for Violin and Piano, D934, excerpts<\/a> with James Ehnes, violin, and Inon Barnatan, piano<\/p>\n\n\n\n<p><a href=\"http:\/\/www.cvillechambermusic.org\/op-96-analysis.html\">Beethoven: Sonata No. 10 for Violin and Piano in G Major, Op. 96, mvt. 4<\/a>, with Timothy Summers, violin, and Benjamin Hochman, piano<\/p>\n\n\n\n<p>The same process can be applied to MIDI and to live-streamed audio. The next post will address the process in MIDI.<\/p>\n\n\n\n<p>Please send along any files for analysis &#8212; I would be happy to experiment with them in the course of further development, and discuss results.<\/p>\n\n\n\n<p>The fourier analyses use the <em>librosa<\/em> package for pitch detection.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>harmonypartition can harmonically analyze audio files by dynamically seeking and organizing tonal continuities. In a great many musical cases, these continuities take the form of familiar keys and chords. example: vi-ii-V-I Here, for example, is a vi-ii-V-I progression in C major, generated from fourier analysis of a .wav file: Here is the same progression, analyzed [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[60],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"http:\/\/www.timsummers.org\/index.php?rest_route=\/wp\/v2\/posts\/1474"}],"collection":[{"href":"http:\/\/www.timsummers.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.timsummers.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.timsummers.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.timsummers.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1474"}],"version-history":[{"count":14,"href":"http:\/\/www.timsummers.org\/index.php?rest_route=\/wp\/v2\/posts\/1474\/revisions"}],"predecessor-version":[{"id":1604,"href":"http:\/\/www.timsummers.org\/index.php?rest_route=\/wp\/v2\/posts\/1474\/revisions\/1604"}],"wp:attachment":[{"href":"http:\/\/www.timsummers.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1474"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.timsummers.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1474"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.timsummers.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1474"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}