[PD] Any alternative to [poly] allowing dynamic number of voices?

Philip Stone pkstone at ucdavis.edu
Wed Jul 10 17:36:27 CEST 2019


Hi Matthew,

That’s a clever solution for switching back and forth between two different, *preset* voice-number values, and I may just try it, as I’m mainly wishing to switch between monophony and n-voice polyphony (and ‘n’ could be fixed at creation time).

The more general approach, allowing dynamic changing of the number of voices, is shown in the pull request mentioned by Nicolas. I hope it gets included into Pd.

And you are correct; it can be done in a non-glitchy way – it’s not that I *want* the glitching, I was just prepared to accept it in my use case. As it stands now, I have to change the voice count argument to my synthesizer and re-instantiate it, which is extremely disruptive.

Thanks for your solution.


Phil



From: matthew brandi <mfbrandi at outlook.com>
Date: Wednesday, July 10, 2019 at 6:05 AM
To: Philip Stone <pkstone at ucdavis.edu>, "pd-list at lists.iem.at" <pd-list at lists.iem.at>
Subject: Re: [PD] Any alternative to [poly] allowing dynamic number of voices?

On 10/07/2019 05:40, Philip Stone wrote:
I’ve been using [poly] for a long time … the number of voices can only be set at creation time. I’d love to be able to change that dynamically … I know this will be glitchy, and don’t care — I won’t be doing it during audio output

Dear Phil

Apologies in advance for my stupid questions, but …

If — and it is a big “if” — you have only a small number of poly configurations to switch between and if as you say you are only doing it when no audio is being output, can’t you do this with a wrapper around multiple [poly] objects? Attached an example abstraction for switching between two different voice counts (it ignores out-of-range voice counts, but it might better take a configuration number at its right inlet); it stops all notes before switching to the new voice count, but that is not a problem in your use case, right? I am pretty sure you have thought of this already — almost certain, in fact.

That wouldn’t do if you were dynamically creating/destroying arbitrarily many voices, but then you could create/destroy [poly] objects, too, right?

That is not to say that being able to change voice count in [poly] wouldn’t be a useful feature, but if it were to be implemented, why not do it in a non-glitchy way (i.e. don’t clear the object, and stop the notes only for the voices removed when reducing the voice count)?

What kind of glitch did you have in mind, anyway?

Best

m

--

matthew brandi | 020 8882 4616
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20190710/af9823e3/attachment-0001.html>


More information about the Pd-list mailing list