从头开始创建C#一个mp3文件 [英] Create an mp3 file from scratch C#

查看:276
本文介绍了从头开始创建C#一个mp3文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于一些实验的一部分,我想到了什么,我怎么可以从头开始创建在C#中,实际上听起来象是,例如,一个.MP3文件,创建播放音符一个mp3文件:C#或降B?

As part of some experimentation, I thought of something, how can I create a .mp3 file from scratch in C#, that actually sounds like something, e.g, create an mp3 file that plays the note: C#, or B flat?

我怎样才能做到这一点,它必须是一个MP3文件,而不是一个wav,或其他任何东西。

How can I achieve this, and it must be an mp3 file, not a wav, or anything else.

推荐答案

所以我不会是能够给你确切的code,但我可以给一个起点。

So I'm not going to be able to give you exact code, but I can give a starting point.

所以基本上的步骤将是


  1. 找到您想要的波的频率。看看这个。 C#(不错的选择的方式!)是17.32HZ

  2. 转换频率,以 LPCM ,这仅仅是一个系列的幅度值

  3. 转换的LPCM EN codeD数组MP3文件。这可能是最难的,但LPCM形式的 WAV格式的基础上,有转换器转换这为MP3。看一看找到了n音讯baalazamon。它支持PCM。

  1. Find the frequency of the wave you want. Look at this. C# (nice choice by the way!) is 17.32HZ
  2. Convert the frequency to LPCM, which is just a series of amplitude values.
  3. Convert the LPCM encoded array to an MP3 file. This is probably the hardest, but LPCM forms that basis of the WAV format and there are converters to convert that to MP3. Have a look at the NAudio baalazamon found. It supports PCM.

这篇关于从头开始创建C#一个mp3文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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