[{"data":1,"prerenderedAt":138},["ShallowReactive",2],{"blog-post-sox-mix-audio-files":3,"recent-posts":77},{"id":4,"uid":5,"url":6,"type":7,"href":8,"tags":9,"first_publication_date":10,"last_publication_date":10,"slugs":11,"linked_documents":13,"lang":14,"alternate_languages":15,"data":16},"avg1QhEAACcAj4dj","sox-mix-audio-files",null,"blog_posts","https:\u002F\u002Fmarks-personal-website.cdn.prismic.io\u002Fapi\u002Fv2\u002Fdocuments\u002Fsearch?ref=avzZABIAACgAeKzX&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22avg1QhEAACcAj4dj%22%29+%5D%5D",[],"2026-11-17T22:45:19+0000",[12],"sox-how-to-mix-audio-files",[],"en-us",[],{"title":17,"date":23,"description":24,"image":29,"content":39},[18],{"type":19,"text":20,"spans":21,"direction":22},"heading1","SoX: How to Mix Audio Files",[],"ltr","2026-11-17",[25],{"type":26,"text":27,"spans":28,"direction":22},"heading2","Learn how to mix audio files together in the terminal using SoX",[],{"dimensions":30,"alt":20,"copyright":6,"url":33,"id":34,"edit":35},{"width":31,"height":32},1280,720,"https:\u002F\u002Fimages.prismic.io\u002Fmarks-personal-website\u002F4RWTrnCA88HTuCIJ_sox-mix-audio-files.png?auto=format,compress","4RWTrnCA88HTuCIJ",{"x":36,"y":36,"zoom":37,"background":38},0,1,"transparent",[40,44,48,52,55,58,61,64,67,71,74],{"type":41,"text":42,"spans":43,"direction":22},"paragraph","Before we start, make sure you have SoX installed on your computer and your audio files ready in a folder. On a Mac, you can install it with Homebrew:",[],{"type":45,"text":46,"spans":47,"direction":22},"preformatted","brew install sox",[],{"type":49,"text":50,"spans":51,"direction":22},"heading3","Mix the Files",[],{"type":41,"text":53,"spans":54,"direction":22},"First, open your terminal and navigate to the folder with your audio files using \u003Ccode>cd\u003C\u002Fcode>. To mix two files so they play at the same time, run this command:",[],{"type":45,"text":56,"spans":57,"direction":22},"sox -m input1.wav input2.wav output.wav",[],{"type":41,"text":59,"spans":60,"direction":22},"Just remember to replace \u003Ccode>input1.wav\u003C\u002Fcode> and \u003Ccode>input2.wav\u003C\u002Fcode> with your actual file names and \u003Ccode>output.wav\u003C\u002Fcode> with the name you want for the new file. The \u003Ccode>-m\u003C\u002Fcode> flag tells SoX to mix the inputs together instead of playing them one after the other.",[],{"type":41,"text":62,"spans":63,"direction":22},"For short files, this finishes almost instantly, and don't worry if you don't see a success message. The new file is as long as your longest input. Also, both inputs need the same sample rate, otherwise SoX stops with \u003Ccode>Input files must have the same sample-rate\u003C\u002Fcode>. If that happens, convert one of them first with \u003Ccode>-r\u003C\u002Fcode>.",[],{"type":41,"text":65,"spans":66,"direction":22},"To make sure everything worked, run \u003Ccode>soxi -d output.wav\u003C\u002Fcode> to print just the duration of the new file.",[],{"type":68,"oembed":69},"embed",{"embed_url":70,"type":68},"",{"type":41,"text":72,"spans":73,"direction":22},"If one file is a lot louder than the other, put \u003Ccode>-v\u003C\u002Fcode> and a number right before that file. For example, \u003Ccode>-v 0.5\u003C\u002Fcode> cuts the second file to half its volume:",[],{"type":45,"text":75,"spans":76,"direction":22},"sox -m input1.wav -v 0.5 input2.wav output.wav",[],{"results":78,"page":37,"results_per_page":136,"results_size":136,"total_results_size":137,"total_pages":37},[79,98,117],{"id":80,"uid":81,"url":6,"type":7,"href":82,"tags":83,"first_publication_date":10,"last_publication_date":10,"slugs":84,"linked_documents":86,"lang":14,"alternate_languages":87,"data":88},"avg1XREAACsAj4eS","sox-change-bit-depth","https:\u002F\u002Fmarks-personal-website.cdn.prismic.io\u002Fapi\u002Fv2\u002Fdocuments\u002Fsearch?ref=avzZABIAACgAeKzX&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22avg1XREAACsAj4eS%22%29+%5D%5D",[],[85],"sox-how-to-change-bit-depth",[],[],{"image":89,"title":95},{"dimensions":90,"alt":91,"copyright":6,"url":92,"id":93,"edit":94},{"width":31,"height":32},"SoX: How to Change Bit Depth","https:\u002F\u002Fimages.prismic.io\u002Fmarks-personal-website\u002FGm9ND5avh6VMrQoP_sox-change-bit-depth.png?auto=format,compress","Gm9ND5avh6VMrQoP",{"x":36,"y":36,"zoom":37,"background":38},[96],{"type":19,"text":91,"spans":97,"direction":22},[],{"id":99,"uid":100,"url":6,"type":7,"href":101,"tags":102,"first_publication_date":10,"last_publication_date":10,"slugs":103,"linked_documents":105,"lang":14,"alternate_languages":106,"data":107},"avg1XxEAACcAj4eg","sox-reverse-audio","https:\u002F\u002Fmarks-personal-website.cdn.prismic.io\u002Fapi\u002Fv2\u002Fdocuments\u002Fsearch?ref=avzZABIAACgAeKzX&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22avg1XxEAACcAj4eg%22%29+%5D%5D",[],[104],"sox-how-to-reverse-audio",[],[],{"image":108,"title":114},{"dimensions":109,"alt":110,"copyright":6,"url":111,"id":112,"edit":113},{"width":31,"height":32},"SoX: How to Reverse Audio","https:\u002F\u002Fimages.prismic.io\u002Fmarks-personal-website\u002F6yWWTbolMOE4a3JL_sox-reverse-audio.png?auto=format,compress","6yWWTbolMOE4a3JL",{"x":36,"y":36,"zoom":37,"background":38},[115],{"type":19,"text":110,"spans":116,"direction":22},[],{"id":118,"uid":119,"url":6,"type":7,"href":120,"tags":121,"first_publication_date":10,"last_publication_date":10,"slugs":122,"linked_documents":124,"lang":14,"alternate_languages":125,"data":126},"avg1XBEAACwAj4eL","sox-convert-stereo-to-mono","https:\u002F\u002Fmarks-personal-website.cdn.prismic.io\u002Fapi\u002Fv2\u002Fdocuments\u002Fsearch?ref=avzZABIAACgAeKzX&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22avg1XBEAACwAj4eL%22%29+%5D%5D",[],[123],"sox-how-to-convert-stereo-to-mono",[],[],{"image":127,"title":133},{"dimensions":128,"alt":129,"copyright":6,"url":130,"id":131,"edit":132},{"width":31,"height":32},"SoX: How to Convert Stereo to Mono","https:\u002F\u002Fimages.prismic.io\u002Fmarks-personal-website\u002FPgqFJaqMdDkYQkE6_sox-convert-stereo-to-mono.png?auto=format,compress","PgqFJaqMdDkYQkE6",{"x":36,"y":36,"zoom":37,"background":38},[134],{"type":19,"text":129,"spans":135,"direction":22},[],3,64,1794955544422]