Hello,
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...
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?
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 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!
Somebody must understand me!
Send and receive Hotmail on your mobile device: http://mobile.msn.com
AI ain't easy in PD...
Marcus Flanagan wrote:
Hello,
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.
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
#N canvas 308 34 519 528 10; #N canvas 0 0 450 300 graph111 0; #X array major 7 float 1; #A 0 0 2 4 5 7 9 11; #X coords 0 11 6 1 200 140 1; #X restore 310 18 graph; #X obj 45 110 tabread major; #X msg 328 209 ; major 0 0 2 4 5 7 9 11; #X obj 45 68 random 7; #X obj 46 47 metro 1000; #X msg 45 20 1; #X msg 87 22 0; #X text 337 240 pc for a major scale; #X floatatom 176 257 5 0 10; #X text 173 238 octave; #X text 63 142 Pitch class; #X text 35 406 MIDI pitch number; #X text 339 256 0 = C; #X obj 48 385 print mpn; #X obj 62 183 print pc; #X text 123 70 random location within; #X text 105 84 the scale (0 = first degree); #X floatatom 198 189 5 0 0; #X obj 48 291 expr 12 * $f2 + $f1; #X obj 82 341 s pc; #X obj 326 179 loadbang; #X text 77 466 C major. Transpose at will....; #X text 55 434 The simplest possible way to generate major scales using arrays; #X connect 1 0 14 0; #X connect 1 0 18 0; #X connect 3 0 1 0; #X connect 4 0 3 0; #X connect 5 0 4 0; #X connect 6 0 4 0; #X connect 8 0 18 1; #X connect 17 0 1 0; #X connect 18 0 13 0; #X connect 18 0 19 0; #X connect 20 0 2 0;
hi i placed some patches on http://www.parasitaere-kapazitaeten.net/Pd/pdpatches/chordfinder/ which could help you. one patch prints a list of all notes actually pressed in a poly-object. the others search if three certain numbers (e.g. 3 midinotes of a chord) are in that list. (you will need all patches in this directory and open help-chordfinder.pd) sme.
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 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!
Somebody must understand me!
Send and receive Hotmail on your mobile device: http://mobile.msn.com
.. sorry, there was a small mistake in the patch (i did not test it, i hav no midi-keyboard connected) with notein. but thats corrected. marius.
----- Original Message ----- From: "sme" marius.schebella@chello.at To: pd-list@iem.kug.ac.at Sent: Tuesday, March 19, 2002 11:16 AM Subject: Re: [PD] Arrays / chords
hi i placed some patches on http://www.parasitaere-kapazitaeten.net/Pd/pdpatches/chordfinder/ which could help you. one patch prints a list of all notes actually pressed in a poly-object. the others search if three certain numbers (e.g. 3 midinotes of a chord)
are
in that list. (you will need all patches in this directory and open help-chordfinder.pd) sme.
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 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!
Somebody must understand me!
Send and receive Hotmail on your mobile device: http://mobile.msn.com