Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@errozero/beatstepper

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@errozero/beatstepper - npm Package Compare versions

Comparing version 1.0.7 to 1.0.8

src/Beatstepper.ts

8

package.json

@@ -7,5 +7,8 @@ {

},
"version": "1.0.7",
"type": "module",
"version": "1.0.8",
"description": "",
"main": "dist/Beatstepper.js",
"exports": {
".": "./dist/index.js"
},
"scripts": {

@@ -17,3 +20,2 @@ "test": "echo \"Error: no test specified\" && exit 1",

"license": "MIT",
"types": "dist/index.d.ts",
"prepublish": "tsc",

@@ -20,0 +22,0 @@ "keywords": [

@@ -13,7 +13,7 @@ # Beatstepper

```javascript
import Beatstepper from '@errozero/beatstepper';
```typescript
import { Beatstepper, IBeatstepperCallbackData } from '@errozero/beatstepper';
const ctx = new AudioContext();
const callback = data => {
const callback = (data:IBeatstepperCallbackData) => {
console.log('Step!', data);

@@ -26,3 +26,3 @@ };

Now that is setup, call the start method to begin scheduling:
```javascript
```typescript
beatstepper.start()

@@ -94,4 +94,4 @@ ```

## Metronome example
```javascript
import Beatstepper from '@errozero/beatstepper';
```typescript
import { Beatstepper, IBeatstepperCallbackData } from '@errozero/beatstepper';

@@ -102,3 +102,3 @@ const context = new AudioContext();

const callback = data => {
const callback = (data:IBeatstepperCallbackData) => {
const freq = (data.step % stepsPerBeat == 0) ? 880 : 440;

@@ -105,0 +105,0 @@ const oscillator = context.createOscillator();

@@ -27,4 +27,4 @@ {

/* Modules */
"module": "commonjs", /* Specify what module code is generated. */
// "rootDir": "./", /* Specify the root folder within your source files. */
"module": "ES6", /* Specify what module code is generated. */
"rootDir": "./src", /* Specify the root folder within your source files. */
// "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */

@@ -31,0 +31,0 @@ // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc