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.
Now got what sounds to me like the ideal project: should be simple enough but it teaches me important lessons about Pure data.
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.
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.
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.
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).
Where things get really tricky really quickly is in generating different 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.
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).
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.
Lots to learn!
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.
Any help would be greatly appreciated!