Gepponline Posted 45 minutes ago Report Posted 45 minutes ago 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 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.