Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

Sorry, you do not have permission to ask a question, You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please type your username.

Please type your E-Mail.

Please choose an appropriate title for the post.

Please choose the appropriate section so your post can be easily searched.

Please choose suitable Keywords Ex: post, video.

Browse

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Logo Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Logo

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Navigation

  • Home
  • About Us
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • About Us
  • Contact Us
Home/ Questions/Q 1692

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Latest Questions

Author
  • 62k
Author
Asked: November 25, 20242024-11-25T10:30:09+00:00 2024-11-25T10:30:09+00:00

Discovering the WebAudio API & Making a Simple Synth

  • 62k

I work primarily as a web developer, but you might not know that I'm also a musician. I have a special appreciation for the creativity found in experimental electronic music. Recently I was curious about where audio tools for the web were at, and I was impressed by the HTML <audio> element, though I ran up against what I considered a pretty big shortcoming: it can't loop seamlessly.

That's what led me the WebAudio API. It's an API intended for people like me who have a little background in messing with sound and I had no idea it was out there. I quickly learned how to repeat an audio clip without the interruption in the loop provided by the standard <audio> element, and in the process I did some reading about WebAudio's other capabilities.

A Few WebAudio Offerings

WebAudio features a number of different types of audio sources; in the documentation I noticed an oscillator type and I was inspired to see what kind of web-based synthesizer I could make with the WebAudio API. My goal wasn't to make something with a keyboard for playing pop music, but something simpler, more suited to creating atmosphere or sound effects.

WebAudio uses a metaphor carried over from physical sound equipment that describes the flow of audio through a number of nodes connected in a designated order. In JavaScript, I set up a couple oscillator nodes and connected them to the WebAudio destination; it felt like the JavaScript equivalent of plugging instruments and effects units into a mixer. I added some other nodes like gain nodes to control volume at different points in the “circuit”, and convolution nodes to add reverb.

The controls for the synth? Simple HTML <input> elements. I was absolutely tickled to learn that a range input would stand in for a potentiometer in this WebAudio world. One of the reasons I left my synth visually unstyled is to emphasize the webbiness of it all—playing sounds involves yanking a bunch of browser-default sliders around and selecting from dropdown menus. It brings a smile to my face.

Introducing Dulce Baby

The final features of my synth, the Dulce Baby, include one oscillator with variable waveform, coarse tone control, and volume control, another oscillator that plays a drone and fine tone control, and a master gain for overall volume. The drone options are frequencies borrowed from Cousto's The Cosmic Octave: they're the frequencies of the planets in our solar system.

my web-based synthesizer

Time to Explore

Overall the WebAudio API is a very exciting discovery for me. It's inspired this start to a new series about experimenting with WebAudio. Today I haven't shown much process or code, but in the future this series will delve more into the nitty gritty. Read along for some creative coding and non-visual web design!

htmljavascriptwebdev
  • 0 0 Answers
  • 2 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

Sidebar

Ask A Question

Stats

  • Questions 4k
  • Answers 0
  • Best Answers 0
  • Users 2k
  • Popular
  • Answers
  • Author

    ES6 - A beginners guide - Template Literals

    • 0 Answers
  • Author

    Understanding Higher Order Functions in JavaScript.

    • 0 Answers
  • Author

    Build a custom video chat app with Daily and Vue.js

    • 0 Answers

Top Members

Samantha Carter

Samantha Carter

  • 0 Questions
  • 20 Points
Begginer
Ella Lewis

Ella Lewis

  • 0 Questions
  • 20 Points
Begginer
Isaac Anderson

Isaac Anderson

  • 0 Questions
  • 20 Points
Begginer

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help

Footer

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise

Querify Question Shop: Explore, ask, and connect. Join our vibrant Q&A community today!

About Us

  • About Us
  • Contact Us
  • All Users

Legal Stuff

  • Terms of Use
  • Privacy Policy
  • Cookie Policy

Help

  • Knowledge Base
  • Support

Follow

© 2022 Querify Question. All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.