I am working on an automated pipe organ project driven from PD, basically long droning chords. Most of the PD sequencers i've seen (there are a lot) generate single notes. My crude beginning is a subpatch that i can send a message to with 6 MIDI note#s and a duration in ms, and it plays those notes, but the timing is off - i'm sure i'm missing something basic but i'm stuck. I'm also sure this is the most brute force/inelegant approach imaginable, and if someone else has written something like this i'd be more than glad to hear.
2023Organ_ChordGen_05_subpatch.pd
-
MIDI Chord sequencer
-
@fluxmonkey I see nothing wrong, except that the connection to the [delay] leg was made before that to the [pipe] legs, which means the next chord is triggered before the note off messages are sent .
A [t f f] at the last outlet of [unpack] would fix that......
But because the note values are stored sequentially in the [pipe] they are not overwritten by the next chord, so that is not a problem.Except that if you use something after the sub-patch that restricts your patch to 6 notes..... like [poly 6].... later messaging might be a mess.
In what way is the "timing off"...?
David. -
@whale-av that's exactly right! I actually figured it out this morning but i appreciate the corroboration., thank you
-
if the duration is the same for all notes, there is no need to process them as numbers, you could as well store and trigger the list as such.
you will benefit from that in many other situations, for example it then will also work with an arbitrary number of list elements.
at least you can remove all but one pipe objects in that patch.
another alternative design would be to add the duration to each note, as it will be required to do that when assembling te midi events anyway. if you do it this way, you will also add the option to use different durations for each list member, something which cen get quite relevant for musical events.
alltogether i would say you dont need that patch at all to do what you want, you basically only need to bang the messagebox and then do the midi formatting.
-
Another possible choice is to use [makenote] instead of [pipe], although 1 millisecond needed to be added to the bang delay.
chord-loop.pd -
Variable note length per step is a requirement, so that scotches the one duration fits all solutions.
Probably the more elegant solution would be to define the sequence in a .txt file, one line per event, and then read and parse that. more flexible, and much easier to write the sequencing. but this is for an installation that goes live in a few days, so... but thanks, folks!