[PD] Midi notes.....analysis?

Olaf Matthes olaf.matthes at gmx.de
Mon Oct 22 13:08:54 CEST 2001


Hi Rory,

I don't know the 'perfect' solution for your problem but had a similar
one some month ago. I tried to make some sort of score following to
enable pd to find / detect certain parts in a musical score (analysed by
a pitch-to-midi converter). If it's that what you want to do, have a
look at the patch attached.
Incoming 'notes' get stored into an array and the patch sort of compares
the last three values from a certain position on with values that are
given. You would then need to detect somehow the beginning of a chord in
this array. My musical score was just monophonic, with chords even the
order of notes might change from time to time. A way around this would
be to sort values before analysis.
I just have to distinguish between 6 different 'clue points', otherwise
the patch would have been very overcrowded. One major problem in using
this patch is the accuracy of the pitch to midi converter and/or the
performing musician. Any failure in detection confuses this stupid
patch....

Maybe there is someone who knows how to make a more 'intelligent' score
follower or tune analyser.


Olaf


PS: With your 'device out of range'-problem try starting pd with
'-midiindev 1' flag. This uses the first midi in device installed on
your system.


Rory Walsh schrieb:

> Hi list, how about a little early morning teaser to
> get the heads going! How do I separate midi notes as I
> play them into pd? Say for example I want to analyse
> the notes of a chord? With route I can output all the
> notes of the chord to my pd window, so i figured if I
> use this with unpack that this will work, but
> unfortunately it only seems to work when messages
> containing one or more numbers are sent to it. I
> figure it doesn't like midi notes because they are
> sent sequentially. I can think of some rather time
> consuming ways to do this with counters and timers,
> but is there an easier way? Cheers!
>
> ROry.
>
> ____________________________________________________________
> Nokia Game is on again.
> Go to http://uk.yahoo.com/nokiagame/ and join the new
> all media adventure before November 3rd.
-------------- next part --------------
#N canvas 0 0 479 494 10;
#X obj 30 29 inlet;
#X text 73 29 receives number of attacks so far;
#X obj 30 430 outlet;
#X text 13 3 score follower - tells where we are in the piece;
#X obj 30 151 tabread array21;
#X obj 206 167 tabread array21;
#X obj 349 168 tabread array21;
#X obj 30 300 sel 73;
#X obj 30 278 int 0;
#X obj 30 338 int 0;
#X obj 319 276 int 0;
#X obj 319 336 int 0;
#X obj 319 298 sel 65;
#X obj 319 357 sel 68;
#X msg 319 378 6;
#X obj 272 276 int 0;
#X obj 272 336 int 0;
#X msg 272 378 5;
#X obj 224 277 int 0;
#X obj 224 337 int 0;
#X msg 224 379 4;
#X obj 224 299 sel 78;
#X obj 224 358 sel 77;
#X obj 176 277 int 0;
#X obj 176 337 int 0;
#X msg 176 379 3;
#X obj 176 299 sel 69;
#X obj 176 358 sel 72;
#X msg 30 380 0;
#X obj 128 338 int 0;
#X msg 128 380 2;
#X obj 81 248 int 0;
#X obj 81 338 int 0;
#X msg 81 380 1;
#X obj 81 270 sel 69;
#X obj 81 359 sel 70;
#X obj 128 299 sel 67;
#X obj 128 359 sel 66;
#X obj 30 359 sel 74;
#X obj 30 174 pipe 10;
#X obj 30 102 - 1;
#X obj 30 129 - 1;
#X obj 30 51 pipe 10;
#X text 81 429 number of group (0-6);
#X obj 30 197 select 72 68 65 79 70 61;
#X obj 272 298 sel 71;
#X obj 272 357 sel 72;
#X connect 0 0 42 0;
#X connect 4 0 39 0;
#X connect 5 0 8 1;
#X connect 5 0 31 1;
#X connect 5 0 23 1;
#X connect 5 0 18 1;
#X connect 5 0 15 1;
#X connect 5 0 10 1;
#X connect 6 0 9 1;
#X connect 6 0 32 1;
#X connect 6 0 29 1;
#X connect 6 0 24 1;
#X connect 6 0 19 1;
#X connect 6 0 11 1;
#X connect 6 0 16 1;
#X connect 7 0 9 0;
#X connect 8 0 7 0;
#X connect 9 0 38 0;
#X connect 10 0 12 0;
#X connect 11 0 13 0;
#X connect 12 0 11 0;
#X connect 13 0 14 0;
#X connect 14 0 2 0;
#X connect 15 0 45 0;
#X connect 16 0 46 0;
#X connect 17 0 2 0;
#X connect 18 0 21 0;
#X connect 19 0 22 0;
#X connect 20 0 2 0;
#X connect 21 0 19 0;
#X connect 22 0 20 0;
#X connect 23 0 26 0;
#X connect 24 0 27 0;
#X connect 25 0 2 0;
#X connect 26 0 24 0;
#X connect 27 0 25 0;
#X connect 28 0 2 0;
#X connect 29 0 37 0;
#X connect 30 0 2 0;
#X connect 31 0 34 0;
#X connect 32 0 35 0;
#X connect 33 0 2 0;
#X connect 34 0 32 0;
#X connect 34 1 36 0;
#X connect 35 0 33 0;
#X connect 36 0 29 0;
#X connect 37 0 30 0;
#X connect 38 0 28 0;
#X connect 39 0 44 0;
#X connect 40 0 5 0;
#X connect 40 0 41 0;
#X connect 41 0 4 0;
#X connect 42 0 6 0;
#X connect 42 0 40 0;
#X connect 44 0 8 0;
#X connect 44 1 31 0;
#X connect 44 2 23 0;
#X connect 44 3 18 0;
#X connect 44 4 15 0;
#X connect 44 5 10 0;
#X connect 45 0 16 0;
#X connect 46 0 17 0;


More information about the Pd-list mailing list