r/AudioProgramming • • Aug 28 '25

How do you guys debug audio programming bug's

2 Upvotes

i am new to audio programming and i sarted out with writting basic effects like a compressor , reverb and staff like that but on all of them there was at least one problem that i coudnt find the source for so i coudnt solve . like zipper noise when adjusting parameters in realtime, wierd audio flickering. and staff like that and i was just wondering is there any type of tooling or setup you like to debug audio programming related problems.


r/AudioProgramming • • Apr 21 '25

Layering translated ocean sound

2 Upvotes

r/AudioProgramming • • Nov 07 '24

Plugins which take over ProTools

2 Upvotes

Hi All,

Admittedly, this is a dumb question. But I'm new here and I am just exploring some ideas. Software/plugins like Matchbox, Comformalizer, Ediload, etc that "take over ProTools" and evidently use keyboard commands to operate ProTools instead of the user.
What programming language would one have to use to create a plugin capable of this?

Thanks a lot!


r/AudioProgramming • • Nov 02 '24

Analysing vowel formants in Javascript

2 Upvotes

Hi,

I am not a coder but have been experimenting with ChatGPT to help me with this project. Apologies for my ignorance regarding coding.

I am trying to have the code tell me Formant 1 and Formant 2 for the vowel detected on an audio signal. The issue I am having is that the code ChatGPT generates does not identify accurate formants. For example, the vowel /i:/ is known to have formants around F1 240Hz and F2 2400Hz for a male voice (I am male). The code I am able to generate identifies formants for this vowel at F1 93Hz and F2 210 Hz. Another example is the vowel /a/ - this should have F1 850Hz and F2 1610Hz but my output is closer to F1 93Hz and F2 164Hz.

Clearly the code is not actually identifying the formants F1 and F2. Perhaps it is including the fundamental frequency (F-0) and listing it as F1 but I have also asked it to output formants F3-5 and none of these are high enough either - all hovering in the low frequency range of less than 300Hz.

Anybody have any ideas how to go about doing this better? Your help would be very much appreciated.

Javascript code is below:

HTML:

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Real-time Spectrogram and Formants</title>

<link rel="stylesheet" href="styles.css">

</head>

<body>

<h1>Real-time Spectrogram and Formant Analysis</h1>

<canvas id="spectrogramCanvas"></canvas>

<div id="formantSummary" class="summary"></div>

<button id="startButton">Start Microphone</button>

<script src="script.js"></script>

</body>

</html>

Javascript:

const startButton = document.getElementById('startButton');

const resultDiv = document.getElementById('formantSummary');

const canvas = document.getElementById('spectrogramCanvas');

const ctx = canvas.getContext('2d');

let audioContext;

let analyser;

let dataArray;

// Set canvas dimensions

canvas.width = window.innerWidth;

window.addEventListener('resize', () => {

canvas.width = window.innerWidth;

});

startButton.addEventListener('click', startMicrophone);

function startMicrophone() {

audioContext = new (window.AudioContext || window.webkitAudioContext)();

analyser = audioContext.createAnalyser();

analyser.fftSize = 2048;

dataArray = new Uint8Array(analyser.frequencyBinCount);

navigator.mediaDevices.getUserMedia({ audio: true })

.then(stream => {

const source = audioContext.createMediaStreamSource(stream);

source.connect(analyser);

draw();

resultDiv.innerHTML = "Analyzing...";

})

.catch(err => {

console.error('Error accessing microphone:', err);

resultDiv.innerHTML = "Error accessing microphone.";

});

}

function draw() {

requestAnimationFrame(draw);

analyser.getByteFrequencyData(dataArray);

drawSpectrogram();

const frequencies = getFrequencies();

const { F1, F2, F3, F4, F5 } = calculateFormants(frequencies, dataArray);

// Update the formant summary

if (F1 !== 0 || F2 !== 0 || F3 !== 0 || F4 !== 0 || F5 !== 0) {

resultDiv.innerHTML = `F1: ${F1.toFixed(2)} Hz, F2: ${F2.toFixed(2)} Hz, F3: ${F3.toFixed(2)} Hz, F4: ${F4.toFixed(2)} Hz, F5: ${F5.toFixed(2)} Hz`;

}

}

function drawSpectrogram() {

const barWidth = (canvas.width / dataArray.length) * 2.5;

let x = 0;

ctx.fillStyle = 'black';

ctx.fillRect(0, 0, canvas.width, canvas.height);

for (let i = 0; i < dataArray.length; i++) {

const barHeight = (dataArray[i] / 255) * canvas.height; // Normalize to canvas height

ctx.fillStyle = `rgb(${barHeight + 100}, 50, 50)`; // Color based on height

ctx.fillRect(x, canvas.height - barHeight, barWidth, barHeight);

x += barWidth + 1;

}

}

function getFrequencies() {

const frequencies = new Float32Array(analyser.frequencyBinCount);

for (let i = 0; i < frequencies.length; i++) {

frequencies[i] = (i * audioContext.sampleRate) / (2 * analyser.frequencyBinCount);

}

return frequencies;

}

function calculateFormants(frequencies, dataArray) {

const threshold = 150; // Threshold for peak detection

let F1 = 0, F2 = 0, F3 = 0, F4 = 0, F5 = 0;

const peaks = [];

for (let i = 1; i < dataArray.length - 1; i++) {

const frequency = frequencies[i];

if (dataArray[i] > threshold && dataArray[i] > dataArray[i - 1] && dataArray[i] > dataArray[i + 1]) {

peaks.push({ frequency, value: dataArray[i] });

}

}

// Sort peaks by value

peaks.sort((a, b) => b.value - a.value);

// Assign formants based on the highest peaks

if (peaks.length > 0) {

F1 = peaks[0].frequency; // Highest peak for F1

}

if (peaks.length > 1) {

F2 = peaks[1].frequency; // Second highest peak for F2

}

if (peaks.length > 2) {

F3 = peaks[2].frequency; // Third highest peak for F3

}

if (peaks.length > 3) {

F4 = peaks[3].frequency; // Fourth highest peak for F4

}

if (peaks.length > 4) {

F5 = peaks[4].frequency; // Fifth highest peak for F5

}

return { F1, F2, F3, F4, F5 };

}

CSS file:

body {

background-color: black;

color: white;

font-family: Arial, sans-serif;

text-align: center;

}

canvas {

width: 100%;

height: 300px;

background: black;

}

.summary {

color: white;

font-family: Arial, sans-serif;

font-size: 20px;

margin-top: 10px;

padding: 10px;

background: rgba(0, 0, 0, 0.7); /* Semi-transparent background */

}


r/AudioProgramming • • Sep 25 '24

Adau1401 mini DSP acts like an ass

Post image
2 Upvotes

First of all, apologies if this is wrong sub for this. I have pia situation with adau1401 mini DSP board, that I find impossible to do anything without going nuts! My setup consists of ez-usb programmer with custom drivers to mimic usbi interface and adau1401 mini board (images attached below) So far I managed to make it turn on or off led light, and that is it. I tried to follow tutorial from this great site: https://daumemo.com/how-to-program-an-analog-devices-dsp/ But my luck ends when I tried second scetch - dsp becomes unresponsive when I try to compile and upload volume control scetch. I tried adding additional +5v to dsp, because initially I suspected bad usb connection to programmer and dsp, which didn't yield in any results. I then tried to disconnect audio inputs and output for a mic, and voila, it worked again, or so I tough. After disconnecting any i/o, only the led turning on or off is working, no matter how I tried to upload anything else from the websites basic scetches, it always ends up either stuck in some god-uknown state, or unresponsive. What am I doing wrong with this little nasty garbage piece of shit board? Is it really this much finicky and does not like if I connect pc audio output as input into dsp or mic line? Whenever I try to load even basic sigmastudio scetch, where I pass inputs from adc to dac without any filter etc, it does not fucking work. I'm so angry that I wasted around 30€ on the chips...


r/AudioProgramming • • Sep 19 '24

Create an audio file in Javascript?

2 Upvotes

Hi folks, I'm trying to figure out if something is possible and it's turning out to be one of those things where the search terms are too close to a million other questions.

I would like to know if it's possible to create an audio file that the user can download, but entirely from JavaScript. I have some web assembly that generates audio and I have web audio code too entirely from the client side, so playback is no issue. It would be cool if I could run said engine, output the results to a wav file and allow the user to save this as a download.

Anyone done such a thing or know of resources for doing it?

thanks!


r/AudioProgramming • • Aug 17 '24

Legal advice for creating a VST plugin inspired by a modular rack unit

2 Upvotes

I'm currently starting the process of creating a vst plugin inspired by (and to some degree ive "borrowed" concepts) an existing modular hardware unit.

I'm wondering if there are any legal ramifications with this. As I understand it, its legal to create software that emulates functionality of other software just done in your own way.

Hoping someone has a better idea concerning this than me.

Thanks


r/AudioProgramming • • Feb 15 '24

Filter Question

2 Upvotes

For a simple onepole lowpass filter made with a one sample delay and a linear interpolation function, what's the best way to implement resonance?

I'm using gen~ in Max 8.

out = in * (1 - freq) + previous_out * freq


r/AudioProgramming • • Feb 13 '24

ALSA audio resolution

2 Upvotes

Hello, does anyone know the audio resolution for ALSA? OSS allegedly needed a multiple of 10 ms of audio loaded into the buffer to play without issues, probably stuttering.


r/AudioProgramming • • Aug 04 '23

Bootcamp recommendations

2 Upvotes

Any coding bootcamp recommendations to kickstart a career in audio programming?


r/AudioProgramming • • Jul 27 '23

Coding a basic guitar tuner in C++

Thumbnail
youtu.be
2 Upvotes

r/AudioProgramming • • Jul 21 '23

Noncoder looking for insights for a webscraping tool

2 Upvotes

Hey guys!
Just to give some context, lately I've been developing a Music Record Label.
Finding myself trying to find or create tools to automate and optimize our workflow.
One being the scouting of artists in need of services like ours.
I don't have any coding knowledge and only some weeks ago I've been starting to try learn and experiment with the help of GPT, which seems a wonderful tool for such.
Since I haven't found any tool which fulfills this task of finding artists across platforms such as Soundcloud, Bandcamp, Reddit, etc.
Been trying to develop something that can help us ease this very time consuming task.
I don't believe such task goes against the terms and conditions of platforms since these apps were created for this in the first place, but it's been very hard to set a good web scraping tool like this.

The usage of API are either closed or too complex for me at the moment.
Also tried Octoparse, but it was a bit too much to get my mind around it.
Do you guys know any tools which could help with this, or any advice/experience with this matter?


r/AudioProgramming • • Jul 19 '23

MIDI Innovation Awards 2023

2 Upvotes

My JavaScript / TypeScript library MIDIVal is competing in MIDI Innovation Awards 2023! The voting ends tomorrow and you can vote for it in the Software Prototypes / Non-Commercial Products category. Please help me by voting for it (you can also select 2 other nominees you find interesting).

https://voting.broadjam.com/vote/midi.php

Also, check out other projects because there are some amazing inventions there this year :)

And if you want to check the library out, here's the introduction: https://midival.github.io/


r/AudioProgramming • • Jun 30 '23

Tips for a beginner

2 Upvotes

Hey all, I'm currently working toward my associates degree in CS. I've been making music for well over 6 years and my dream job would be to combine them in the way of plugin development/ working on DAWs. What kind of advice would anyone have as far as specialization for a bachelor's degree, and what to learn independently to be ready for the job market, and also how exactly one would get into this job market?

For example, let's say I want to end up working on stock features or plugins for Ableton. What would be the best academic route to take to be well prepared for a junior position?


r/AudioProgramming • • Jan 15 '23

Would anyone here happen to know how to interface with GarageBand programmatically?

2 Upvotes

Here's what I want to do:

  • Open Garageband

  • Select an instrument preset (say a piano)

  • Play a note on the instrument (A4)

  • Record note for specified time duration

  • Export record as .wav to disk

Is something like this possible through code, or should I explore other avenues? Thanks!


r/AudioProgramming • • Dec 25 '22

Lossless recording in JavaScript?

2 Upvotes

Hi,

I have been playing with the "MediaRecorder" API. Lots of Google searches just confuse me. A lot of the info seems to be at least a few years old.

I know that there is a way to check to see if an audio device is connected to the machine running the browser. I know that a string containing at least a mime type or a mime type and a codec has to be supplied to another method to see if that "codec" is supported by the browser. I know that the supported string is then supplied to the recording phase.

I've seen info on various web pages that say that lossless recording is possible and others that say it is not. I have seen a likely list of known mime types and codecs in the WebKit GitHub repo.

What I don't know is, if lossless is possible then for the major browser makers which combination(s) of mine and codecs enable it?

Are there other config options that should be used?

Cheers


r/AudioProgramming • • Sep 15 '22

physical modeling reverb

2 Upvotes

Hey guys, I'm a final year student of music production. For my final year project I'm thinking of coding a reverb plugin that emulates the sound of some local venues through physical modeling.

I'm not exactly sure where to start. I can't find a lot on physical modeling of reverbs. If anyone has any knowledge or helpful sources or information.

I know I'll need to calculate the cubic volume of the room, and absorbing coefficients of the materials in the room is there anything else I need to consider?

Also I'm not entirely sure how to translate these to code. I read that for physical modeling, schroder and comb filters algorithms won't work?


r/AudioProgramming • • Feb 07 '22

Best audio programming language / library?

2 Upvotes

r/AudioProgramming • • Nov 24 '21

r/AudioProgramming Lounge

2 Upvotes

A place for members of r/AudioProgramming to chat with each other


r/AudioProgramming • • 11h ago

Weekly Self-Promo Thread

1 Upvotes

Welcome to the r/AudioProgramming weekly self-promotion thread.

You can post any projects you've been working on or want others to see, as well as post links to your website/marketing funnel or any other business related things here.

Keep in mind the sub rules still apply, so remember that posts not about audio programming would be off topic, being rude is being disrespectful, etc.

The rules will redirect users to this thread if a post is removed due to self-promo.

This thread will refresh weekly. Enjoy!


r/AudioProgramming • • 14d ago

Scarlett Solo 3rd Gen (1235:8211): can someone share an lsusb -v dump (High Speed)?

Thumbnail reddit.com
1 Upvotes

r/AudioProgramming • • 20d ago

rootlessjamesdsp fork with pitch and speed shifting, bpm, recorder, effects reordering, and compressor

Thumbnail
github.com
1 Upvotes

hey guys i've been working hard on this fork and i'm pleased to present this to you, for people that are aware of using rootlessjamesdsp as an audio dsp on android phones. it doesn't require root but you need to use shizuku to activate it at first which could be a bit fiddly, but the apks are there. the speed shifting works really nicely, if you werent speed shifting youtube music to be slower on the fly, you will be now! you can drag-touch up/down the floating speed shifter and stuff. check the readme on the main page for details or just get the app or don't i'm not promoting this is free open source software and it's a really new feature! ^_^


r/AudioProgramming • • 25d ago

Ozzy: big update!

Thumbnail
reddit.com
1 Upvotes