[PD] Polyphonic voice allocation and sustain pedal
José de Abreu
abreubacelar at gmail.com
Sun Jan 3 01:35:33 CET 2021
maybe you can do it without poly at all
you can clone an abstraction 128 times (and use switch~ to make sure the
ones without trigger doesn't use your cpu) then voilá, you have one address
per note in midi, if you want to retrigger you just... retrigger it, yay
about sustain pedal, i would do this trick: i would create an array with
128 entries and use this: if i press a note, i give the array value 1 at
that index, if note off value 0, BUT IF the sustain pedal is pressed
instead of giving 0 at note off event, i would give it 2 and prevent the
note to die, soo, when i release the pedal i check this array and all the
notes that have state 2 will be released. The ones with state 1 i am still
pressing so nothing to do. What do you think?
about retriggering, if a note have state 2 and i do a note on, i retrigger
it and give the state 1 again so sustain pedal doesn't release it afterwards
this way you don't need poly and bag, but will need clone and a separate
interface with arrays and untils to simulate the states of a note (0 for no
sound and no press, 1 for pressing, 2 for not pressing but sustained by the
pedal and ready to be released)
Em Sáb, 2 de jan de 2021 14:41, alfonso santimone <
alfonso.santimone at gmail.com> escreveu:
> Thanks Christof!
> I surely hope that your proposal will be heard. Those would be essential
> additions to vanilla's [poly] for polyphonic instrument building.
> As for the [bag] object i tried but in the way i built the patch it only
> works if the sustain pedal is pressed before note on arrives. I have to
> find a way to make it work the same way when is pressed after a note on.
> The same note retriggering is another essential feature.
> On Sat, Jan 2, 2021 at 6:29 PM Christof Ressi <info at christofressi.com>
>> Not a direct answer to your question, but I've proposed a few additional
>> features for the [poly] object, including a [sustain( message:
>> For implementing a sustain pedal in Pd vanilla, the [bag] object will
>> probably help. Unfortunately, I don't have time at the moment to come up
>> with a full solution.
>> On 02.01.2021 18:07, alfonso santimone wrote:
>> Hi all,
>> i'm trying to build a polyphonic voice allocation patch that include
>> sustain pedal (MIDI CC(64) ).
>> Is there any abstraction that i can look into?
>> My problems are :
>> 1. How to deal with [poly] when the same note number is received (i.e,
>> three C4 in a row)
>> [poly] always assign a new voice slot to the incoming notes.
>> I'm trying to make it assign the same voice slot when the same note
>> number is received consecutively. I guess that i should mess with some
>> arrays keeping track of note numbers and voice slots.
>> 2. How to deal with sustain pedal.
>> In the "real" world as with keyboard instruments like piano, rhodes etc.
>> the sustain pedal is used in different ways but the most common one is to
>> press the pedal immediately after a chord or note is played and then
>> release it when a new chord is played.
>> It can be used in more "effect" oriented ways.
>> Is there any patch or abstraction that i can look into? I guess i should
>> use a combination of [stripnote] and arrays/table/list to keep track of the
>> notes on and off events.
>> How this can be integrated with a polyphonic voice management with
>> stealing algorithm etc. etc.?
>> thanks and all the best
>> _______________________________________________Pd-list at lists.iem.at mailing list
>> UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
>> Pd-list at lists.iem.at mailing list
>> UNSUBSCRIBE and account-management ->
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management ->
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pd-list