javasound Questions

7

Solved

Can you please suggest that how can i write a piece that plays a song.? I tried the following snippet but i get the this exception: import sun.audio.*; import java.io.*; class tester { public s...
Jolt asked 14/4, 2011 at 17:56

2

Solved

My code to convert mp3 to wav is: package audio1; import java.io.File; import javax.sound.sampled.AudioFileFormat; import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioInputStr...
Maricamarice asked 29/12, 2012 at 19:32

2

I have a .wav file. I want to get the PCM data from that sound file, so that I can get the individual data chunks from the sound and process it. But I don't know how to do it. Can anyone tell me ...
Barrada asked 25/8, 2012 at 8:25

6

Solved

I am using the following code to play a sound file using the java sound API. Clip clip = AudioSystem.getClip(); AudioInputStream inputStream = AudioSystem.getAudioInputStream(stream); clip.open...
Wot asked 17/2, 2009 at 17:36

3

tl;dr For future readers, recording real-time audio is not possible (for now) with Java or C#. Use C++, as it provides a plethora of audio api's. My goal is to get the current sound played on a ...
Addison asked 9/8, 2016 at 4:44

2

Solved

When the following method is executed: private void beep_player_1() { try { //clip_Player_2.close(); clip_Player_1 = AudioSystem.getClip(); ais = AudioSystem.getAudioInputStream(new File(Consta...
Naima asked 6/4, 2013 at 14:45

4

Solved

Does anybody know of anything that exists in the Java world to map midi note numbers to specific note names and octave numbers. For example, see the reference table: http://www.harmony-central.com...
Alcala asked 3/4, 2009 at 5:44

7

Solved

What's the simplest way to generate a sine wave sound at any frequency in Java? A sample size more than 2 bytes would help, but it doesn't really matter.
Sula asked 25/12, 2011 at 23:20

3

Solved

What is the difference between sample rate and frame rate? I tried to check a song and found sample rate and frame rate using java.They have same value, It makes me confuse. doesn't frame consist ...
Odetteodeum asked 25/10, 2013 at 12:9

3

Solved

Using Java is it possible to capture the speaker output? This output is not being generated by my program but rather by other running applications. Can this be done with Java or will I need to reso...
Prokopyevsk asked 10/7, 2011 at 23:14

4

Solved

I'm reading a wav-file to a byte array using this method (shown below). Now that I have it stored inside my byte array, I want to change the sounds volume. private byte[] getAudioFileData(final St...
Downandout asked 23/1, 2013 at 17:36

1

Using Java, I'm trying to record sound from the default microphone and show the current volume and mute status (as set at OS level, not interested in checking bytes if possible). So far, I can get ...
Lioness asked 19/1, 2018 at 14:11

4

My project is 'Speech Recognition of Azeri speech'. I have to write a program that converts wav files to byte array. How to convert audio file to byte[]?
Translation asked 1/5, 2012 at 11:53

2

I thought I can find anything on this great site but now I seem to face the issue with no answer :) Please help! Thing is, I need to play up to 6 different wav files with 1 channel each into 6 cha...
Arleyne asked 12/10, 2012 at 16:8

2

Solved

I want to create a audio level meter in java for the microphone to check how loud the input is. It should look like the one of the OS. I'm not asking about the gui. It is just about calculating the...
Calutron asked 26/10, 2014 at 14:56

2

Solved

I keep getting the LineUnavailableException on line 34 of my code: https://www.refheap.com/21223 The error reads as javax.sound.sampled.LineUnavailableException: line with format PCM_SIGNED 44100....
Hollow asked 25/11, 2013 at 4:14

5

Solved

Given an InputStream called in which contains audio data in a compressed format (such as MP3 or OGG), I wish to create a byte array containing a WAV conversion of the input data. Unfortunately, if ...
Paphian asked 13/10, 2008 at 19:7

2

Solved

This question is usually asked as a part of another question but it turns out that the answer is long. I've decided to answer it here so I can link to it elsewhere. Although I'm not aware of a way...
Demonize asked 9/11, 2014 at 3:28

2

I don't know very much about Java's MIDI function. In fact, it utterly bewilders me. what I'd like to do however is just build a simple application that will play one note. How to play a single M...
Heffron asked 9/5, 2013 at 13:22

1

Solved

I created a thread to play an mp3 file in Java by converting it to an array of bytes. I'm wondering if I can keep track of the current play position as the mp3 is being played. First, I set up m...
Clostridium asked 6/3, 2016 at 2:16

1

Solved

I want to get the sound file at the URL provided in the code and play it (It is in mp3 format). I looked through some Stack Overflow questions related to this problem, and they all said to get mp3p...
Vassalage asked 23/1, 2016 at 23:8

2

I was experimenting with producing beep using Java. I found this answer on SO. I am using the code from that answer to produce beeps. The code is: import javax.sound.sampled.*; public class Sound {...
Obvolute asked 5/1, 2016 at 11:54

1

Solved

I am working on a program that analyzes the pitch of a sound file. I came across a very good API called "TarsosDSP" which offers various pitch analysis. However I am experiencing a lot of...
Vivl asked 5/7, 2015 at 15:13

2

Solved

When I try to get a beep by using Toolkit.getDefaultToolkit().beep(), it does not seem to work on any of my Windows computers. I also know someone who has the same problem, but they say it works on...
Frankforter asked 15/3, 2013 at 20:53

1

Solved

I want to modify the pitch of the audio clip dynamically based on the user input at different time instants, say if user enters change the pitch of the audio after 10 seconds then how can I achieve...
Comma asked 18/3, 2015 at 6:20

© 2022 - 2024 — McMap. All rights reserved.