Skip to content
This repository has been archived by the owner on Feb 8, 2022. It is now read-only.

Commit

Permalink
Merge branch 'master' of https://github.com/mikeanth-dev/pydos
Browse files Browse the repository at this point in the history
  • Loading branch information
Mircea Anton committed Mar 15, 2021
2 parents a4e83af + 0532f8b commit 618362f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This emulates the process of converting digital data into an analog signal, send

### The "how"

By taking a look at `config.py` under `src/`, we can notice some key components that help us building the sine wave:
By taking a look at `config.py` under `src/`, we can notice some key components that help us build the sine wave:

1. `sample_rate = 44100 # [Hz]`: the sample rate of the wave
2. `bit_duration = 1 # [s]`: the time duration allocated for each bit into the output signal
Expand All @@ -43,13 +43,13 @@ bits = [1, 0, 1, 1]

The program will generate the following sine wave:

<img src="res/encoded_signal.png" alt="drawing" width="450"/>
<img src="res/encoded_signal.png" alt="drawing" width="650" height="250"/>

We can easily observe the original bit array within our signal, since the 2 used frequencies are far apart enough for it to be noticeable.

Next, this signal is played by the sound card and recorded back via the microphone. The previous wave, recorded by a my microphone looks like this:

<img src="res/recorded_signal.png" alt="drawing" width="450"/>
<img src="res/recorded_signal.png" alt="drawing" width="650" height="250"/>

We can notice quite a bit of noise and variance, but it is still easily recognizable.

Expand Down

0 comments on commit 618362f

Please sign in to comment.