Jump to content

Regeneration of ana rbitrary waveform


Recommended Posts

Posted

Hi,
  I'm generating a user drawed waveform (it can be half sine, with a square, than a triangle and so on all in a single waveform) and I need this waveform to be changed by the user without any pause between the old an the new wave.
The new wave MUST start at the end of the old one.
 As I understood making some tests, If I use regeneration mode (so I use the internal FIFO buffer) I have to stop, fill the buffer with the new wave and then restart and that cause an unwanted pause between waveforms. Because If I populate directly the buffer I will get a glitch having some old and some new values.

To avoid this behaviour I generate a fixed samplerate waveform (so I the new waveform is longer oor shorter I interpolate it) and loop regenerating and starting it every iteration.
The waveform MUST have a duration major than the generation cycle (that's why I duplicate waveform if not double than the cycletime)
In this way it seems to work as I expect but it doesn't seem a clean solution to me.
Any suggestion of how to improve my code?
(In the past I thought about manipulating the internal buffer use splitting it as a two part buffer, one for the old and one for the new wave but it wasn't possible)
Thank youSintesi_gnerazione_segnale.vi

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.