Main siteMain site  ForumForum  ForumSearch  Private messageEmail contact  RegisterRegister  Log inLog in 
Topic: Mute source at start of session
Reply to topic
Author Message
spektrolyte



Joined: Jan 16, 2016
Posts: 23

PostPosted: Feb 7, 2016 7:54 PM    Post subject: Mute source at start of session

My amp spits out a load of noise for about 3 seconds upon startup and this is affecting the session average figures.

Is there a way of muting the output of the source for a short length of time before allowing data through?
jarek



Joined: Oct 22, 2007
Posts: 1073

PostPosted: Feb 8, 2016 12:30 AM    Post subject:

There is no direct option to mute like that.

But you could try to use the "Do not start" advanced property on your amp element, select it. Then use ElementInteractor along with Timer to start that element after 3 (or more) seconds.
spektrolyte



Joined: Jan 16, 2016
Posts: 23

PostPosted: Feb 8, 2016 12:34 AM    Post subject:

OK I'll try that. Thanks :)
spektrolyte



Joined: Jan 16, 2016
Posts: 23

PostPosted: Feb 8, 2016 1:17 AM    Post subject:

Now the burst of noise happens after the time interval has completed.

I could instead try applying the same idea to control the gain of a mixer element, effectively muting the signal until the noise is done
spektrolyte



Joined: Jan 16, 2016
Posts: 23

PostPosted: Feb 8, 2016 1:18 AM    Post subject:

OK Mixer has no gain. Is there an attenuator element?
spektrolyte



Joined: Jan 16, 2016
Posts: 23

PostPosted: Feb 8, 2016 1:20 AM    Post subject:

Or is there something that could multiply the float value of source output by zero for 3 seconds, then multiply it by 1?
spektrolyte



Joined: Jan 16, 2016
Posts: 23

PostPosted: Feb 8, 2016 1:32 AM    Post subject:

Got it working with Timer, Element Interactor and Expression Evaluator.

There is still a spike, is there a way to ramp up the gain from 0 to 1 over 1 second?
jarek



Joined: Oct 22, 2007
Posts: 1073

PostPosted: Feb 8, 2016 1:41 AM    Post subject:

Yes, you can create a more advanced expression for that. For example, in advanced properties declare:

float ratio = 0;

Then in the main expression do this:

Out1 = In1 * ratio;
if (ratio < 1)
ratio += 0.01; // Or other step, depending on how quickly you want this to happen
jarek



Joined: Oct 22, 2007
Posts: 1073

PostPosted: Feb 8, 2016 1:43 AM    Post subject:

That last idea could be even used to replace your Timer and ElementInteractor, and use just ExpressionEvaluator.
spektrolyte



Joined: Jan 16, 2016
Posts: 23

PostPosted: Feb 8, 2016 2:11 AM    Post subject:

It seems to work best with the timer as the gain is so high at the start there is still a huge spike even with the new expression.

Thanks!
jarek



Joined: Oct 22, 2007
Posts: 1073

PostPosted: Feb 8, 2016 3:36 AM    Post subject:

The expression could be slightly different in such case, so that the gain stays at 0 for some time:

Declaration:

int idleCount;
float ratio;

Execute at start:

idleCount = 256*3; // 3 seconds at rate 256sps
float ratio = 0;

Expression:

Out1 = In1 * ratio;

if (idleCount > 0) {
--idleCount
} else if (ratio < 1)
ratio += 0.01; // This will increase from 0 to 1 over 100 samples
}
GMartin



Joined: Feb 5, 2010
Posts: 308

PostPosted: Mar 11, 2016 10:50 AM    Post subject:

I am not sure if this would accomplish what you want. It seems as if you do not want you session averages distorted by the initial burst.

I have had a similar problem on some designs. I set the design to start when loaded. The edffilewriter, thresholds, and feedback are set not to start. After a few seconds I can click a button to start the processing of data and feedback. I do it this way so that I can start the session after I see
the signal has normalized. You could also set up a timer to start those processes.

George
GMartin



Joined: Feb 5, 2010
Posts: 308

PostPosted: Mar 11, 2016 10:52 AM    Post subject:

I am not sure if this would accomplish what you want. It seems as if you do not want you session averages distorted by the initial burst.

I have had a similar problem on some designs. I set the design to start when loaded. The edffilewriter, thresholds, and feedback are set not to start. After a few seconds I can click a button to start the processing of data and feedback. I do it this way so that I can start the session after I see
the signal has normalized. You could also set up a timer to start those processes.

George
spektrolyte



Joined: Jan 16, 2016
Posts: 23

PostPosted: Mar 11, 2016 4:06 PM    Post subject:

Good suggestion George,

I have to revisit this protocol anyway as there was a system error which removed all of the connections between the elements in that protocol.

It needs to be rebuilt at some point, and now I see the wisdom of using as many nested elements a possible.
Reply to topic