All Projects → oliviachang29 → react-native-tone

oliviachang29 / react-native-tone

Licence: other
🎶 Generate sine waves with frequency and amplitude (iOS only).

Programming Languages

objective c
16641 projects - #2 most used programming language
C#
18002 projects
java
68154 projects - #9 most used programming language
ruby
36898 projects - #4 most used programming language
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to react-native-tone

glsl-tone-map
A collection of tone mapping functions available both as ES modules strings and as GLSL files for use with glslify.
Stars: ✭ 116 (+582.35%)
Mutual labels:  tone
Tone.js
A Web Audio framework for making interactive music in the browser.
Stars: ✭ 11,352 (+66676.47%)
Mutual labels:  tone
Music-Genre-Classification
Genre Classification using Convolutional Neural Networks
Stars: ✭ 27 (+58.82%)
Mutual labels:  tone
Pigment.O
Krita - Plugin - Color Picker and Mixer
Stars: ✭ 75 (+341.18%)
Mutual labels:  tone
metro
Speed Trainer Metronome
Stars: ✭ 26 (+52.94%)
Mutual labels:  tone

react-native-tone 🎶

Simple library for playing tones in React Native (iOS only). Bridge of https://github.com/picciano/iOS-Tone-Generator

⚠️ Note: this library is not actively maintained.

Getting started

yarn add react-native-tone

or

npm install react-native-tone --save
react-native link react-native-tone

Usage

Generates simple sine wave, specify a frequency and amplitude. Play sound indefinitely or for a specified time interval.

import RNTone from 'react-native-tone';

// In constructor
RNTone.initWithChannels(numChannels, volume) // initalize
// volume ranges from 0.01-0.25

RNTone.play() // play tone, indefinitely
RNTone.playForDuration(seconds) // play specified time interval (in seconds)
RNTone.stop() // stop tone

// Example
RNTone.initWithChannels(2, 0.25) // initalize two channels at full volume
RNTone.setChannelFrequencies([440, 220]) // A4 and A3
RNTone.playForDuration(0.5) // play for half a second

Todo

  • Remove clicking sound at beginning and end of tone

P.S. I'm still still learning Obj-C and bridging, so if anyone would like to help with this module they are very welcome!

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].