Code relating to sound recording, playback, and manipulation of audio data and hardware.
6
votes
3answers
238 views
Karplus Strong pluck generation
I want to use a simple implementation of the Karplus-Strong algorithm to generate pluck sounds and chords.
My existing code seems correct but is slow when more than a few plucks are being generated. ...
4
votes
0answers
69 views
FFT Frequency Shifter Extravaganza
I've been writing a frequency shifter in C++ for an Audio Unit plugin. The best way for me to do this while keeping a large amount of other algorithms working in the same plugin was by writing a ...
6
votes
1answer
108 views
Music player written in Python using PyQt
Some days ago, in the middle of a flight, in one hour or so, I've written this basic music player using Python3 and PyQt4.
I needed some easy to use music player, so I decided to write this piece of ...
2
votes
3answers
73 views
Generating a sinusoid sound signal in Java
Is there any legroom left for optimization (without switching to C)?
...
7
votes
0answers
82 views
Raw PCM to FLAC conversion using QtGstreamer in C++
This is part of my kynnaugh-cc TeamSpeak 3 plugin implementing speech recognition for deaf/hearing-impaired users. One of the self-contained classes in my code has the job of converting incoming PCM ...
3
votes
0answers
51 views
Pitch detection library, basic architecture
I'm a mechanical engineer/amateur programmer trying to learn modern C++. I'm working on a personal project where I'm building a library that uses PortAudio to abstract some basic audio processing, ...
0
votes
0answers
10 views
Audio Feature Extraction
Playing around with Matlab and making my own speech recognition system. I wasn't sure as to whether the vectorisation I have done is a good idea or not.
Any pointers would be greatly appreciated
<...
2
votes
0answers
99 views
Downloading and transcoding music from YouTube
This is a music downloader and transcoder based on Youtube-Dl and VLC. It is written in Python 3. The PAFY Python module is required in addition to VLC. Currently, the cancel button is not functional ...
5
votes
1answer
304 views
Playing sound in JavaFX when button is pressed, window pops up
So I made a class for playing a sound in JavaFX when a button is pressed, a window pops up... I don't know about the quality of the code though. I don't know if I used the best way to play the sound. ...
7
votes
3answers
256 views
Morse code translator GUI
I made a Morse code translator in Java in which a user inputs a word/words into a text field and the program converts it to Morse code and beeps the Morse code. I have a feeling that my code could be ...
1
vote
1answer
181 views
Android music-streaming app
This is my first time building an Android app or even using Java in the first place. All of this code does work, but I'm hoping to optimize it or find out if things could be done more easily than how ...
2
votes
1answer
83 views
Encoding a list of frequencies as WAV audio
This code gets a list of signals with predefined frequency from struc.num
I need to encode it to wave format, so i use this code. This works, but i dont sure it is a correct decision to encode like ...
8
votes
0answers
32 views
Flac Converter And Organizer
I really like flac files, but my phone can't store them all. So I made a script for converting them, that slowly became a full featured flac organizer. I'd like to improve my programming skills, as ...
3
votes
1answer
51 views
AudioController class for managing audio in Unity games
I'm looking for a critique of this audio management system I wrote for Unity games. It references a JSON file to trigger the clips by events.
The main AudioController.cs class is pasted below. The ...
4
votes
1answer
74 views
Identify audio using Gracenote
This script records audio from the computer's output and passes it to a C program that fingerprints it and queries the Gracenote database. If it identifies the audio then it offers options to look it ...
1
vote
0answers
102 views
JavaScript sound manager (singleton / static object using observer pattern)
I have some JavaScript code i would like your feedback on please.
My goals:
SoundManager should be a singleton/static class that has one instance.
...
2
votes
2answers
982 views
Music player in Swift
I made a simple mp3 player that plays, pauses and stops a given song, shows the time elapsed, and has a volume control. I read the documentation and can't figure out the difference between the ...
0
votes
1answer
59 views
Playing audio from two data sources
I want to play some audio of two byte arrays. I was wondering whether it would be better to play them as two separate arrays both calling the method, or to put them into one array and play it from ...
1
vote
4answers
101 views
JS form verification
I have three checboxes in my form. I have to check which one is checked and start the action. What do you think? Is this the easiest way of doing it?
Checkbox 1 = cat
Checkbox 2 = dog
Checkbox 3 = ...
6
votes
1answer
255 views
Playing MIDI instruments in Java
This program offers 8 notes C, D, ..., A, B, C on keyboard keys 1, 2, ..., 8. Also, by typing Left or Right, you can cycle over MIDI instruments.
KeyboardPiano.java:
...
2
votes
1answer
67 views
ngCordova plugin for audio player
I wrote a Cordova plugin for an app that I'm working on, and now I'm trying to write an Angular definition to wrap my plugin. So far, I've followed the model in ng-cordova.js:
...
5
votes
4answers
327 views
Audio player for a website
I'm fairly new to jQuery and have decided to make a jQuery audio player for a website.
There are two versions of the way it selects the audio:
Here
Here
I removed some basic, not connected with the ...
3
votes
1answer
367 views
Serving a growing audio file with Django
I would like to serve a growing audio file (raw PCM audio for now) with the possibility of seeking. I tried to manage it with Apache, but in the end wasn't able to achieve what I wanted.
Now I ...
2
votes
1answer
343 views
Prepend data to stream in C#
I'm working on an XNA project that loads several resources that are packed into a single file. XNA can take a WAV file stream and turn that into a SoundEffect (seen below in "case ".wav"").
Since ...
16
votes
1answer
142 views
Musical Fizzbuzz
I wrote some code using ChucK : Strongly-timed, Concurrent, and On-the-fly
Music Programming Language and would like a review. I broke down the logic into a number of classes, all of which are shown ...
1
vote
1answer
64 views
Writing computer generated music to a wav.file in C - follow-up 2
See the previous iteration.
What's new: endianness is now handled more gracefully (only one endianness check, and convertion if need be) and music is more funky.
...
10
votes
4answers
322 views
Writing computer generated music to a .wav file in C - follow-up
See the previous and initial iteration.
See the next iteration.
Now I have refactored the code according to many suggestions made in the first iteration.
What's new:
I attempted to deal with ...
36
votes
5answers
4k views
Writing computer generated music to a .wav file in C
See the next iteration.
I wrote this simple C program for writing computer generated music to a WAV file over three years ago. I refactored it a little, but it does not look good to me. Any ...
11
votes
1answer
80 views
Improved Sound Control System
After a bit of work, I've changed my code a lot from the previous question:
I was recommended by George Mauer and schism to make a better structural design, so hopefully this new build is a bit ...
3
votes
1answer
86 views
Sound Control System
This is my sound system that allows for the following functionality:
One master volume that controls every sound.
A function to stop/pause every playing sound
A function to control every instance of ...
1
vote
1answer
102 views
Organize dynamic HTML generation function for audio player
I have some code that's part of my music-js library, and most of it is very organized, using object-oriented design for my AudioAnalyser and ...
5
votes
1answer
206 views
Comparing FFTs to deduplicate IVR recordings
I've got a Python script that traverses two file trees, checking all .wav files for duplication.
I'm still an undergrad, and have never worked with audio before. I'm not entirely sure this is going ...
3
votes
1answer
131 views
Simple audio playback system
I am trying to optimize my game written in Java and I used the VisualVM launcher for profiling and monitoring my game. What caught me by surprise was that my basic utility to play sound effects was ...
10
votes
2answers
134 views
Keyboard music maker
I enjoy making silly programs every once in a while. This is one of them. It makes nice sounding notes that vary slightly depending on the key being entered into a ...
15
votes
2answers
362 views
4
votes
2answers
331 views
A Note class which plays a note and stops it after specific period of time
This code plays a note for a specific period of time using NAudio.dll 1.3.8.
...
3
votes
1answer
131 views
Encoding variable-length quanties for MIDI
I was reading about the MIDI spec and I challenged myself to implement a function to convert an int32 to a variable length quantity uint32.
I didn't look it up or ...
30
votes
5answers
3k views
Recording Audio Continuously in C
As an ongoing little side project of mine, I've been working on recording audio in c. You can the code's progression by looking at past versions (V1.0, V2.0).
I've found that my past versions were ...
7
votes
1answer
433 views
Simple Java MIDI player followup
This is my second iteration of a simple Java MIDI player. I've made several amendments and would like to see if the code is now correctly implemented and readable. This follows on from the first ...
6
votes
2answers
6k views
Basic C++ tone generator
I'm trying to learn C++ (with experience in C and Java, inter alia).
I wrote a program to output a waveform of multiple (superimposed) tones, each varying in pitch.
To execute:
Compilation: ...
6
votes
1answer
331 views
Simple Java MIDI player
I created a simple program that allows you to create and play MIDI sounds.
I've used the MVC approach and I’d like to know if there are any improvements to be made regarding the design and structure ...
1
vote
0answers
80 views
Web Audio Oscillator Waveform
I'm currently working with Web Audio for creating a simple synth like project in the browser and implementing controls for the Oscillators via jQuery/jQueryUI:
...
7
votes
1answer
73 views
Python script audibly represents itself
I was just messing around with python making wav files; when I came up with this (what I think is) pretty neat script. It takes each character and represents it ...
6
votes
1answer
826 views
Beat detection algorithm implementation
What is the quality of the code I've written? Is it easy to read or is it a low-quality piece of code? Also, is there any way I can improve the algorithm itself (beside changing C parameters)?
...
3
votes
2answers
375 views
Playing pure sinusoidal tones
I wrote a simple sound player to use as part of my MorseString class. I am new to using sounds (in fact, I was helped a lot by Google) and I don't know if this is ...
4
votes
1answer
596 views
Morse code string - follow-up 2
This is my second follow-up. Major changes made:
Use a Map instead of an enum for the Morse characters
Added ...
1
vote
3answers
208 views
AudioMetaTagger: recursively read files and gather metadata
So the idea is to read metadata recursively in a chosen directory, load their metadata and display it into a table.
Here is the simplified example of what I am doing.
...
-3
votes
1answer
95 views
Count percentage of audio samples exceeding a threshold
I have this practice question that I have an answer to:
In this stage of the project, you will identify any "danger" spots, in which the SPL is greater than or equal to 80
dB (the value above ...
10
votes
1answer
2k views
Piano app in Swift
I'm making my first app in Swift: a Piano app. I'd like to get your feedback especially about how I can make codes shorter. I maybe have to use arrays and loops and something, and searched by myself ...
6
votes
2answers
137 views
Performance of speech enhancement code for Android app
I wrote a speech enhancement code for an Android App. The algorithm runs on 256 size frames of voice samples. On my PC the code runs per about 5ms per frame, while on my Nexsus 5 it more like 50ms per ...