Java中Wav文件的音乐转录 [英] Music Transcription of Wav files in Java

查看:148
本文介绍了Java中Wav文件的音乐转录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有关于使用Java进行音乐转录的项目,事情是,我创建了一个记录声音的小程序并将其保存到WAV文件中,玩家应该只播放他/她想要转录的作品,之后如果我必须从保存的WAV文件中获取信息并使用此信息创建MIDI文件,并且在创建MIDI文件后,我必须为它生成一个乐谱(乐谱)以及所有这些必须用Java完成。

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.

我到处搜索了解这些东西是如何完成的明确解释,但我没有找到任何直接的东西:(因为我是新手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:


  1. 获取有关笔记的信息在WAV文件中播放。

  2. 了解笔记。

  3. 创建一个等同于WAV文件的MIDI文件。

  4. 从MIDI文件生成一个SCORE。

  1. Getting information about notes being played in the WAV file.
  2. Knowing the Notes.
  3. Creating a MIDI file equivalent to the WAV file.
  4. 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 :(

如果有人可以帮助我完成上面指定的主题,以及如何只用Java编写这些主题,那将非常感激:)

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.

要从文件中获取笔记,我认为你需要在WAV文件上进行 FFT (快速傅立叶变换),但只有像一次10毫秒的声音。然后你会在那个时间帧上找到FFT的最高峰值,然后继续前进到10ms的下一个帧,或者其他什么。你再次进行FFT,如果最高峰值与前一个峰值的频率不同,那么它会说它是一个新音符。要查看音符的长度,请计算彼此特定阈值内的峰值数量,并将它们乘以每帧使用的时间(10毫秒等)

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.

这篇关于Java中Wav文件的音乐转录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆