hornc / musysim

Simulator for the early music synthesis programming language: MUSYS.
https://esolangs.org/wiki/MUSYS
GNU General Public License v3.0
7 stars 1 forks source link

Set *control-srate* to *sound-srate* to sync envelopes #8

Closed hornc closed 2 years ago

hornc commented 3 years ago

Prevents clicking over longer output by making sure the *control-srate* (used for (env)) is the same as *sound-srate* (used for (osc)).

By default they were sound: 44100 vs. control: 2205, which is why envelopes would noticeably creep out of sync over time (~50s in to a supposedly synchronised osc + env shaper combination).

Closes #7 replaces / Closes #6

resolves #1

Tested with the example that showed de-sync at >~ 50s:

./musysim.py examples/random-tone-rows2.musys; ./sofkasim.py | ny

perfectly in sync over the full 3m35s duration.

test-env001.musys (one tone with 3 envelopes) waveform: image

hornc commented 3 years ago

This will probably be superseded by (~#9~) #10 The control rate should be less than the sample rate - set it to the highest resolution possible for Musys. Will need to confirm the rates and range allowed by T3.

Update:

Leo is interrupted by a hardware clock at a rate which may be varied between 0.25 Hz and 16 KHz under program control. In a MUSYS program the rate is controlled by the pseudo-device T3

doi:10.1002/spe.4380030410

hornc commented 2 years ago

see #10 for current progress on this branch