简体   繁体   English

如何使用J2ME分析音乐文件(mp3)以便在Mobile上显示其频谱-Java ME

[英]How to analyse a music file (mp3) in order to display its spectrum on Mobile using J2ME - Java ME

Now I want to create a simple media player for Mobile. 现在,我想为Mobile创建一个简单的媒体播放器。 It will read a music file (default : mp3), then play it and display spectrum on screen. 它将读取一个音乐文件(默认值:mp3),然后播放并在屏幕上显示频谱。 But now I don't know how to analyse a music file. 但是现在我不知道如何分析音乐文件。 Please tell me way to analyse it. 请告诉我分析的方法。 Thank you so much ! 非常感谢 !

You don't have to parse the input files in order to get to the samples. 您不必解析输入文件即可获取样本。 Instead you can capture the sound currently played to get your hands on the raw audio data. 相反,您可以捕获当前播放的声音,以获取原始音频数据。 To draw a spectrum visualization of this you would have to perform a FFT on this data and the use the result to render your bars (or whatever you choose for you visuals). 要对此进行频谱可视化,您将必须对此数据执行FFT,并使用结果来渲染条形图(或为视觉效果选择的任何图形)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM