Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overview of modified/deprecated functions from previous p5.sound? #45

Open
ffd8 opened this issue Dec 17, 2024 · 2 comments
Open

Overview of modified/deprecated functions from previous p5.sound? #45

ffd8 opened this issue Dec 17, 2024 · 2 comments

Comments

@ffd8
Copy link

ffd8 commented Dec 17, 2024

Congrats @ogbabydiesal and all involved in this revamp of p5.sound! I had last followed the refresh in 2023, but hadn't been following updates until the processing.org announcement today. I have a few small/big questions:

  • is there an overview of the major deprecated/removed/modified functions from previous p5.sound? I've read the Medium announcement, checked the references, checked editor examples, but can't find a sort of migration explainer for updating. While attempting to implement latest p5.sound into P5LIVE, the technique used for audio-reactivity the past 6 years stopped working, because I think plenty of changes occurred to both p5.audioIn(), p5.FFT() (audioIn complains about missing methods like getLevel() and FFT complains about setInput() and logAverages()... would be very helpful if the FES for any broken p5.sound functions pointed to that resource, since it's likely to happen a lot for any sketches older than 2024. Here's my audio-reactive template – any insights for updating it would be appreciated.

  • name is the same to before, however the versioning was reset, currently at 0.10.0 – guessing this will be an issue as it develops or reaches a 1.0 status? The last release of the old p5.sound made it to 1.0.1 (or 1.0.3?). Using 2.0.0+ would make it more clear that functions have been dropped entirely and others work differently than before?

  • would be helpful if the minified version included a similar timestamp/version header for keeping track of which version one adds to a project:
    /** [p5.sound] Version: 1.0.1 - 2021-05-25 */

  • FYI, finding false references, which is likely known. I was attempting to read up on the difference of how the p5.FFT would work – wished there were more tiny demos for some of the methods that previous version had, then when trying to get the overview, saw that things like polySynth() are still active, yet causes an error as the method doesn't exist (which tells me new p5.sound is used on refs page). Maybe there's plans to reimplement polySynth and others?

  • an overview of all classes and what they're used for, similar to top of [old references for p5.sound(https://archive.p5js.org/reference/#/libraries/p5.sound) would be super helpful for students and total beginners. Maybe it's an aspect of the new website, or something to add to the lib.

Edit: just realized some functions like audioIn() have drastically different behaviors that could cause some big speaker/sound/feedback issues when loading any prior sketches. In the previous version, using the mic didn't sent it to the output, ie with monitoring – it was silent. Just realized new version instantly plays out what comes in from the mic (haha heard weiird scratching sounds when hand brushed passed mic):

mic = new p5.AudioIn()
mic.start() // old version was no prob, new version causes feedback

Thanks for taking aspects into consideration, particularly a guide for migrating to this version.

@ogbabydiesal
Copy link
Collaborator

hey @ffd8

  • overview of deprecated features (grayed out) can be found here, we should probably make this more visible somewhere!: https://docs.google.com/spreadsheets/d/1djPAqeMPHvbevpk_b_VBPjgAEZzjwQd0Pye04EIzvMI/edit?gid=1571497897#gid=1571497897
    one of the goals in the revamp was to deprecate some duplicate functionality, so while audioIn() has the getLevel() method, so does the amp class which is dedicated for that purpose. However, one might make the case that it is an important feature of the p5.sound.js library as a beginner friendly audio visualization tool 🤔, would be easy to add back in... forFFT() I figured setInput() was duplicating functionality in the connect disconnect method, and logAverages() would be a more advanced feature that would warrant someone reaching for Tone.js -
  • makes sense about versioning I'll defer to @limzykenneth and @davepagurek on this topic
  • for the minified versioning same as above
  • yes I noticed this the other day as well, the references for the old library are still up and I have to go through and remove them, no more polysynth
  • i believe the documentation will look as it did in the old site, with a description of each class and it's methods with example sketch
  • as for the AudioIn() feedback issue, good catch, I'll revert that back to original functionality!

let's chat about the deprecated methods in FFT and AudioIn some more

@davepagurek
Copy link
Collaborator

Btw there's an issue here processing/p5.js-website#636 you can follow for the old methods still showing up on the site!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants