java wav文件,Java中Wav文件的音乐转录

该项目旨在使用Java实现音乐转录,过程包括从WAV文件获取音符信息,创建MIDI文件以及生成乐谱。博主已经创建了一个能录音并保存为WAV文件的Applet,但遇到困难在于解析WAV文件中的音符,转换为MIDI文件以及生成对应的乐谱。尝试过使用FFT和数据分段,但未取得理想结果。寻求帮助以完成上述Java编程任务。
摘要由CSDN通过智能技术生成

I have project about music transcription using Java, the thing is,, I have created an applet that records sound and saves it into a WAV file, the player should only play the piece he/she would like to transcribe, after that I am stuck at the point were I have to get information from the saved WAV file and use this information to create a MIDI file,, and after creating the MIDI file I have to generate a Musical Score for it (Sheet Music) and all these must be done in Java.

I searched everywhere for a clear explanation on how these stuff can be done, but I did not find anything direct :( since I am new to Java, I would like anybody to help me with this please, the topics that I am having trouble programming are:

Getting information about notes being played in the WAV file.

Knowing the Notes.

Creating a MIDI file equivalent to the WAV file.

Generate a SCORE from the MIDI file.

I have also tried Fast Fourier Transform after performing Segmentation on the data being read, but I think that went absolutely in the wrong direction :(

Please if anybody can help me on the topics specified above, and how to program these only in Java, it would be really highly appreciated :)

By the way, the project is:

Player plays notes on Piano >> Records his playing >> Player gets the SCORE of his playing.

解决方案

I am by no means an expert in this area, so I apologise in advance if this is all rubbish.

To get the notes from the file, I think you need to do an FFT (Fast Fourier Transform) on the WAV file, but with only like 10ms of sound at a time. Then you find the highest peak on the FFT for that time frame, and move on to the next "frame" of 10ms, or whatever. You do the FFT again, and if the highest peak is a different frequency to the previous peak, then it will say it's a new note. To see how long the notes are, count the number of peaks within a certain threshold of each other and multiply them by the time you are using for each frame (10ms, etc)

I will say again, I am not expert and there are probably other ways of doing it.

That aside, I hope this helps... even a little.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值