{"id":1941,"date":"2020-09-28T08:39:04","date_gmt":"2020-09-28T06:39:04","guid":{"rendered":"https:\/\/www.pschatzmann.ch\/home\/?p=1941"},"modified":"2022-08-27T21:00:42","modified_gmt":"2022-08-27T19:00:42","slug":"the-synthesis-toolkit-skt-library-for-the-arduino-esp32-midi","status":"publish","type":"post","link":"https:\/\/www.pschatzmann.ch\/home\/2020\/09\/28\/the-synthesis-toolkit-skt-library-for-the-arduino-esp32-midi\/","title":{"rendered":"The Synthesis ToolKit (STK) Library for the Arduino ESP32 &#8211; Supporting MIDI and BLE"},"content":{"rendered":"<p>I made the <strong><a href=\"https:\/\/ccrma.stanford.edu\/software\/stk\/fundamentals.html\">Synthesis ToolKit (SKT)<\/a><\/strong> available as <a href=\"https:\/\/github.com\/pschatzmann\/Arduino-STK\"><strong>Arduino Library<\/strong><\/a>.<\/p>\n<p>The Synthesis ToolKit in C++ (STK) is a set of open source audio signal processing and algorithmic synthesis classes written in the C++ programming language. STK was designed to facilitate rapid development of music synthesis and audio processing software, with an emphasis on cross-platform functionality, realtime control, ease of use, and educational example code.<\/p>\n<p>Standard STK uses <strong>Skini<\/strong> instead of <strong>MIDI<\/strong>. This is a simple text based format which provides the same functionality as MIDI.<\/p>\n<p>However, my intention was to use a simple <strong>MIDI keyboard<\/strong> as input device to generate music on an ESP32. In my initial use case I just wanted to connect the device via <strong>Bluetooth Low Energy (BLE)<\/strong>.<\/p>\n<p>After having implemented a <strong>BLE server<\/strong> that was able to <strong>receive<\/strong> MIDI messages (which was the difficult part) I decided to add some <strong>sending<\/strong> functionality as well (which was pretty easy) &#8211; and having all this functionality it was no effort at all to refactor the code a little bit to provide <strong>additional communication<\/strong> possibilities.<\/p>\n<p>I have integrated the MIDI functionality into the library:<\/p>\n<h2>Sending MIDI Messages<\/h2>\n<p>Midi messages can be sent by using the following methods on an output device<\/p>\n<ul>\n<li>void noteOn(uint8_t note, uint8_t velocity, int8_t channel=-1);<\/li>\n<li>void noteOff(uint8_t note, uint8_t velocity, int8_t channel=-1);<\/li>\n<li>void pitchBend(uint16_t value, int8_t channel=-1);<\/li>\n<li>void channelPressure(uint8_t value, int8_t channel=-1);<\/li>\n<li>void polyPressure(uint8_t valuePar, int8_t channel=-1);<\/li>\n<li>void programChange(uint8_t program, int8_t channel=-1);<\/li>\n<li>void allNotesOff( int8_t channel=-1);<\/li>\n<li>void resetAllControllers( int8_t channel=-1);<\/li>\n<li>void localControl( bool active, int8_t channel=-1);<\/li>\n<li>void controlChange(uint8_t msg, uint8_t value, int8_t channel=-1);<\/li>\n<\/ul>\n<h3>Output MIDI Messages to Serial<\/h3>\n<p>Output of MIDI messages are done with the help of the <strong>ArdMidiStreamOut<\/strong> class. It expects a <strong>Stream<\/strong> as argument, which makes it so flexible.<\/p>\n<p>Here is the implementation that sends the output to Serial. MIDI is a binary protocol, so you will not see anything meaningful in your Serial Monitor:<\/p>\n<pre><code>#include \"ArdMidiStreamOut.h\"\n\nusing namespace stk;\n\nArdMidiStreamOut out(Serial);\nStkFloat note = 64; \/\/ 0 to 128\nStkFloat amplitude = 100; \/\/ 0 to 128\n\nvoid setup() {\n    Serial.begin(115200);\n}\n\nvoid loop() {\n    Serial.println();\n    Serial.print(\"playing \");\n    Serial.println(++note);\n\n    out.noteOn( note, amplitude );\n    delay(900);\n    out.noteOff( note, 20 );\n    delay(200);\n    if (note&gt;=90) {\n      note = 30;\n    }\n}\n<\/code><\/pre>\n<h3>Output MIDI Messages to IP<\/h3>\n<p>In order to do communication with TCP\/IP you can use the standard Arduino <strong>WiFiClient<\/strong> class. Of cause you need to have a listening server on the receiving side for this to work:<\/p>\n<pre><code>#include &lt;WiFi.h&gt;\n#include &lt;WiFiMulti.h&gt;\n#include \"ArdMidiStreamOut.h\"\n\nusing namespace stk;\n\nIPAddress ip(192, 168, 1, 35);\nint port = 9999;\nWiFiClient client;\nArdMidiStreamOut out(client);\nconst char *SSID = \"your ssid\";\nconst char *PWD = \"your password\";\n\nStkFloat note = 64; \/\/ 0 to 128\nStkFloat amplitude = 100; \/\/ 0 to 128\n\nvoid setup() {\n  Serial.begin(115200);\n  WiFi.begin(SSID, PWD);\n  while (WiFi.status() != WL_CONNECTED) {\n    Serial.print('.');\n    delay(1000);\n  }\n\n  Serial.print(\"Connected to IP address: \");\n  Serial.println(WiFi.localIP());\n\n  client.connect(ip, port);\n}\n\nvoid loop() {\n    Serial.print(\"playing \");\n    Serial.println(++note);\n\n    out.noteOn( note, amplitude );\n    delay(900);\n    out.noteOff( note, 20 );\n    delay(200);\n    if (note&gt;=90) {\n      note = 30;\n    }\n}\n<\/code><\/pre>\n<p>We need to login into WIFI and then connect to the requested IP address and port. This is just plain vanilla Arduino code. Since we have given the <strong>WifiClient as argument to the ArdMidiStreamOut<\/strong> class, the information is automatically sent to the expected destination.<\/p>\n<h3>Output MIDI Messages to UDP<\/h3>\n<p>We have already seen an example in the introduction on how to send out sound via UDP. This is very similar and we use <strong>ArdMidiStreamOut<\/strong> instead of ArdStreamBinaryOut.<\/p>\n<pre><code>#include \"WiFi.h\" \n#include \"ArdUdp.h\" \n#include \"ArdMidiStreamOut.h\"\n\nusing namespace stk;\n\nIPAddress ip(192, 168, 1, 35);\nArdUdp udp(ip, 7000);\nArdMidiStreamOut out(udp);\nconst char *SSID = \"your ssid\";\nconst char *PWD = \"your password\";\n\nStkFloat note = 64; \/\/ 0 to 128\nStkFloat amplitude = 100; \/\/ 0 to 128\n\nvoid setup() {\n  Serial.begin(115200);\n  WiFi.begin(SSID, PWD);\n  while (WiFi.status() != WL_CONNECTED) {\n    Serial.print('.');\n    delay(1000);\n  }\n\n  Serial.print(\"Connected to IP address: \");\n  Serial.println(WiFi.localIP());\n}\n\nvoid loop() {\n    Serial.print(\"playing \");\n    Serial.println(++note);\n\n    out.noteOn( note, amplitude );\n    delay(900);\n    out.noteOff( note, 20 );\n    delay(200);\n    if (note&gt;=90) {\n      note = 30;\n    }\n}\n<\/code><\/pre>\n<h2>Receiving MIDI Messages<\/h2>\n<p>Receiving messages is easy as well. You use the class <strong>ArdMidiStreamIn<\/strong> together with a Stream and a <strong>ArdMidiEventHandler<\/strong> which implements the parsing of MIDI messages.<\/p>\n<h3>Input MIDI Messages from Serial<\/h3>\n<pre><code>#include \"Voicer.h\"\n#include \"Clarinet.h\"\n#include \"ArdMidiStreamIn.h\"\n\nusing namespace stk;\n\nVoicer voicer;\nClarinet clarinet(440);\nArdMidiEventHandler handler(&amp;voicer);\nArdMidiStreamIn in(Serial, handler);\n\nvoid setup() {\n  Serial.begin(115200);\n  voicer.addInstrument(&amp;clarinet);\n}\n\nvoid loop() {\n  in.loop();\n}\n\n\n<\/code><\/pre>\n<p>In the setup method we tell the voicer to play the clarinet when we receive a corresponding command on channel 0.<br \/>\nIn the loop we need to call the loop() method from the ArdMidiStreamIn to trigger the receiving and parsing of the MIDI messages.<\/p>\n<h3>Input MIDI Messages from UDP<\/h3>\n<p>We can use the same logic as above, but we provide the standard Arduino <strong>WiFiUDP<\/strong> to the <strong>ArdMidiStreamIn<\/strong>:<\/p>\n<pre><code>#include &lt;WiFi.h&gt;\n#include &lt;WiFiClient.h&gt;\n#include &lt;WiFiUdp.h&gt;\n#include &lt;ArdMidiStreamIn.h&gt;\n#include \"Voicer.h\"\n#include \"Clarinet.h\"\n\nusing namespace stk;\n\n\nWiFiUDP udp;\nClarinet clarinet(440);\nVoicer voicer;\nArdMidiEventHandler handler(&amp;voicer);\nArdMidiStreamIn in(udp, handler );\nint localPort = 9000;\n\nvoid setup() {\n  Serial.begin(115200);\n  WiFi.begin(SSID, PWD);\n  while (WiFi.status() != WL_CONNECTED) {\n    Serial.print('.');\n    delay(1000);\n  }\n\n  Serial.print(\"Connected to IP address: \");\n  Serial.println(WiFi.localIP());  \n\n  voicer.addInstrument(&amp;clarinet,0);\n  udp.begin(localPort);\n}\n\nvoid loop() {\n  in.loop();\n}\n\n<\/code><\/pre>\n<h2>BLE Server<\/h2>\n<p>The MIDI BLE Server functionality is provided by the <strong>ArdMidiBleServer<\/strong> class. Above you have already seen all relevant components and how they work together.<\/p>\n<h3>Sending of MIDI Messages over BLE<\/h3>\n<pre><code>#include &lt;ArdMidiBleServer.h&gt;\n\nusing namespace stk;\n\nArdMidiBleServer ble(\"MidiServer\");\n\nStkFloat note = 64; \/\/ 0 to 128\nStkFloat amplitude = 100; \/\/ 0 to 128\n\nvoid setup() {\n  Serial.begin(115200);\n  ble.start();\n}\n\nvoid loop() {\n  Serial.print(\"playing \");\n  Serial.println(++note);\n\n  ble.noteOn( note, amplitude );\n  delay(900);\n  ble.noteOff( note, 20 );\n  delay(200);\n  if (note&gt;=90) {\n    note = 30;\n  }\n}\n\n<\/code><\/pre>\n<h3>Receiving of MIDI Messages over BLE<\/h3>\n<p>In order to receive an process inbound MIDI messages we use the <strong>ArdMidiBLEEventHandler<\/strong> class which expects a voicer.<\/p>\n<pre><code>#include &lt;Voicer.h&gt;\n#include &lt;Clarinet.h&gt;\n#include &lt;ArdMidiBleEventHandler.h&gt;\n#include &lt;ArdMidiBleServer.h&gt;\n\nusing namespace stk;\n\nVoicer voicer;\nClarinet clarinet(440);\nArdMidiBleEventHandler handler(&amp;voicer);\nArdMidiBleServer ble(\"MidiServer\", &amp;handler);\n\nvoid setup() {\n  Serial.begin(115200);\n  voicer.addInstrument(&amp;clarinet, 0);\n  ble.start(voicer);\n}\n\nvoid loop() {\n}\n\n<\/code><\/pre>\n<p>Of cause you could add the loop processing from the sending example here as well and you would have a MIDI BLE server that can send and receive MIDI messages at the same time!<\/p>\n<h2>BLE Client<\/h2>\n<p>After having seen how to use the BLE Server I finally demonstrate the corresponding <strong>ArdMidiBleClient<\/strong> class which acts as BLE Client.<br \/>\nLike the server it can receive and send out MIDI messages at the same time:<\/p>\n<pre><code>#include &lt;Voicer.h&gt;\n#include &lt;Clarinet.h&gt;\n#include &lt;ArdMidiBleEventHandler.h&gt;\n#include &lt;ArdMidiBleServer.h&gt;\n\nusing namespace stk;\n\nVoicer voicer;\nClarinet clarinet(440);\nArdMidiBleEventHandler handler(&amp;voicer);\nArdMidiBleServer ble(\"MidiServer\", &amp;handler);\n\nvoid setup() {\n  Serial.begin(115200);\n  voicer.addInstrument(&amp;clarinet, 0);\n  ble.start(voicer);\n}\n\nStkFloat note = 64; \/\/ 0 to 128\nStkFloat amplitude = 100; \/\/ 0 to 128\n\nvoid loop() {\n  Serial.print(\"playing \");\n  Serial.println(++note);\n\n  ble.noteOn( note, amplitude );\n  delay(900);\n  ble.noteOff( note, 20 );\n  delay(200);\n  if (note&gt;=90) {\n    note = 30;\n  }\n}\n\n<\/code><\/pre>\n<p>In this example we receive and process MIDI messages on channel 0 and send out messages on channel 1.<\/p>\n<h2>Conclusion<\/h2>\n<p>We can receive and process MIDI messages over different communication channels &#8211; including BLE. Combining this with the standard sound generation functionality of the STK framework we can now build some <strong>powerful Music Projects quite easily<\/strong>!<\/p>\n<p>And if you discover that one of the provided Classes does not quite meet your exact requirements: This is C++ &#8211; you can just create a Subclass and overwrite the method that you want to extend&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I made the Synthesis ToolKit (SKT) available as Arduino Library. The Synthesis ToolKit in C++ (STK) is a set of open source audio signal processing and algorithmic synthesis classes written in the C++ programming language. STK was designed to facilitate rapid development of music synthesis and audio processing software, with [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2000,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_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":[33,34,26],"class_list":["post-1941","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arduino","category-machine-sound","tag-midi","tag-stk","tag-synthesizer"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>The Synthesis ToolKit (STK) Library for the Arduino ESP32 - Supporting MIDI and BLE - 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\/2020\/09\/28\/the-synthesis-toolkit-skt-library-for-the-arduino-esp32-midi\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"The Synthesis ToolKit (STK) Library for the Arduino ESP32 - Supporting MIDI and BLE - Phil Schatzmann\" \/>\n<meta property=\"og:description\" content=\"I made the Synthesis ToolKit (SKT) available as Arduino Library. The Synthesis ToolKit in C++ (STK) is a set of open source audio signal processing and algorithmic synthesis classes written in the C++ programming language. STK was designed to facilitate rapid development of music synthesis and audio processing software, with [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pschatzmann.ch\/home\/2020\/09\/28\/the-synthesis-toolkit-skt-library-for-the-arduino-esp32-midi\/\" \/>\n<meta property=\"og:site_name\" content=\"Phil Schatzmann\" \/>\n<meta property=\"article:published_time\" content=\"2020-09-28T06:39:04+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-08-27T19:00:42+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2020\/09\/midi.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"582\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\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=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2020\\\/09\\\/28\\\/the-synthesis-toolkit-skt-library-for-the-arduino-esp32-midi\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2020\\\/09\\\/28\\\/the-synthesis-toolkit-skt-library-for-the-arduino-esp32-midi\\\/\"},\"author\":{\"name\":\"pschatzmann\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#\\\/schema\\\/person\\\/73a53638a4e34e8373405fd737dac9b1\"},\"headline\":\"The Synthesis ToolKit (STK) Library for the Arduino ESP32 &#8211; Supporting MIDI and BLE\",\"datePublished\":\"2020-09-28T06:39:04+00:00\",\"dateModified\":\"2022-08-27T19:00:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2020\\\/09\\\/28\\\/the-synthesis-toolkit-skt-library-for-the-arduino-esp32-midi\\\/\"},\"wordCount\":795,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#\\\/schema\\\/person\\\/73a53638a4e34e8373405fd737dac9b1\"},\"image\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2020\\\/09\\\/28\\\/the-synthesis-toolkit-skt-library-for-the-arduino-esp32-midi\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2020\\\/09\\\/midi.png\",\"keywords\":[\"MIDI\",\"STK\",\"Synthesizer\"],\"articleSection\":[\"Arduino\",\"Machine Sound\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2020\\\/09\\\/28\\\/the-synthesis-toolkit-skt-library-for-the-arduino-esp32-midi\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2020\\\/09\\\/28\\\/the-synthesis-toolkit-skt-library-for-the-arduino-esp32-midi\\\/\",\"url\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2020\\\/09\\\/28\\\/the-synthesis-toolkit-skt-library-for-the-arduino-esp32-midi\\\/\",\"name\":\"The Synthesis ToolKit (STK) Library for the Arduino ESP32 - Supporting MIDI and BLE - Phil Schatzmann\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2020\\\/09\\\/28\\\/the-synthesis-toolkit-skt-library-for-the-arduino-esp32-midi\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2020\\\/09\\\/28\\\/the-synthesis-toolkit-skt-library-for-the-arduino-esp32-midi\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2020\\\/09\\\/midi.png\",\"datePublished\":\"2020-09-28T06:39:04+00:00\",\"dateModified\":\"2022-08-27T19:00:42+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2020\\\/09\\\/28\\\/the-synthesis-toolkit-skt-library-for-the-arduino-esp32-midi\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2020\\\/09\\\/28\\\/the-synthesis-toolkit-skt-library-for-the-arduino-esp32-midi\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2020\\\/09\\\/28\\\/the-synthesis-toolkit-skt-library-for-the-arduino-esp32-midi\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2020\\\/09\\\/midi.png\",\"contentUrl\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2020\\\/09\\\/midi.png\",\"width\":1280,\"height\":582},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2020\\\/09\\\/28\\\/the-synthesis-toolkit-skt-library-for-the-arduino-esp32-midi\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"The Synthesis ToolKit (STK) Library for the Arduino ESP32 &#8211; Supporting MIDI and BLE\"}]},{\"@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":"The Synthesis ToolKit (STK) Library for the Arduino ESP32 - Supporting MIDI and BLE - 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\/2020\/09\/28\/the-synthesis-toolkit-skt-library-for-the-arduino-esp32-midi\/","og_locale":"en_US","og_type":"article","og_title":"The Synthesis ToolKit (STK) Library for the Arduino ESP32 - Supporting MIDI and BLE - Phil Schatzmann","og_description":"I made the Synthesis ToolKit (SKT) available as Arduino Library. The Synthesis ToolKit in C++ (STK) is a set of open source audio signal processing and algorithmic synthesis classes written in the C++ programming language. STK was designed to facilitate rapid development of music synthesis and audio processing software, with [&hellip;]","og_url":"https:\/\/www.pschatzmann.ch\/home\/2020\/09\/28\/the-synthesis-toolkit-skt-library-for-the-arduino-esp32-midi\/","og_site_name":"Phil Schatzmann","article_published_time":"2020-09-28T06:39:04+00:00","article_modified_time":"2022-08-27T19:00:42+00:00","og_image":[{"width":1280,"height":582,"url":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2020\/09\/midi.png","type":"image\/png"}],"author":"pschatzmann","twitter_card":"summary_large_image","twitter_misc":{"Written by":"pschatzmann","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.pschatzmann.ch\/home\/2020\/09\/28\/the-synthesis-toolkit-skt-library-for-the-arduino-esp32-midi\/#article","isPartOf":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2020\/09\/28\/the-synthesis-toolkit-skt-library-for-the-arduino-esp32-midi\/"},"author":{"name":"pschatzmann","@id":"https:\/\/www.pschatzmann.ch\/home\/#\/schema\/person\/73a53638a4e34e8373405fd737dac9b1"},"headline":"The Synthesis ToolKit (STK) Library for the Arduino ESP32 &#8211; Supporting MIDI and BLE","datePublished":"2020-09-28T06:39:04+00:00","dateModified":"2022-08-27T19:00:42+00:00","mainEntityOfPage":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2020\/09\/28\/the-synthesis-toolkit-skt-library-for-the-arduino-esp32-midi\/"},"wordCount":795,"commentCount":2,"publisher":{"@id":"https:\/\/www.pschatzmann.ch\/home\/#\/schema\/person\/73a53638a4e34e8373405fd737dac9b1"},"image":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2020\/09\/28\/the-synthesis-toolkit-skt-library-for-the-arduino-esp32-midi\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2020\/09\/midi.png","keywords":["MIDI","STK","Synthesizer"],"articleSection":["Arduino","Machine Sound"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.pschatzmann.ch\/home\/2020\/09\/28\/the-synthesis-toolkit-skt-library-for-the-arduino-esp32-midi\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.pschatzmann.ch\/home\/2020\/09\/28\/the-synthesis-toolkit-skt-library-for-the-arduino-esp32-midi\/","url":"https:\/\/www.pschatzmann.ch\/home\/2020\/09\/28\/the-synthesis-toolkit-skt-library-for-the-arduino-esp32-midi\/","name":"The Synthesis ToolKit (STK) Library for the Arduino ESP32 - Supporting MIDI and BLE - Phil Schatzmann","isPartOf":{"@id":"https:\/\/www.pschatzmann.ch\/home\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2020\/09\/28\/the-synthesis-toolkit-skt-library-for-the-arduino-esp32-midi\/#primaryimage"},"image":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2020\/09\/28\/the-synthesis-toolkit-skt-library-for-the-arduino-esp32-midi\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2020\/09\/midi.png","datePublished":"2020-09-28T06:39:04+00:00","dateModified":"2022-08-27T19:00:42+00:00","breadcrumb":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2020\/09\/28\/the-synthesis-toolkit-skt-library-for-the-arduino-esp32-midi\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pschatzmann.ch\/home\/2020\/09\/28\/the-synthesis-toolkit-skt-library-for-the-arduino-esp32-midi\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pschatzmann.ch\/home\/2020\/09\/28\/the-synthesis-toolkit-skt-library-for-the-arduino-esp32-midi\/#primaryimage","url":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2020\/09\/midi.png","contentUrl":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2020\/09\/midi.png","width":1280,"height":582},{"@type":"BreadcrumbList","@id":"https:\/\/www.pschatzmann.ch\/home\/2020\/09\/28\/the-synthesis-toolkit-skt-library-for-the-arduino-esp32-midi\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pschatzmann.ch\/home\/"},{"@type":"ListItem","position":2,"name":"The Synthesis ToolKit (STK) Library for the Arduino ESP32 &#8211; Supporting MIDI and BLE"}]},{"@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\/1941","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=1941"}],"version-history":[{"count":35,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/posts\/1941\/revisions"}],"predecessor-version":[{"id":4062,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/posts\/1941\/revisions\/4062"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/media\/2000"}],"wp:attachment":[{"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/media?parent=1941"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/categories?post=1941"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/tags?post=1941"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}