All Projects → nicolas-van → Sonant X

nicolas-van / Sonant X

Licence: zlib
Small JavaScript synthesizer library

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Sonant X

Awesome Music Production
A curated list of software, services and resources to create and distribute music.
Stars: ✭ 340 (+120.78%)
Mutual labels:  audio, sound, synthesizer
Audiokitsynthone
AudioKit Synth One: Open-Source iOS Synthesizer App
Stars: ✭ 1,258 (+716.88%)
Mutual labels:  audio, sound, synthesizer
Webaudiofont
Use full GM set of musical instruments to play MIDI and single sounds or effects. Support for reverberation and equaliser. No plugins, no Flash. Pure HTML5 implementation compatible with desktop and mobile browser. See live examples.
Stars: ✭ 600 (+289.61%)
Mutual labels:  audio, sound, synthesizer
Daisysp
A Powerful, Open Source DSP Library in C++
Stars: ✭ 291 (+88.96%)
Mutual labels:  audio, sound, synthesizer
Dx7 Supercollider
My accurate Yamaha DX-7 clone. Programmed in Supercollider.
Stars: ✭ 395 (+156.49%)
Mutual labels:  audio, sound, synthesizer
Romplayer
AudioKit Sample Player (ROM Player) - EXS24, Sound Font, Wave Player
Stars: ✭ 445 (+188.96%)
Mutual labels:  audio, sound, synthesizer
Soloud
Free, easy, portable audio engine for games
Stars: ✭ 1,048 (+580.52%)
Mutual labels:  audio, sound, synthesizer
Figaro
Real-time voice-changer for voice-chat, etc. Will support many different voice-filters and features in the future. 🎵
Stars: ✭ 80 (-48.05%)
Mutual labels:  audio, sound
Minibae
The platform-neutral Beatnik Audio Engine, Mini Edition (miniBAE) is an exceptionally mature, well-rounded, and reliable computer music and sound system specially customized for small-footprint and embedded applications.
Stars: ✭ 82 (-46.75%)
Mutual labels:  audio, sound
Beep.js
Beep is a JavaScript toolkit for building browser-based synthesizers.
Stars: ✭ 1,294 (+740.26%)
Mutual labels:  audio, synthesizer
Polaron
A DIY drum machine for the teensy microcontroller (hardware / software)
Stars: ✭ 99 (-35.71%)
Mutual labels:  audio, synthesizer
Soundable
Soundable allows you to play sounds, single and in sequence, in a very easy way
Stars: ✭ 78 (-49.35%)
Mutual labels:  audio, sound
Soundswitch
C# application to switch default playing device. Download: https://soundswitch.aaflalo.me/
Stars: ✭ 1,190 (+672.73%)
Mutual labels:  audio, sound
Ctag Straempler
An open source eurorack sample streaming and sound synthesis module.
Stars: ✭ 65 (-57.79%)
Mutual labels:  audio, synthesizer
Pizzicato
Library to simplify the way you create and manipulate sounds with the Web Audio API.
Stars: ✭ 1,296 (+741.56%)
Mutual labels:  audio, sound
Fas
C Pixels-based graphical audio synthesizer implemented as a WebSocket server
Stars: ✭ 100 (-35.06%)
Mutual labels:  audio, synthesizer
Dspi
Digital Signal Processing (or Pi). Adventures in making my Raspberry Pi 3 realtime, and running audio DSP.
Stars: ✭ 71 (-53.9%)
Mutual labels:  audio, synthesizer
Processing Sound
Audio library for Processing built with JSyn
Stars: ✭ 94 (-38.96%)
Mutual labels:  audio, sound
Wad
Web Audio DAW. Use the Web Audio API for dynamic sound synthesis. It's like jQuery for your ears.
Stars: ✭ 1,540 (+900%)
Mutual labels:  audio, sound
React Native Sound Recorder
Simplest Sound Recorder for React Native
Stars: ✭ 103 (-33.12%)
Mutual labels:  audio, sound

Sonant-X

Build Status npm

A very small JavaScript synthesizer library, suitable for small JavaScript demos or video games.

Sonant-X was created with video games' sound effects and music in mind, as well as size-restrained demos. It uses the Web Audio API.

Songs for Sonant-X can be composed using Sonant-X Live.

Sonant-X is a fork of js-sonant by Marcus Geelnard.

Example

Just test one of the available songs for Sonant-X Live, like this one: Synth 4k by m / Bits'n'Bites.

Installation

npm install --save sonantx

Usage

Song Generation

To generate a whole song, you'll first need a song in JSON format generated by Sonant-X Live. An example can be found by clicking here and choosing "Export JSON" in the menu on the left.

With that JSON song, we will be able to use the generateSong() function:

import * as sonantx from 'sonantx'
import mySong from './mySong.json'

const audioCtx = new AudioContext()

sonantx.generateSong(mySong, audioCtx.sampleRate).then((audioBuffer) => {
  const audioBufferSource = audioCtx.createBufferSource()
  audioBufferSource.buffer = audioBuffer
  audioBufferSource.connect(audioCtx.destination)
  audioBufferSource.start()
})

The generateSong() function can take multiple seconds before returning, depending on the length of your song. It is recommended to initialize your music at the startup of the application and keep a reference to the audio buffer.

Single sounds generation

To generate single sound (suitable for video games sound effects) you'll first need an instrument description in JSON format generated by Sonant-X Live. To get an example one, you can click here then choose one of the tracks of the sample song and click on the "Export" button on the top right of the application. You will then get a JSON description of the instrument used for the selected track.

With that instrument, we will be able to use the generateSound() function:

import * as sonantx from 'sonantx'
import myInstrument from './myInstrument.json'

const audioCtx = new AudioContext()

const midiNote = 67
const bpm = 120

sonantx.generateSound(myInstrument, midiNote, audioCtx.sampleRate, bpm).then((audioBuffer) => {
  const audioBufferSource = audioCtx.createBufferSource()
  audioBufferSource.buffer = audioBuffer
  audioBufferSource.connect(audioCtx.destination)
  audioBufferSource.start()
})

Single sound generation can be very fast but sounds can still be generated ahead of time if precise timing is very important for you.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].