0

I want to create a sine wave file and apply some modifications like change in amplitude etc. at specific time intervals to the sine function. Any suggestions on how to go about it? An equivalent of https://ccrma.stanford.edu/software/stk/hello.html this c++ library. Any suggestions on some good external library in java?

ishan
  • 1,029
  • 1
  • 12
  • 19

1 Answers1

0

Use java sound api. Read about converters that allow you to write dufferent format including wave here.

Java sound api included to jdk, so no third party library is needed.

alexey28
  • 5,170
  • 1
  • 20
  • 25
  • What I am looking for is a simple elegant function which let me creates and modify audio sine waves. An equivalent of https://ccrma.stanford.edu/software/stk/hello.html this c++ library. Any suggestions on some good external library in java? The generic java api does not provide a simple and elegant solution – ishan Jun 08 '12 at 09:19
  • I don't know such library that do this job for you. But if it is hard for you to write 10 strings method that generate sin signal and write it into byte buffer or directlly to OutputStream - you can spend several days searching for solution. Or write this simple method for 10 minutes. – alexey28 Jun 08 '12 at 09:32
  • Thanks, I figured I might as well use the c++ library. I would have preferred to write my own, but it would definitely take more time than writing 10 strings method. Anyways I am calling the executable from Java and it works quite well for me. Thanks everyone. – ishan Jun 15 '12 at 07:56