Hi,
it's my first post here, hello to everybody!
I've recently bought FC8 and I'm playing with the DSP components.
Please, which is the proper way to control the FreqGenerator wave amplitude with a potentiometer?
so that 0V gives zero amplitude, and 5V full amplitude?
I've been trying with the Scale DSP component without good results,
the closest I can get is to actually scale the input waveform, but unfortunately it becomes also completely distorted when I watch it in the data recorder...
Thanks in advance for your time and patience with such newbie question.
cheers!
Sandro
DSP frequency generator amplitude
Moderator: Benj
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: DSP frequency generator amplitude
Hello Sandro,
Welcome to the forums. Can you attach what you have done so far and we will have a look for you and hopefully point you back in the right direction.
Welcome to the forums. Can you attach what you have done so far and we will have a look for you and hopefully point you back in the right direction.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: DSP frequency generator amplitude
Hi Benj,
thanks for your quick reply.
Here is my file attached.
Red potentiometer is the sine wave rate, and the blue one should be the sine wave amplitude control, from zero to unity gain.
I'm trying to use the Scale DSP component, have tried any macro within it, but without getting close to the desired behaviour.
I suspect I should do something to the blue potentiometer reading before using it with the Scale DSP, but can't figure out what to do.
many thanks for your help!
thanks for your quick reply.
Here is my file attached.
Red potentiometer is the sine wave rate, and the blue one should be the sine wave amplitude control, from zero to unity gain.
I'm trying to use the Scale DSP component, have tried any macro within it, but without getting close to the desired behaviour.
I suspect I should do something to the blue potentiometer reading before using it with the Scale DSP, but can't figure out what to do.
many thanks for your help!
- Attachments
-
- LFO.fcfx
- (14.02 KiB) Downloaded 153 times
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: DSP frequency generator amplitude
Hello,
It looks like the scale maths is going a bit strange for signed buffers in the simulator. I've changed the buffers to be unsigned and changed the parameters of the sine wave generator and now it is hopefully working as expected.
Let me know how you get on.
It looks like the scale maths is going a bit strange for signed buffers in the simulator. I've changed the buffers to be unsigned and changed the parameters of the sine wave generator and now it is hopefully working as expected.
Let me know how you get on.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: DSP frequency generator amplitude
Thanks Benj !
Will try it tonight,
thank you very much.
best
Sandro
Will try it tonight,
thank you very much.
best
Sandro
Re: DSP frequency generator amplitude
Hi Benj
the code was perfect, thank you very much.
I've also added an offset control, using a Sum DSP component... and it works!!
Now I'm trying to use one of the DSP buffers as a float variable,
please which would be the standard procedure to do so?
the code was perfect, thank you very much.
I've also added an offset control, using a Sum DSP component... and it works!!
Now I'm trying to use one of the DSP buffers as a float variable,
please which would be the standard procedure to do so?
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: DSP frequency generator amplitude
Hello,
Brilliant, glad it's working correctly for you now.
The easiest way is to use an DSP output component and read the value into a float variable. Once there you can do any floating point calculations required.
Brilliant, glad it's working correctly for you now.
The easiest way is to use an DSP output component and read the value into a float variable. Once there you can do any floating point calculations required.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel