1.1.2 • Published 2 years ago

react-guitar-sound v1.1.2

Weekly downloads
11
License
MIT
Repository
github
Last release
2 years ago

React-Guitar-Sound · npm version

A React Hook to play sound with react-guitar.

See https://react-guitar.com for a live demo.

For the full documentation go to the root README.

Edit quizzical-dawn-0hzuq

Usage

npm i react-guitar react-guitar-sound react-guitar-tunings
import React, { useMemo } from 'react'
import { render } from 'react-dom'
import Guitar from 'react-guitar'
import { standard } from 'react-guitar-tunings'
import useSound from 'react-guitar-sound'

function SampleGuitarWithSound() {
  const strings = useMemo(() => [0, 1, 2, 2, 0, -1], [])
  const { play, strum } = useSound({ fretting: strings, tuning: standard })

  return <Guitar strings={strings} onPlay={play} />
}

render(<SampleGuitarWithSound />, document.getElementById('root'))

Developing

  • yarn start will watch and rebuild.
  • yarn build will generate the production scripts under the dist folder.
1.1.2

2 years ago

1.1.0

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.12.0

3 years ago

0.11.2

4 years ago

0.11.1

4 years ago

0.11.0

4 years ago