ΣSigmaStudio Ask AI Русский Log in

Sigmastudio algorithms

SigmaDSP & SigmaStudio gr4eme Mar 11, 2014 00:00 16 replies Original on forum ↗
Subscribe
gr4eme Question
Mar 11, 2014 00:00

Hi Guys,

Im looking to build a couple of features but not sure where to start, There are a lot of blocks to choose from lol

Here is what I'm looking to do,

First I want to monitor my input signal and if it goes above a set level after say 3 seconds i want it to reduce that level back to a pre determined safe level until the incoming level is reduced.

The second thing is monitoring the same input signal and if that signal doubles in level in say .5 second i want to mute the outputs for 5 seconds

Looking at the mute block i see it has to be set as either on or off so I'm guessing that i will need to have another block that can be controlled and switch the output from the signal to the mute block

Thanks in advance

Graeme

Yagami Reply
Mar 12, 2014 00:00

Hi Graeme,

This is a little complicated, but certainly not impossible.

First, I'd suggest reading this primer on the basics of monitoring the level of a signal inside the SigmaDSP:

https://ez.analog.com/message/7669#7669

Measuring time can be a bit tricky. However, it looks like there is a new timer in the library that I've never seen before. "Timer Coarse Long Time" seems like it would do the trick.

This cell doesn't appear to have a help article associated with it yet, but if you read the description when you hover the mouse over the cell, it looks like an input of 1 starts the timer, an input of 0 resets the time, and the timer counts up to the specified time using the specified accuracy.

The output will be zero until the timer reaches the specified value, and then it will become 1.

Here's what the cell looks like in the project.

In the first part of your description, you said you want to count up to 3 seconds. I assume a 1 ms accuracy is OK, so here are the corresponding settings.

The input should be a logic signal that compares the input level to a specified threshold. We can get this circuit from the FAQ I posted.

You'll then need some logic to control the timer... I haven't tested this out yet, but I think this project is a good starting point.

Basically, I use the timer's output to control a multiplexer. If the time has not yet been reached, it outputs a copy of the input signal. If the timer has been reached, meaning that the input signal is too big, then it outputs a reduced-gain copy of the input signal.

You could use this same logic to implement mute functions, if desired.

Hopefully this is a good starting point for you.

5050.79a67c32f299605d9ed65df25c535125.jpg
5050.79a67c32f299605d9ed65df25c535125.jpg
5050.79a67c32f299605d9ed65df25c535125.jpg-212x84.jpg
5050.79a67c32f299605d9ed65df25c535125.jpg-212x84.jpg
3276.afa9e93c1a221c7b60bbeeafa560571b.jpg
3276.afa9e93c1a221c7b60bbeeafa560571b.jpg
3276.afa9e93c1a221c7b60bbeeafa560571b.jpg-120x121.jpg
3276.afa9e93c1a221c7b60bbeeafa560571b.jpg-120x121.jpg
5516.cac18d380706aadf467c653b6e3be848.jpg
5516.cac18d380706aadf467c653b6e3be848.jpg
5516.cac18d380706aadf467c653b6e3be848.jpg-131x127.jpg
5516.cac18d380706aadf467c653b6e3be848.jpg-131x127.jpg
4721.71f82045d6cd14946fc48aeb72d690c3.jpg
4721.71f82045d6cd14946fc48aeb72d690c3.jpg
4721.71f82045d6cd14946fc48aeb72d690c3.jpg-407x495.jpg
4721.71f82045d6cd14946fc48aeb72d690c3.jpg-407x495.jpg
8507.0cffcc240c1650c4c9df5f180d17e1fa.jpg
8507.0cffcc240c1650c4c9df5f180d17e1fa.jpg
8507.0cffcc240c1650c4c9df5f180d17e1fa.jpg-450x325.jpg
8507.0cffcc240c1650c4c9df5f180d17e1fa.jpg-450x325.jpg
gr4eme Reply
Mar 12, 2014 00:00

Thanks Yagami,

I will test this today, I'm using it for controlling clipping, as i know the level required on the DAC outputs for full scale deflection of the amplifiers i ca use this to reduce the input after the threshold has been hit for the set period.

My other algorithm is to monitor for large signals so if a signal is happily sitting at .4v ±1mv and then it changes to .8v in 2ms i need to mute the outputs if that make sense

Graeme

gr4eme Reply
Mar 12, 2014 00:00

Hi Yagami, I'm having issues as you seem to be using a beta version thats not available? i can only find 3.10.3 and your on .4 where is this available from?

gr4eme Reply
Mar 12, 2014 00:00

Thanks Coleman, that would be great

Graeme

ColemanR Reply
Mar 12, 2014 00:00

Hi Graeme,

I will get the most recent version available to you as soon as I can.

Regards,

Coleman

ColemanR Reply
Mar 12, 2014 00:00

The most current version of SigmaStudio are available here:

http://www.analog.com/en/dsp-software/ss_sigst_02/sw.html

I am not in a position to offer 3.10.4 at this time. Please check back to the SigmaStudio page over the next week or so for changes.

Regards,

Coleman

gr4eme Reply
Mar 13, 2014 00:00

Thanks Bob,

I stepped up to the 1442 from the 1701 i was initially using. Indeed we have come a long way. This is a pro product and most studio monitors have a led for clipping which in my opinion is pretty much useless, if your busy working chances are you won't notice it so my idea is to let it clip for a second as thats not going to hurt but back it down if it does it longer.

The principle here is i know my output level so i can pre determine the "safe" output and reference it to the clip algorithm i just wasn't sure how to create that lol

The other section is the one thats gouging to need more work as it needs to track the input watching for a HUGE increase in level when some one does something major on the desk

Graeme

gr4eme Reply
Mar 13, 2014 00:00

Thanks Bob,

Its kind of like legos lol you just have to build the blocks, the battle is knowing what half the blocks do. Im glad I'm using the 144x series as it has a lot more power, can't wait to get this finished and start on a new board with the 1452 as thats even more powerful

Graeme

KJBob Reply
Mar 13, 2014 00:00

Hi Graeme,

In the meantime, you can implement Yagami's neat idea by using an old-style timer, as shown below. The old timer is not as convenient as you must add a DC source to set the time delay in samples rather than in seconds. But it works, just the same.

We've sure come a long way from the old "light bulb in series with the tweeter trick" -- a commonly-used way to protect DJ speakers. I'm not sure what DSP you're using, the attached file is tor the -1701.

Best regards,

Bob

551461a071d3e4551334323aef1d4ebf.jpg
551461a071d3e4551334323aef1d4ebf.jpg
551461a071d3e4551334323aef1d4ebf.jpg-551x328.jpg
551461a071d3e4551334323aef1d4ebf.jpg-551x328.jpg
KJBob Reply
Mar 13, 2014 00:00

Hi Graeme,

In SigmaDSP there's often "more than one way to skin a cat" (-oops). The challenge is to cobble together the smallest collection of blocks that perform (or that can be tricked into doing) what you need. You could achieve the second part of your requirement with the arrangement shown here, although there could very well be a simpler way.

Two decisions apply to the audio: if it's above threshold (too loud) and has suddenly doubled, the first timer begins its wait. If this condition remains after 0.5 second, the first timer goes high and latches itself via the feedback loop. This mutes the sound until either the level returns below threshold (breaking the feedback loop), or the five second length times out. You'll of course need to translate this to your -1442 DSP, combine it with the existing logic, and tweak as needed. Moving the feedback block's beginning and / or ending nodes will change the circuit's logic in a way you may find desirable.

Bob

287a6d3782d6a8153998982c3278d2a6.jpg
287a6d3782d6a8153998982c3278d2a6.jpg
287a6d3782d6a8153998982c3278d2a6.jpg-552x235.jpg
287a6d3782d6a8153998982c3278d2a6.jpg-552x235.jpg
gr4eme Reply
Sep 27, 2014 00:00

Hi Guys,

I see 3.11 is now released but its still missing the course timer long? has this block been removed?

KJBob Reply
Oct 2, 2014 00:00

Hello Graeme,

It sure seems like this block, Timer Coarse Long Time, is MIA. It doesn't show up in any SigmaStudio version I tried, from 3.10.4 to the latest beta.

Best regards,

Bob

gr4eme Reply
Oct 2, 2014 00:00

Thanks Bob,

That confirmed my findings, i wonder if Miguel can confirm if this block will ever be available. It would really help reduce the number of resources in this project

gr4eme Reply
Oct 26, 2014 00:00

Bump for Miguel as i really could do with this block

dan_xerx Reply
Oct 28, 2014 00:00

Dear All,

I'm eager to use this block Timer Coarse Long Time as my application requires it, but as of the latest beta in 3.11.1 build, it's not there yet. Is there any update on this?

Regards,

Dan

EZAdministrator Reply
Aug 2, 2018 00:00

This question has been assumed as answered either offline via email or with a multi-part answer. This question has now been closed out. If you have an inquiry related to this topic please post a new question in the applicable product forum.

Thank you,
EZ Admin