{"id":2744,"date":"2025-09-12T18:26:52","date_gmt":"2025-09-12T16:26:52","guid":{"rendered":"https:\/\/www.julien-nevo.com\/arkostracker\/?page_id=2744"},"modified":"2025-09-19T00:11:58","modified_gmt":"2025-09-18T22:11:58","slug":"converting-samples","status":"publish","type":"page","link":"https:\/\/www.julien-nevo.com\/arkostracker\/index.php\/converting-samples\/","title":{"rendered":"Converting samples"},"content":{"rendered":"\n<p>This is important. I saw some musicians using WAV files found in their huge collection and use them as-is in AT3. Sure enough, AT can play 44100 Hz samples. However, the target hardware will probably have a hard time playing them.<\/p>\n\n\n\n<p>Converting your samples is probably mandatory if you want a decent sound on your target machine, and you <strong>will<\/strong> have to make a few tests to get the best result. <strong>Always listen to the result on the hardware!<\/strong> Do not trust AT or any emulator! Each machine has a specific way of sounding, especially when it comes to samples. Rest assured, if it sounds good on AT, it will probably sound <em>not bad<\/em> on the hardware.<\/p>\n\n\n\n<p>However, each player has its limitation. For example, the current <a href=\"https:\/\/www.julien-nevo.com\/arkostracker\/index.php\/samplepsg-player\/\" data-type=\"page\" data-id=\"2568\" target=\"_blank\" rel=\"noreferrer noopener\">AKY sample player<\/a> does not play sample during the music treatment part. As a consequence, the samples don&#8217;t sound as good as they could. Some samples may suffer from it, some may not.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Getting the samples<\/h2>\n\n\n\n<p>AT3 can load any WAV, regardless their frequency, bit rate, and channel count. They will be converted to 8-bit mono inside AT3, and the frequency remains unchanged. There are many websites where you can find WAV files. However, you may find these useful:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/modsamplemaster.thegang.nu\/module-index.php\" target=\"_blank\" rel=\"noreferrer noopener\">Mod Sample Master<\/a> has tons on Amiga MODs, with the ability to save their samples. Watch out, they will likely be at 8373 Hz, and as such may require resampling (see below).<\/li>\n\n\n\n<li>SoundFonts (.sf2) is a convenient format that stores samples plus metadata of how to play them in a musical way (mapping from key\/velocity to what sample to play). It is now quite obsolete compared to more modern samplers (Kontakt, etc.), but SoundFonts are numerous, easy to find and they are many tools to extract its data. One I like is <a href=\"https:\/\/www.polyphone.io\" target=\"_blank\" rel=\"noreferrer noopener\">Polyphone<\/a> (cross-platorm). The website also has very nice soundfonts.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Converting the samples<\/h2>\n\n\n\n<p>This could have been the tricky part, but it won&#8217;t be. There are tons of software to manipulate samples (Audacity, OcenAudio, Soundforge, or even DAWs like Reaper), but none has the flexibility of <a href=\"https:\/\/sourceforge.net\/projects\/sox\/files\/sox\/\" target=\"_blank\" rel=\"noreferrer noopener\">SoX<\/a>. It is a cross-platform command line tool to process samples in any way you want (check the <a href=\"https:\/\/linux.die.net\/man\/1\/sox\" target=\"_blank\" rel=\"noreferrer noopener\">manual<\/a>). Since it is a command line tool, it is very easy to experiment at will without having to click a hundred of buttons to perform a change.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">The basics<\/h4>\n\n\n\n<p>I will only explain a few options for you to get started. The most basic command would be:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sox input.wav --channels 1 --bits 8 --rate 8000 output.wav<\/code><\/pre>\n\n\n\n<p>This converts any WAV into a sample your hardware is more likely to play (mono, 8 bits, 8 kHz). Read <a href=\"https:\/\/www.julien-nevo.com\/arkostracker\/index.php\/samples#sample-player-frequency\" data-type=\"page\" data-id=\"2575\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a> about the 8 kHz, because it is probably <strong>not<\/strong> the right frequency for you!<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">EQs<\/h4>\n\n\n\n<p>But it gets better. Many times, you want to remove some bass (which doesn&#8217;t sound good on tiny speakers), and highlight the trebles:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sox input.wav --channels 1 --bits 8 --rate 8000 output.wav <strong>bass -10 treble 10<\/strong><\/code><\/pre>\n\n\n\n<p>I suggest not to use the &#8220;gain&#8221; option of SoX, since AT has a build-in non-destructive amplification in the sampler editor to test at will.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Force length and fade-out<\/h4>\n\n\n\n<p>One nice option is to reduce the length of the sample, and add a fade-out:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sox input.wav --channels 1 --bits 8 --rate 8000 output.wav <strong>trim 0s 4000s gain 0 fade q 0 0 200s<\/strong><\/code><\/pre>\n\n\n\n<p>The trim options keeps only the bytes from 0 to 4000. Watch out, the &#8220;s&#8221; unit is for &#8220;sample&#8221; (bytes, words&#8230; according to your bit rate), not &#8220;seconds&#8221;.<\/p>\n\n\n\n<p>The fade option, as written, doesn&#8217;t add a fade-in, only a fade-out of 200 samples.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Pitch<\/h4>\n\n\n\n<p>Your sound may be off of key for various reasons. To quickly correct this, you can use the pitch command to slightly increase or decrease the frequency, in 1\/100 semitones (thus 100 is one semitone up, -100 is one semitone down).<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sox input.wav &#91;...] <strong>pitch 20<\/strong><\/code><\/pre>\n\n\n\n<p>This example will slightly change the pitch to a fifth of semitone up.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Summing up<\/h2>\n\n\n\n<p>You&#8217;ve now got everything you need to get the best sounding samples! But please be aware that <strong>you will need<\/strong> a few tests to get the best sound! Sample <strong>is<\/strong> a tricky business.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is important. I saw some musicians using WAV files found in their huge collection and use them as-is in AT3. Sure [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":162,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_vp_format_video_url":"","_vp_image_focal_point":[],"footnotes":""},"class_list":["post-2744","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.julien-nevo.com\/arkostracker\/index.php\/wp-json\/wp\/v2\/pages\/2744","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.julien-nevo.com\/arkostracker\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.julien-nevo.com\/arkostracker\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.julien-nevo.com\/arkostracker\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.julien-nevo.com\/arkostracker\/index.php\/wp-json\/wp\/v2\/comments?post=2744"}],"version-history":[{"count":28,"href":"https:\/\/www.julien-nevo.com\/arkostracker\/index.php\/wp-json\/wp\/v2\/pages\/2744\/revisions"}],"predecessor-version":[{"id":2791,"href":"https:\/\/www.julien-nevo.com\/arkostracker\/index.php\/wp-json\/wp\/v2\/pages\/2744\/revisions\/2791"}],"wp:attachment":[{"href":"https:\/\/www.julien-nevo.com\/arkostracker\/index.php\/wp-json\/wp\/v2\/media?parent=2744"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}