Skip to content

p5.sound import issue #23

Closed
Closed

Description

@qdhoward

Hi. I include import "p5/lib/addons/p5.sound" in sketch.js and I get a compile error Line 21: 'loadSound' is not defined no-undef.
Line 21 is: let song = loadSound("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/src/test.ogg");
Is there anything I did wrong?
Thank you

Activity

  1. slin12 commented on May 7, 2018

    @slin12

    Have you tried p.loadSound?

  2. qdhoward commented on May 7, 2018

    @qdhoward
    Author

    I have tried everything including p.loadSound, p5.loadSound(import p5 from 'p5'). I give up and decide to use other library. I have to say p5 compatibility with front-end framework is not very good.

  3. toroduque commented on Jul 26, 2018

    @toroduque

    I had a very similar issue with p5.dom.js. Try importing it from the react-p5-wrapper module folder. It worked for me:

    import "react-p5-wrapper/node_modules/p5/lib/addons/p5.dom";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions