{"id":580,"date":"2019-02-13T10:02:08","date_gmt":"2019-02-13T10:02:08","guid":{"rendered":"http:\/\/digital.eca.ed.ac.uk\/soundandfixedmedia\/?p=580"},"modified":"2019-02-13T10:02:10","modified_gmt":"2019-02-13T10:02:10","slug":"tutorial-graphing-sound","status":"publish","type":"post","link":"https:\/\/digital.eca.ed.ac.uk\/soundandfixedmedia\/2019\/02\/tutorial-graphing-sound\/","title":{"rendered":"Tutorial &#8211; graphing sound"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"sec-1\">1 Introduction<\/h2>\n\n\n\n<p>\nThere are numerous tools out there to help you analyse, view and extract\n audio information from films. \nDropping your .mkv file into REAPER for example will extract the audio, \ngenerate a waveform and give you full access to view and edit the 5.1 \nmix that&#8217;s there.\n<\/p>\n\n\n\n<p>\nThere are other tools too that will pay dividends if you spend a few minutes to work out how to use them. \nSoX is an old, yet still fantastic tool for processing audio, separating out stems and generating waveforms: <a href=\"http:\/\/sox.sourceforge.net\/\">sox.sourceforge.net\/<\/a> \n<\/p>\n\n\n\n<p>\nFFMPEG is superb for extracting chucks of a larger film and keeping, or \nprocessing the video material in different ways to make the files useful\n in other forms. <a href=\"http:\/\/ffmpeg.org\/\">ffmpeg.org\/<\/a>\n<\/p>\n\n\n\n<p>\nMPV is a very handy video playback tool that is built on FFMPEG and has \ninnumerable options to playback parts or whole of video tracks or audio \nonly etc.: <a href=\"https:\/\/mpv.io\/\">mpv.io\/<\/a>\n<\/p>\n\n\n\n<p>\nFinally, <a href=\"https:\/\/www.sonicvisualiser.org\/\">www.sonicvisualiser.org\/<\/a>,\n made at the Queen Mary, University of London gives you access to a huge\n range of visualisation options. Depending on which operating system \nyou&#8217;re using, you may not have access to the latest version, grab an \nearlier one from this page: <a href=\"https:\/\/code.soundsoftware.ac.uk\/projects\/sonic-visualiser\/files\">code.soundsoftware.ac.uk\/projects\/sonic-visualiser\/files<\/a>. For example, version 3.2 doesn&#8217;t work on OSX10.11.x but 3.1.1 does. \n<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"sec-2\">2 Workflow<\/h2>\n\n\n\n<p>\nFirst of all, you need to choose your section of film to explore, you \ncan take the film and drag and drop it onto an empty REAPER session. \n<\/p>\n\n\n\n<p>\nWhen you have selected a region of the film you want to explore, remove \nthe other parts of the film and bounce\/export the audio. If you have 5.1\n mix, export as multichannel so that you can keep all of that lovely \ninformation. \n<\/p>\n\n\n\n<p>\nIf you want to export just that chunk of film, make a region and select a\n movie format for the kind of export you&#8217;re looking for.\n<\/p>\n\n\n\n<p>\nIf you&#8217;d like to use FFMPEG for this, and I do recommend it very highly for its speed and efficiency, then you could try this\n<\/p>\n\n\n\n<p>\n<code>ffmpeg -ss 01:10:30.0 -t 00:00:10.0 -i inputFile.mkv -map 0 -codec copy -async 1 inputFileSelection.mkv<\/code>\n<\/p>\n\n\n\n<p>\n<code>-map 0<\/code> guarantees that all the tracks in the .mkv will be copied across so you can still select surround, or stereo audio on playback.\n<\/p>\n\n\n\n<p>\nIf you want to grab just the audio so you can run an analysis on the audio, then you\u2019d do this\n<\/p>\n\n\n\n<p>\n<code>ffmpeg -ss 01:10:30.0 -t 00:00:10.0 -i inputFile.mkv -map 0:1 audioOnly.wav<\/code>\n<\/p>\n\n\n\n<p>\nThe <code>-map0:1<\/code> gives us the first audio track in the .mkv.\n<\/p>\n\n\n\n<p>\nOnce you have just the audio, you can render off a spectrogram with SoX:\n<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sox inputFile.wav -r 5k -n rate spectrogram -t \"title of track\" -x 2599 -y 600 -z 120 -o \"outputSpectrgram.png\"\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>1 Introduction There are numerous tools out there to help you analyse, view and extract audio information from films. Dropping your .mkv file into REAPER for example will extract the audio, generate a waveform and give you full access to &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"https:\/\/digital.eca.ed.ac.uk\/soundandfixedmedia\/2019\/02\/tutorial-graphing-sound\/\"> <span class=\"screen-reader-text\">Tutorial &#8211; graphing sound<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/digital.eca.ed.ac.uk\/soundandfixedmedia\/wp-json\/wp\/v2\/posts\/580"}],"collection":[{"href":"https:\/\/digital.eca.ed.ac.uk\/soundandfixedmedia\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/digital.eca.ed.ac.uk\/soundandfixedmedia\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/digital.eca.ed.ac.uk\/soundandfixedmedia\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/digital.eca.ed.ac.uk\/soundandfixedmedia\/wp-json\/wp\/v2\/comments?post=580"}],"version-history":[{"count":1,"href":"https:\/\/digital.eca.ed.ac.uk\/soundandfixedmedia\/wp-json\/wp\/v2\/posts\/580\/revisions"}],"predecessor-version":[{"id":581,"href":"https:\/\/digital.eca.ed.ac.uk\/soundandfixedmedia\/wp-json\/wp\/v2\/posts\/580\/revisions\/581"}],"wp:attachment":[{"href":"https:\/\/digital.eca.ed.ac.uk\/soundandfixedmedia\/wp-json\/wp\/v2\/media?parent=580"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/digital.eca.ed.ac.uk\/soundandfixedmedia\/wp-json\/wp\/v2\/categories?post=580"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/digital.eca.ed.ac.uk\/soundandfixedmedia\/wp-json\/wp\/v2\/tags?post=580"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}