How to create a sound file in Java

Currently, I want to create "fractal music." I created the LSystem fractal generator for a 2D drawing, so I can understand how the sound will be generated and prepare for the generation of the files.

I tried to learn how to create and play sound files, and currently I have very little knowledge of Java Sound. I found a useful stream showing how to play sound from a clip and sequencer (I am NOT EXACTLY sure what it is), but I do not know how I can generate the information needed to create an audio file.

I understand that I will probably use byte data (something that is new to me too), but I know little how to make sound at all. Basically, I don’t know what I need to create the initial sounds, such as single pitches, the length of the tone and put them on the same line of the audio input.

+3
source share

Source: https://habr.com/ru/post/1276007/


All Articles