Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

Last Poly Voice Extractor

DSP related issues, mathematics, processing and techniques

Last Poly Voice Extractor

Postby trogluddite » Tue Feb 11, 2020 7:58 pm

Here's another of my "I have no idea what you'd want one of those for" modules that's fallen out of a current project (I'll describe why you might in a moment!)

This little combination of two modules allows you to extract the most recently started voice from a poly stream and output it as a mono stream. A single "master" module wired up inside the MIDI-to-Poly does most of the work, and can be shared by as many "voice extractors" as you like (even wirelessly if you prefer). The example in the schematic shows how to wire it up - it's only a couple of links...
poly_helpers.fsm
(28.71 KiB) Downloaded 1405 times

Buy why?!!!

1) When you're debugging poly streams, the way that they all add together on a poly readout can be really annoying sometimes!

2) It can help to make GUI animations for things like the progress of an envelope or phase of an LFO clearer when there less crosstalk between voices.

A couple of caveats...

1) It's rather hacky, so prefer to use it purely for cosmetic features. I can't guarantee reliability if you use hundreds of them in critical audio parts of a schematic!

2) There's an unavoidable single-sample delay to the channel mask signal, so you can't reliably pick up first-sample-only signals such as initial triggers and stage(0) computations.

3) The voice is selected strictly by the starting order of new voices. If you release this voice, the output does not "fall back" to an earlier voice, it just goes silent until another new voice is started.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
User avatar
trogluddite
 
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: Last Poly Voice Extractor

Postby martinvicanek » Tue Feb 11, 2020 9:02 pm

Very interesting, Trog! And - yes, quite a hack! :mrgreen:
I don't think that the one-sample-delay is an issue: just delay the signal that you want to catch the first sample of by the same amount.
User avatar
martinvicanek
 
Posts: 1328
Joined: Sat Jun 22, 2013 8:28 pm

Re: Last Poly Voice Extractor

Postby Spogg » Wed Feb 12, 2020 9:34 am

This is brilliant trog! :o :ugeek:

Previously I’ve used a highest note system for displays. The limitation is that when the highest note is dropped, the display will drop back to the next highest note which can be in a different phase of activity, so the display will “jump”.

Without testing it I suspect your system will be better, since the display will correspond with the content of the last note played, which is what I would want as a user.

Thank you!

Spogg
User avatar
Spogg
 
Posts: 3358
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England

Re: Last Poly Voice Extractor

Postby adamszabo » Wed Feb 12, 2020 1:04 pm

Cool, I also have something similar but I use the global ID instead in the floswtone alpha version. By the way, if you use midi to multi voice your method gets kinda broken :P
adamszabo
 
Posts: 667
Joined: Sun Jul 11, 2010 7:21 am

Re: Last Poly Voice Extractor

Postby trogluddite » Wed Feb 12, 2020 2:29 pm

Spogg wrote:Previously I’ve used a highest note system for displays. The limitation is that when the highest note is dropped, the display will drop back to the next highest note which can be in a different phase of activity, so the display will “jump”.

That's exactly why I built it - for my wave-table oscillator and the spline-envelope code that I'm working on for tulamide. At first, I just thought of it as a handy way of debugging my code; but being able to see a real-time playback cursor makes it much easier to see how the loop-points and note-release options interact, so I wanted a more robust version that wouldn't confuse players.

adamszabo wrote:By the way, if you use midi to multi voice your method gets kinda broken

Yes, I should have pointed out that caveat too - it doesn't work when two voices start at exactly the same sample; you'll get the sum of all the voices which started at the same time! :oops:
I haven't played with the properly working voice IDs in the Alphas yet, but I have a feeling that they'll make quite a few interesting little gadgets possible.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
User avatar
trogluddite
 
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: Last Poly Voice Extractor

Postby trogluddite » Thu Feb 13, 2020 12:14 am

I've just replaced the download in the top-post with a new, much improved version. The "master" unit inside the MIDI-to-Poly module is now just a single ASM block without all the nasty conversions between poly and mono, and in the case that multiple voices start at exactly the same time, it will choose whichever has the highest channel ID, so that you still get a coherent single-channel output.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
User avatar
trogluddite
 
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: Last Poly Voice Extractor

Postby adamszabo » Thu Feb 13, 2020 10:32 am

I love the update with the buffer, very clever! However I was pressing "T" on my keyboard so it output Pitch 67, and I started pressing that key faster and eventually the mono readout showed 134, which is double of the single 67, so I guess somehow the second key got leaked and added the pitches together? Should it be like that?
adamszabo
 
Posts: 667
Joined: Sun Jul 11, 2010 7:21 am

Re: Last Poly Voice Extractor

Postby Spogg » Thu Feb 13, 2020 11:56 am

I’ve had a quick play with the new version and it’s very impressive trog. :ugeek:

I was also impressed by your how-it-works module for those who know assembler.
You always add lots of info in your schematics which is always appreciated.
I also really appreciate you putting the stuff you make into a working example.

Cheers

Spogg
User avatar
Spogg
 
Posts: 3358
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England

Re: Last Poly Voice Extractor

Postby trogluddite » Thu Feb 13, 2020 5:10 pm

adamszabo wrote:I guess somehow the second key got leaked and added the pitches together? Should it be like that?

Hmmm; no, it's not supposed to do that! The buffer only has one slot to store a channel ID, and there are no adds in the code anywhere! So my hunch is that it may be something to do with zeros - the first voice has a channel ID of zero, which is a bit of a PITA, as zero will compare equal to unset or completely bitmasked floats. I'll have to dig a little deeper, but I wonder whether something is upsetting it when polyphony is exceeded and voices have to be stolen.

Spogg wrote:You always add lots of info in your schematics which is always appreciated.
I also really appreciate you putting the stuff you make into a working example.

Oh; my "developer notes" and "unit-testing fixtures", you mean? ;)

Seriously, though, a lot of the notes and code-snippets get pasted in from the "examples and techniques" folder that I've been keeping for years. I never trust myself to remember how to use a new technique after a few months of playing with other things, or even to remember that I ever saw it before (even when it's something I spent weeks deducing for myself!). So I'm a great believer in meticulous documentation.

It seems quite common that the proverbial "like riding a bicycle" requires the "training wheels" to be bolted back on again occasionally for us autistic folks. It can be remarkably similar to dementia at times - I've even seen some research which suggests that autistic people cope better with the onset of dementia, because they've grown up devising workarounds their whole lives without realising it ("Write. It. Down. !!")
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
User avatar
trogluddite
 
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: Last Poly Voice Extractor

Postby BobF » Thu Feb 13, 2020 5:12 pm

Great stuff there Trog, boy I wish I had learned coding years ago.

Later then, BobF.....
BobF
 
Posts: 598
Joined: Mon Apr 20, 2015 9:54 pm

Next

Return to DSP

Who is online

Users browsing this forum: Google [Bot] and 30 guests