MCPcopy Create free account
hub / github.com/LabSound/LabSound / filterFreqInSfxrUnits

Method filterFreqInSfxrUnits

src/extended/SfxrNode.cpp:1167–1175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1165 return OVERSAMPLING * 44100.0f * flurp(cube(sfxr) / 10);
1166}
1167float SfxrNode::filterFreqInSfxrUnits(float hz)
1168{
1169 if (hz >= 44100.0f)
1170 return 1.0f;
1171
1172 // if y = K x / (1 - x), then x = y / (y + K)
1173 float s3 = hz / (hz + (OVERSAMPLING * 44100.0f));
1174 return powf(s3, 1.0f / 3.0f);
1175}
1176
1177//------------------------------------------------------------------------
1178

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected