I have a processing chain that starts with 1 x 32 @ 48Khz audio data and ends with 1 x 1 @ 10Hz. There is a rebuffer in chain that causes all subsequent modules to be annotated with 1/150 which I understand to be the clock divider ( my rebuffer is 4800 samples ). Clock rate shift from "1" ( 32 samples per block ) to "1/150" ( 4800 samples per block ). In the example posted the error complains that I am mixing clock rates. I want to use my 1 x 1 @ 10Hz (1/150th) control data to alter a scaler block acting on 1 x 32 @ 48Khz blocks ( 1/1 ). The only way I can achieve this is to use Get param to extract the value output from my processing chain ( 1/150th clockdiv ) and deliver this to the next stage ( 1/1th clockdiv). This works, but why can't I connect directly instead of having to Get Param ?
best regards
Alan
4:26pm
Hi Alan.
Thanks for the post. The reason that you can't hook up pins with different clockDividers to the same module has to do with how Audio Weaver optimizes the internal buffers for memory usage. The data output from a module with a slow clock rate cannot always be guaranteed to be available to a module with a higher clock rate, so a clockDivider matching rule is enforced.
Please comment if you have additional questions.
-Axel
12:07pm
Hi Axel, thanks for the reply. I understand your response. In this case I have it working by using Get Param and passing it on. Why does this work? Is there another method I should be using ?
best regards
Alan
12:11pm
Hi Axel, thanks for the reply. I understand your response. In this case I have it working by using Get Param and passing it on. Why does this work? Is there another method I should be using ?
best regards
Alan
5:59pm
Alan,
Using the ParamGet module works in this case because you are accessing a parameter stored in a specific module's internal structure, not in a data buffer. You cannot access the input/output buffers to each module, but if a parameter is part of a module's structure then you can access it at anytime with ParamGet, regardless of clock rates.
Other ways to deal with mismatched clock rates are to buffer up the faster clock rate signal to match the clock rate of the slower signal, or, if the signal is a source, to change the clockDivider directly in the Build tab under view properties.
Hope this helps with your understanding.
-Axel
4:50am
Hi Axel, Ok good tips. My slow control signal ( 1 x 1 @ 10Hz gain changes ) are used to alter the gain of a fast block ( 1 x 32 @ 48K ). If alter the audio throughput block to 1 x 4800 samples will this do the trick ?
thanks
Alan
5:02pm
Alan,
Yes. Your suggestion to buffer up the audio throughput by a factor of 150 will make the audio signal clockDivider match the gain control signal clockDivider, and your solution will build.
Good luck!
-Axel
10:34pm
Axel,
Does this mean that after the gain is applied to the buffered-up audio signal, the result should be buffered-down for correct playback?
Thanks.
Pablo
2:25pm
The output wire requires the same block size as the input wire, so eventually you need to buffer-down your audio for playback.