{"id":6257,"date":"2026-05-21T20:44:56","date_gmt":"2026-05-21T20:44:56","guid":{"rendered":"https:\/\/composers-inside-electronics.net\/cie-wp20\/?p=6257"},"modified":"2026-05-21T20:44:58","modified_gmt":"2026-05-21T20:44:58","slug":"neural-synthesis-with-gen","status":"publish","type":"post","link":"https:\/\/composers-inside-electronics.net\/cie-wp20\/neural-synthesis-with-gen\/","title":{"rendered":"Neural Synthesis with Gen~"},"content":{"rendered":"\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_84 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a2893e2c69ba\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a2893e2c69ba\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/composers-inside-electronics.net\/cie-wp20\/neural-synthesis-with-gen\/#Introduction\" >Introduction<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/composers-inside-electronics.net\/cie-wp20\/neural-synthesis-with-gen\/#Initial_Prompt\" >Initial Prompt<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/composers-inside-electronics.net\/cie-wp20\/neural-synthesis-with-gen\/#Response\" >Response<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/composers-inside-electronics.net\/cie-wp20\/neural-synthesis-with-gen\/#Core_Concepts_translated_to_gen\" >Core Concepts translated to gen~<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/composers-inside-electronics.net\/cie-wp20\/neural-synthesis-with-gen\/#The_gen_Code\" >The gen~ Code<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/composers-inside-electronics.net\/cie-wp20\/neural-synthesis-with-gen\/#Key_Implementation_Details\" >Key Implementation Details<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/composers-inside-electronics.net\/cie-wp20\/neural-synthesis-with-gen\/#Code\" >Code<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Introduction\"><\/span>Introduction<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Here is a meander using Gemini to propose Neural Synthesis using MAX MSP Gen~<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Initial_Prompt\"><\/span>Initial Prompt<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Using dr dobbs article about david tudor neural synthesizer project using the intel Etann chip, suggest modern implementation that could run on apple silicon macos<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Response\"><\/span>Response<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Here is a modern, ultra-fast implementation of a neural synthesizer node based on the ETANN chip architecture, built specifically for the <strong>Max\/MSP <code>gen~<\/code><\/strong> environment.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Core_Concepts_translated_to_gen\"><\/span>Core Concepts translated to <code>gen~<\/code><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Analog Simulation:<\/strong> It uses a tanh function for smooth, analog-style saturation.<\/li>\n\n\n\n<li><strong>Zero-Latency Matrix:<\/strong> Every weight is processed per-sample.<\/li>\n\n\n\n<li><strong>Feedback Loops:<\/strong> Outputs connect directly back to inputs for chaotic, Tudor-style self-generation.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"The_gen_Code\"><\/span>The <code>gen~<\/code> Code<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Paste this code inside a <code>gen~<\/code> object. It creates a $3 \\times 3$ fully interconnected neural network matrix.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ Inputs: In1, In2, In3 (External Audio\/Control)\n\/\/ Outputs: Out1, Out2, Out3 (Neural Oscillations)\n\n\/\/ 1. History operators for single-sample feedback loops\nHistory n1(0);\nHistory n2(0);\nHistory n3(0);\n\n\/\/ 2. Programmable Weights (ETANN Simulation)\n\/\/ Range: -2.0 to 2.0. Connect Max flonums to these params.\nParam w11(0.5), w12(-0.8), w13(0.3); \/\/ Node 1 weights\nParam w21(0.9), w22(0.1),  w23(-0.6); \/\/ Node 2 weights\nParam w31(-0.4), w32(0.7), w33(0.2);  \/\/ Node 3 weights\n\n\/\/ Input Gains\nParam in_gain(1.0);\n\n\/\/ 3. Matrix Multiplication &amp; Summation\n\/\/ Sum external inputs and previous states multiplied by weights\nData1 = (in1 * in_gain) + (n1 * w11) + (n2 * w12) + (n3 * w13);\nData2 = (in2 * in_gain) + (n1 * w21) + (n2 * w22) + (n3 * w23);\nData3 = (in3 * in_gain) + (n1 * w31) + (n2 * w32) + (n3 * w33);\n\n\/\/ 4. Non-Linear Activation Function (Sigmoid\/Tanh)\n\/\/ Simulates the ETANN analog differential amplifier saturation\nOut1 = tanh(Data1);\nOut2 = tanh(Data2);\nOut3 = tanh(Data3);\n\n\/\/ 5. Update History for the next sample\nn1 = Out1;\nn2 = Out2;\nn3 = Out3;\n\n\/\/ 6. Route to Max MSP DSP chain\nout1 = Out1;\nout2 = Out2;\nout3 = Out3;\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Key_Implementation_Details\"><\/span>Key Implementation Details<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>          &#91; External Audio Inputs ]\n                     \u2502\n                     \u25bc\n  \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n  \u2502  Matrix Multiplication (w11..w33)  \u25c4\u2500\u2500\u2500\u2510\n  \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518   \u2502\n                     \u2502                      \u2502\n                     \u25bc                      \u2502 Single-Sample\n         \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510          \u2502 Feedback Loop\n         \u2502 Tanh Saturation Stage \u2502          \u2502 (History)\n         \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518          \u2502\n                     \u2502                      \u2502\n                     \u251c\u2500\u2500&#91; External Out ]    \u2502\n                     \u2502                      \u2502\n                     \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2518\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>No Buffer Delays:<\/strong> Using <code>History<\/code> in <code>gen~<\/code> ensures a feedback loop delay of exactly <strong>1 sample<\/strong>.<\/li>\n\n\n\n<li><strong>Chaotic Behavior:<\/strong> To make it self-oscillate like David Tudor&#8217;s rig, set external inputs to 0, increase the parameter weights, and cross-modulate the nodes.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">To help expand this system, let me know:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Do you want to add <strong>biases (offsets)<\/strong> to the nodes?<\/li>\n\n\n\n<li>Should we implement <strong>genetic algorithm controls<\/strong> to automatically find stable patches?<\/li>\n\n\n\n<li>Do you need a <strong>larger matrix layout<\/strong> (e.g., $8 \\times 8$ or $16 \\times 16$)?<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Code\"><\/span>Code<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ Inputs: In1, In2, In3 (External Audio\/Control)\n\/\/ Outputs: Out1, Out2, Out3 (Neural Oscillations)\n\n\/\/ 1. History operators for single-sample feedback loops\nHistory n1(0);\nHistory n2(0);\nHistory n3(0);\n\n\/\/ 2. Programmable Weights (ETANN Simulation)\n\/\/ Range: -2.0 to 2.0. Connect Max flonums to these params.\nParam w11(0.5), w12(-0.8), w13(0.3); \/\/ Node 1 weights\nParam w21(0.9), w22(0.1),  w23(-0.6); \/\/ Node 2 weights\nParam w31(-0.4), w32(0.7), w33(0.2);  \/\/ Node 3 weights\n\n\/\/ Input Gains\nParam in_gain(1.0);\n\n\/\/ 3. Matrix Multiplication &amp; Summation\n\/\/ Sum external inputs and previous states multiplied by weights\nData1 = (in1 * in_gain) + (n1 * w11) + (n2 * w12) + (n3 * w13);\nData2 = (in2 * in_gain) + (n1 * w21) + (n2 * w22) + (n3 * w23);\nData3 = (in3 * in_gain) + (n1 * w31) + (n2 * w32) + (n3 * w33);\n\n\/\/ 4. Non-Linear Activation Function (Sigmoid\/Tanh)\n\/\/ Simulates the ETANN analog differential amplifier saturation\nOut1 = tanh(Data1);\nOut2 = tanh(Data2);\nOut3 = tanh(Data3);\n\n\/\/ 5. Update History for the next sample\nn1 = Out1;\nn2 = Out2;\nn3 = Out3;\n\n\/\/ 6. Route to Max MSP DSP chain\nout1 = Out1;\nout2 = Out2;\nout3 = Out3;\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Here is a meander using Gemini to propose Neural Synthesis using MAX MSP Gen~ Initial Prompt Using dr dobbs article about david tudor neural [&#8230;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"h5ap_radio_sources":[],"footnotes":""},"categories":[5],"tags":[403,151],"class_list":["post-6257","post","type-post","status-publish","format-standard","hentry","category-technical","tag-ai","tag-neural-synthesis"],"post_type":"post","author_name":"Philip Edelstein","_links":{"self":[{"href":"https:\/\/composers-inside-electronics.net\/cie-wp20\/wp-json\/wp\/v2\/posts\/6257","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/composers-inside-electronics.net\/cie-wp20\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/composers-inside-electronics.net\/cie-wp20\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/composers-inside-electronics.net\/cie-wp20\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/composers-inside-electronics.net\/cie-wp20\/wp-json\/wp\/v2\/comments?post=6257"}],"version-history":[{"count":1,"href":"https:\/\/composers-inside-electronics.net\/cie-wp20\/wp-json\/wp\/v2\/posts\/6257\/revisions"}],"predecessor-version":[{"id":6258,"href":"https:\/\/composers-inside-electronics.net\/cie-wp20\/wp-json\/wp\/v2\/posts\/6257\/revisions\/6258"}],"wp:attachment":[{"href":"https:\/\/composers-inside-electronics.net\/cie-wp20\/wp-json\/wp\/v2\/media?parent=6257"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/composers-inside-electronics.net\/cie-wp20\/wp-json\/wp\/v2\/categories?post=6257"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/composers-inside-electronics.net\/cie-wp20\/wp-json\/wp\/v2\/tags?post=6257"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}