Questions tagged [audio]

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

Filter by
Sorted by
Tagged with
3 votes
1 answer
55 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 ...
user avatar
  • 456
2 votes
0 answers
60 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 ...
user avatar
0 votes
1 answer
68 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. ...
user avatar
1 vote
0 answers
14 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 ...
user avatar
  • 111
3 votes
1 answer
82 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 ...
user avatar
7 votes
1 answer
307 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 ...
user avatar
  • 32.5k
1 vote
2 answers
37 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 ...
user avatar
1 vote
0 answers
595 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 ...
user avatar
  • 153
5 votes
3 answers
296 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 ...
user avatar
  • 153
9 votes
1 answer
969 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 ...
user avatar
  • 191
2 votes
1 answer
90 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 ...
user avatar
  • 161
3 votes
0 answers
128 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. ...
user avatar
5 votes
1 answer
113 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 ...
user avatar
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 ...
user avatar
5 votes
2 answers
69 views

Report time on whole hours

Report time at whole hours ...
user avatar
2 votes
1 answer
66 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 ...
user avatar
  • 23
4 votes
1 answer
214 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 ...
user avatar
7 votes
1 answer
836 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 ...
user avatar
  • 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-...
user avatar
1 vote
0 answers
41 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 ...
user avatar
1 vote
0 answers
584 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 ...
user avatar
  • 25.3k
1 vote
1 answer
232 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-...
user avatar
2 votes
2 answers
157 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 ...
user avatar
  • 89
7 votes
1 answer
150 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. ...
user avatar
2 votes
4 answers
608 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 ...
user avatar
  • 165
2 votes
2 answers
505 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: ...
user avatar
  • 165
3 votes
3 answers
854 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 ...
user avatar
4 votes
1 answer
130 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 ...
user avatar
  • 241
5 votes
2 answers
821 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 ...
user avatar
  • 241
7 votes
2 answers
798 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 ...
user avatar
  • 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. ...
user avatar
  • 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 ...
user avatar
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 ...
user avatar
  • 53
5 votes
1 answer
772 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 ...
user avatar
  • 12.6k
8 votes
1 answer
945 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 ...
user avatar
  • 81
3 votes
0 answers
610 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. ...
user avatar
  • 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 ...
user avatar
6 votes
5 answers
466 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 ...
user avatar
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 ...
user avatar
  • 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. ...
user avatar
  • 225
3 votes
0 answers
81 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 ...
user avatar
5 votes
2 answers
172 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 ...
user avatar
  • 153
4 votes
0 answers
631 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 ...
user avatar
  • 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 ...
user avatar
  • 64.1k
4 votes
3 answers
546 views

Play audio files when buttons are clicked in Simon Says

...
user avatar
5 votes
2 answers
451 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 ...
user avatar
  • 419
2 votes
0 answers
657 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 ...
user avatar
  • 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,...
user avatar
  • 419
6 votes
1 answer
3k views

Python .WAV generator

The following is a .wav file generator that I wrote briefly while (re)learning about audio sampling: ...
user avatar
6 votes
1 answer
290 views

Speech Recognition Part 2: Classifying Data

Now that I have generated training data, I need to classify each example with a label to train a TensorFlow neural net (first building a suitable dataset). To streamline the process, I wrote this ...
user avatar
  • 21.6k