<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Consolas",serif;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hi Matthew,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">That’s a clever solution for switching back and forth between two different, *<b>preset</b>* 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).<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">And you are correct; it can be done in a non-glitchy way – it’s not that I *<b>want</b>* 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.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks for your solution.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Phil<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black">matthew brandi <mfbrandi@outlook.com><br>
<b>Date: </b>Wednesday, July 10, 2019 at 6:05 AM<br>
<b>To: </b>Philip Stone <pkstone@ucdavis.edu>, "pd-list@lists.iem.at" <pd-list@lists.iem.at><br>
<b>Subject: </b>Re: [PD] Any alternative to [poly] allowing dynamic number of voices?<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">On 10/07/2019 05:40, Philip Stone wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">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<o:p></o:p></p>
</blockquote>
<p>Dear Phil<o:p></o:p></p>
<p>Apologies in advance for my stupid questions, but …<o:p></o:p></p>
<p>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.<o:p></o:p></p>
<p>That wouldn’t do if you were dynamically creating/destroying arbitrarily many voices, but then you could create/destroy [poly] objects, too, right?<o:p></o:p></p>
<p>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)?<o:p></o:p></p>
<p>What kind of glitch did you have in mind, anyway?<o:p></o:p></p>
<p>Best<o:p></o:p></p>
<p>m<o:p></o:p></p>
<pre>-- <o:p></o:p></pre>
<pre>matthew brandi | 020 8882 4616<o:p></o:p></pre>
</div>
</body>
</html>