Hello,
I´m trying to implement a patch to play proportional canons in real time from a midi source. A proportional canon works in this way: if I play, let´s say, three notes at 200ms of speed, and if I decide that the proportion should be 2 times slower, the patch should playback the same three notes at 400ms speed.
I thought I could record the distance between notes with timer, and then send the time difference (multiplied by a certain factor), to pipe, but it seems that pipe cannot handle the change of delay time, if more than one change in delay has to be stored before playing back the previous.
Do you have any suggestion?
In other words, what I would like to do is to record and at the same time (or later) playing back at a slower speed.
Thanks a lot
Libero Mureddu Vanha Viertotie, 21 as 417 00350 Helsinki Finland http://webusers.siba.fi/~limuredd/ http://www.myspace.com/liberomureddu
Is the ratio consistent? Or does it change frequently during the piece. My only experience with canon's is with one of Brian Eno's tape pieces using Pachelbel's Canon, where he feeds notes into a tape loop which can be played back at slower than real time. So, in the spirit of tape loops, and especially if the ratio is consistent, why not write your incoming notes into a circular table, which gets played back at a proportionate reduction of speed?
Sorry I don't have time to patch that idea up right now, but maybe it will be enough of a shift from your current line of thinking on the problem to get you moving in a new direction...
best, d.
Libero Mureddu wrote:
Hello,
I´m trying to implement a patch to play proportional canons in real time from a midi source. A proportional canon works in this way: if I play, let´s say, three notes at 200ms of speed, and if I decide that the proportion should be 2 times slower, the patch should playback the same three notes at 400ms speed.
I thought I could record the distance between notes with timer, and then send the time difference (multiplied by a certain factor), to pipe, but it seems that pipe cannot handle the change of delay time, if more than one change in delay has to be stored before playing back the previous.
Do you have any suggestion?
In other words, what I would like to do is to record and at the same time (or later) playing back at a slower speed.
Thanks a lot
Libero
Libero Mureddu Vanha Viertotie, 21 as 417 00350 Helsinki Finland http://webusers.siba.fi/~limuredd/ http://www.myspace.com/liberomureddu http://www.myspace.com/liberomureddu
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Hi Derek,
thanks for your answer, I´m already trying an implementation with coll, my problem is that I cannot store the notes in advance, being the piece in real time. so I´m trying to store in a coll the notes with an augmented distance between them, and then (with a certain delay, decided in advance), playing them back. I´ll send the patch to the list when it will be a bit better looking!
Regards,
Libero
On 7/10/07, Derek Holzer derek@umatic.nl wrote:
Is the ratio consistent? Or does it change frequently during the piece. My only experience with canon's is with one of Brian Eno's tape pieces using Pachelbel's Canon, where he feeds notes into a tape loop which can be played back at slower than real time. So, in the spirit of tape loops, and especially if the ratio is consistent, why not write your incoming notes into a circular table, which gets played back at a proportionate reduction of speed?
Sorry I don't have time to patch that idea up right now, but maybe it will be enough of a shift from your current line of thinking on the problem to get you moving in a new direction...
best, d.
Libero Mureddu wrote:
Hello,
I´m trying to implement a patch to play proportional canons in real time from a midi source. A proportional canon works in this way: if I play, let´s say, three notes at 200ms of speed, and if I decide that the proportion should be 2 times slower, the patch should playback the same three notes at 400ms speed.
I thought I could record the distance between notes with timer, and then send the time difference (multiplied by a certain factor), to pipe, but it seems that pipe cannot handle the change of delay time, if more than one change in delay has to be stored before playing back the previous.
Do you have any suggestion?
In other words, what I would like to do is to record and at the same time (or later) playing back at a slower speed.
Thanks a lot
Libero
Libero Mureddu Vanha Viertotie, 21 as 417 00350 Helsinki Finland http://webusers.siba.fi/~limuredd/ http://www.myspace.com/liberomureddu <
http://www.myspace.com/liberomureddu%3E
PD-list@iem.at mailing list UNSUBSCRIBE and account-management ->
http://lists.puredata.info/listinfo/pd-list
-- derek holzer ::: http://www.umatic.nl ::: http://blog.myspace.com/macumbista ---Oblique Strategy # 149: "Take a break"
Hi, here is a working example of the proportional canon patch. Now I have the following question: if I want to make this patch an abstraction, and use more instances of it, how to avoid duplications of the same "send", coll, etc?
I read the subpatch tutorial, but the mechanism is not really clear.
Thanks for any help.
Libero
#N canvas 55 22 1371 812 10; #X obj 704 569 cnv 15 160 40 empty empty empty 20 12 0 14 -204352 -66577 0; #X obj -76 20 cnv 15 160 40 empty empty empty 20 12 0 14 -204352 -66577 0; #X obj 123 19 cnv 15 160 40 empty empty empty 20 12 0 14 -204352 -66577 0; #X obj -49 113 makenote 100 100; #X msg -49 61 60; #X obj 628 217 timer; #X obj 628 122 i 0; #X obj 664 122 + 1; #X msg 643 96 0; #X obj 498 169 prepend set; #X msg 498 202 184.308; #X obj 628 154 sel 0; #X obj 138 95 s counterreset; #X msg 138 67 0; #X obj -38 88 s notes; #X obj 628 19 r notes; #X obj 643 69 r counterreset; #X obj 628 43 t b; #X obj 655 182 t b b; #X text 701 175 restart the counter on the first note and show the other time differences.; #X text 734 93 restart counter when canon is played from the beginning. ; #X obj 628 257 t b f; #X obj 628 339 i 0; #X obj 664 339 + 1; #X msg 643 313 0; #X obj 643 286 r counterreset; #X text 668 256 bang triggers index values , float the durations. ; #X text 695 337 generates index values.; #X obj 628 370 pack 0 1 0; #X text 696 369 index , event , time diff.; #X obj 640 398 r counterreset; #X msg 640 425 clear; #X obj 628 523 coll -------; #C restore; #X obj 38 337 i 0; #X obj 74 337 + 1; #X msg 53 311 0; #X obj 38 234 r notes; #X obj 53 284 r counterreset; #X obj 38 258 t b; #X obj 628 555 unpack f f; #X text 699 554 separate events and time diffs.; #X obj 38 369 sel 9; #X text 727 608 change the time diffs with a fixed proportion.; #X obj 38 533 i 0; #X obj 74 533 + 1; #X msg 53 507 0; #X obj 53 483 r counterreset; #X obj 38 461 t b; #X obj 628 641 pipe; #X text 80 364 trigger the first value in the coll , after the 10th note has been played.; #X obj 665 737 + 1; #X obj 644 691 r counterreset; #X msg 644 714 1; #X obj 629 737 i 1; #X obj 38 567 s playcoll0; #X obj 649 453 r playcoll0; #X obj 629 767 s playcoll1toinf; #X text 121 564 when the 10th note has been played , play the first note only!; #X text 701 729 play from the second note.; #X obj 654 488 r playcoll1toinf; #X obj 628 671 t b; #X obj -49 142 noteout 1; #X obj 469 746 makenote 100 100; #X obj 469 775 noteout 1; #X msg 469 718 80; #X obj 685 608 * 1.5; #X msg 712 577 1; #X msg 743 577 2; #X msg 776 577 0.5; #X text -74 31 1) play at least 10 notes; #X text 125 32 2) before restart , reset!; #X text 807 577 3) try different speed.; #X connect 3 0 61 0; #X connect 3 1 61 1; #X connect 4 0 3 0; #X connect 4 0 14 0; #X connect 5 0 9 0; #X connect 5 0 21 0; #X connect 6 0 7 0; #X connect 6 0 11 0; #X connect 7 0 6 1; #X connect 8 0 6 1; #X connect 9 0 10 0; #X connect 11 0 5 0; #X connect 11 0 5 1; #X connect 11 1 18 0; #X connect 13 0 12 0; #X connect 15 0 17 0; #X connect 16 0 8 0; #X connect 17 0 6 0; #X connect 18 0 5 0; #X connect 18 1 5 1; #X connect 21 0 22 0; #X connect 21 1 28 2; #X connect 22 0 23 0; #X connect 22 0 28 0; #X connect 23 0 22 1; #X connect 24 0 22 1; #X connect 25 0 24 0; #X connect 28 0 32 0; #X connect 30 0 31 0; #X connect 31 0 32 0; #X connect 32 0 39 0; #X connect 33 0 34 0; #X connect 33 0 41 0; #X connect 34 0 33 1; #X connect 35 0 33 1; #X connect 36 0 38 0; #X connect 37 0 35 0; #X connect 38 0 33 0; #X connect 39 0 48 0; #X connect 39 1 65 0; #X connect 41 0 47 0; #X connect 43 0 44 0; #X connect 43 0 54 0; #X connect 44 0 43 1; #X connect 45 0 43 1; #X connect 46 0 45 0; #X connect 47 0 43 0; #X connect 48 0 60 0; #X connect 50 0 53 1; #X connect 51 0 52 0; #X connect 52 0 53 1; #X connect 53 0 50 0; #X connect 53 0 56 0; #X connect 55 0 32 0; #X connect 59 0 32 0; #X connect 60 0 53 0; #X connect 60 0 64 0; #X connect 62 0 63 0; #X connect 62 1 63 1; #X connect 64 0 62 0; #X connect 65 0 48 1; #X connect 66 0 65 1; #X connect 67 0 65 1; #X connect 68 0 65 1;
Hallo, Libero Mureddu hat gesagt: // Libero Mureddu wrote:
Hi, here is a working example of the proportional canon patch. Now I have the following question: if I want to make this patch an abstraction, and use more instances of it, how to avoid duplications of the same "send", coll, etc?
I read the subpatch tutorial, but the mechanism is not really clear.
I don't know which tutorial you mean, but: subpatches are something completely different from abstractions, so a subpatch tutorial won't help you.
Subpatches are objects -- [pd] or [page] -- while abstractions are files: Abstractions have to be saved into their own file, then you can call them by their filename minus the .pd ending in another patch, also multiple times. When abstraction are used this way in another file, people often call various occurences of the same abstraction different "instances" of an abstraction.
In each instance of an abstraction and actually in every seperate patch file that you have opened, the special variable "$0" gets a unique value. (Note that "$0" can only be used in object names, not in message boxes.)
So to avoid duplicate names for s/r, you can use names with "$0" in your send/receive pairs:
| [s $0-local]
[r $0-local] |
This in practice is (almost) as local as a direct connection.
You can use the same approach for [table $0-local-array] or [catch~ $0-left]. For last year's versions of Pd (i.e. prior to 0.40) you have to start your name with $0 for this to work, while current 0.4x versions of Pd also allow $0 inside a name like [r pd-$0-name].
To get back to subpatches for a moment: $0 is only unique in whole patch *files* and in abstraction instances. If you use $0 in two subpatches, that live in the same file, they will have the *same* value for $0. You cannot create a sender that is local only in a subpatch with $0.
I don't know how [coll] deals with $0, I never use that object.
Frank Barknecht _ ______footils.org_ __goto10.org__
Dear Libero,
The short answer is to use a $1 variable when you want to name each abstraction (i.e. [myabstraction numberone], [myabstraction numbertwo], etc...), or use a $0 variable when you want to simply make a new instance and not worry about naming it (multiple instances of [myabstraction], where $0 will be replaced by a new random number which is unique to each abstraction).
I can post more about it later in if you're still confused... also check the tutorials I gave you in Helsinki, in particular 01.pd-control/04.subpatches_and_abstractions/04.abstractions_and_dollar_signs.pd (apologies to the rest of the list that I haven't published these yet... coming soon in coordination with the PD FLOSS Manual!)
best, d.
Libero Mureddu wrote:
Hi, here is a working example of the proportional canon patch. Now I have the following question: if I want to make this patch an abstraction, and use more instances of it, how to avoid duplications of the same "send", coll, etc?
I read the subpatch tutorial, but the mechanism is not really clear.
Hi Derek,
Thanks, I forgot about your tutorial. I just had a memory about a detailed explanation somewhere... There it was!!!
Best regards,
Libero
On 7/11/07, Derek Holzer derek@umatic.nl wrote:
Dear Libero,
The short answer is to use a $1 variable when you want to name each abstraction (i.e. [myabstraction numberone], [myabstraction numbertwo], etc...), or use a $0 variable when you want to simply make a new instance and not worry about naming it (multiple instances of [myabstraction], where $0 will be replaced by a new random number which is unique to each abstraction).
I can post more about it later in if you're still confused... also check the tutorials I gave you in Helsinki, in particular 01.pd-control /04.subpatches_and_abstractions/04.abstractions_and_dollar_signs.pd (apologies to the rest of the list that I haven't published these yet... coming soon in coordination with the PD FLOSS Manual!)
best, d.
Libero Mureddu wrote:
Hi, here is a working example of the proportional canon patch. Now I have the following question: if I want to make this patch an abstraction, and use more instances of it, how to avoid duplications of the same "send", coll, etc?
I read the subpatch tutorial, but the mechanism is not really clear.
-- derek holzer ::: http://www.umatic.nl ::: http://blog.myspace.com/macumbista ---Oblique Strategy # 128: "Overtly resist change"
Have you tried using lists? A list of values interpreted as pairs of a something and a time interval ( where the something is a note value or pointer) make an easy way if you want to stretch or shrink the sequence in time, just scale all the time delays.
A list sequencer takes a list in one go. It splits the first value off as a note and plays it to the output, then chomps the next element from the list and treats it as a delay to wait. After that delay time, it gives the rest of list (minus the last two elements) back to itself and does it all again....
So this list plays note 44, waits 125ms then plays note 50....
[44 125 50 125 44 250 52(
until it runs out of elements.
In attached example you can scale the speed using horizontal radio bar, it just multiplies all the time values by {0.25, 0.5, 1, 2, 4...}
On Tue, 10 Jul 2007 14:23:29 +0300 "Libero Mureddu" libero.mureddu@gmail.com wrote:
Hello,
I´m trying to implement a patch to play proportional canons in real time from a midi source. A proportional canon works in this way: if I play, let´s say, three notes at 200ms of speed, and if I decide that the proportion should be 2 times slower, the patch should playback the same three notes at 400ms speed.
I thought I could record the distance between notes with timer, and then send the time difference (multiplied by a certain factor), to pipe, but it seems that pipe cannot handle the change of delay time, if more than one change in delay has to be stored before playing back the previous.
Do you have any suggestion?
In other words, what I would like to do is to record and at the same time (or later) playing back at a slower speed.
Thanks a lot
Libero
Libero Mureddu Vanha Viertotie, 21 as 417 00350 Helsinki Finland http://webusers.siba.fi/~limuredd/ http://www.myspace.com/liberomureddu