From 2bb3c9a119832d73fc008cdf1a32b51576ebc858 Mon Sep 17 00:00:00 2001 From: Don Cross Date: Wed, 12 Feb 2025 13:00:28 -0500 Subject: [PATCH] Env doc: explain polyphony, copyedit. --- Env.md | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/Env.md b/Env.md index 623da23..5261fe1 100644 --- a/Env.md +++ b/Env.md @@ -5,7 +5,9 @@ Env is a combination pitch detector and envelope follower. Given an input audio signal, Env tries to detect the loudness and musical pitch of a single tone in it. -Env is based on the pitch detector and envelope follower in the Surge XT [TreeMonster](https://library.vcvrack.com/SurgeXTRack/SurgeXTFXTreeMonster) module. Thanks to [BaconPaul](https://github.com/baconpaul/) for ideas and encouragement in this project! +Env is mostly based on the pitch detector and envelope follower in the Surge XT [TreeMonster](https://library.vcvrack.com/SurgeXTRack/SurgeXTFXTreeMonster) module. Both Env and TreeMonster "naively" measure pitch frequency based on time intervals when the filtered waveform's voltage passing through zero. In other words, both count samples between zero-crossings and smooth out the result over time. Env uses a different prefilter (Cytomic with FREQ / RES) than TreeMonster (LO CUT / HI CUT). But the THRESH and SPEED controls are lifted directly from TreeMonster. + +Thanks to [BaconPaul](https://github.com/baconpaul/) of Surge XT for the idea for, and support of, this project! ## Controls @@ -15,9 +17,34 @@ From left to right, each control consists of a CV input port, a smaller attenuverter knob, and a larger control knob. * **THRESH**: The amplitude threshold of the input signal needed to trigger pitch detection. The range is −94 dB to 0 dB, with a default of −24 dB. Adjust as needed to report pitch for valid notes while rejecting any low-level noise while notes are not playing. -* **SPEED**: How quickly to slew reported output pitches. Lower values result in more stable note detection, but with a trombone-like glide through note changes. Faster values track changes in notes more quickly, but is more susceptible to unwanted variations of pitch. +* **SPEED**: How quickly to slew reported output pitches. Lower values result in more stable note detection, but with a trombone-like glide through note changes. Faster values track changes in notes more quickly, but are more susceptible to unwanted variations of pitch (which can sound like birds twittering). * **FREQ**: Adjusts the center frequency of a bandpass prefilter that helps narrow in on the intended pitch range of the notes being detected. This can help reject unwanted harmonics from the input audio. -* **RES**: Adjusts the resonance of the prefilter. Higher resonance can help squeeze the passband closer to the expected range of notes in the input audio. Too high a value can cause erroneous detection of notes at or near the center frequency. +* **RES**: Adjusts the resonance of the bandpass prefilter. Higher resonance can help squeeze the passband closer to the expected range of notes in the input audio. Too high a value can cause erroneous detection of notes at or near the center frequency. + +## Polyphony + +Env is fully polyphonic, meaning all 5 of its input ports (AUDIO and the 4 CV input ports) allow +independent control of up to 16 channels in the ENV and V/OCT output ports. +Each channel of output represents a completely independent combined pitch detector and envelope follower. + +Whichever of the 5 input ports has the highest number of channels (1..16) determines the +number of channels in the two output ports ENV and V/OCT. +Any of the remaining 4 input ports having fewer channels will "clone" their final channel's +voltage across all the required output channels. + +For example, if a cable connected to AUDIO has 2 channels (stereo), +and a cable connected to the FREQ CV input port has 1 channel, +and there are no other input cables, +then the outputs ENV and V/OCT will each have 2 channels. +Because in this example the FREQ CV signal has only 1 channel, that one channel +will be used to satisfy the second channel also. + +If instead you used a 2-channel FREQ CV input cable, each of the two output channels +in the ENV and V/OCT ports would set their respective prefilters using the two CV voltages, +one for each channel in the output. + +This system of polyphony treats all the 5 input ports equally, using the rules explained above. As another example, you can put in 1-channel (mono) AUDIO +but perform up to 16 simultaneous pitch/env operations, all with different settings, so long as at least one of your CV input ports has a polyphonic cable attached to it. ## Audio Input @@ -39,4 +66,4 @@ there will be one channel of output for each channel of input on the AUDIO port. ## Attenuverters -Env supports [low-sensitivity attenuverters](LowSensitivityAttenuverterKnobs.md). +Env supports [low-sensitivity mode](LowSensitivityAttenuverterKnobs.md) for all four attenuverter knobs.