File:Sawtooth sampled.png

Summary

Description
English: A periodic sawtooth wave represented as both an analog curve and digital samples.
Date
Source Own work
 This plot was created with Matplotlib.
Category:PNG created with Matplotlib#Sawtooth%20sampled.png
Author Ldo

Generated with the following code:

import numpy as np
import matplotlib.pyplot as plt

frames_per_cycle = 16
freq = 2
nr_frames = frames_per_cycle * freq
phase = 0
audio = np.fromfunction(lambda y : (y /  frames_per_cycle + phase) % 1 - 0.5, (nr_frames,))

fig, ax = plt.subplots(nrows = 2)
ax[0].plot(np.linspace(0, freq, nr_frames), audio, "-")
ax[0].set_title("Analog")
ax[1].plot(np.linspace(0, freq, nr_frames), audio, "o")
ax[1].set_title("Digital")
plt.subplots_adjust(hspace = 0.5)
plt.show()

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

Category:CC-Zero#Sawtooth%20sampled.pngCategory:Self-published work
Category:Waveforms Category:Digital-analogue conversion Category:Images with Python source code
Category:CC-Zero Category:Digital-analogue conversion Category:Images with Python source code Category:PNG created with Matplotlib Category:Self-published work Category:Waveforms