Skip to content

Commit 19637ec

Browse files
committed
chore(release): 4.0.2
1 parent 7f4d63b commit 19637ec

File tree

8 files changed

+1446
-970
lines changed

8 files changed

+1446
-970
lines changed

bin/build/github-pages.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ eslint testing/**.ts
88
eslint tests/**.ts
99
eslint processor/**.ts
1010

11-
ts-node --esm --skipProject ./github-pages/favicons-generator.ts
12-
ts-node --esm --skipProject ./github-pages/sitemap-generator.ts
13-
ts-node --esm --skipProject ./github-pages/meta-injector.ts
11+
ts-node github-pages/favicons-generator.ts
12+
ts-node github-pages/sitemap-generator.ts
13+
ts-node github-pages/meta-injector.ts
1414

1515
rm ./docs/favicons/index.html
1616
cp -r ./github-pages/public/* ./docs/

changelog.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22

33
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.
44

5+
### [4.0.2](https://github.com/dlepaux/realtime-bpm-analyzer/compare/v4.0.1...v4.0.2) (2024-03-30)
6+
7+
### [4.0.1](https://github.com/dlepaux/realtime-bpm-analyzer/compare/v4.0.0...v4.0.1) (2024-03-30)
8+
9+
10+
### Bug Fixes
11+
12+
* add bash interpreter to script ([3e78924](https://github.com/dlepaux/realtime-bpm-analyzer/commit/3e7892420ec2b8ff2fd965c1026e4b4ec574819a))
13+
* replace static skipForwardIndexes to dynamic computation based on sampleRate ([9c478b1](https://github.com/dlepaux/realtime-bpm-analyzer/commit/9c478b1c00dec91ea2304dee34d46cfa016a1680))
14+
515
## [4.0.0](https://github.com/dlepaux/realtime-bpm-analyzer/compare/v3.3.0...v4.0.0) (2024-02-06)
616

717

package-lock.json

Lines changed: 1409 additions & 942 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "realtime-bpm-analyzer",
3-
"version": "4.0.0",
3+
"version": "4.0.2",
44
"description": "This dependency free library can analyze the BPM (Tempo) of an audio/video node or any stream in realtime on your browser",
55
"author": {
66
"name": "David Lepaux",

readme.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@
1414

1515
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.
1616

17-
- [Getting started](#getting-started)
18-
- [Features](#features)
19-
- [Usages](#usages)
20-
- [Player strategy](#player-strategy)
21-
- [Continuous Analysis strategy](#continuous-analysis-strategy)
22-
- [Local/Offline strategy](#localoffline-strategy)
23-
- [Development](#development)
24-
- [Unit Tests](#unit-tests)
25-
- [Dataset Testing](#dataset-testing)
26-
- [New features](#new-features)
27-
- [Technical Documentation](#technical-documentation)
28-
- [Tests & Coverage](#tests--coverage)
29-
- [Commercial Usage](#commercial-usage)
30-
- [Roadmap](#roadmap)
31-
- [Credits](#credits)
17+
- [Realtime BPM Analyzer](#realtime-bpm-analyzer)
18+
- [Getting started](#getting-started)
19+
- [Features](#features)
20+
- [Usages](#usages)
21+
- [Player strategy](#player-strategy)
22+
- [Continuous Analysis strategy](#continuous-analysis-strategy)
23+
- [Local/Offline strategy](#localoffline-strategy)
24+
- [Development](#development)
25+
- [Unit Tests](#unit-tests)
26+
- [Dataset Testing](#dataset-testing)
27+
- [New features](#new-features)
28+
- [Technical Documentation](#technical-documentation)
29+
- [Commercial Usage](#commercial-usage)
30+
- [Roadmap](#roadmap)
31+
- [Credits](#credits)
3232

3333
## Getting started
3434

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

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

7070
const realtimeAnalyzerNode = await createRealTimeBpmProcessor(audioContext);
7171

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

8181
realtimeAnalyzerNode.port.onmessage = (event) => {
8282
if (event.data.message === 'BPM') {
83-
console.log('BPM', event.data.result);
83+
console.log('BPM', event.data.data.bpm);
8484
}
8585
if (event.data.message === 'BPM_STABLE') {
86-
console.log('BPM_STABLE', event.data.result);
86+
console.log('BPM_STABLE', event.data.data.bpm);
8787
}
8888
};
8989
```
@@ -120,10 +120,10 @@ source.connect(audioContext.destination);
120120

121121
realtimeAnalyzerNode.port.onmessage = (event) => {
122122
if (event.data.message === 'BPM') {
123-
console.log('BPM', event.data.result);
123+
console.log('BPM', event.data.data.bpm);
124124
}
125125
if (event.data.message === 'BPM_STABLE') {
126-
console.log('BPM_STABLE', event.data.result);
126+
console.log('BPM_STABLE', event.data.data.bpm);
127127
}
128128
};
129129
```

src/analyzer.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import {descendingOverThresholds} from './utils';
22
import type {
33
Peaks,
4-
ValidPeaks,
54
PeaksAndThreshold,
65
BpmCandidates,
76
Interval,

tests/lib/analyzer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ describe('Analyzer - Integration tests', () => {
3939
it('should be able to detect the BPM from an AudioBuffer', async function () {
4040
this.timeout(30 * 1000);
4141
const audioContext = new AudioContext();
42-
const response = await fetch('/tests/fixtures/bass-test.wav');
43-
const buffer = await response.arrayBuffer();
42+
const request = await fetch('/tests/fixtures/bass-test.wav');
43+
const buffer = await request.arrayBuffer();
4444
const audioBuffer = await audioContext.decodeAudioData(buffer);
4545
const tempos = await analyzeFullBuffer(audioBuffer);
4646
const tempo = analyzer.getTopCandidate(tempos);

web-dev-server.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {esbuildPlugin} from '@web/dev-server-esbuild';
22

33
export default {
44
open: false,
5-
watch: true,
5+
watch: false,
66
nodeResolve: true,
77
appIndex: 'testing/index.html',
88
rootDir: '.',

0 commit comments

Comments
 (0)