README.md: Fix the FM example to clear amp[VEL]. #221
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The example that plays a couple of FM tone by directly configuring the individual sine oscillators had been broken since we made the change that unspecified ControlCoefficients are left unchanged (rather than being cleared to zero). Because FM component oscs do not see the velocity of their parent note, it's important to include
amp={'vel': 0}
(to clear the default weight of 1), otherwise the operator oscs will always have zero output, because they see a velocity of zero.Doing this, I realize that
ratio
is really just a special case of ControlCoefficients. Instead ofratio=0.2
(and the associated explanation), that's really justfreq={'const': 52.326, 'note': 1}
, i.e. it follows the note frequency, but relative to 0.2 x the default frequency (of 261.63 Hz). We could change that. Would it make things easier to understand?