Always-on computer music
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
807B

  1. from matplotlib import pyplot as plt
  2. import numpy as np
  3. detune_max = 10
  4. x = np.linspace(0, 1)
  5. oscillator_level = x**4
  6. noise_level = 1 - (x**2)
  7. qfactor = np.exp(-x * 10)
  8. detune = (1 - x) * detune_max
  9. subosc_level = 1 - (x - .5)**2
  10. distortion = (1 - x)**2
  11. plt.subplot(421)
  12. plt.plot(x, oscillator_level)
  13. plt.xlabel("x")
  14. plt.ylabel("Oscillator level")
  15. plt.subplot(422)
  16. plt.plot(x, noise_level)
  17. plt.xlabel("x")
  18. plt.ylabel("Noise level")
  19. plt.subplot(423)
  20. plt.plot(x, qfactor)
  21. plt.yscale("log")
  22. plt.xlabel("x")
  23. plt.ylabel("Q factor")
  24. plt.subplot(424)
  25. plt.plot(x, detune)
  26. plt.xlabel("x")
  27. plt.ylabel("Detune")
  28. plt.subplot(425)
  29. plt.plot(x, subosc_level)
  30. plt.xlabel("x")
  31. plt.ylabel("Subosc level")
  32. plt.subplot(426)
  33. plt.plot(x, distortion)
  34. plt.xlabel("x")
  35. plt.ylabel("Distortion")
  36. plt.tight_layout()
  37. plt.show()