<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Noob Trying to Create a MIDI Chorder&#x2F;Harmonizer]]></title><description><![CDATA[<p>Newbie alert! Been interested in Pd for quite a while, though long after hearing a lot about Max in college (ca. 1990). But my attempts to do anything in it were thwarted by many factors, including the lack of a clear plan. As is often the case, the most appropriate approach to learning a new language is to find a use for it.</p>
<p>Now got what sounds to me like the ideal project: should be simple enough but it teaches me important lessons about Pure data.</p>
<p>Been trying to create a basic chorder/harmonizer taking input from a MIDI keyboard or wind controller and outputting multiple notes to an external synth connected via MIDI as well. Later on, this project might end up with Pd-synthesized sounds, but my first need is for a simple tool which generates different chords based on incoming MIDI notes.</p>
<p>More specifically, the idea is to create something like the “Michael Brecker Effect”, based on something the sax player would do with his Akai EWI and Oberheim Xpander. Brecker would play melodic lines on his (monophonic) EWI and the Xpander would generate random chords under that. There are tools out there which do this but it’s probably best for me to create my own. Been using a tool which does something a bit different (using the incoming MIDI notes as chord roots instead of top notes) and it’s just too much fun. Creating my own chorder/harmonizer would allow me to appropriate the whole thing to my own context.</p>
<p>My sense is that much of this is really trivial, by Pd standards. Even surprised not to readily find multiple examples of just this thing. Maybe my search skills are off. But my understanding of Pure data is so fragmentary that it quickly gets me stuck.</p>
<p>Here’s where things stand at this point. Can easily generate a given chord type (say, a major chord) under any incoming note. Offset the [notein] MIDI note number by a certain amount does create an interval, obviously. And sending multiple numbers to [noteout] actually works. Quite neat. It even deals correctly with note off messages, which was somewhat surprising to me. So far, so good. Can play major chords on any note, which is already a fun effect for a monodic instrument (but something which is already possible for me to easily do).</p>
<p>Where things get really tricky really quickly is in generating <em>different</em> chord types for each incoming note. For instance, in a C major context, would like an incoming C or G to produce major chords, but an incoming D or E should produce minor chords. A non-scale incoming note could work as a passing tone (not producing a chord). Basically, each of the 12 notes in the 12TET octave would trigger a different set of notes.</p>
<p>Therein lies the rub. Triggering different events based on different notes is easy enough with [mod] and [select]. But, for some unobvious-to-me reason, sending those “mixed messages” breaks the whole thing. This is when note off messages stop being interpreted correctly (so: stuck notes). It’s also been impossible to produce passing tones (an offset of 0 for each voice doesn’t appear to have an effect).</p>
<p>It’s fairly clear to me that there’s a basic misunderstanding on my part. About many things. Like which inlet produces which results and how/when messages are interpreted. To my surprise, it sounds like Pd objects have memory, which is reset by closing the patch and opening it again.</p>
<p>Lots to learn!</p>
<p>At any rate, here’s my current attempt at making a chorder/harmonizer patch. Tried many different things leading to different problems. This version gives me stuck notes. Which is what got me stuck.</p>
<p><a href="/uploads/files/1485967269774-chorder.pd">chorder.pd</a></p>
<p>Any help would be greatly appreciated!</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/10554/noob-trying-to-create-a-midi-chorder-harmonizer</link><generator>RSS for Node</generator><lastBuildDate>Fri, 10 Jul 2026 20:07:17 GMT</lastBuildDate><atom:link href="http://forum.pdpatchrepo.info/topic/10554.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 01 Feb 2017 17:22:21 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Noob Trying to Create a MIDI Chorder&#x2F;Harmonizer on Wed, 01 Feb 2017 17:22:21 GMT]]></title><description><![CDATA[<p>Newbie alert! Been interested in Pd for quite a while, though long after hearing a lot about Max in college (ca. 1990). But my attempts to do anything in it were thwarted by many factors, including the lack of a clear plan. As is often the case, the most appropriate approach to learning a new language is to find a use for it.</p>
<p>Now got what sounds to me like the ideal project: should be simple enough but it teaches me important lessons about Pure data.</p>
<p>Been trying to create a basic chorder/harmonizer taking input from a MIDI keyboard or wind controller and outputting multiple notes to an external synth connected via MIDI as well. Later on, this project might end up with Pd-synthesized sounds, but my first need is for a simple tool which generates different chords based on incoming MIDI notes.</p>
<p>More specifically, the idea is to create something like the “Michael Brecker Effect”, based on something the sax player would do with his Akai EWI and Oberheim Xpander. Brecker would play melodic lines on his (monophonic) EWI and the Xpander would generate random chords under that. There are tools out there which do this but it’s probably best for me to create my own. Been using a tool which does something a bit different (using the incoming MIDI notes as chord roots instead of top notes) and it’s just too much fun. Creating my own chorder/harmonizer would allow me to appropriate the whole thing to my own context.</p>
<p>My sense is that much of this is really trivial, by Pd standards. Even surprised not to readily find multiple examples of just this thing. Maybe my search skills are off. But my understanding of Pure data is so fragmentary that it quickly gets me stuck.</p>
<p>Here’s where things stand at this point. Can easily generate a given chord type (say, a major chord) under any incoming note. Offset the [notein] MIDI note number by a certain amount does create an interval, obviously. And sending multiple numbers to [noteout] actually works. Quite neat. It even deals correctly with note off messages, which was somewhat surprising to me. So far, so good. Can play major chords on any note, which is already a fun effect for a monodic instrument (but something which is already possible for me to easily do).</p>
<p>Where things get really tricky really quickly is in generating <em>different</em> chord types for each incoming note. For instance, in a C major context, would like an incoming C or G to produce major chords, but an incoming D or E should produce minor chords. A non-scale incoming note could work as a passing tone (not producing a chord). Basically, each of the 12 notes in the 12TET octave would trigger a different set of notes.</p>
<p>Therein lies the rub. Triggering different events based on different notes is easy enough with [mod] and [select]. But, for some unobvious-to-me reason, sending those “mixed messages” breaks the whole thing. This is when note off messages stop being interpreted correctly (so: stuck notes). It’s also been impossible to produce passing tones (an offset of 0 for each voice doesn’t appear to have an effect).</p>
<p>It’s fairly clear to me that there’s a basic misunderstanding on my part. About many things. Like which inlet produces which results and how/when messages are interpreted. To my surprise, it sounds like Pd objects have memory, which is reset by closing the patch and opening it again.</p>
<p>Lots to learn!</p>
<p>At any rate, here’s my current attempt at making a chorder/harmonizer patch. Tried many different things leading to different problems. This version gives me stuck notes. Which is what got me stuck.</p>
<p><a href="/uploads/files/1485967269774-chorder.pd">chorder.pd</a></p>
<p>Any help would be greatly appreciated!</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/10554/noob-trying-to-create-a-midi-chorder-harmonizer</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/10554/noob-trying-to-create-a-midi-chorder-harmonizer</guid><dc:creator><![CDATA[Enkerli]]></dc:creator><pubDate>Wed, 01 Feb 2017 17:22:21 GMT</pubDate></item><item><title><![CDATA[Reply to Noob Trying to Create a MIDI Chorder&#x2F;Harmonizer on Wed, 01 Feb 2017 19:58:33 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/enkerli">@Enkerli</a> Hi there.</p>
<p>Actually when you trigger a note your program sends out 7 notes:</p>
<ul>
<li>
<p>1 - the note you actually played.</p>
</li>
<li>
<p>2 - the 3 notes coming out of the [+ ] objects, which are the note you played (in the hot inlet) summed to the last value you put into the right inlet (cold one).</p>
</li>
<li>
<p>3 - the 3 notes coming out of the [+ ] objects after the bang, which are the last value you put into the left inlet (the note you played) summed to the new value they received into the right inlet after [sel].</p>
</li>
</ul>
<p>This is because you are using the note you played as a trigger for 3 different things, that are [noteout], [+ ]s and [mod 12]. You should avoid multiple connection when not needed and should be aware that every &quot;number&quot; you send acts both like a number and a bang. Also, be aware of the difference between cold and hot inlets, the first are just &quot;memory&quot;, you put something in there and will remain there until the output is triggered, Usually this happens when something goes into the hot inlet, it may be a number, a symbol or a simple bang. Use the [trigger] object to force a bang into the hot inlet when you input something into the cold one.<br />
I modified your patch and commented each solution, give it a look and everything will be clear <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/wink.png" title=";)" alt=";)" /></p>
<p><a href="/uploads/files/1485978770476-chorder-solution.pd">chorder-solution.pd</a></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/10554/noob-trying-to-create-a-midi-chorder-harmonizer/2</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/10554/noob-trying-to-create-a-midi-chorder-harmonizer/2</guid><dc:creator><![CDATA[shindeibrauns]]></dc:creator><pubDate>Wed, 01 Feb 2017 19:58:33 GMT</pubDate></item><item><title><![CDATA[Reply to Noob Trying to Create a MIDI Chorder&#x2F;Harmonizer on Wed, 01 Feb 2017 22:03:20 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/shindeibrauns">@shindeibrauns</a> Wow. Just, wow. Thanks a ton! Owe you one.</p>
<p>Did hope for a response to my convoluted query, at some point. But didn't even dare to dream for such an appropriate one. This is truly fantastic! Not only did you provide a working solution to my silly little issue, but you were able to patiently explain things and push me towards more learning. Without giving me any kind of grief or “attitude”. As a teacher, this touches me rather deeply. Sorry to go on about this but you actually just made my day!</p>
<p>As for the technical aspects.</p>
<p>You’re right about every count, of course. The hot/cold inlet distinction did appear on my radar but it hadn’t dawned on me that it might be among my mistakes (despite noticing the “memory” issue). In fact, had vaguely remembered something similar to what you describe in the math example, but didn’t follow that to its logical conclusion in the case of my MIDI notes.</p>
<p>Wasn’t aware of [trigger] (did see the [t b f] notation without knowing what it was). Makes a lot of sense, including the inclusion of an abbreviated <code>bang</code>. Since the extra notes are all triggering the addition, a bang isn’t needed in this case. (As you say, addition is commutative, which was my reason to use it instead of subtraction. Made things easier.)</p>
<p>Something which still isn’t so clear to me is why you used a [-12] object for the octave but a [-n( message for the other intervals. Get that the octave only takes one input and outputs directly to [noteout], but it’s not obvious to me what difference it might make.</p>
<p>But, overall, this was a thorough explanation of what was wrong in my patch and clear hints as to how to fully fix it.</p>
<p>Was able to complete the patch for major/minor/diminished triads. Then modified it to produce seventh chords.</p>
<p><a href="/uploads/files/1485985470540-chorder-7th.pd">chorder-7th.pd</a></p>
<p>Will try to generalise the patch and make it produce random chords within the scale. Sounds to me like your help was enough to get me “unstuck” and it might be possible for me to finish the project on my own.</p>
<p>Again, consider me indebted to you for your kind, thorough, and prompt help. If you ever need some help about ethnomusicology or anthropology, let me know!</p>
<p>-- Alex</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/10554/noob-trying-to-create-a-midi-chorder-harmonizer/3</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/10554/noob-trying-to-create-a-midi-chorder-harmonizer/3</guid><dc:creator><![CDATA[Enkerli]]></dc:creator><pubDate>Wed, 01 Feb 2017 22:03:20 GMT</pubDate></item><item><title><![CDATA[Reply to Noob Trying to Create a MIDI Chorder&#x2F;Harmonizer on Thu, 02 Feb 2017 05:40:00 GMT]]></title><description><![CDATA[<p>Made a bit of progress. Just in case it helps someone, here’s a few more details.</p>
<p>Adapted the patch to work in harmonic minor mode and streamlined a bit by routing lists of intervals instead of connecting each wire individually.<br />
<a href="/uploads/files/1486012583244-harmo-chorder.pd">harmo-chorder.pd</a></p>
<p>As there are only four types of seventh chords in the major mode, it does make things a bit clearer.<br />
<a href="/uploads/files/1486012603974-major-chorder.pd">major-chorder.pd</a></p>
<p>Among my next steps is a generalization of the whole thing to work in different modes, and with different root notes. Not completely sure how to make that work but it should also help me in terms of randomizing chord selection.</p>
<p>Might also tweak voicings to fit a couple of concepts from classical harmony/counterpoint (avoiding parallel fifths, etc.). Eventually, it’d be great to choose a given voicing based on the preceding chord (for instance, the F in a G7 chord could resolve on the E in a C Major 7 chord). Should be doable, but will probably require more learning.</p>
<p>Something which should be relatively easy to tweak is to decrease the velocity of the inner voices, to emphasize the top part.</p>
<p>Another thing which will be quite fun is to produce sounds directly in Pd. Wavetable synth might be especially fitting for a wind controller. In that case, it should be easier to run it on a Raspberry Pi, without requiring an external synth. Would make for a very compact setup.</p>
<p>Been experiencing some issues with some scale notes not producing chords. In fact, Pd doesn’t show that incoming note, but it plays on my external synth. Probably an issue with my current MIDI setup (WX-11 wind controller hooked to a laptop which controls the iWavestation app on an iPad using MIDImux). In some ways, it makes for a bit more variety.</p>
<p>It’s a fun learning experience, so far. Been occasionally thinking about a project like this for some years, actually. But kept being too overwhelmed to take it on. Today’s experience really energized me.<br />
Thanks, <a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/shindeibrauns">@shindeibrauns</a>!!</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/10554/noob-trying-to-create-a-midi-chorder-harmonizer/4</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/10554/noob-trying-to-create-a-midi-chorder-harmonizer/4</guid><dc:creator><![CDATA[Enkerli]]></dc:creator><pubDate>Thu, 02 Feb 2017 05:40:00 GMT</pubDate></item><item><title><![CDATA[Reply to Noob Trying to Create a MIDI Chorder&#x2F;Harmonizer on Sun, 05 Feb 2017 23:28:46 GMT]]></title><description><![CDATA[<p>Haven’t gone back to my Pd (been experimenting with other things) but eventually got <a href="http://robbykilgore.com/?p=19" rel="nofollow">some technical details and the back story</a> behind the “Michael Brecker Effect”. Turns out, those chords aren’t random but are made of notes which rotate. Makes more sense than purely random, especially in the context of the Oberheim Xpander.<br />
The same musician who built those patches for Michael Brecker has since created a MIDI plugin version through Max and even some Arduino-based hardware.<br />
Will try to reproduce his Max patch in Pd. Might eventually do a hardware version with Arduino or Raspberry Pi, but that might take longer.<br />
Still useful to document all of this, just in case somebody else has similar ideas.</p>
<p>(My major-chorder.pd patch in the previous post was the wrong one. Oops!)</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/10554/noob-trying-to-create-a-midi-chorder-harmonizer/5</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/10554/noob-trying-to-create-a-midi-chorder-harmonizer/5</guid><dc:creator><![CDATA[Enkerli]]></dc:creator><pubDate>Sun, 05 Feb 2017 23:28:46 GMT</pubDate></item><item><title><![CDATA[Reply to Noob Trying to Create a MIDI Chorder&#x2F;Harmonizer on Mon, 06 Feb 2017 04:55:20 GMT]]></title><description><![CDATA[<p>Ok! Getting somewhere.<br />
<a href="/uploads/files/1486356801426-voice-rotator.pd">voice-rotator.pd</a></p>
<p>Got the basic effect working. To an incoming note, the patch adds a parallel fifth and then two other notes with rotating offsets. So there are non-random but relatively unpredictable chords built around the incoming note. Cool! Makes for a really neat effect, especially with a bit of practice.</p>
<p>My main issue is sending note off messages. Tried different ways but since my thing cycles through, it “forgets” the previous note when it sends velocity zero.</p>
<p>“Solved” it with [<code>makenote</code>], which works well but is a bit different.</p>
<p>Will probably revisit this after learning more about Pd. Sounds like cyclone’s  [<code>flush</code>] could help me. Or finding a way to “remember” the offset note.</p>
<p>In the meantime, will be able to play with this patch, using different patterns. Might try to reproduce it in Apple Mainstage’s JavaScript-based Scripter and/or in Sonic Pi (now that it can receive MIDI signals).</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/10554/noob-trying-to-create-a-midi-chorder-harmonizer/6</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/10554/noob-trying-to-create-a-midi-chorder-harmonizer/6</guid><dc:creator><![CDATA[Enkerli]]></dc:creator><pubDate>Mon, 06 Feb 2017 04:55:20 GMT</pubDate></item><item><title><![CDATA[Reply to Noob Trying to Create a MIDI Chorder&#x2F;Harmonizer on Mon, 06 Feb 2017 18:12:03 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/enkerli">@Enkerli</a> I'm really glad it helped. I see you have made really big progress in your project, I'm somehow proud of it, turns out that I'm not so bad at teaching as my sister says! :D<br />
Jokes apart, I'll check your patch as it intrigues me quite a lot. If I can help you with the note off issue I'll let you know, but since I'm a bit busy with university at the moment I'm sure you'll find a solution before I can even give it a look.</p>
<p>I've been working on a chord generator some weeks ago. As soon as I make the help file I'll publish it here in the &quot;abstractions&quot; section so check it out. Your feedback will be enough to pay me back <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/stuck_out_tongue_winking_eye.png" title=":P" alt=":P" /></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/10554/noob-trying-to-create-a-midi-chorder-harmonizer/7</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/10554/noob-trying-to-create-a-midi-chorder-harmonizer/7</guid><dc:creator><![CDATA[shindeibrauns]]></dc:creator><pubDate>Mon, 06 Feb 2017 18:12:03 GMT</pubDate></item><item><title><![CDATA[Reply to Noob Trying to Create a MIDI Chorder&#x2F;Harmonizer on Mon, 06 Feb 2017 20:05:38 GMT]]></title><description><![CDATA[<p>Yet more progress!</p>
<p>But still stuck on sending noteoff messages to a note after its number has changed. Maybe there’s something to do with a cold inlet, working as memory? Wait! Might have found part of the solution…</p>
<p>Followed the first two parts on the <a href="http://libremusicproduction.com/tools/pure-data" rel="nofollow">synth creation tutorial on Libre Music Production</a>,</p>
<p>(The third and last part of the LMP tutorial has to do with filters and UI, so it shouldn’t have an answer to my noteoff issue.)</p>
<p>Through that tutorial, was able to make a simple polyphonic synth which takes MIDI in and outputs ADSR-enveloped notes to the DAC. So far, so good.</p>
<p>Added a fifth to the mix. Still works. No stuck note.</p>
<p>Then tried adding a third note which progressively goes up with a counter… Boom, noteoff problem again. It does make some sense: need to trigger a velocity of zero to the previous note, But this is where memory would come in handy.</p>
<p>Found part of a solution in using the right inlet of a [<code>float</code>] object,<br />
<a href="/uploads/files/1486409229298-libremusic-synth.pd">libremusic-synth.pd</a></p>
<p>Now, the synth produces the correct effect, even with multiple incoming notes.</p>
<p>In fact, doing this with [<code>poly</code>] may bring us closer to the original effect created by Robby Kilgore on the Oberheim Xpander! Adding more polyphony than the notes which are produced internally, getting a rotation of notes… and a comeback of the noteoff problem.<br />
<a href="/uploads/files/1486410294934-libremusic-synth-rot.pd">libremusic-synth-rot.pd</a></p>
<p>So, getting closer, but my learning path is still winding around. Will search for known solutions, as it’s surely a common problem. Don’t necessarily want to go all the way to a minimal sequencer with [<code>tabwrite</code>] and [<code>tabread</code>], but it could be a solution and would have the added advantage of leaving a trace on which notes have been generated.</p>
<p>Will get it eventually!</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/10554/noob-trying-to-create-a-midi-chorder-harmonizer/8</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/10554/noob-trying-to-create-a-midi-chorder-harmonizer/8</guid><dc:creator><![CDATA[Enkerli]]></dc:creator><pubDate>Mon, 06 Feb 2017 20:05:38 GMT</pubDate></item></channel></rss>