This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### 0.25Hz LFOs ... | |
lfos = (synthio.LFO(rate=1/4, | |
scale=500.0, | |
once=False), | |
SimpleLFO(rate=1/4, | |
scale=500.0, | |
once=True), | |
SimpleLFO(rate=1/4, | |
waveform="square", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SimpleLFO: | |
LIBRARY = {"triangle": {"waveform": (0, 32767, 0, -32767), | |
"interpolate": True, "nowrap": False, "once": False}, | |
"square": {"waveform": (32767, -32767), | |
"interpolate": False, "nowrap": False, "once": False}, | |
"sine": {"waveform": tuple([round(32767.0 * math.sin(2 * math.pi * idx / 100)) for idx in range(100)]), | |
"interpolate": True, "nowrap": False, "once": False}, | |
"sawtooth": {"waveform": tuple([round(32767 - 2 * 32767 * idx / (20 - 1)) for idx in range(20)]), | |
"interpolate": True, "nowrap": False, "once": False}, |