How to fire sounds with various frequencies
Hello,
I'm willing to create a program to check how people hear sounds and plot curves based on audible frequencies.
Are there java classes to play a sound at a particular frequency. ?
I'm running Windows XP on a PC with just speakers and earphone.
Thanks to point me to the good package (if it exists) or to provide me with a sample code.
There's a bug in the forum software that's inserting
a space when displaying long urls, like here:
c2coff=1& q=test
Darn, didn't notice the blanks. Usually they're more obvious.
b) searching for the keywords you used doesn'tbring
up any code as far as I saw. Funnily, though, it
returns this thread...Then I guess that you skipped over this one:
http://www.softsynth.com/jsyn/tutorial/
(#10 in the list)
and this one:
http://javaboutique.internet.com/audio/
Very probably. All I saw on my list were online hearing tests, but no code. :) Thanks.
Similar Messages
-
How to combine sound with video to an AVI Using IMAQ?
I need to combine sound with video I capture and write it out as an AVI. Is there anyway in Labview to combine sound with and AVI? Or an easy to use third party product?
Hello,
The AVI tools that are provided with Vision allow for data to be added to your video. Sound information can be stored this way, but if you are looking for a way to add audio support to your video (such that it will play the sound file when the video is played in Windows Media Player or other applications) you may want to look into finding a shareware or freeware product that can accomplish this. LabVIEW does not have tools specifically targetted to this operation.
Good luck,
Robert -
How to sync sound with movie when exporting from iMovie
i have problems with sound synchronization with movie. mostly is movie delayed few seconds behind sound. also sound is repeatedly missing - under certain frequency. videos are prepared in iMac iMovie and exported in to the file and stored on synology. how to fix this trouble before exporting from iMovie?
playing movie on imac works without problemI have a collection of Apple Support documents about passwords, some of which might be of help ...
iOS: Forgot Passcode or Device Disabled
http://support.apple.com/kb/ht1212
iOS Passcodes
http://support.apple.com/kb/ht4113
Find My iPhone, iPad, iPod a Touch or Mac
https://www.apple.com/support/icloud/find-my-device/
Find My iPhone Activation Lock
http://support.apple.com/kb/HT5818
Find My iPhone Activation Lock: Removing a Device from a Previous Owner's Account
http://support.apple.com/kb/ts4515
Apple release Tool to check the Activation Lock Status of iOS Devices
http://www.idownloadblog.com/2014/10/01/activation-lock-status-check/ -
No Sound with Various FM transmitters
I just bought my girlfriend a Nano and gave her my Monster ICarPlay so she could listen to it in the car. When we connect it, we get no sound. She says she has tried it with someone else's transmitter at her job and THAT didn't work either. Is anyone else having a similiar problem? Any ideas how to fix it?
Actually, we fixed it (in the most odd way I can think of). For some reason, plugging in the headphones and removing them did the trick. I can't imagine why that would make any difference, but it did. Thanks anyway!
-
Flash Pro, How can preview sound with the vidio on embedded video on the timeline
I am using a windows 7 based machine Flash Pro CC. I embedded the video on the timeline, basically a person talking. Want to put pictures in and out during certain times of the discussion but when I press play on the preview these is no sound. When I test publish the project I get sound. How do I get the sound on the embedded video to play on the preview?
Make sure that you have the latest version of > Safari 4.1 for Tiger
Then check and update your > Adobe - Flash Player -
How to fire event with parameter?
Hi folks,
does anyone know how to use the event parameter functionality?
My idea is to fire an event within the richisland and pass a parameter value. As I recognized the function
var myParameter:Number = new Number();
FlashIsland.fireEvent(this,"myEvent",myParameter);
On WD side in ROOTUIELEMENTCONTAINER I created a child element of type GACEvent, named myEvent. This event has a GACEventParameter named myParameter.
But running the app I am getting a dump:
WebDynpro Exception: ERROR: GAC_EVENT_PARAMETER 'myParameter' missing (GAC_EVENT='myEvent')
Any idea of how to fix this?Hi,
I solved it now. The correct syntax is:
FlashIsland.fireEvent(this, 'myEvent', {myParameter:myValue});
Hope it helps you too.
Greets -
Can anyone check this out for me? I'm intending to switch to Vista if there are no issues, so please, would anyone please check if there are any dropouts or delays during playback of MIDI files (especially with a lots of fast notes)? Please?
Thank you both very very much! Well, I guess I'll have to stick with XP! Maybe in a few YEARS when there's some other after-Vista operating system, maybe then it will finally work the way it should!
Once again, thank you all -
How to record sound with JMF?
I just want to record a clip of sound and save it in a WAV file. I exhausted the web but just couldn't find a tutorial. Would someone be kind enough to give me a tutorial or a sample code? The simpler the better. Thanks.
Hi there,
The following lines of code will record sound for 5 sec and save it in file C:/test.wav.
import java.io.IOException;
import javax.media.CannotRealizeException;
import javax.media.DataSink;
import javax.media.Format;
import javax.media.Manager;
import javax.media.MediaLocator;
import javax.media.NoDataSinkException;
import javax.media.NoProcessorException;
import javax.media.NotRealizedError;
import javax.media.Processor;
import javax.media.ProcessorModel;
import javax.media.format.AudioFormat;
import javax.media.protocol.FileTypeDescriptor;
public class WAVWriter {
public void record(){
AudioFormat format = new AudioFormat(AudioFormat.LINEAR, 44100, 16, 1);
ProcessorModel model = new ProcessorModel(new Format[]{format}, new FileTypeDescriptor(FileTypeDescriptor.WAVE));
try {
Processor processor = Manager.createRealizedProcessor(model);
DataSink sink = Manager.createDataSink(processor.getDataOutput(), new MediaLocator("file:///C:/test.wav"));
processor.start();
sink.open();
sink.start();
Thread.sleep(5000);
sink.stop();
sink.close();
processor.stop();
processor.close();
} catch (NoProcessorException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (CannotRealizeException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (NoDataSinkException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (NotRealizedError e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
public static void main(String[] args) {
new WAVWriter().record();
}I hope this will help. Don't forget to go through JMF guide (http://www.cdt.luth.se/~johank/smd151/jmf/jmf2_0-guide.pdf), especially page 81... it's not always helpfull, but sometimes, it may give you some good answers.
Happy coding!!! -
How to record sound with Java Sound?
I just want to record a clip of sound and save it to a WAV file. I exhausted the web but didn't find a tutorial. Would someone be kind enough to give me a tutorial or a sample code? The simpler the better. Thanks.
Here's the code I used to record and play sound. Hope the length do not confound you.
import javax.sound.sampled.*;
import java.io.*;
// The audio format you want to record/play
AudioFormat.Encoding encoding = AudioFormat.Encoding.PCM_SIGNED;
int sampleRate = 44100;
byte sampleSizeInBits = 16;
int channels = 2;
int frameSize = 4;
int frameRate = 44100;
boolean bigEndian = false;
int bytesPerSecond = frameSize * frameRate;
AudioFormat format = new AudioFormat(encoding, sampleRate, sampleSizeInBits, channels, frameSize, frameRate, bigEndian);
//TO RECORD:
//Get the line for recording
try {
targetLine = AudioSystem.getTargetDataLine(format);
catch (LineUnavailableException e) {
showMessage("Unable to get a recording line");
// The formula might be a bit hard :)
float timeQuantum = 0.1F;
int bufferQuantum = frameSize * (int)(frameRate * timeQuantum);
float maxTime = 10F;
int maxQuantums = (int)(maxTime / timeQuantum);
int bufferCapacity = bufferQuantum * maxQuantums;
byte[] buffer = new byte[bufferCapacity]; // the array to hold the recorded sound
int bufferLength = 0;
//The following has to repeated every time you record a new piece of sound
targetLine.open(format);
targetLine.start();
AudioInputStream in = new AudioInputStream(targetLine);
bufferLength = 0;
for (int i = 0; i < maxQuantums; i++) { //record up to bufferQuantum * maxQuantums bytes
int len = in.read(buffer, bufferQuantum * i, bufferQuantum);
if (len < bufferQuantum) break; // the recording may be interrupted
bufferLength += len;
targetLine.stop();
targetLine.close();
//Save the recorded sound into a file
AudioInputStream stream = AudioSystem.getAudioInputStream(new ByteArrayInputStream(buffer, 0, bufferLength));
AudioFileFormat.Type fileType = AudioFileFormat.Type.WAVE;
File file = new File(...); // your file name
AudioSystem.write(stream, fileType, file);
//TO PLAY:
//Get the line for playing
try {
sourceLine = AudioSystem.getSourceDataLine(format);
catch (LineUnavailableException e) {
showMessage("Unable to get a playback line");
//The following has to repeated every time you play a new piece of sound
sourceLine.open(format);
sourceLine.start();
int quantums = bufferLength / bufferQuantum;
for (int i = 0; i < quantums; i++) {
sourceLine.write(buffer, bufferQuantum * i, bufferQuantum);
sourceLine.drain(); //Drain the line to make sure all the sound you feed it is played
sourceLine.stop();
sourceLine.close();
//Or, if you want to play a file:
File audioFile = new File(...);//
AudioInputStream in = AudioSystem.getAudioInputStream(audioFile);
sourceDataLine.open(format);
sourceDataLine.start();
while(true) {
if(in.read(buffer,0,bufferQuantum) == -1) break; // read a bit of sound from the file
sourceDataLine.write(buffer,0,buffer.length); // and play it
sourceDataLine.drain();
sourceDataLine.stop();
sourceDataLine.close();You may also do this to record sound directly into a file:
targetLine.open(format);
targetLine.start();
AudioInputStream in = new AudioInputStream(targetLine);
AudioFileFormat.Type fileType = AudioFileFormat.Type.WAVE;
File file = new File(...); // your file name
new Thread() {public void run() {AudioSystem.write(stream, fileType, file);}}.start(); //Run this in a separate thread
//When you want to stop recording, run the following: (usually triggered by a button or sth)
targetLine.stop();
targetLine.close();Edited by: Maigo on Jun 26, 2008 7:44 AM -
Vox: how to get sound with no line-in?
Pardon my french, but I'm up creek without a paddle...
I can't seem to get the sound working because I don't have a "line in" input on my laptop. I read that I can use the mic input, but it doesn't work!
I have WinXP pro and an HP Compaq nc8000 laptop. What do I need to do - step by step...
*Tronaldo*i split this from the sticky as that is only for tips and tricks. it does state that you should start a new topic if you need help. so i have done that for you.
it does say that you should reduce the microphone recording volume. -
How to make impdp with various files
Hi, I ran the following command to make the export of my database.
/u01/app/oracle/product/10g/bin/expdp newsys/mypass@prd schemas=NEWSYS directory=DMPDIR dumpfile=prd_newsys%U.dmp filesize=2G logfile=prd_newsys.log
This generated a 3 files: prd_newsys01.dmp / prd_newsys02.dmp / prd_newsys03.dmp
How I make a import?I ran this command: /u01/app/oracle/product/10g/bin/impdp newsys/mypass@tst schemas=NEWSYS directory=DMPDIR dumpfile=prd_newsys%U.dmp
But returns:
Import: Release 10.2.0.1.0 - Production on Sunday, 08 March, 2009 21:46:34
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Release 10.2.0.1.0 - Production
Master table "NEWSYS"."SYS_IMPORT_SCHEMA_05" successfully loaded/unloaded
Starting "NEWSYS"."SYS_IMPORT_SCHEMA_05": NEWSYS/********@tst schemas=NEWSYS directory=DMPDIR dumpfile=prd_newsys%U.dmp logfile=import.log
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
ORA-39126: Worker unexpected fatal error in KUPW$WORKER.LOAD_METADATA
ORA-31640: unable to open dump file "/backup/oracle/prd_newsys01.dmp" for read
ORA-19505: failed to identify file "/backup/oracle/prd_newsys01.dmp"
ORA-27046: file size is not a multiple of logical block size
Additional information: 1
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
ORA-06512: at "SYS.KUPW$WORKER", line 6273
PL/SQL Call Stack
object line object
handle number name
0x418748f0 14916 package body SYS.KUPW$WORKER
0x418748f0 6300 package body SYS.KUPW$WORKER
0x418748f0 3514 package body SYS.KUPW$WORKER
0x418748f0 6889 package body SYS.KUPW$WORKER
0x418748f0 1262 package body SYS.KUPW$WORKER
0x4aece4b0 2 anonymous block
Job "NEWSYS"."SYS_IMPORT_SCHEMA_05" stopped due to fatal error at 21:48:08 -
How to play movies with different ext like wmv and...
need to know how to play movies with various ext like wmv..mpeg..vlc on e7
If the phone's built-in video player does not handle those formats, your option are:
- find some other video player app that does, or
- convert the videos to a supported format
The E7 supported video formats are listed on, e.g., this page:
https://www.developer.nokia.com/Devices/Device_specifications/E7-00/
Hit "Expand all" and scroll down to "Video Playback Formats". -
My iPad does not have sound when on the Internet, including YouTube, but does have sound with iTunes and other apps. How can I correct this?
If you are sure that you have sound in other apps - and if you can still hear keyboard clicks and get notifications, then system sounds are not muted. Try this and see if it works.
Close all apps completely and reboot the iPad.
Go to the home screen first by tapping the home button. Double tap the home button and the recents tray will appear with all of your recent apps displayed at the bottom. Tap and hold down on any app icon until it begins to wiggle. Tap the minus sign in the upper left corner of the app that you want to close. Tap the home button or anywhere above the task bar.
Reboot the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider if it appears on the screen - let go of the buttons. Let the iPad start up. -
How can I sync my various email accounts into an iCloud account. Example. I have an embarqmail.account. How can I get it to sync with iPhone, iPad, iMac so that I don't have to read or review eMails on all 3 devices. Thanks
You need OSX 10.7.2 or higher in order to access icloud. The mobile me account is now defunct (it closed down more than a year ago).
-
I have moved permanently from the US to live in the UK. when I try to download a UK app I am often told that I cannot use a UK Apple sstore, only a US store. I need to access various UK stores how can I deal with this?
Try here
http://support.apple.com/kb/HT1311
when you have UK Cards etc best to change as well
Maybe you are looking for
-
Command Center Crashes When Launched
MS-7738 / Bios 3.7 / Windows 7 When I run the command center v1.0.0.65 the screen loads, I see the GUI, then windows error message appears "commandcenter has stopped working" Have tried uninstall, re-install of command center and also same for .Net
-
VERIZON IS QUICK TO TAKE YOUR MONEY BUT NOT GIVE IT BACK
I ordered 3 phones on 1/30/2015 (2 used Samsung Galaxy S4's and a new Samsung Galaxy s5) I had to place each order separately due to each one being on the prepaid plan. After I placed the second order for the S5, I received a call from verizon's frau
-
IPhone and Nano syncing...
I currently have my iPhone synced to my laptop, and my nano synced to another laptop. I am now wishing to get rid of the iphone and the old laptop, and wondering if I will be able to easily sync my nano to my new laptop with little bother? If I remem
-
Lion Safari 5.1 back and forward gestures not working.
Is anyone else having problems with some of the gestures in Safari? They work about 20% of the time. The page moves and the elastically snaps back rather than changing to a previous page.
-
I have a canvas with a drawing added to a Panel on my applet. I posted the applet on my website, when I visit the site, after the page is refreshed, the canvas disappears. Also, once I've opened Safari, if I revisit the page, the canvas won't show up