Re: Gnuradio: SineWave generator python block choppy audio out

2021-05-26 Thread Mitja kocjančič
both yours and Maruc solutions work very well, didn't spot any visual difference between them, so thank you both V V sre., 26. maj 2021 ob 18:50 je oseba Achilleas Anastasopoulos < anas...@umich.edu> napisala: > Hi all, > > I do not think that the proposed algorithm by Marcus is the correct way

Re: Gnuradio: SineWave generator python block choppy audio out

2021-05-26 Thread Mitja kocjančič
although later testing shows that yours doesn't flicker like Markuc does when changing frequency or sample rate on the fly V V sre., 26. maj 2021 ob 19:08 je oseba Mitja kocjančič napisala: > both yours and Maruc solutions work very well, didn't spot any visual > difference between them, so

Re: Gnuradio: SineWave generator python block choppy audio out

2021-05-26 Thread Achilleas Anastasopoulos
Hi all, I do not think that the proposed algorithm by Marcus is the correct way to implement this block, because it assumes that the frequency has remained the same throughout the life of the block! The correct way is to keep a state variable (say, "self.phase") that is initialized to 0 and

Re: Gnuradio: SineWave generator python block choppy audio out

2021-05-26 Thread Marcus Müller
err Oh! I shouldn't have answered in a hurry, sorry! The method self.nitems_written(0) gives you the items your block has already produced, so that at each call to work() the sine continues exactly where it left off. My apologies for the confusion this caused, Marcus On 26.05.21 13:06, Mitja

Re: Gnuradio: SineWave generator python block choppy audio out

2021-05-26 Thread Mitja kocjančič
Thanks you very much the reason I use gnuradio 3.7 is because some OOT modules gr-rftap https://github.com/rftap/gr-rftap gr-rds (don't know about this one but probably would work on 3.9): https://github.com/bastibl/gr-rds do not work on gnuradio 3.9 (rftap doesn't even work on 3.8) and I am

Re: Gnuradio: SineWave generator python block choppy audio out

2021-05-25 Thread Marcus Müller
Hi Mitja! Great to have you here :) Couple of things up front: 1. This is GNU Radio 3.7. Especially if you want to implement things in Python blocks, 3.8 or later is a *must*. GNU Radio 3.7 is really just in legacy keepalive mode, not actively developed. Please update to GNU Radio 3.8 or

Gnuradio: SineWave generator python block choppy audio out

2021-05-25 Thread Mitja kocjančič
for testing something I am trying to develop my own SineWave generator using python block in gnuradio the block is here """ Embedded Python Blocks: Each time this file is saved, GRC will instantiate the first class it finds to get ports and parameters of your block. The arguments to __init__