Sigmastudio algorithms
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
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.
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
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?
Thanks Coleman, that would be great
Graeme
Hi Graeme,
I will get the most recent version available to you as soon as I can.
Regards,
Coleman
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
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
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
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
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
Hi Guys,
I see 3.11 is now released but its still missing the course timer long? has this block been removed?
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
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
Bump for Miguel as i really could do with this block
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
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
Please log in to reply.













