npm.io
0.0.8 • Published 8 years ago

ngx-oscillator

Licence
—
Version
0.0.8
Deps
1
Size
234 kB
Vulns
0
Weekly
0

NgxOscillator

ngx-oscillator is an angular wrapper for the javascript oscillator.

Installation

To install using npm :

npm i ngx-oscillator

To install using yarn : yarn add ngx-oscillator

Usage

Import the NgxOscillatorModule in your root module :

import { NgxOscillatorModule } from 'ngx-oscillator';

@NgModule({
  declarations: [AppComponent],
  imports: [NgxOscillatorModule],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule {}

Use the OscillatorService to play notes :

import { OscillatorService, notes } from 'ngx-oscillator';

constructor(private _oscillatorService: OscillatorService) {}

playSomeNote() {
  this._oscillatorService.playNote(notes.A, 5);
}