Add example sketches for all p5.Amplitude methods in p5.Sound reference
Increasing Access
The p5.Sound reference pages currently lack live examples. This issue is specifically for the p5.Amplitude class. Without examples, it’s hard for users to see how each method behaves in a sketch.
Add one or more simple example sketches demonstrating each of the following p5.Amplitude methods:
- [ ]
getLevel() - [ ]
setInput() - [ ]
smooth() - [ ]
toggleNormalize()
You can consult the API details here for guidance: https://p5js.org/reference/p5.sound/p5.Amplitude/
Feel free to add one example or multiple examples for any of these methods and submit a PR..
Most appropriate sub-area of p5.js?
Reference
Feature request details
A pull request that updates the p5.sound reference documentation with at least one working code example per method, so that users can immediately copy, paste, and run each sketch to learn how p5.Amplitude works.
Hey @perminder-17, I would be interested in contributing to this issue with relevant examples for the docs. Can you please assign it to me?
Hi @0xs1r4t, I’m assigning this issue to you. Are you interested in documenting all four functions i.e. getLevel(), setInput(), smooth(), and toggleNormalize() or would you prefer to contribute to a specific one? Let me know your preference.
@perminder-17, I would be interested in documenting all four functions. I noticed that one example exists for both setInput() and getLevel(), but not for toggleNormalize() and smooth(). Should I just add examples for the later two, or should I also rework the examples for the earlier two functions?
@perminder-17, I would be interested in documenting all four functions. I noticed that one example exists for both setInput() and getLevel(), but not for toggleNormalize() and smooth(). Should I just add examples for the later two, or should I also rework the examples for the earlier two functions?
I guess you are correct about the functions setInput() and getLevel() the examples are already documented but the issue is with the beta site which works on 2.x versions. https://beta.p5js.org/reference/p5.sound/
Have a look here, and you can see only few are documented. If you feel to rework and add more description, feel free to add them or you can probably focus more on adding example sketches and descriptions.
Oh okay cool, I'll which one works best and then create a PR.