[gen~] for Pink Trombone port... help!
Hi everyone,
I've spent the past few weeks casually working on a Max port of the lovely Pink Trombone (https://dood.al/pinktrombone/) vocal synthesizer, which hopefully some folks on here are familiar with. I suspect there's tons of potential for procedural, real-time speech synthesis in live performance, and Max seems like a much more fitting context than the browser to make it happen!
Anyway, I've got a working version that's polyphonic, so you can control an entire Pink Trombone chorus. The only issue is that when using more than 4 voices simultaneously, my CPU usage occasionally spikes above 100%, and this is on a relatively good computer. The JavaScript code I ported this from can handle as many as 8-10 voices with no issue so I'm surprised the performance inside Max is so much lower.
The synthesis is done inside 2 [gen~] patches per poly~ voice, one for the glottis and one for the tract. I'm no gen~ expert (genExprt) by any means, so I'd absolutely appreciate it if anyone with more experience with gen could have a look and identify any potential issues or improvements.
Simply enable audio and adjust the dials to simulate dragging the tongue and constriction around in the original GUI. You can also draw the target tract diameters manually in the [waveform~]. The aspiration noise might not load but the rest should work fine.
If anyone has any information, it would be so greatly appreciated.
Thanks!
I am interested to try, but opening in Max there are missing files:
poly~: no patcher MPT_Voice
buffer~: fricativeNoise.wav
buffer~: aspirationNoise.wav
Many thanks and much much love for doing this. I've wanted to port Pink trombone to Max a few years ago but the task seemed impossible back then with my poor understanding of javascript and gen~ at the time.
Can't wait to see the result and play with it!
A couple of years ago I worked on a port of the pink trombone too, but never quite completed it enough to share. I wonder how similar our ports look?
Just dug up my patch -- a single voice is hovering about 15% CPU, but I have a pretty new macbook pro. I think perhaps it is heavier on the CPU partly because the JS version runs some things at a block rate of once every 512 samples (whereas gen~ is all audio rate), and partly because JS 32-bit floats, whereas gen~ is running all 64-bit perhaps? But maybe there's other ways to optimize this a bit more for a gen~ context too.
Anyway here's my work-in-progress in case it helps:
Hi again,
I suspected some files wouldn't load in the compressed version. Any way to post a compressed version with external files included?
In the meantime, the best I can offer is my GitHub repo which contains all the necessary files, including a recreation of the GUI (minus the nose diameters, at the moment). You can clone it into a folder of your choice or, if you don't use GitHub, download the ZIP files by clicking on the green Code button.
@graham, your comment about gen vs JS makes sense to me. Would creating this logic in regular MSP instead of gen possibly improve this? I'm using gen mostly for the convenience of codebox but would definitely make the effort of recreating this in MSP if it could potentially run better.
Thanks again!
@ YONATAN ROZIN thanks a lot.
Maybe you can upload the external files to a webhoster (google or dropbox)?