All Projects → audiojs → pcm-convert

audiojs / pcm-convert

Licence: MIT license
Convert pcm data from any to any format

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to pcm-convert

web-voice-processor
A library for real-time voice processing in web browsers
Stars: ✭ 69 (+130%)
Mutual labels:  pcm
fmcw-RADAR
[mmWave based fmcw radar design files] based on AWR1843 chip operating at 76-GHz to 81-GHz.
Stars: ✭ 41 (+36.67%)
Mutual labels:  dsp
portedplugins
A collection of plugins for the SuperCollider sound environment, all of which are ported / remixed from elsewhere
Stars: ✭ 124 (+313.33%)
Mutual labels:  dsp
spafe
🔉 spafe: Simplified Python Audio Features Extraction
Stars: ✭ 310 (+933.33%)
Mutual labels:  dsp
uos
United Open-libraries of Sound. United procedures for open-source audio libraries. For FPC/Lazarus/fpGUI/MSEgui.
Stars: ✭ 112 (+273.33%)
Mutual labels:  dsp
audio noise clustering
https://dodiku.github.io/audio_noise_clustering/results/ ==> An experiment with a variety of clustering (and clustering-like) techniques to reduce noise on an audio speech recording.
Stars: ✭ 24 (-20%)
Mutual labels:  dsp
SpleeterRT
Real time monaural source separation base on fully convolutional neural network operates on Time-frequency domain.
Stars: ✭ 111 (+270%)
Mutual labels:  dsp
TD-Faust
FAUST (Functional Audio Stream) for TouchDesigner
Stars: ✭ 38 (+26.67%)
Mutual labels:  dsp
Filters
An Arduino finite impulse response and infinite impulse response filter library.
Stars: ✭ 36 (+20%)
Mutual labels:  dsp
speech course
YSDA course in Speech Processing.
Stars: ✭ 93 (+210%)
Mutual labels:  dsp
DtBlkFx
Fast-Fourier-Transform (FFT) based VST plug-in
Stars: ✭ 99 (+230%)
Mutual labels:  dsp
lessampler
lessampler is a Singing Voice Synthesizer
Stars: ✭ 59 (+96.67%)
Mutual labels:  dsp
matchering-web
🎚️ Self-Hosted LANDR / eMastered Alternative
Stars: ✭ 25 (-16.67%)
Mutual labels:  dsp
Nohmad
Nohmad modules for VCV Rack
Stars: ✭ 25 (-16.67%)
Mutual labels:  dsp
EEL VM
EEL2 compiler and execution VM with enhanced routines for real-time signal processing
Stars: ✭ 27 (-10%)
Mutual labels:  dsp
edgeofchaos
This repository is not maintained anymore. If I have any significant contributions, I usually do a PR for the Faust libraries. This repository contains the Faust libraries for sound and information processing that I use to implement my music complex adaptive systems.
Stars: ✭ 51 (+70%)
Mutual labels:  dsp
AnotherBadBeatSaberClone
This is a discontinued but perhaps helpful VR project created during my Master's degree at FH Wedel.
Stars: ✭ 22 (-26.67%)
Mutual labels:  dsp
campaign-manager
The Camapign Management UI for RTB4Free, the open source bidder / DSP.
Stars: ✭ 24 (-20%)
Mutual labels:  dsp
stabilizer
Firmware and software for the Sinara Stabilizer module with high speed, low latency ADC/DAC data processing and powerful DSP algorithms in between
Stars: ✭ 61 (+103.33%)
Mutual labels:  dsp
dsp-collection-java
A collection of Java classes for Digital Signal Processing
Stars: ✭ 41 (+36.67%)
Mutual labels:  dsp

pcm-convert unstable Build Status Greenkeeper badge

Convert data from one pcm-format to another.

Usage

npm install pcm-convert

const convert = require('pcm-convert')

//convert data from float32 to uint8 array
let uint8arr = convert([0, 0.1, 0.1, 0], 'float32', 'uint8')

//convert interleaved uint8 to planar float32 array
let float32arr = convert(new Uint8Array([127, 200, 127, 200]), 'uint8 stereo interleaved', 'float32 planar')

//deinterleave keeping the same data type
let int8arr = convert(new Int8Array([-100,100,-100,100]), 'interleaved', 'planar')

//change endianness keeping the same data type
let float32be = convert(new Float32Array([1,.5,-.5,-1]), 'le', 'be')

//use objects as formats
let float64 = convert(float32be, {
	dtype: 'float32',
	channels: 2,
	interleaved: false,
	endianness: 'be'
}, {
	dtype: 'float64',
	interleaved: true,
	endianness: 'le'
})

//skip source format string, convert directly to data format
let uint16 = convert(new Uint8Array([0,255]), 'uint16')

//put data into target container skipping format strings
convert(new Uint8Array([0,255]), new Uint16Array(2))

//full arguments case
let uint16arr = convert([0, 0, 1, 1], 'float32 le stereo planar', 'uint16 interleaved be', new Uint16Array(4))

API

convert(src, srcFormat?, dstFormat?, dst?)

Takes data in src container and converts from srcFormat to dstFormat. Format can be whether a string with tags or an object with properties, see audio-format module. If srcFormat is skipped, it is detected from src. Optionally a destination container can be provided as dst, and in case if dstFormat is skipped, it will be detected from dst.

Source

Source format is inferred from src data type and extended with srcFormat properties. By default source is considered planar mono le. Source data types:

Type Dtype
Array float32
Float32Array float32
Float64Array float64
ArrayBuffer uint8
Buffer uint8
Uint8Array uint8
Uint8ClampedArray uint8
Uint16Array uint16
Uint32Array uint32
Int8Array int8
Int16Array int16
Int32Array int32

Format

Can be defined as dtype string with tags, eg. 'uint8 interleaved mono le', 'float64 planar quad' (some tags can be skipped), or an object with the following properties:

Property Meaning
dtype Data type string: uint8, uint16, uint32, int8, int16, int32, float32, float64, array (only dstFormat), arraybuffer (only dstFormat).
interleaved Boolean indicating if data has interleaved or planar layout.
channels Number of channels in source: mono, stereo, quad, 5.1.
endianness be or le, defaults to OS endianness.

Related

License

© 2017 Dima Yv. MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].