Skip to content

Play your favorite instrument in the browser, with complex note intervals and scales

License

Notifications You must be signed in to change notification settings

createbits/playnote

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Playnote

Play your favorite instrument in the browser with support for scales and complex intervals.

import { init, scale, play, note, wait } from 'playnote'

init('/mp3/soundSprite.mp3').then(async () => {
  play(note('dSharp', 4))
  await wait(2000)
  play(scale('d', 'major').base(4).note(1))
  await wait(2000)
  play(scale('c', 'minor').base(4).notes([1, 3, 5]))
})

It uses howler.js to play the notes. If you need a sound sprite check out the piano sprite in the assets folder.

About

Play your favorite instrument in the browser, with complex note intervals and scales

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published