Skip to content

Commit

Permalink
chore(release): 4.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
dlepaux committed Mar 30, 2024
1 parent 7f4d63b commit 19637ec
Show file tree
Hide file tree
Showing 8 changed files with 1,446 additions and 970 deletions.
6 changes: 3 additions & 3 deletions bin/build/github-pages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ eslint testing/**.ts
eslint tests/**.ts
eslint processor/**.ts

ts-node --esm --skipProject ./github-pages/favicons-generator.ts
ts-node --esm --skipProject ./github-pages/sitemap-generator.ts
ts-node --esm --skipProject ./github-pages/meta-injector.ts
ts-node github-pages/favicons-generator.ts
ts-node github-pages/sitemap-generator.ts
ts-node github-pages/meta-injector.ts

rm ./docs/favicons/index.html
cp -r ./github-pages/public/* ./docs/
10 changes: 10 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [4.0.2](https://github.com/dlepaux/realtime-bpm-analyzer/compare/v4.0.1...v4.0.2) (2024-03-30)

### [4.0.1](https://github.com/dlepaux/realtime-bpm-analyzer/compare/v4.0.0...v4.0.1) (2024-03-30)


### Bug Fixes

* add bash interpreter to script ([3e78924](https://github.com/dlepaux/realtime-bpm-analyzer/commit/3e7892420ec2b8ff2fd965c1026e4b4ec574819a))
* replace static skipForwardIndexes to dynamic computation based on sampleRate ([9c478b1](https://github.com/dlepaux/realtime-bpm-analyzer/commit/9c478b1c00dec91ea2304dee34d46cfa016a1680))

## [4.0.0](https://github.com/dlepaux/realtime-bpm-analyzer/compare/v3.3.0...v4.0.0) (2024-02-06)


Expand Down
2,351 changes: 1,409 additions & 942 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "realtime-bpm-analyzer",
"version": "4.0.0",
"version": "4.0.2",
"description": "This dependency free library can analyze the BPM (Tempo) of an audio/video node or any stream in realtime on your browser",
"author": {
"name": "David Lepaux",
Expand Down
40 changes: 20 additions & 20 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@

Welcome to Realtime BPM Analyzer, a powerful and easy-to-use TypeScript/JavaScript library for detecting the beats-per-minute (BPM) of an audio or video source in real-time.

- [Getting started](#getting-started)
- [Features](#features)
- [Usages](#usages)
- [Player strategy](#player-strategy)
- [Continuous Analysis strategy](#continuous-analysis-strategy)
- [Local/Offline strategy](#localoffline-strategy)
- [Development](#development)
- [Unit Tests](#unit-tests)
- [Dataset Testing](#dataset-testing)
- [New features](#new-features)
- [Technical Documentation](#technical-documentation)
- [Tests & Coverage](#tests--coverage)
- [Commercial Usage](#commercial-usage)
- [Roadmap](#roadmap)
- [Credits](#credits)
- [Realtime BPM Analyzer](#realtime-bpm-analyzer)
- [Getting started](#getting-started)
- [Features](#features)
- [Usages](#usages)
- [Player strategy](#player-strategy)
- [Continuous Analysis strategy](#continuous-analysis-strategy)
- [Local/Offline strategy](#localoffline-strategy)
- [Development](#development)
- [Unit Tests](#unit-tests)
- [Dataset Testing](#dataset-testing)
- [New features](#new-features)
- [Technical Documentation](#technical-documentation)
- [Commercial Usage](#commercial-usage)
- [Roadmap](#roadmap)
- [Credits](#credits)

## Getting started

Expand Down Expand Up @@ -65,7 +65,7 @@ This example shows how to deal with a simple `audio` node.

2. Create the AudioWorkletProcessor with `createRealTimeBpmProcessor`, create and pipe the filters to the AudioWorkletNode (`realtimeAnalyzerNode`).
```javascript
import { createRealTimeBpmProcessor } from 'realtime-bpm-analyzer';
import { createRealTimeBpmProcessor, getBiquadFilter } from 'realtime-bpm-analyzer';

const realtimeAnalyzerNode = await createRealTimeBpmProcessor(audioContext);

Expand All @@ -80,10 +80,10 @@ source.connect(audioContext.destination);

realtimeAnalyzerNode.port.onmessage = (event) => {
if (event.data.message === 'BPM') {
console.log('BPM', event.data.result);
console.log('BPM', event.data.data.bpm);
}
if (event.data.message === 'BPM_STABLE') {
console.log('BPM_STABLE', event.data.result);
console.log('BPM_STABLE', event.data.data.bpm);
}
};
```
Expand Down Expand Up @@ -120,10 +120,10 @@ source.connect(audioContext.destination);

realtimeAnalyzerNode.port.onmessage = (event) => {
if (event.data.message === 'BPM') {
console.log('BPM', event.data.result);
console.log('BPM', event.data.data.bpm);
}
if (event.data.message === 'BPM_STABLE') {
console.log('BPM_STABLE', event.data.result);
console.log('BPM_STABLE', event.data.data.bpm);
}
};
```
Expand Down
1 change: 0 additions & 1 deletion src/analyzer.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {descendingOverThresholds} from './utils';
import type {
Peaks,
ValidPeaks,
PeaksAndThreshold,
BpmCandidates,
Interval,
Expand Down
4 changes: 2 additions & 2 deletions tests/lib/analyzer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ describe('Analyzer - Integration tests', () => {
it('should be able to detect the BPM from an AudioBuffer', async function () {
this.timeout(30 * 1000);
const audioContext = new AudioContext();
const response = await fetch('/tests/fixtures/bass-test.wav');
const buffer = await response.arrayBuffer();
const request = await fetch('/tests/fixtures/bass-test.wav');
const buffer = await request.arrayBuffer();
const audioBuffer = await audioContext.decodeAudioData(buffer);
const tempos = await analyzeFullBuffer(audioBuffer);
const tempo = analyzer.getTopCandidate(tempos);
Expand Down
2 changes: 1 addition & 1 deletion web-dev-server.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {esbuildPlugin} from '@web/dev-server-esbuild';

export default {
open: false,
watch: true,
watch: false,
nodeResolve: true,
appIndex: 'testing/index.html',
rootDir: '.',
Expand Down

0 comments on commit 19637ec

Please sign in to comment.