Hi everyone,
thanks for the reply to my last request. I realize now it was a bit
too vague and ambitious for a simple patch. I've re-considered the
article, come up with several ideas for patches and I wonder if
people could suggest how easy they would be to make and if you think
they'd make interesting demonstrations of PD for a new audience?
1 A markov chain reading controller values from an midi file and
outputting a control change every time a note is received.
2 Averaging the last 10 values received from a midi controller and
outputting that average every time a control message is received.
3 Outputting random midi control changes within a range, the upper
and lower bounds learned from received midi control changes.
Hope this seems more reasonable and someone can help me with this
project.
Best wishes,
Ollie
Hallo, Ollie Glass hat gesagt: // Ollie Glass wrote:
1 A markov chain reading controller values from an midi file and
outputting a control change every time a note is received.
You could modify the markov-example from the Pd-docs for this. Readign values from a midi file will not work without externals though. You should better use realtime midi input for this.
2 Averaging the last 10 values received from a midi controller and
outputting that average every time a control message is received.
Maybe check out list-lastx.pd and list-accum.pd from the [list]-abs collection: http://footils.org/cms/show/46
3 Outputting random midi control changes within a range, the upper
and lower bounds learned from received midi control changes.
I like that example the most, I think. It's quite easy to do by just a little scaling of a random variable.
For more advanced random variations you may find some interesting stuff in the recently released Pd port of the RTC-library: http://footils.org/cms/show/56
Frank Barknecht _ ______footils.org_ __goto10.org__
On 9/15/06, Ollie Glass ollieglaskovik@gmail.com wrote:
2 Averaging the last 10 values received from a midi controller and outputting that average every time a control message is received.
Hi Ollie. Here's one way to do that. The setup on the right adds the 9 previous values to the new value and averages. The setup on the left moves the last 8 values up one in the table and puts the newest one in.
Put your cc input where the numberbox is and the output where the "print average" object is.
On 9/15/06, Chuckk Hubbard badmuthahubbard@gmail.com wrote:
On 9/15/06, Ollie Glass ollieglaskovik@gmail.com wrote:
2 Averaging the last 10 values received from a midi controller and outputting that average every time a control message is received.
Here's one way to do that.
Here's another way. I don't know if this actually saves any computing time, but you can see how a patch can be altered. The first bang from the trigger object hits the 9, which reads the 9 stored values and leaves the sum in the lower "+"; at the same time, the trigger hits the counter over the "tabwrite" object to advance by
0 back into the counter, which then comes out the left side of the "moses". This way the "tabwrite" object will write each new number into a different location in the "midi2" table. That all happens from the rightmost outlet of the "trigger". Next, whatever number was input into the trigger gets sent out the left outlet. This simultaneously resets to zero the function that summed the table, adds the new value to the sum and divides by 10, and writes the new value into the table. I changed the names of the table and the print object so this patch and the first one can be open at the same time and not interfere.
I don't know if this is useful for your purposes or not. -Chuckk
Thanks Chuckk.
The patch gives a nice result, smoothing out sudden changes to the
input. In that sense it's exactly what I'm looking for, showing how
relatively simple math can be used on a midi stream for musical
effects. Unfortunately I don't understand much of how it works, and I
have the sense that it's too complex to use as an introduction for
people new to PD.
Perhaps just a few changes (like making the table visible?) would
make the processes clear enough that it would be more intuitive? I
didn't get your second example, it sounds like your changes were
moving in this direction.
Thanks very much for your help,
Ollie
On 15 Sep 2006, at 20:11, Chuckk Hubbard wrote:
On 9/15/06, Ollie Glass ollieglaskovik@gmail.com wrote:
2 Averaging the last 10 values received from a midi controller and outputting that average every time a control message is received.
Hi Ollie. Here's one way to do that. The setup on the right adds the 9 previous values to the new value and averages. The setup on the left moves the last 8 values up one in the table and puts the newest one in.
Put your cc input where the numberbox is and the output where the "print average" object is. <average.pd>