
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
beat-parser-core
Advanced tools
A powerful, production-ready TypeScript library for parsing musical beats and rhythmic patterns from audio data. Built for both browser and Node.js environments with Web Worker support for heavy processing tasks.
For complete installation instructions, environment setup, and configuration options, see Setup Guide.
npm install @beat-parser/core
import { BeatParser } from '@beat-parser/core';
// Create parser and process audio
const parser = new BeatParser();
const result = await parser.parseBuffer(audioData, {
targetPictureCount: 16,
selectionMethod: 'adaptive'
});
console.log('Detected beats:', result.beats.length);
console.log('Tempo:', result.tempo, 'BPM');
// Always cleanup
await parser.cleanup();
import { BeatParserWorkerClient } from '@beat-parser/core';
const workerClient = new BeatParserWorkerClient();
const result = await workerClient.parseBuffer(audioData, {
progressCallback: (progress) => console.log(`${progress.percentage}%`)
});
await workerClient.terminate();
## Performance Benchmarks
Based on comprehensive testing across multiple platforms:
| Audio Duration | Processing Time | Memory Usage | Typical Results |
|---------------|-----------------|--------------|----------------|
| 5 seconds | <3 seconds | <10MB | 8-12 beats |
| 30 seconds | <15 seconds | <25MB | 40-60 beats |
| 2 minutes | <60 seconds | <50MB | 160-240 beats |
| 5 minutes | <150 seconds | <100MB | 400-600 beats |
**Key Performance Features:**
- **Web Worker processing**: 40-70% performance improvement
- **Memory efficient**: Automatic cleanup with bounded growth
- **Streaming support**: Process large files without loading everything into memory
- **Real-time capable**: <1.0x processing time for most audio
## Key Classes
### BeatParser
Main parser class for beat detection and audio processing.
```typescript
const parser = new BeatParser(config?);
const result = await parser.parseFile(filePath, options?);
Web Worker client for background processing.
const client = new BeatParserWorkerClient(options?);
const result = await client.parseBuffer(audioData, options?);
For complete API documentation, see API.md
Robust error handling with descriptive messages:
try {
const result = await parser.parseBuffer(audioData);
} catch (error) {
if (error.message.includes('Invalid or empty audio data')) {
// Handle invalid input
} else if (error.message.includes('Unsupported audio format')) {
// Handle format issues
}
// Full error handling guide in API.md
}
Browsers: Chrome 66+, Firefox 60+, Safari 13.1+, Edge 79+
Node.js: 18.0.0+ with npm 8.0.0+
Audio Formats: WAV, MP3, FLAC, OGG, M4A
For complete compatibility details, see SETUP.md.
We welcome contributions! See CONTRIBUTING.md for:
Quick Start:
git clone https://github.com/username/beat-parser.git
cd beat-parser
npm install
npm test
For complete performance optimization guide, see API.md.
Common solutions:
BeatParser insteadcleanup()For complete troubleshooting guide, see Setup Guide.
MIT License. See LICENSE file for details.
Developed with ❤️ for the audio processing community.
FAQs
TypeScript library for parsing musical beats and rhythmic patterns
We found that beat-parser-core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.