Questions tagged [audio]

Code relating to sound recording, playback, and manipulation of audio data and hardware.

Filter by
Sorted by
Tagged with
8 votes
1 answer
3k views

Python decibel meter-accurate?

...
  • 89
17 votes
4 answers
3k views

Python program to scramble MP3 audio

I'm super new to coding. I had a random idea in the car to make this application in order dive head first into learning to code. This is an app to take an MP3 file, "shred it" into pieces (...
3 votes
1 answer
92 views

KivyPlayer - first Kivy app

So I have decided to learn Kivy Framework. Did two small apps containing mainly just labels (so that doesn't count) and decided I am going to do a simple music player. Nothing fancy just to learn ...
  • 456
2 votes
0 answers
69 views

Decoding audio encoded with LDAC codec

The full code (works on x86_64) is available on GitHub At first I used just original floating-point version, but it turned out to be too slow, because used DSP (32 bit, 120 MHz max, 112kB program and ...
0 votes
1 answer
92 views

Safely and Quickly Trim a Byte Array of Audio in Java

I'm trying to take a raw byte array of audio and trim it. The user selects a start and end value using a range slider. ...
1 vote
0 answers
17 views

Getting metadata out of a Shoutcast stream

I have written the following class used to get the metadata out of an internet radio station. It takes a Node Stream and transforms it to grab the metadata out of the mp3 stream and then removes the ...
  • 111
3 votes
1 answer
86 views

macOS: resetting balance to center (0.5) using Swift

Due to some bug somewhere, my speaker balance kept moving off-center and it was getting annoying. So I cobbled together the code below (based on this question) which—to my surprise—does compile and ...
7 votes
1 answer
374 views

Modular synthesizer framework for C++

While working on a much more complicated audio application, I was thinking about modular synthesizers, and whether it could be made simple to build a C++ application that implemented a modular ...
  • 35.7k
1 vote
2 answers
40 views

A Simple Media Generator with Directional Control

My goal was to have a single page display bulk amounts of media without the need to load new pages. I also wanted it to be able to load fast, so the generator uses a JavaScript array to display one ...
's user avatar
1 vote
0 answers
652 views

NodeJS stream.Readable implementation to combine PCM audio streams

Edit: This has a bug that I didn't discover initially. I've opened an issue in the nodejs/help github. I'm not sure what that means for this post. I am creating a discord music playing bot using ...
  • 153
5 votes
3 answers
390 views

C++ WAVE file reader: library-like structure, safety, readability

Introduction I have released a small a WAVE file reader with a mutex/lock-based caching mechanism, as a header-only library. The general purpose of the library is to read WAVE files into floating ...
  • 153
9 votes
1 answer
1k views

Audio visualizer in C++

I have completed my first attempt of a simple music visualizer app for windows in C++ using SDL. It takes system audio and outputs the soundwave in real-time. I'd appreciate some feedback on how I can ...
  • 191
2 votes
1 answer
109 views

Multiple audio player - arrow keys & space

I am creating a VueJS component of an audio player. I am having some difficulties in finding the ideal way to get the arrow keys and space bar to work. I have found a solution, however I think it is ...
  • 161
3 votes
0 answers
157 views

Metronome in Rust, Audio Handling and Threading

for learning purposes (and I found it kinda useful), I built a very basic command-line based metronome in rust. It's the first actual smaller project I built in rust. It consists of 4 source files. ...
5 votes
1 answer
126 views

Terminal interface audio player based on VLC & Curses

I'm working on an audio player with a terminal interface. I'm designing it for eventual use on a Raspberry Pi with a 480x320px display. I've broken the code into three main files with the intention ...
13 votes
2 answers
2k views

Python Sound visualizer

The past week I have tinkered making a sound visualizer using Tkinter, Matplotlib, NumPy, PyAudio and using a thread to be able to play the sound and to display the plot at the same time. I have been ...
5 votes
2 answers
73 views

Report time on whole hours

Report time at whole hours ...
2 votes
1 answer
67 views

Playing a sound depending on the currently displayed flash card image

I've developed a fully working flash card app for kids. It has a UIImageView that cycles through 26 cards (abcs) via a gesture click and a music button that will ...
  • 23
4 votes
1 answer
221 views

Convert to and from variable length quantities

As part of small MIDI library i've implemented the conversion of a VLQ (variable length quantity) for byte[] -> bigint and ...
7 votes
1 answer
903 views

Parse a WAV file and export PCM data

I'm a newbie and I wrote code that gets a WAV file and exports a RAW (only PCM data) to *.raw file. But I am confused about the structure. The code is written as one procedure (LISP style) and there ...
  • 73
3 votes
0 answers
1k views

Converts audio files to fixed size chunks and the chunks to spectrogram images

This code takes in input as audio files (.wav or .WAV) and divides them into fixed-size (chunkSize in seconds) samples. Then these chunks are converted to spectrogram images after applying PCEN (Per-...
1 vote
0 answers
46 views

HTML5 Custom Audio Player with SASS

i made an audio player in html5 for learning purposes, also i tried to use BEM pattern with sass (i dont know if i did it well) i also encapsuled my code as much as possible, but i think i can make it ...
2 votes
0 answers
620 views

A JavaFX for generating beeping sound on Windows via JNI

This is my practice program: a simple dialog box using which a user may specify a frequency of a sinus audio signal, and play it via pressing a button. It contains a GUI: App.java ...
  • 26.1k
1 vote
1 answer
241 views

Passing objects atomically across threads without locks or data races for audio synchronization

I am learning about one of the hardest parts of Audio development: the synchronization between the audio thread and the GUI thread. Per the discussion here https://forum.juce.com/t/timur-doumler-...
2 votes
2 answers
164 views

Rhythm game finger trainer

Decided to make a small C# console based rhythm game finger trainer with lots of user definable options. I'm very much a beginning programmer, so thought I might learn a lot from it. Especially when ...
  • 89
7 votes
1 answer
162 views

Warped Audio Sample

I was asked this question and got no feedback, so I'd like to ask you for any feedback on my solution, Thanks! Think of an audio sample as a rubber-band that you want to pin to a musical time ruler. ...
2 votes
4 answers
621 views

Modulating an oscillator by gain, pitch, and offset

I've an Audio Host application that sends block of samples to a DLL I'm building. It sends 44100 samples per seconds (i.e. Sample Rate 44100hz), per block, processing 16 distinct Voices. It ...
  • 165
2 votes
2 answers
507 views

Processing voice samples

I'm within an audio application that sends variable-length buffers to my DLL, which will process at higher speed (48000 samples per sec, but can also be higher). Here's the code I've written: ...
  • 165
3 votes
3 answers
913 views

Generate sinusoid as Wave file

This is a little program to show how a WAVe-File Generator could be written. It use a Function-Object "SinFunction" to calculate the value of any point of the amplitude in time. This object and two ...
4 votes
1 answer
135 views

Audio frequency trainer / tester using Web Audio API

I'm making an audio frequency trainer as a learning exercise. It could be useful for audio technicians who need to recognize audio frequencies (eg. when ringing out feedback during a live concert or ...
  • 241
5 votes
2 answers
861 views

Random tone generator using Web Audio API

This is a random frequency audio generator made with the Web Audio API by Mozilla. The end-goal is an audio frequency trainer: the website plays an audio frequency and the user tries to guess which ...
  • 241
7 votes
2 answers
825 views

A baby monitor using a Raspberry Pi to send push notifications when triggered by noise

I have a Raspberry Pi 3B with a USB microphone. I have used a combination of Bash and Python scripts to detect noise levels above a certain threshold that trigger a notification on my phone. The ...
  • 226
6 votes
0 answers
2k views

Android audio recording using AudioRecord and ByteBuffer

I'm developing an audio recorder app for android using AudioRecord class to have a low level access to audio samples. ...
  • 61
2 votes
1 answer
1k views

HTMLAudioElement sound delay on keyboard clicks

I am using Vue.js to play mp3 sounds on keyboard clicks. Even though each mp3 is less than 40 KB, there is a 95ms delay on heroku, on each request. Is there a way to download sounds when dom is ready ...
5 votes
1 answer
1k views

HTML5 audio player with CSS-styled interface for pages with multiple MP3 sources

This is one of my first JavaScript projects. It works (at least in Firefox and Chrome), but I would like to know if this code follows common best practices. This script is supposed to look for ...
  • 53
5 votes
1 answer
800 views

The sheet music of Morning Mood

While learning to play the keyboard, I find it helpful to write down the score of the pieces I play, regardless of whether a score already exists. The code is written using Frescobaldi as IDE and ...
  • 12.8k
8 votes
1 answer
972 views

Hiding message within an audio file with entropy detection

i'm currently making an application using python to hide a message in an audio file (WAV only for now). The hiding itself is done pretty quickly and without any problems, but i want to calculate the ...
  • 81
3 votes
0 answers
629 views

Using arecord through subprocess to record in Raspberry Pi

I am using arecord through subprocess to record in raspberry pi : press joystick button to start recording and press button again to stop recording. I am really a noob in programming. ...
  • 31
3 votes
1 answer
5k views

Simple audio player to play music using a URL built using MediaPlayer in Android

I wanted to create a very basic application for Android that plays an audio file based on a URL input. I would like it to be reviewed based on good programming practices. This is the first time that I ...
6 votes
5 answers
494 views

Convert FLAC files to MP3 in parallel on Ubuntu

I created a script to convert my FLAC music collection to MP3. I did this so that I can play the MP3 files in my car, as the integrated head unit only supports MP3 and WMA files. The script works on ...
0 votes
2 answers
2k views

A c++ classs for recording audio samples

This question is a continuation of this. Here, I modified the original code with the following changes. 1. Make a class Recorder() to store the information of ...
  • 225
5 votes
2 answers
1k views

A struct for recording audio samples

I am writing a program in c++ to record audio. Here are my structure and code snippet. ...
  • 225
3 votes
0 answers
82 views

Live radio streamer

I've posted a repo on a live radio streamer much like shoutcast/icecast without admin panels / user panels or custom mounts. I was wondering if anyone could review it and tell me what I can do better ...
5 votes
2 answers
180 views

Fetch real-time audio input

The following code uses portAudio library to implement a real-time audio input through default input device. The SAMPLE format is float32 with 100 samples per frame. The code is able to provide ...
  • 153
4 votes
0 answers
658 views

Sound recorder, based on sdl2

This is my first Haskell program, a command-line sdl-based(so, hopefully, cross-platform), parameter-less sound recorder. Tutorials, articles or chapters that concern mistakes in my code are just as ...
  • 454
18 votes
2 answers
2k views

Split mp3 of album into individual tracks

Recently, I've been transferring some of my old vinyl records to MP3 files. One of the things I did to make some progress was to automate things, so I initially set things up so that it would record ...
  • 64.6k
4 votes
3 answers
599 views

Play audio files when buttons are clicked in Simon Says

...
5 votes
2 answers
455 views

Optimizing a Text-To-Speech program with a lot of repetition

I have a Text-To-Speech program that will ask the user to input text, convert it to speech and then output that speech from within Pygame by loading the file into memory, getting Pygame to play the ...
  • 419
2 votes
0 answers
668 views

An Mp3 player using React and Redux and the HTML5 web audio API

I built a simple MP3 player with React and now I would like to incorporate Redux to the app as it is getting larger and I feel Redux will help it to be more organized and efficient. I was wondering ...
  • 401
3 votes
2 answers
3k views

Python Text-To-Speech program

I have some code that asks for a user input, and then uses TTS to convert that into speech and play the file. It then asks the user whether they want to repeat it and convert another input into speech,...
  • 419