Melplayer

|melplayer| uses first-order Markov chains to generate new output notes. The last note that the system output is received from the feedback loop at the top of the patch. This input is sent through a network of objects that determine the value of  the most recent melodic interval. Intervals larger than an octave are reduced to their equivalent interval class; direction (ascending or descending) is always preserved.

Melplayer

melplayer

Once the interval has been determined, it is converted from integer form into a text string (for example, -4 is converted to n4). The suffix "perf" is attached, in effect creating the name of the probability table that corresponds with the last output melodic interval.

The |obj. . .| and |s pd-manager.pd| objects exploit a special capability of PD: the ability of objects to create other objects. |obj 10 30 melody/melgetint $1| creates an instance of an object called |melgetnextint|, places it at (10, 30) on the screen of |manager|, and gives it, as an initialization argument, the table name that has just been assembled.

Three random numbers are then generated and sent into the new |melgetnextint| object. |melgetnextint| queries the probability table specified in it's initialization argument, and returns the values stored at the addresses specified by the random numbers.  These returned values, which are suggestions for the next melodic interval, are sent to |manager|. When this is complete, |melplayer| destroys the instance of |melgetnextint| and waits for the next input.
Melgetnextint  

This is the abstraction for |melgetnextint|. The |tabread| object reads from the array specified in it's initialization argument, at the address specified in it's inlet. In this patch, the name of the table is "$1" which means that the table name will be taken from the first initialization argument of |melgetnextint| itself. The |r meladdress| objects receive random numbers from |melplayer| to be used as query addresses, and the |s melnextint| objects send the values at those addresses to |manager|.


Email Greg OSCAR Main PageHarmgen