[PD] Arrays
Michal Seta
mis at creazone.com
Tue Mar 19 07:26:40 CET 2002
AI ain't easy in PD...
Marcus Flanagan wrote:
> Hello,
>
> 1)
>
> Ok, I can put info into an array, but how do I get it out and make it
> do something. If I put the 8 notes of a number of different scales
> into an array and want to retrieve them at different times..how do I
> do that?
>
> E.G..sometimes I may want the minor scale...sometimes I may want the
> major scale...
You will want to use as many arrays as you have scales (or refill the
arrays appropriately). I think, you will be better off putting pitch
classes that characterize the scales rather than the actual notes and do
processing afterwards.
>
>
> I figured out how to read and write to files...but the arrays seem
> useless...is it possible to bang an array and connect it to something
> like the "noteout" object so that it plays it contents?
you need to call the locations for specific notes (or pitch classes, as
I mentioned).
see atached example.
>
>
> 2)
>
> If I store values of chord notes in an array..how can I compare these
> values to the ones that are coming in from the "notein" object(using
> the "poly" object to get all notes from "notein").
i don't see why you use [poly]... [notein] lets all the notes through.
I don't have a MIDI setup but if I'm correct, every pitch gets through
twice (note-on and note-off) so you need to filter that with
[stripnote]. After that you can compare the note coming to anything,
really... try [select] or [=] or [<=] etc...
>
> I want to recognise chords input from the MIDI keyboard and get PD to
> play a little melody over them, somehow by using arrays. I've been
> looking at them all weekend and still I'm no closer to getting anywhere!
The simplest way to recognize chords is to pass your notes through
[sel]. However, you need to define, first, what constitutes a chord.
Hint: [timer] could be used to establish the rate at which the stream
of notes is coming in so you can filter out long (say > 80 ms) gaps
between notes and consider them not chords. Then define rules for
establishing the chord analysis and eventually inversion, register etc.
I know it's vague. But your problem is, too :)
.
HTH.
./MiS
>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: array-pitches.pd
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20020319/1987e20f/attachment.txt>
More information about the Pd-list
mailing list