Browse Source

Developing more stuff

tags/kitchen
Pete Shadbolt 3 years ago
parent
commit
9efcac3807
2 changed files with 47 additions and 2 deletions
  1. +45
    -0
      curves.py
  2. +2
    -2
      fm.scd

+ 45
- 0
curves.py View File

@@ -0,0 +1,45 @@
from matplotlib import pyplot as plt
import numpy as np

detune_max = 10
x = np.linspace(0, 1)
oscillator_level = x**4
noise_level = 1 - (x**2)
qfactor = np.exp(-x * 10)
detune = (1 - x) * detune_max
subosc_level = 1 - (x - .5)**2
distortion = (1 - x)**2

plt.subplot(421)
plt.plot(x, oscillator_level)
plt.xlabel("x")
plt.ylabel("Oscillator level")

plt.subplot(422)
plt.plot(x, noise_level)
plt.xlabel("x")
plt.ylabel("Noise level")

plt.subplot(423)
plt.plot(x, qfactor)
plt.yscale("log")
plt.xlabel("x")
plt.ylabel("Q factor")

plt.subplot(424)
plt.plot(x, detune)
plt.xlabel("x")
plt.ylabel("Detune")

plt.subplot(425)
plt.plot(x, subosc_level)
plt.xlabel("x")
plt.ylabel("Subosc level")

plt.subplot(426)
plt.plot(x, distortion)
plt.xlabel("x")
plt.ylabel("Distortion")

plt.tight_layout()
plt.show()

+ 2
- 2
fm.scd View File

@@ -15,10 +15,10 @@ s.waitForBoot {
car = SinOsc.ar(
(freq * carPartial) + mod,
0,
mul
1
);

Out.ar(0, Disintegrator.ar(SinOsc.ar(440), 0.5));
Out.ar(0, Disintegrator.ar(car, MouseX.kr(0, 1)));
});

module.load(s);


Loading…
Cancel
Save