How to send a message to all clones whitout s/r
If you are trying to make some polyphony using clone object and you need to find a free voice you can use : [your midi pitch]-[next $1] - [clone synth.cl nr_of_voices]. [next $1] is a message object that will find a free voice for your clone object. "nr_of_voices" is your number of voices for the clone object. "synth.cl" is your abstraction for one voice.
Help with [key]/[keyup] inside [clone]
@4ZZ4 did you try to right-click on objects that you don't understand and opened the corresponding help files? in most cases, the help files contain everything you need to know about object and how it works.... take a look at th help file of [route], it's easy to understand, if you try out the patch and see what it does. regarding th usage of $ variables please read this here: https://booki.flossmanuals.net/pure-data/dataflow-tutorials/dollar-signs.html. [change] only outputs the values reaching it, when they change (so, when it's not the same number as before for example). but thats not all: again - check it's help file and try to play with the object, connet some message boxes with numbers to it's inlet ( for example [1(, [2( ...) and a {print] object to its output and see what getting printed to the console and what happens, when you click one message twice.
the [r chn( sets the midi channel for the [noteout] object... i have to confess, this is not obvious for a beginner: it gets it's value by the message in the maybe2.pd file, which is connected to [loadbang]. the [t b f] or [trigger bang float] cares for, that the addition operation in the [+] object is getting triggered, whenerver one of both inlets receives a value. otherwise, the operation would only be triggered when the "hot inlet" (the left one of [+]) receives a value. voice stealing specifies what happens, if you run out of voices: for ecxample you have a [poly 4 1] -> imagine, you hit a chord on your midi keyboard with 5 keys simultanously -> you run out of voices, because your [poly] is only set to 4 voices (not 5). with the second argument of [poly 4 1] (the 1) you tell poly to begin "overwriting" the oldest voice with the note, that caused running out of voices. sorry for my poor english, i hope you got me. ok, this must be enough for the moment, but you can find all these anwers in the internet or in the help files and the countless pd tutorials out there. please considr making some of these, it will need some time, to learn pd.
ah, and all the infos above come without any warranty! 
PS: the "e"-key on my laptop seems to be on strike sometimes! 
Sending different envelope's out of the same polypatch
@emji It looks like you have made [voice] as an abstraction..... so it is easy.
Make the 4 voices [voice 1] [voice 2] [voice 3] [voice 4] ....... with a space between "voice" and the number.
Then connect the number box to a [s $1-voice_s]
In [voice 1] the send object will become [s 1-voice_s]
In [voice 4] it will become [s 4-voice_s]
See https://forum.pdpatchrepo.info/topic/9774/pure-data-noob/4
David.
Sending different envelope's out of the same polypatch
Hello,
I'm new with PD. Currently I'm working on an audiovisual project. For that I use a polyphonic synth I found on the patch-repository called SYNTH-0. I uploaded my modified version (for use in purr or l2ork) here.SYNTH-0.5.zip . With it I'm trying to send values to VVVV, which does all the visual part.
Now from this patch I would like to send out 4 numbers of the 4 voice signals as they go through the filter & adsr-envelope. I've gotten pretty far. The problem is the following: the patch uses the "poly"-object, which routes the midi-input 4 times to a subpatch called voice, which then again contains the envelopes and produces an output.


Within "voice" I attached a number-box and an object to send to my sending subpatch, which transfer data to VVVV via FUDI. The thing is: with that I get numbers for one out of the 4 voice patches, I'd like to receive all 4 of them in a pack however. If I attach a numberbox in a subpatch that is 4 times called the same name but is factually 4 different instances, how does pd make the decision which of the 4 to send out with a send object? Might be that I'm missing out on something fundamental about subpatches. Glad for any help!
best practices, sample-accurate polyphonic envelope, note stealing
Hi everyone. I have frequently revised designs for polyphonic envelopes. i've often misunderstood things about vline~ and scheduling voices in such a way to avoid unwanted clicks while also keeping things on time and snappy.
i'd be really happy to know what your methods are for envelopes.
i submit this patch, a reflection on envelope practices and how i address certain challenges. envwork.pd
this patch makes these assertions:
1- because vline~ maintains sample accuracy by scheduling events for the next block, you can switch dsp on in a subpatch with block~ while sending a message to vline~ and the dsp will be active by the start of the vline~ output. This also works if you need to configure a non-signal inlet before triggering a voice. send a message to such an inlet concurrently with a vline~ message and the parameters will update on the block boundary before the vline~ plays.
2- accounting for note stealing can cause issues in a polyphonic patch. if the stealing note has a slow attack and the envelope of the stolen note is not closed, there will be a click as the pitch of the new note jumps. the voices in my patch apply slight portamento to smooth out this click. if, however, the attack time of the stealing note is faster than this slight portamento it is counterproductive and will soften the attack of stolen notes. Stolen notes need every bit of snap they can get because the envelopes may be starting at a non-zero value. so i limit the time of the portamento to the attack time.
3- to make sure a note that is still in its release phase is treated as a stolen note, it is necessary to monitor the state of the envelopes like so:

switching the dsp off too close to the end of the release causes clicks. after testing, my system liked a full 50ms of extra delay after the end of a release before it was safe to switch off dsp. I don't think this is attributable just to the scheduling delay of vline~ but it's a small mystery to me. possibly there's a problem with my voices.
This all gets a little more complex when there are multiple envelopes per voice. The release time that affects the final output of the voice must reset all envelopes to when it is finished and before dsp is switched off. Otherwise an envelope with a long release affecting something like filter frequency can be held at a non-zero value when dsp is switched off and spoil the starting state of the vline~ on a new note.
finally, on vline~ and sample accuracy and timing, let me type out what i believe is the case. i could be wrong about this. if you programmed a synth using line~ for the envelopes, it would be faster than vline~ but not all notes equally faster. all notes would sound at the block boundary. Notes arriving shortly after the last block boundary might take 90% of the block period to sound. notes arriving just before the block boundary might take 10% of the period to sound.
vline~ will always be delayed by 100% of the block boundary. but the events will be scheduled sample-accurately, so the vline~ will trigger at exactly the real time intervals of the input. a synth with line~ envelopes will trigger any two events within a single block at the same time.
this should mean that vline~ envelopes can be accurately delay compensated and stay absolutely true to input timing, in the case of something like a Camomile plugin.
however, if one was to build a synth for something like a raspberry pi that will act as hardware, would it be better to use line~ envelopes and gain a little bit of speed? is the restriction of locking envelopes to block boundaries perceptible under normal playing conditions?! i could test some midi input and see if the notes in a chord ever achieve a timing spread greater than the block period anyway...
8 Voices Poly Synth
[poly] and [clone] and an abstraction of your synth voice.
poly handles the voice allocation of the number of voices your synth requires
clone creates multiples of your voice abstraction in the background, that are addressable by an index that poly prepends to the note data.
Messages can be sent to all instances of the voice for asdr, levels , filter etc using a list prepended with all.
Right click poly and clone objects for more info on these
Cheers
Balwyn

clone with pd~ and subpatches
Hi everybody!
Getting my feet wet with Pure Data on the quest to find an environment that works well for interactive modular synth stuff with MPE compatible controllers.
On first sight I am quite impressed - particularly the "clone" object is really a relevation when it comes to managing several voices (compared to most other eurorack-style mono-voice-module modulars)!
Two questions:
Do we always have to create an abstraction (= a new file) when we want to clone something?
Have some cases where the cloned objects are so highly special that they only make sense within one particular parent patch and even there they occur only once. (E.g. have an "mpein" object for reading mpe midi data that uses a 16 times cloned, quite specialized mpein_channeltovoice" abstraction internally)
Can I somehow use a subpatch instead of an abstraction that is stored together with the main patch file?
(Not a big deal, might just be more convenient when sharing stuff to have one file instead of a bunch of them)
And assuming I have a synth with quite demanding calculations per voice - would it be possible to somehow combine pd~ and clone? E.g. to run 16 instances of an abstraction in parallel on 4 cores with four voices each?
(Also not a big thing if it doesn't work, I can always manually create 4 pd~ instances with "clone myvoiceabstraction 4" inside each. Would be convenient though not having to copy everything N times. Is still ok for 4 cores, but not so much fun for a 32 cores 64 threads CPU
.)
Which version for an absolute noob?
@CrouchingPython Pd has midi output...... and you could connect an external synth and select it from the Pd "Media" "Midi Settings".
But if it is a software synth on your computer then you need to loop-back the output of Pd to the input of the software synth.
In Windows you could use loopMIDI........... http://www.tobias-erichsen.de/software.html
Open it and set up a loop (there could well be one opened straight away by loopMIDI..... then open Pd and connect to it....... and open your software synth and connect to it.........
Widows10 might still have "Microsoft GS Wavetable Synth" still built in, but some say it doesn't work and Google will find you plenty of free and better ones.
The Arturia is a controller...... it outputs midi messages the same as Pd....... and still needs a synth (something to make the sounds when triggered by midi messages).....
David.
prophet 3003 wavetable synth prototype
hi all ... im developing a funky wavetable synth thats inspired by the sequential circuits prophet 2000 from 1985. it uses the original 12 bit ROM from this synth and and a synthesis menthod called harmonic aliasing.
- all frequencies and repeat rates are related by simple integer relationships
- adaptive just intonation = infinite tuning systems
- 3 oscillators per voice
- wavetables by multiplexing oscs with waveshaped sines
- variable sample rate simulation via resampling with audiorate wavetables (BLITs)
- integrated complex numeric sequencer
- integrated delay for hardware mixer feedback loop with analog eqs
basically it includes everything i think is cool about numeric sequencing and is still really low on dsp because its all based on integers mechanics like early wavetable synths.
this synth can sound really ambient or real raw depending on the complexity of the number relationships and the waveshaping settings. eventually this is going to be a hardware synth with FPGA technology, variable sample rate per oscillator and analog eqs/filter ... just like in the 80s 
project logo:
https://i.imgur.com/F1kqrMt.png
prototype patch:
wave multiplexing:
.
harmonic aliasing is inspired by a patch by acreil: https://forum.pdpatchrepo.info/topic/6759/new-anti-aliasing-and-phase-distortion-abstractions.
early discussion: https://forum.pdpatchrepo.info/topic/11176/adaptive-sample-rate-and-harmonic-aliasing-in-pd
.
mixer delay feedback loop feature:
lots of different sounds with audiorate waveshaping:
.
Pitch-shift and normalization object for Ohm-Choir/innerDialogue-exposure.
Hello,
we are working on an interactive sound-installation. It is a wooden bell that opens vertically by sliding up it´s segments to make space for one person that sits down to listen to a guided meditation after the bell closes again. It´s all about the perception of one self and how it changes when one isolates from society and vision. The people will hear themselves over headphones and be instructed by a voice to make an "Ohm" and say several things that are secretly recorded and played back later in a way to expose the inner dialogue.
... using a timer*, I time-trigger recordings, playback of those, and sound-effects (reverberation, pitch-shift). In the end the participants will hear their own voice talking to them, but in two different pitches, one voice a little lower pitched talking as the inner-enemy and then a higher pitched voice commenting on this, creating a dialogue, giving the participants the chance to observe that theatre-play inside of their head.
To close the session, they will be asked to make another Ohm...and as background they will hear the recorded Ohm they made when they started plus the recorded and looped Ohms of all the participants who were under the bell before them (if possible, first one om...then the next joins and another...and then maybe fading it to three or more other Oms, before the whole choir joines the megaOm).
*! I want to modify this patch to use it´s timer, recorder and playback- features. The karaoke-text-display is not needed, cause everything will be instructed by a backgroud-voice (lostintro.wav).
To test the patch simply click on start, to open the patch right-click in the window, then open the object pd audio, where the recorders and playbk objects are hiding.
-
I can´t find a pitch-shift object except one in an old RjDj library called e_pitchshift.pd, but I didn´t yet managed to make it work in the patch. Any suggestions of an object that shifts the pitch by two semitones up/down? ...also I wonder how to implement this to make the workflow as easy as possible, because there will be a lot of samples. I guess it is the easiest to include it in playbk.pd, and use two different ones, one with playing back the samples with a higher pitch and one with a lower pitch. (?)
-
To combine and loop all recorded "ohms" into one file, i will need sth like a looper-object/patch, I am sure there are plenty out there. My biggest concern is, the different volumes of peoples voices, thats why I am wondering if there is a normalization-object?
-
I once found a trigger for recordings in an RjDj patch (that I can´t find anymore), that checked the db of the incoming signal and only when detecting a sound it started to record - I was wondering if I could use it to control, if people really say/sing things and if not repeat the question (or give more time to record? ...maybe substitute that even with the timer-triggered recordings?)
-
well, not really top priority, but I would love to make the whole patch run on a raspi. I already struggeled with the raspi for a while - who knows...maybe there is someone in Berlin who could help me to set this up during the next weeks?
-
I want to timetrigger a change of the reverberation of the live-signal at the beginning ...the great @whale-av helped me once to optimize this patch (lostgeneration) and deactivated the reverb (found in the down-left corner of the pd audio -object) ..unfortunately I can´t figure out how to reactivate it. Where do i have to connect the "r revtime"? right to/between the "dac~" object???
-
last but not least a little stupid question, but as i don´t even know the name of this "~" symbol it is hard to google. How to make the keyboardshortcut for this little ~er ? tired of having to copy paste it each time
?
Bämgreetings and thanks for any help or suggestion!




