Code Monkey home page Code Monkey logo

p5.sound.js's Introduction

p5.sound.js

This repository was started during the 2023 p5.js sound fellowship. Please read the announcement for more details.

This repository will soon replace the previous version of the p5.sound library, which is currently hosted at https://github.com/processing/p5.js-sound.

p5.sound Fellow 2023: aarón montoya-moraga(@montoyamoraga), p5.Sound Fellow Mentor 2023: Kristin Galvin (@blechdom)

Scope of the project

This project is an update of the p5.sound.js library, with the following goals:

  • Code stability and readability
  • Updated and fewer dependencies
  • Only keeping the most used features
  • Deprecating the least used features

Usage

To use this library, make sure you have p5.js installed. Visit the p5.js website for more information and installation instructions.

Please let us know if you find any bugs or issues!

Comparison with the previous version of the library

Base classes

Name Previous name Dependencies Tone.js dependencies
audioContext - none none

Oscillators

Name Previous name Dependencies Tone.js dependencies
Oscillator - audioContext Add, Multiply, Scale
SinOsc - Oscillator
TriOsc - Oscillator
SawOsc - Oscillator
Noise - Oscillator

Effects

Name of class Previous name Dependencies Tone.js dependencies
BiquadFilter Filter Effect TODO
Delay - Effect TODO

Utilities

Name of class Previous name Dependencies Tone.js dependencies
AnalyzerFFT FFT audioContext none
Gain FFT audioContext none
Envelope FFT audioContext none

Currently broken / in progress

Name of class Previous name Dependencies Tone.js dependencies
AudioIn - audioWorklet/ TODO
SoundFile - audioWorklet/ TODO

Deprecations

Name of class Reason of deprecation
Convolver Efforts focused on simpler effects
MonoSynth Efforts focused on developing dependencies like Oscillator
Polysynth Built on top of MonoSynth, already deprecate
Part Musical class, and out of scope for p5.sound
Phrase Musical class, and out of scope for p5.sound
Score Musical class, and out of scope for p5.sound
SoundLoop Efforts focused on developing dependency SoundFile
userStartAudio Bad practice

Dependencies

After a fruitful discussion with the Tone.js team, we are keeping Tone.js as a dependency and updating this to the latest version 14.x.x.

Build instructions

To install the dependencies for building, please run this command.

npm install

To build the library, please run this command.

npm run build

p5.sound.js's People

Contributors

adityyax avatar coyarzun avatar montoyamoraga avatar qianqianye avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

p5.sound.js's Issues

test build of v0.0.1

please complete these tasks:

  • clone this repository in your machine
  • follow the build instructions on the README
  • run a local server on your machine
  • open the examples/ folder and let me know if the library it's working
  • please include which combination of operating system and web browser you are using:

operating systems:

  • Linux
  • MacOS
  • Windows

web browsers:

  • Chrome
  • Firefox
  • Opera
  • Safari

Enhance p5-Sound Documentation and Integration into the new p5.js Website

Increasing Access

The plan is to integrate p5-sound as a library into the rebuilt p5.js website, which is currently a work in progress https://p5js-wip.online/ . This integration will serve as a comprehensive learning resource for p5-sound. To implement this learning experience, the aim is to merge the p5-sound library documentation (reference) available at p5.js sound reference with the learning page at p5.js sound curriculum.

The overarching goal is to transform p5-Sound into a robust learning platform, equipped with comprehensive tutorials, notes, and documentation. By streamlining the learning experience and consolidating resources within the p5.js ecosystem, users can seamlessly explore and utilize p5.js Sound without the need to navigate disparate platforms or face accessibility challenges.

Most appropriate sub-area of p5.js?

  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Build Process
  • Unit Testing
  • Internalization
  • Friendly Errors
  • Other (specify if possible)

Feature request details

The documentation for p5-sound is currently hosted on GitBook. However, this platform's paid nature and potential limitations could cause issues in the future. Therefore, we're exploring alternative tech stacks, such as Docusaurus, for several reasons, not just one.

The idea is to provide users with an easy-to-use resource, eliminating the need to search elsewhere for learning materials related to p5.js

p5.SoundRecorder demo not working with versions after 0.9.0

Most appropriate sub-area of p5.js?

  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Build process
  • Unit testing
  • Internationalization
  • Friendly errors
  • Other (specify if possible)

p5.js version

1.9.1

Web browser and version

Firefox 124.0

Operating system

MacOSX

Steps to reproduce this

Steps:

  1. Copy example code from p5.SoundRecorder reference
  2. Paste into new sketch here is mine
  3. Run the sketch
  4. Click the canvas to record sound
  5. Record a snippet
  6. Stop recording by clicking canvas
  7. Errors in console: TypeError: arraySequence[channel] is undefined and Uncaught DOMException: BaseAudioContext.createBuffer: Length (0) is out of range
  8. Try to download file by clicking canvas
  9. Errors in console: undefined: undefined

Other Notes

  • I was able to fix it by switching my p5 version to 0.9.0, but why doesn't it work with the any versions after 0.9.0?
  • It is has the same problem in Chrome

FEAT: Adding a sidebar.

Increasing Access

image

Most appropriate sub-area of p5.js?

  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Build Process
  • Unit Testing
  • Internalization
  • Friendly Errors
  • Other (specify if possible)

Feature enhancement details

We Will make a new sidebar for the mobile view.

missing TimeLineSignal, needs to be adapted from Tone.js v0.10.0

our Envelope class depends on TimeLinesignal class from Tone.js v0.10.0,
and since our focus for p5.sound.js is to eliminate those dependencies.

status:

Can p5.sound.js Support Importing Audio in Base64 Format?

Increasing Access

This new feature could potentially increase access to p5.js by providing users with more flexibility in how they include audio files in their projects. By supporting the import of audio in base64 format, users may find it easier to embed audio directly within their JavaScript code, reducing the need for separate audio files and simplifying project distribution. This could be particularly beneficial for users who want to share small projects or prototypes without having to manage additional audio files. Additionally, it could lower the barrier to entry for beginners who may be unfamiliar with managing external assets, making it easier for them to get started with p5.js.

Most appropriate sub-area of p5.js?

  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Build Process
  • Unit Testing
  • Internalization
  • Friendly Errors
  • Other (specify if possible)

Feature request details

Support Importing Audio in Base64 Format

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.