# New Object Early Community Build #1: FluidVoiceAllocator (NOW WITH SC TOO)

**URL:** <https://discourse.flucoma.org/t/new-object-early-community-build-1-fluidvoiceallocator-now-with-sc-too/2085>\
**Category:** Development and Maintenance\
**Created:** [August 26, 2023, 3:27pm UTC](https://discourse.flucoma.org/t/new-object-early-community-build-1-fluidvoiceallocator-now-with-sc-too/2085 "2023-08-26T15:27:58Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![tremblap](https://discourse.flucoma.org/user_avatar/discourse.flucoma.org/tremblap/32/5_2.png) [@tremblap](https://discourse.flucoma.org/u/tremblap)\
**Post date:** [August 26, 2023, 3:27pm UTC](https://discourse.flucoma.org/t/new-object-early-community-build-1-fluidvoiceallocator-now-with-sc-too/2085/1 "2023-08-26T15:27:58Z")

</div>

ok here is the first offering. No help yet, but a great demo patch by the brain behind the voice allocation, @fearne - Warning: everything might change, interface and all. It is carefully thought of, but hey, suggestions and discussions are welcomed 🙂

Presenting FluidVoiceAllocator, a real-time implementation of message-in message-out voice allocation. It has the same interface as FluidSines for the track allocation and validation, then some special magic voice allocation ideas from @fearne @a.harker and yours truly… not forgetting @weefuzzy and @groma for the original sine tracking interface!

Max (MacOS and Windows) only now but any Pd users could translate the patch if they have time (I can put the binaries of all 3 OSes here too). For SC, I’m still testing the framework changes, then binaries will be available if anyone wants to help to code the same max example. or that will happen eventually too.

(now FAT for MacOS)  
[fluid.voiceallocator.zip](https://discourse.flucoma.org/uploads/short-url/3yyCU3Uo7Hjb5j82ZcJDGdWjS3W.zip) (327.0 KB)

---

<div class="post-metadata">

**Author:** ![rodrigo.constanzo](https://discourse.flucoma.org/user_avatar/discourse.flucoma.org/rodrigo.constanzo/32/12_2.png) [@rodrigo.constanzo](https://discourse.flucoma.org/u/rodrigo.constanzo)\
**Post date:** [August 26, 2023, 10:54pm UTC](https://discourse.flucoma.org/t/new-object-early-community-build-1-fluidvoiceallocator-now-with-sc-too/2085/2 "2023-08-26T22:54:48Z")

</div>

`fluid.voiceallocator: could not load due to incorrect architecture`

Guess it’s not UB2 yet?

![Screenshot 2023-08-26 at 11.54.10 PM](https://discourse.flucoma.org/uploads/default/original/2X/1/1c161b49188f3e1f83368f1da39e9a38c0e6f48a.png)

---

<div class="post-metadata">

**Author:** ![rodrigo.constanzo](https://discourse.flucoma.org/user_avatar/discourse.flucoma.org/rodrigo.constanzo/32/12_2.png) [@rodrigo.constanzo](https://discourse.flucoma.org/u/rodrigo.constanzo)\
**Post date:** [August 27, 2023, 12:24am UTC](https://discourse.flucoma.org/t/new-object-early-community-build-1-fluidvoiceallocator-now-with-sc-too/2085/3 "2023-08-27T00:24:11Z")

</div>

Managed to test it on my laptop and it sounds good!

Even at more real-time friendly FFT sizes.

I guess it could get expensive, but having a waveshaper core, rather than individual oscs would be nice (for a future help file). Also, I guess in this case `fluid.sinefeature~` outputs `n` amount of components all the time, so there’s no use in muting individual voices (since they just steal/transition to each other)

---

<div class="post-metadata">

**Author:** ![tremblap](https://discourse.flucoma.org/user_avatar/discourse.flucoma.org/tremblap/32/5_2.png) [@tremblap](https://discourse.flucoma.org/u/tremblap)\
**Post date:** [August 27, 2023, 9:54am UTC](https://discourse.flucoma.org/t/new-object-early-community-build-1-fluidvoiceallocator-now-with-sc-too/2085/4 "2023-08-27T09:54:05Z")

</div>

I forgot the fat builds sorry - can you check this binary please? If it works I’ll repackage  
[fluid.voiceallocator.mxo.zip](https://discourse.flucoma.org/uploads/short-url/jmuUkAn36KfO1Kxzn8TwimbEV0L.zip) (76.2 KB)

---

<div class="post-metadata">

**Author:** ![rodrigo.constanzo](https://discourse.flucoma.org/user_avatar/discourse.flucoma.org/rodrigo.constanzo/32/12_2.png) [@rodrigo.constanzo](https://discourse.flucoma.org/u/rodrigo.constanzo)\
**Post date:** [August 27, 2023, 11:14am UTC](https://discourse.flucoma.org/t/new-object-early-community-build-1-fluidvoiceallocator-now-with-sc-too/2085/5 "2023-08-27T11:14:04Z")

</div>

Nope, same issue.

---

<div class="post-metadata">

**Author:** ![tremblap](https://discourse.flucoma.org/user_avatar/discourse.flucoma.org/tremblap/32/5_2.png) [@tremblap](https://discourse.flucoma.org/u/tremblap)\
**Post date:** [August 27, 2023, 11:41am UTC](https://discourse.flucoma.org/t/new-object-early-community-build-1-fluidvoiceallocator-now-with-sc-too/2085/6 "2023-08-27T11:41:15Z")

</div>

hmmmm. Indeed it is not fat (after terminal check) despite me asking for it in XCode. I hate them.

---

<div class="post-metadata">

**Author:** ![rodrigo.constanzo](https://discourse.flucoma.org/user_avatar/discourse.flucoma.org/rodrigo.constanzo/32/12_2.png) [@rodrigo.constanzo](https://discourse.flucoma.org/u/rodrigo.constanzo)\
**Post date:** [August 27, 2023, 11:42am UTC](https://discourse.flucoma.org/t/new-object-early-community-build-1-fluidvoiceallocator-now-with-sc-too/2085/7 "2023-08-27T11:42:41Z")

</div>

> [@tremblap](#):
>
> hmmmm. Indeed it is not fat (after terminal check) despite me asking for it in XCode. I hate them.

Mucho mysteriouso that stuff is…

> [@rodrigo.constanzo](#):
>
> I guess it could get expensive, but having a waveshaper core, rather than individual oscs would be nice (for a future help file). Also, I guess in this case `fluid.sinefeature~` outputs `n` amount of components all the time, so there’s no use in muting individual voices (since they just steal/transition to each other)

Actually, don’t know if you still are `mc.` averse, but an `mc.`-based implementation would be super elegant and a lot more mutable/tweakable.

---

<div class="post-metadata">

**Author:** ![tremblap](https://discourse.flucoma.org/user_avatar/discourse.flucoma.org/tremblap/32/5_2.png) [@tremblap](https://discourse.flucoma.org/u/tremblap)\
**Post date:** [August 27, 2023, 11:49am UTC](https://discourse.flucoma.org/t/new-object-early-community-build-1-fluidvoiceallocator-now-with-sc-too/2085/8 "2023-08-27T11:49:10Z")

</div>

I am still mc. averse yes 🙂

I have now compiled the object another way and it fails. I’m troubleshooting

---

<div class="post-metadata">

**Author:** ![tremblap](https://discourse.flucoma.org/user_avatar/discourse.flucoma.org/tremblap/32/5_2.png) [@tremblap](https://discourse.flucoma.org/u/tremblap)\
**Post date:** [August 27, 2023, 12:12pm UTC](https://discourse.flucoma.org/t/new-object-early-community-build-1-fluidvoiceallocator-now-with-sc-too/2085/9 "2023-08-27T12:12:52Z")

</div>

ok this should work - it is fat according to my terminal invocations.

[fluid.voiceallocator.mxo.zip](https://discourse.flucoma.org/uploads/short-url/uBi9b2bkBk1umH4MLAGuZCRAskO.zip) (134.9 KB)

---

<div class="post-metadata">

**Author:** ![tremblap](https://discourse.flucoma.org/user_avatar/discourse.flucoma.org/tremblap/32/5_2.png) [@tremblap](https://discourse.flucoma.org/u/tremblap)\
**Post date:** [August 27, 2023, 12:24pm UTC](https://discourse.flucoma.org/t/new-object-early-community-build-1-fluidvoiceallocator-now-with-sc-too/2085/10 "2023-08-27T12:24:50Z")

</div>

so that heart is a yes?

---

<div class="post-metadata">

**Author:** ![tremblap](https://discourse.flucoma.org/user_avatar/discourse.flucoma.org/tremblap/32/5_2.png) [@tremblap](https://discourse.flucoma.org/u/tremblap)\
**Post date:** [August 27, 2023, 12:31pm UTC](https://discourse.flucoma.org/t/new-object-early-community-build-1-fluidvoiceallocator-now-with-sc-too/2085/11 "2023-08-27T12:31:19Z")

</div>

link in OP now FAT - any Pd takers to translate the example? I can provide (fat) binaries for MacOS, or skinny ones for Windows and Linux 🙂

SC is almost there for the binaries

---

<div class="post-metadata">

**Author:** ![rodrigo.constanzo](https://discourse.flucoma.org/user_avatar/discourse.flucoma.org/rodrigo.constanzo/32/12_2.png) [@rodrigo.constanzo](https://discourse.flucoma.org/u/rodrigo.constanzo)\
**Post date:** [August 27, 2023, 1:17pm UTC](https://discourse.flucoma.org/t/new-object-early-community-build-1-fluidvoiceallocator-now-with-sc-too/2085/12 "2023-08-27T13:17:42Z")

</div>

Yup, had to hop on a quick zoom mid-typing out my response!

Working well.

---

<div class="post-metadata">

**Author:** ![jamesbradbury](https://discourse.flucoma.org/user_avatar/discourse.flucoma.org/jamesbradbury/32/1252_2.png) [@jamesbradbury](https://discourse.flucoma.org/u/jamesbradbury)\
**Post date:** [August 27, 2023, 7:49pm UTC](https://discourse.flucoma.org/t/new-object-early-community-build-1-fluidvoiceallocator-now-with-sc-too/2085/13 "2023-08-27T19:49:59Z")

</div>

This is going to to be the most terrible nitpick and I would be angry if I read this feedback about my own work… but…

Should it not be `fluid.sinesfeature~` plural to match `fluid.sines~`? I can easily forgive the incongruence but there is something to be said about autocomplete helping people find things. If you type `fluid.sines` into a box you won’t see it in Max. I assume something similar would be the same for SC. `pd`… well…

---

<div class="post-metadata">

**Author:** ![jamesbradbury](https://discourse.flucoma.org/user_avatar/discourse.flucoma.org/jamesbradbury/32/1252_2.png) [@jamesbradbury](https://discourse.flucoma.org/u/jamesbradbury)\
**Post date:** [August 27, 2023, 7:58pm UTC](https://discourse.flucoma.org/t/new-object-early-community-build-1-fluidvoiceallocator-now-with-sc-too/2085/14 "2023-08-27T19:58:31Z")

</div>

One piece of feedback is that much of the instantiation of the `voiceallocator` object in the help file occurs outside of the object and is also quite distant spatially in the patch. That means if you copy out some of the contents, such as what is seemingly the most important part you won’t get a functional patch. I would advocate that the attribtues such as `@numvoices` and `@prioritisedvoices` are written into the box alongside having the controls.

---

<div class="post-metadata">

**Author:** ![jamesbradbury](https://discourse.flucoma.org/user_avatar/discourse.flucoma.org/jamesbradbury/32/1252_2.png) [@jamesbradbury](https://discourse.flucoma.org/u/jamesbradbury)\
**Post date:** [August 27, 2023, 8:33pm UTC](https://discourse.flucoma.org/t/new-object-early-community-build-1-fluidvoiceallocator-now-with-sc-too/2085/15 "2023-08-27T20:33:48Z")

</div>

I really like this object, I can see myself having a lot of fun with it 🙂

```auto
<pre><code>
----------begin_max5_patcher----------
1386.3oc2YszbihCD9r8uBJN6XqG.RLmxt6rONryk80kolZJYPwQy.HVP3Id
lZxu8sk.6vrwFSRHUpcoRvPiDs5ut6O0R7k4y7WquQV668Ju25Ma1WlOalSj
Uvrt6m4mKtIIST6Zleg7S50eveQ6iLxaLNwxzMxa2KU2XxjFytRY6a1esnXi
+hte8dWWyJEljqUEadek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Az.Dk.KfjXmWcH7.+BUR
gq9Qq0tQ93KgraA07VRhnPbbT.FpavZ0QCV3vKS8jsaryVsJQJfEKmHL5JuK
gdBZzIs1iDF4c4c2xGFbVLl5rORfBIFujPIQHFGgC4jPD0tWDCyn7.vrfoFy
pUExqjBSSETJNlvcn1UWYpUeV5QPAf.6c.BAFecqjKv1+tTWkJq7vmGHOej1
w19rf1cV6jnV3Cfug1C1buLHMo3eu6otQmU92hks6uQmMsewB81zlTYMfMh8
6+yauqBZOb61AbO+0X0js5yypIakX1F8zzDeL1DaJzDcL1DYJzDYDZxt6FOc
M05qG1jhmHEcVriNAJxtw.mWSSgEENFraBxkviNq8IicQiPS3oHWhOlbI1T3
l3iIxiOEnmce3Oul91gStJsTqJLcD5wzkgvZ9bkmEhQ6uo2mW.l35zKaaRGo
t36yLRCbEVe202efheZAjihHDMANO5XUzSMalNpYQhlJBpyxaLEJZLzFj6Sa
zVOCr73sxp5tV6TBTE3Gztvm3EtaUEs251Nc+J4VUc+OZkunBpNy.klAEC5p
y5ln.+1tpg.whFUWrHXdyselInBS62sotTjz8wwfBQm+04+i0+bSd
-----------end_max5_patcher-----------
</code></pre>

```

---

<div class="post-metadata">

**Author:** ![rodrigo.constanzo](https://discourse.flucoma.org/user_avatar/discourse.flucoma.org/rodrigo.constanzo/32/12_2.png) [@rodrigo.constanzo](https://discourse.flucoma.org/u/rodrigo.constanzo)\
**Post date:** [August 27, 2023, 9:43pm UTC](https://discourse.flucoma.org/t/new-object-early-community-build-1-fluidvoiceallocator-now-with-sc-too/2085/16 "2023-08-27T21:43:14Z")

</div>

> [@tremblap](#):
>
> I am still mc. averse yes 🙂

Don’t know if that starts getting too clunky, but having some Max version checking and scripting to instantiate an `mc.` example, as it would be super useful in that context (sines in general, as a descriptor type, as per @jamesbradbury 's example above).

> [@jamesbradbury](#):
>
> but…

It’s a bit inconsistent all over the place (mfcc vs melband **S** ), but they typically stay consistent among each descriptor type.

Also curious about the naming here, since the naming is generic and not sines-specific. Is there another use for this object inside FluCoMa, or in general? (it seems quite different from the voice allocation inside `mc.` for example, and from `sigmund~` from what I remember).

---

<div class="post-metadata">

**Author:** ![fearne](https://discourse.flucoma.org/letter_avatar_proxy/v4/letter/f/919ad9/32.png) [@fearne](https://discourse.flucoma.org/u/fearne)\
**Post date:** [August 28, 2023, 1:43am UTC](https://discourse.flucoma.org/t/new-object-early-community-build-1-fluidvoiceallocator-now-with-sc-too/2085/17 "2023-08-28T01:43:33Z")

</div>

Ah, this is great, I did want to implement the demo patch with `mc.` objects but hadn’t worked with them in a while and something that worked was better than nothing at all haha

> One piece of feedback is that much of the instantiation of the `voiceallocator` object in the help file occurs outside of the object and is also quite distant spatially in the patch.

And this is a great point, I shall make adjustments to the version I make for the help file 🙂

---

<div class="post-metadata">

**Author:** ![tremblap](https://discourse.flucoma.org/user_avatar/discourse.flucoma.org/tremblap/32/5_2.png) [@tremblap](https://discourse.flucoma.org/u/tremblap)\
**Post date:** [August 28, 2023, 7:43am UTC](https://discourse.flucoma.org/t/new-object-early-community-build-1-fluidvoiceallocator-now-with-sc-too/2085/18 "2023-08-28T07:43:17Z")

</div>

> [@jamesbradbury](#):
>
> the most terrible nitpick

this was discussed in and @weefuzzy opted for singular - if you look at the commits it started as plural but he made me see the light… 🙂

---

<div class="post-metadata">

**Author:** ![tremblap](https://discourse.flucoma.org/user_avatar/discourse.flucoma.org/tremblap/32/5_2.png) [@tremblap](https://discourse.flucoma.org/u/tremblap)\
**Post date:** [August 28, 2023, 7:45am UTC](https://discourse.flucoma.org/t/new-object-early-community-build-1-fluidvoiceallocator-now-with-sc-too/2085/19 "2023-08-28T07:45:08Z")

</div>

> [@rodrigo.constanzo](#):
>
> It’s a bit inconsistent all over the place (mfcc vs melband **S** )

it is actually grammarly right: mfcc is an abreviation (no plural) and bands is a noun. but then, people have started to argue about anything grammar in English since the US independance, so we have a style sheet for naming - usually Oxford Brit English 🙂

---

<div class="post-metadata">

**Author:** ![tremblap](https://discourse.flucoma.org/user_avatar/discourse.flucoma.org/tremblap/32/5_2.png) [@tremblap](https://discourse.flucoma.org/u/tremblap)\
**Post date:** [August 28, 2023, 7:49am UTC](https://discourse.flucoma.org/t/new-object-early-community-build-1-fluidvoiceallocator-now-with-sc-too/2085/20 "2023-08-28T07:49:18Z")

</div>

> [@rodrigo.constanzo](#):
>
> Is there another use for this object inside FluCoMa, or in general?

I can think of one or two - for instance, you could take 40 melbands and keep the loudest 4 with this to find peaks and allocate them. or you could do that with EQ peaks to ride an eq smoothly. Anything that needs assignation of (pitch and/or gain) lists to its nearest ‘voice’ to make poly patches is your friend here.

[Next page](https://discourse.flucoma.org/t/new-object-early-community-build-1-fluidvoiceallocator-now-with-sc-too/2085.md?page=2)
