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

Envelope control primitive acts like a hog in "Hold" mode

For general discussion related FlowStone

Envelope control primitive acts like a hog in "Hold" mode

Postby kortezzzz » Sun Oct 01, 2017 11:42 am

Hi people,

I have a problem with the sample player (Exo's one) that probably related to the evelope control. What I'm trying to do is to hold the sample until it's ends even if the midi note that triggers it has short duration. When I connect a "true" boolian to the "Hold"s green input, it does hold the sample until it ends correctly, but the CPU raises up and becomes quite ridicilous when the loop runs and even after the loop ends. It shouldn't be it's normal behaviour, or I'm wrong?

Does anyone has an idea what can cause this and how to fix it?
User avatar
kortezzzz
 
Posts: 763
Joined: Tue Mar 19, 2013 4:21 pm

Re: Envelope control primitive acts like a hog in "Hold" mod

Postby Spogg » Sun Oct 01, 2017 3:58 pm

I'm not sure without seeing the schematic. Are you using an additional envelope generator anywhere else? Maybe set to a long release time? It sounds possible that you are getting multiple channels (voices) opened up for some reason. Or getting denormals maybe.

If you upload a schematic that shows the problem we can maybe offer more support...

Cheers

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

Re: Envelope control primitive acts like a hog in "Hold" mod

Postby kortezzzz » Sun Oct 01, 2017 5:01 pm

Hey spogg and thanks for the reply,

Here is a little schematic that demonstrate the problem. It contains two midi note sequencers that play kick and snare samples (the credit for them goes to Billv). Each of them has a "note duration" knob and they both respond to the "Hold on" button which turns on\off the hold option of the envelope control primitive inside the wav. sample players.

You can clearly hear the pops and the clicks while the "Hold" is off and then hear clean audio coming out when its on (and see the CPU raises up).
Connecting a stock "adsr" instead of the envelope control primitive and setting it to long duration,sustain, release does make things better, but I wonder if its the best solution. Maybe there is any alternative dsp code made "envelope control" anywhere?
User avatar
kortezzzz
 
Posts: 763
Joined: Tue Mar 19, 2013 4:21 pm

Re: Envelope control primitive acts like a hog in "Hold" mod

Postby Spogg » Mon Oct 02, 2017 10:26 am

I had a look.

The problem is that for every NOTE ON, a channel is opened. Even though the sequencer sends a NOTE OFF, if an envelope is still running the channel will stay open, until the envelope prim is told to finish and therefore to close the channel.
This means that as the sequencer plays the CPU will continue to rise for every 4 notes sounded.

I've fixed this by substituting 2 modified Wave players which have an embedded ADSR, used for channel release only. This mod was by someone called C. Hackl and allows the whole wave to play once until the end, which is what's normally required for a drum sequencer. After playing the wave once and fully, the channel is closed.

I hope this helps out!

Cheers

Spogg
Attachments
(short midi note demo) spogged.zip
(1.18 MiB) Downloaded 917 times
User avatar
Spogg
 
Posts: 3358
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England

Re: Envelope control primitive acts like a hog in "Hold" mod

Postby kortezzzz » Mon Oct 02, 2017 1:07 pm

Thanks spogg,

For some reason, the samples sound whird with this player. Like filterted\trashed or something. If those are our options, I prefer a simple adsr with a long release. The CPU "price" is quite higher, but I can live with it :)
User avatar
kortezzzz
 
Posts: 763
Joined: Tue Mar 19, 2013 4:21 pm

Re: Envelope control primitive acts like a hog in "Hold" mod

Postby Spogg » Mon Oct 02, 2017 2:17 pm

Just had a quick look and the players I added contain a different interpolation system.
You could just try swapping the interpolation modules over...

Cheers

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

Re: Envelope control primitive acts like a hog in "Hold" mod

Postby kortezzzz » Tue Oct 03, 2017 12:37 am

Ok, thanks :)

But wait... what is "interpolation"?

Sounds like one of those words that keep me far a way from dsp synthesis :lol:
User avatar
kortezzzz
 
Posts: 763
Joined: Tue Mar 19, 2013 4:21 pm

Re: Envelope control primitive acts like a hog in "Hold" mod

Postby Spogg » Tue Oct 03, 2017 9:37 am

There’s a lot of information out there about interpolation if you Google it.

Put simply, it’s filling in the gaps between known values with estimated values. The idea is to kinda smooth out the jumps in sample values to reduce audible artefacts without affecting the sound adversely.

But of course you don’t really know for certain where these intermediate values should lie so there are various methods for generating the “most likely” values. The simplest and cheapest method is linear interpolation which creates mathematically half-way values. I think of this as averaging.

Interpolation becomes important when a sample is played with a non-integer relationship between desired pitch and original pitch. In this case (of pitch variation) each scan through a table of values will land on different samples each time they are read out, since the sample number (index) is integer-based. You can’t specify half a sample position; it has to increment in whole sample positions (indices). So, for every increment of a sample counter the interpolation method will estimate what ought to be there, by looking at the samples either side of the fractional index.

You’ve probably worked out that if you only want to play back a sample at its native rate (or exactly doubled etc.) you don’t need interpolation, since the sample counter will always address an actual integer sample position. But if say you want reduce the apparent pitch of a kick drum you will need to interpolate; otherwise you’ll hear nasty inharmonic overtones.

If that brief explanation doesn’t satisfy, take a look online or maybe Martin could chip in with more details. For me the maths involved for anything other than linear is too painful.


Cheers


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

Re: Envelope control primitive acts like a hog in "Hold" mod

Postby kortezzzz » Tue Oct 03, 2017 12:54 pm

Wow, thanks for this detailed comment, spogg :o
I really appreciate the contribution since I believe many others hadn't any idea what it means too.
Where can I find the interpolation part at the sample player's schematic?
User avatar
kortezzzz
 
Posts: 763
Joined: Tue Mar 19, 2013 4:21 pm

Re: Envelope control primitive acts like a hog in "Hold" mod

Postby Spogg » Tue Oct 03, 2017 2:31 pm

It's the module just before the output.

In this schematic I've put the original wave player's interpolation module in place of the one in the play-till-end one.

I had another thought:

If you only plan to play the waves at their native pitch then you don't need a precision counter either. This only becomes important with long wav files and/or where you wish to lower the playback pitch AND keep it properly in tune. Probably not important for short drums and unpitched sounds like cymbals. But it is important for pitched sounds like Bass etc.


Cheers

Spogg
Attachments
(short midi note demo) spogged 2.zip
(1.18 MiB) Downloaded 954 times
User avatar
Spogg
 
Posts: 3358
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England

Next

Return to General

Who is online

Users browsing this forum: No registered users and 65 guests