konradre/video-production-skills / skills/mastering-audio
mastering-audio
VerifiedMaster audio files (especially Suno/Udio AI music) for streaming release with LUFS normalization, true peak limiting, and optional enhancements. Triggers — "master this", "master the track", "LUFS normalize", "optimize for streaming". Not for a spot's or film's delivery loudness — use video-finish-qc.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 4.4 KB |
| lib/dsp/constants.js | script | 1.8 KB |
| lib/dsp/dc-offset.js | script | 4.2 KB |
| lib/dsp/dynamic-leveler.js | script | 10.6 KB |
| lib/dsp/dynamic-processor.js | script | 16.8 KB |
| lib/dsp/exciter.js | script | 7.9 KB |
| lib/dsp/fft.js | script | 6.5 KB |
| lib/dsp/final-filters.js | script | 3.2 KB |
| lib/dsp/index.js | script | 3.2 KB |
| lib/dsp/limiter.js | script | 12.2 KB |
| lib/dsp/lufs.js | script | 5.7 KB |
| lib/dsp/multiband-saturation.js | script | 13.3 KB |
| lib/dsp/multiband-transient.js | script | 8.1 KB |
| lib/dsp/multiband.js | script | 8.2 KB |
| lib/dsp/normalizer.js | script | 4.5 KB |
| lib/dsp/saturation.js | script | 9.3 KB |
| lib/dsp/soft-clipper.js | script | 9.1 KB |
| lib/dsp/stereo.js | script | 8.8 KB |
| lib/dsp/transient.js | script | 7.9 KB |
| lib/dsp/true-peak.js | script | 2.6 KB |
| lib/dsp/utils.js | script | 4.4 KB |
| lib/src/audio-buffer-shim.js | script | 3.6 KB |
| lib/src/wav-encoder.js | script | 5.1 KB |
| package-lock.json | manifest | 611 B |
| package.json | manifest | 187 B |
| scripts/master.mjs | script | 15.2 KB |
lib/src/audio-buffer-shim.js
View on GitHub/**
* AudioBuffer Shim for Node.js
* Provides Web Audio API AudioBuffer interface for DSP module compatibility
*/
/**
* AudioBuffer-compatible class for Node.js environments
* Matches Web Audio API interface used by DSP modules
*/
export class AudioBuffer {
/**
* @param {Object} options
* @param {number} options.numberOfChannels - Number of audio channels
* @param {number} options.length - Number of samples per channel
* @param {number} options.sampleRate - Sample rate in Hz
*/
constructor({ numberOfChannels, length, sampleRate }) {
this._numberOfChannels = numberOfChannels;
this._length = length;
this._sampleRate = sampleRate;
this._channels = [];
for (let i = 0; i < numberOfChannels; i++) {
this._channels.push(new Float32Array(length));
}
}
get numberOfChannels() {
return this._numberOfChannels;
}
get length() {
return this._length;
}
get sampleRate() {
return this._sampleRate;
}
get duration() {
return this._length / this._sampleRate;
}
/**
* Get channel data as Float32Array
* @param {number} channel - Channel index
* @returns {Float32Array}
*/
getChannelData(channel) {
if (channel < 0 || channel >= this._numberOfChannels) {
throw new RangeError(`Channel ${channel} out of range`);
}
return this._channels[channel];
}
/**
* Copy data to a channel
* @param {Float32Array} source - Source data
* @param {number} channelNumber - Target channel
* @param {number} startInChannel - Start offset in channel
*/
copyToChannel(source, channelNumber, startInChannel = 0) {
const dest = this.getChannelData(channelNumber);
for (let i = 0; i < source.length && (startInChannel + i) < dest.length; i++) {
dest[startInChannel + i] = source[i];
}
}
/**
* Copy data from a channel
* @param {Float32Array} destination - Destination array
* @param {number} channelNumber - Source channel
* @param {number} startInChannel - Start offset in channel
*/
copyFromChannel(destination, channelNumber, startInChannel = 0) {
const src = this.getChannelData(channelNumber);
for (let i = 0; i < destination.length && (startInChannel + i) < src.length; i++) {
destination[i] = src[startInChannel + i];
}
}
}
/**
* Create AudioBuffer from interleaved Float32Array
* @param {Float32Array} data - Interleaved audio data
* @param {number} channels - Number of channels
* @param {number} sampleRate - Sample rate
* @returns {AudioBuffer}
*/
export function createAudioBufferFromInterleaved(data, channels, sampleRate) {
const samplesPerChannel = Math.floor(data.length / channels);
const buffer = new AudioBuffer({
numberOfChannels: channels,
length: samplesPerChannel,
sampleRate: sampleRate
});
// Deinterleave
for (let ch = 0; ch < channels; ch++) {
const channelData = buffer.getChannelData(ch);
for (let i = 0; i < samplesPerChannel; i++) {
channelData[i] = data[i * channels + ch];
}
}
return buffer;
}
/**
* Convert AudioBuffer to interleaved Float32Array
* @param {AudioBuffer} buffer - Audio buffer
* @returns {Float32Array} - Interleaved data
*/
export function audioBufferToInterleaved(buffer) {
const channels = buffer.numberOfChannels;
const length = buffer.length;
const interleaved = new Float32Array(length * channels);
for (let i = 0; i < length; i++) {
for (let ch = 0; ch < channels; ch++) {
interleaved[i * channels + ch] = buffer.getChannelData(ch)[i];
}
}
return interleaved;
}
// Make globally available for DSP modules
globalThis.AudioBuffer = AudioBuffer;
export default AudioBuffer;
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |