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

Advanced DSP Question

DSP related issues, mathematics, processing and techniques

Advanced DSP Question

Postby Youlean » Tue Dec 09, 2014 8:30 pm

Hey guys, is there any way to count how many samples is audio being above 0, and to place that information before >0 occurs with delaying original audio?
Youlean
 
Posts: 176
Joined: Mon Jun 09, 2014 2:49 pm

Re: Advanced DSP Question

Postby tester » Tue Dec 09, 2014 10:54 pm

+1

Would be interesting to be able to count in parallel (sample accurate) amounts of samples within specified min/max ranges. [output can be float type and not integer type, because calculations made on that are rather approximations).
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
tester
 
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: Advanced DSP Question

Postby KG_is_back » Wed Dec 10, 2014 12:01 am

I'm not exactly sure what you are trying to do... With the counting samples, the thing is fairly simple:

Code: Select all
streamin in;
streamout out;
float c;
float above;
float pin;

above=(in>0)&(pin<=0);
out=out+(c-out)&above;
c=c+1-c&above;


With the delaying, I'm not sure what you are looking for...
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: Advanced DSP Question

Postby Youlean » Wed Dec 10, 2014 12:33 am

Look at the picture. I could post a FSM if you need it, but it is very messy...

Basically I want to calculate cycle length and to have that information right before cycle occurs, so I can set accurate release, independent for every cycle in envelope follower.

Logic is to:

audio -> fixed delay
audio -> sample counter -> variable delay(fixed delay - cycle length)
Attachments
Cycle.jpg
Cycle.jpg (62.8 KiB) Viewed 31414 times
Youlean
 
Posts: 176
Joined: Mon Jun 09, 2014 2:49 pm

Re: Advanced DSP Question

Postby tester » Wed Dec 10, 2014 12:36 am

As for me, I still don't know what I'm doing. ;-) Yesterday an idea came to me, and I'm trying to figure out what is it about. Probably some sort of a measurement within a filter-like something.

The concept is.

Audio resolution is n bits (but this is related to signals in general and some statistical calculations). I'd like to measure how many sample-to-sample differences fit bit ranges (1bit range ~ 0-6dB, 2bit range ~ 6-12dB, etc), and compare these outcomes to each other.

I'm still not sure what for this is useful, but I find it... intriguing. Maybe it may be helpful somehow to describe audio true dynamics of a compressed/pumped signal? Or level of subtleness in details? I don't know yet. :mrgreen:
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
tester
 
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: Advanced DSP Question

Postby Youlean » Wed Dec 10, 2014 12:43 am

What do you mean by sample to sample differences?
Youlean
 
Posts: 176
Joined: Mon Jun 09, 2014 2:49 pm

Re: Advanced DSP Question

Postby KG_is_back » Wed Dec 10, 2014 12:53 am

As you suggest All you have to do, is to put constant delay on original audio. Detect the positive pulse length from the original (non-delayed) input. The event you want to happen should occur at constant delay minus detected length. That is the amount of time you need to delay the "side-chain" input, if you wish so. The delay will be modulated in a jump fashion but that shouldn't be a problem.
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: Advanced DSP Question

Postby tester » Wed Dec 10, 2014 11:25 am

Youlean wrote:What do you mean by sample to sample differences?


(sampleN) minus (sampleN+1). In short terms - gain differences between samples. Following curiosity - I'd like to see - how much fluctuations are going on in dynamic ranges defined by bits (or 6dB steps). And then - I'd like to hear what it means in audible terms.
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
tester
 
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: Advanced DSP Question

Postby Youlean » Wed Dec 10, 2014 4:46 pm

KG_is_back wrote:As you suggest All you have to do, is to put constant delay on original audio. Detect the positive pulse length from the original (non-delayed) input. The event you want to happen should occur at constant delay minus detected length. That is the amount of time you need to delay the "side-chain" input, if you wish so. The delay will be modulated in a jump fashion but that shouldn't be a problem.


Indeed, there where some bug in my schematics, but now it seams to work...
Youlean
 
Posts: 176
Joined: Mon Jun 09, 2014 2:49 pm

Re: Advanced DSP Question

Postby Youlean » Wed Dec 10, 2014 4:47 pm

tester wrote:
Youlean wrote:What do you mean by sample to sample differences?


(sampleN) minus (sampleN+1). In short terms - gain differences between samples. Following curiosity - I'd like to see - how much fluctuations are going on in dynamic ranges defined by bits (or 6dB steps). And then - I'd like to hear what it means in audible terms.


Well test it and see what it will do... :)
Youlean
 
Posts: 176
Joined: Mon Jun 09, 2014 2:49 pm

Next

Return to DSP

Who is online

Users browsing this forum: No registered users and 11 guests