The signal source is outputting unsigned bytes. The sample rate is 48k and
the tone is 1k. Something I missed before that helps explain your plot ...
the signal is rounded down to zero for all but the peak values, since
abs(x) < 1 can not be represented without scaling. Packed/unpacked refer to
bits of a digital signal. The tone is "analog", but you could think of it a
"packed" if your audio codec is PCM (raw samples). PCM is a valid codec.
It's what you find in a wav file. The problem you will run into is that any
lost or corrupted symbols will ruin the audio. So, you would need to add
framing/packetizing and error correction. Maybe someone else has a link to
an example that shows how this works in GR. The concepts are not specific
to GR.

On Tue, Jul 14, 2020 at 10:50 PM lannan jiang <[email protected]> wrote:

> Hi Jeff Long,
>    Thank you so much for your reply.
>
>    I understand the plot of the signal source now. I have the
> mpsk_stage6.grc running properly from the tutorial, and was able to compare
> the transmitting and receiving bit streams. I attached the grc file to this
> email. Additionally, could you please elaborate more on the byte output of
> the signal source? Are they packed? Unpacked?
>    Moreover, as you stated that i should encode an analog signal to data
> before transmission, so does that mean I also have to use codecs in order
> to transmit a tone?
>    My last question would be: if I were to transmit an mp3 file, which is
> already encoded, will i be able to recover the audio using audio decoders?
>
>   Thanks again for your help!
>
>    Lannan Jiang
>
>    ps: I apologize for my many questions as they may seem very basic. I am
> an engineering student and I am greatly thankful for your advice.
>
>
>
> ------------------------------
> *From:* Discuss-gnuradio <[email protected]>
> on behalf of Jeff Long <[email protected]>
> *Sent:* Tuesday, July 14, 2020 9:57 PM
> *To:* GNURadio Discussion List <[email protected]>
> *Subject:* Re: Question regarding transmission of a tone using QPSK
>
> A better explanation of why that plot is correct: if you sample a tone
> twice per cycle, you see [-1,1,-1,1,...]. Four times per cycle, looks like
> [-1,0,1,0,...]. Even though it looks discontinuous, it will sound like a
> tone when played through your sound card due to filtering in the audio
> software and/or hardware.
>
> That tutorial goes through the low level portions of the digital chain,
> including timing recovery. Framing, error correction and (optionally) an
> audio codec would all be in addition to the blocks shown in the tutorial.
>
> On Tue, Jul 14, 2020 at 9:03 PM Jeff Long <[email protected]> wrote:
>
> Depending on your sample rate and tone frequency, that plot would be
> correct.
>
> The analog signal needs to be encoded somehow as data before transmission.
> While you could feed an audio file 2 bits at a time into a QPSK modulator,
> it's pretty unlikely that you will be able to recover the audio. If you're
> thinking of "transmitting audio", look into audio codecs. If you're
> thinking of sending a wav file, you're really just sending packets. Either
> way, you will need a complete chain that includes error correction, clock
> recovery, etc.
>
> On Tue, Jul 14, 2020 at 3:58 PM lannan jiang <[email protected]> wrote:
>
> Hi all,
>     I have been following the PSK guided tutorial
> https://wiki.gnuradio.org/index.php/Guided_Tutorial_PSK_Demodulation . I
> am on the mpsk_stage6.grc, but I want to transmit a simple tone instead of
> a random source, so I added a signal source which generates a sine wave.
> However, here are my questions:
>
>    1.  I select the output of the signal source as bytes, and the time
> plot of it is attached. As you can see, the plot looks like bursts. But if
> I add an audio sink after signal source directly, I hear a constant tone.
> This does not make sense to me, as I thought I should hear discontinuous
> sound as the plot shows, could someone explain this?
>
>     2. With the first question being said,  I am using a constellation
> modulator (QPSK) that takes 2 bits/symbol.
>     How can I feed the output  of signal source ( a 16-bit audio file
> later on) to the constellation modulator properly?
>
>
>
> *Thanks in advance! Regards, *
> *Lannan Jiang*
>
>

Reply via email to