{"id":6783,"date":"2025-06-13T21:15:08","date_gmt":"2025-06-13T19:15:08","guid":{"rendered":"https:\/\/www.pschatzmann.ch\/home\/?p=6783"},"modified":"2025-06-16T05:01:06","modified_gmt":"2025-06-16T03:01:06","slug":"arduino-audio-tools-pinping-up-resampling","status":"publish","type":"post","link":"https:\/\/www.pschatzmann.ch\/home\/2025\/06\/13\/arduino-audio-tools-pinping-up-resampling\/","title":{"rendered":"Arduino Audio Tools: Pimping Up Resampling"},"content":{"rendered":"<p>The <a href=\"https:\/\/pschatzmann.github.io\/arduino-audio-tools\/classaudio__tools_1_1_resample_stream.html\">ResampleStream<\/a> class of the <a href=\"https:\/\/github.com\/pschatzmann\/arduino-audio-tools\">Arduino Audio Tools<\/a> project provides some flexible resampling functionality both on the input and the output side. To calculate the values it just uses a <strong>simple but efficient linear interpolation<\/strong>.<\/p>\n<p>I finally managed to provide an extended <a href=\"https:\/\/pschatzmann.github.io\/arduino-audio-tools\/classaudio__tools_1_1_resample_stream_t.html\">ResampleStreamT<\/a> resampling class that uses some alternative <a href=\"https:\/\/pschatzmann.github.io\/arduino-audio-tools\/structaudio__tools_1_1_base_interpolator.html\">interpolation method implementations<\/a>:<\/p>\n<p\/>\nHere is an overview with the advantages and disadvantages: <\/p>\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"6\">\n<thead>\n<tr>\n<th>Method<\/th>\n<th>Quality<\/th>\n<th>CPU Cost<\/th>\n<th>Artifacts<\/th>\n<th>Interpolates Sample Points<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Linear<\/td>\n<td>Low<\/td>\n<td>Very Low<\/td>\n<td>High<\/td>\n<td>Yes<\/td>\n<\/tr>\n<tr>\n<td>B-Spline (Cubic)<\/td>\n<td>Moderate<\/td>\n<td>Medium<\/td>\n<td>Low<\/td>\n<td>No<\/td>\n<\/tr>\n<tr>\n<td>Lagrange (Order 3)<\/td>\n<td>High (order-dependent)<\/td>\n<td>High<\/td>\n<td>Moderate (oscillation)<\/td>\n<td>Yes<\/td>\n<\/tr>\n<tr>\n<td>Cubic Hermite<\/td>\n<td>High<\/td>\n<td>Medium<\/td>\n<td>Low<\/td>\n<td>Yes<\/td>\n<\/tr>\n<tr>\n<td>Parabolic (Quadratic)<\/td>\n<td>Moderate<\/td>\n<td>Low<\/td>\n<td>Moderate<\/td>\n<td>Yes<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p\/>\n<p>Further information can be found in the <a href=\"https:\/\/github.com\/pschatzmann\/arduino-audio-tools\/wiki\/Resampling\">Resampling Wiki<\/a>!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The ResampleStream class of the Arduino Audio Tools project provides some flexible resampling functionality both on the input and the output side. To calculate the values it just uses a simple but efficient linear interpolation. I finally managed to provide an extended ResampleStreamT resampling class that uses some alternative interpolation [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[20,22],"tags":[],"class_list":["post-6783","post","type-post","status-publish","format-standard","hentry","category-arduino","category-machine-sound"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Arduino Audio Tools: Pimping Up Resampling - Phil Schatzmann<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.pschatzmann.ch\/home\/2025\/06\/13\/arduino-audio-tools-pinping-up-resampling\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Arduino Audio Tools: Pimping Up Resampling - Phil Schatzmann\" \/>\n<meta property=\"og:description\" content=\"The ResampleStream class of the Arduino Audio Tools project provides some flexible resampling functionality both on the input and the output side. To calculate the values it just uses a simple but efficient linear interpolation. I finally managed to provide an extended ResampleStreamT resampling class that uses some alternative interpolation [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pschatzmann.ch\/home\/2025\/06\/13\/arduino-audio-tools-pinping-up-resampling\/\" \/>\n<meta property=\"og:site_name\" content=\"Phil Schatzmann\" \/>\n<meta property=\"article:published_time\" content=\"2025-06-13T19:15:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-16T03:01:06+00:00\" \/>\n<meta name=\"author\" content=\"pschatzmann\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"pschatzmann\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2025\\\/06\\\/13\\\/arduino-audio-tools-pinping-up-resampling\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2025\\\/06\\\/13\\\/arduino-audio-tools-pinping-up-resampling\\\/\"},\"author\":{\"name\":\"pschatzmann\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#\\\/schema\\\/person\\\/73a53638a4e34e8373405fd737dac9b1\"},\"headline\":\"Arduino Audio Tools: Pimping Up Resampling\",\"datePublished\":\"2025-06-13T19:15:08+00:00\",\"dateModified\":\"2025-06-16T03:01:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2025\\\/06\\\/13\\\/arduino-audio-tools-pinping-up-resampling\\\/\"},\"wordCount\":116,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#\\\/schema\\\/person\\\/73a53638a4e34e8373405fd737dac9b1\"},\"articleSection\":[\"Arduino\",\"Machine Sound\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2025\\\/06\\\/13\\\/arduino-audio-tools-pinping-up-resampling\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2025\\\/06\\\/13\\\/arduino-audio-tools-pinping-up-resampling\\\/\",\"url\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2025\\\/06\\\/13\\\/arduino-audio-tools-pinping-up-resampling\\\/\",\"name\":\"Arduino Audio Tools: Pimping Up Resampling - Phil Schatzmann\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#website\"},\"datePublished\":\"2025-06-13T19:15:08+00:00\",\"dateModified\":\"2025-06-16T03:01:06+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2025\\\/06\\\/13\\\/arduino-audio-tools-pinping-up-resampling\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2025\\\/06\\\/13\\\/arduino-audio-tools-pinping-up-resampling\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2025\\\/06\\\/13\\\/arduino-audio-tools-pinping-up-resampling\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Arduino Audio Tools: Pimping Up Resampling\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#website\",\"url\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/\",\"name\":\"Phil Schatzmann Consulting\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#\\\/schema\\\/person\\\/73a53638a4e34e8373405fd737dac9b1\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#\\\/schema\\\/person\\\/73a53638a4e34e8373405fd737dac9b1\",\"name\":\"pschatzmann\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/pschatzmann.png\",\"url\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/pschatzmann.png\",\"contentUrl\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/pschatzmann.png\",\"width\":305,\"height\":305,\"caption\":\"pschatzmann\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/pschatzmann.png\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Arduino Audio Tools: Pimping Up Resampling - Phil Schatzmann","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.pschatzmann.ch\/home\/2025\/06\/13\/arduino-audio-tools-pinping-up-resampling\/","og_locale":"en_US","og_type":"article","og_title":"Arduino Audio Tools: Pimping Up Resampling - Phil Schatzmann","og_description":"The ResampleStream class of the Arduino Audio Tools project provides some flexible resampling functionality both on the input and the output side. To calculate the values it just uses a simple but efficient linear interpolation. I finally managed to provide an extended ResampleStreamT resampling class that uses some alternative interpolation [&hellip;]","og_url":"https:\/\/www.pschatzmann.ch\/home\/2025\/06\/13\/arduino-audio-tools-pinping-up-resampling\/","og_site_name":"Phil Schatzmann","article_published_time":"2025-06-13T19:15:08+00:00","article_modified_time":"2025-06-16T03:01:06+00:00","author":"pschatzmann","twitter_card":"summary_large_image","twitter_misc":{"Written by":"pschatzmann","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.pschatzmann.ch\/home\/2025\/06\/13\/arduino-audio-tools-pinping-up-resampling\/#article","isPartOf":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2025\/06\/13\/arduino-audio-tools-pinping-up-resampling\/"},"author":{"name":"pschatzmann","@id":"https:\/\/www.pschatzmann.ch\/home\/#\/schema\/person\/73a53638a4e34e8373405fd737dac9b1"},"headline":"Arduino Audio Tools: Pimping Up Resampling","datePublished":"2025-06-13T19:15:08+00:00","dateModified":"2025-06-16T03:01:06+00:00","mainEntityOfPage":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2025\/06\/13\/arduino-audio-tools-pinping-up-resampling\/"},"wordCount":116,"commentCount":0,"publisher":{"@id":"https:\/\/www.pschatzmann.ch\/home\/#\/schema\/person\/73a53638a4e34e8373405fd737dac9b1"},"articleSection":["Arduino","Machine Sound"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.pschatzmann.ch\/home\/2025\/06\/13\/arduino-audio-tools-pinping-up-resampling\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.pschatzmann.ch\/home\/2025\/06\/13\/arduino-audio-tools-pinping-up-resampling\/","url":"https:\/\/www.pschatzmann.ch\/home\/2025\/06\/13\/arduino-audio-tools-pinping-up-resampling\/","name":"Arduino Audio Tools: Pimping Up Resampling - Phil Schatzmann","isPartOf":{"@id":"https:\/\/www.pschatzmann.ch\/home\/#website"},"datePublished":"2025-06-13T19:15:08+00:00","dateModified":"2025-06-16T03:01:06+00:00","breadcrumb":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2025\/06\/13\/arduino-audio-tools-pinping-up-resampling\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pschatzmann.ch\/home\/2025\/06\/13\/arduino-audio-tools-pinping-up-resampling\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.pschatzmann.ch\/home\/2025\/06\/13\/arduino-audio-tools-pinping-up-resampling\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pschatzmann.ch\/home\/"},{"@type":"ListItem","position":2,"name":"Arduino Audio Tools: Pimping Up Resampling"}]},{"@type":"WebSite","@id":"https:\/\/www.pschatzmann.ch\/home\/#website","url":"https:\/\/www.pschatzmann.ch\/home\/","name":"Phil Schatzmann Consulting","description":"","publisher":{"@id":"https:\/\/www.pschatzmann.ch\/home\/#\/schema\/person\/73a53638a4e34e8373405fd737dac9b1"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.pschatzmann.ch\/home\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.pschatzmann.ch\/home\/#\/schema\/person\/73a53638a4e34e8373405fd737dac9b1","name":"pschatzmann","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2022\/08\/pschatzmann.png","url":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2022\/08\/pschatzmann.png","contentUrl":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2022\/08\/pschatzmann.png","width":305,"height":305,"caption":"pschatzmann"},"logo":{"@id":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2022\/08\/pschatzmann.png"}}]}},"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/posts\/6783","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/comments?post=6783"}],"version-history":[{"count":8,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/posts\/6783\/revisions"}],"predecessor-version":[{"id":6791,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/posts\/6783\/revisions\/6791"}],"wp:attachment":[{"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/media?parent=6783"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/categories?post=6783"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/tags?post=6783"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}