The beginners guide of real-time audio processing (Part 1:Equalizer)

  • View
    5.451

  • Download
    0

Embed Size (px)

DESCRIPTION

9/28に開催された、SIG-Audio準備会#2での講演資料(スライド)です。 イコライザーの作り方と、フォートラン教の布教用資料(笑)です。

Text of The beginners guide of real-time audio processing (Part 1:Equalizer)

  • 1. Arc System Works Co., Ltd. .SIG AudioAudio Digital Signal Processing 1 : EQ -1:- (CTO) masuno@arcsy.co.jpHiroyuki Masuno Page 1
  • 2. Arc System Works Co., Ltd. .SIG AudioAudio Digital Signal Processing 1 : EQ (1) (Hiroyuki Masuno) (CTO) 1964108, 48() 26 / Hiroyuki Masuno Page 2
  • 3. Arc System Works Co., Ltd. .SIG AudioAudio Digital Signal Processing 1 : EQ (2) : masuno@arcsy.co.jp () webmaster@artemis-ica.com () Facebook : http://www.facebook.com/hiroyuki.masuno.7 Twitter : @HiroyukiMasuno LinkedIn : Hiroyuki Masuno 3DS/PSN Hiroyuki Masuno Page 3
  • 4. Arc System Works Co., Ltd. .SIG AudioAudio Digital Signal Processing 1 : EQ A4-DSP Engine Xbox360 XAPOWindows 48KHz IEEE754 (-1.0f1.0f) 1 = 1 = 256 = 256/48000 = 5.3 = 187.5HzHiroyuki Masuno Page 4
  • 5. Arc System Works Co., Ltd. .SIG AudioAudio Digital Signal Processing 1 : EQ 1. 2. () 3. XAudio2 4. EQ(NAX Music Player(PSVITA)) 5. () 6. ()Hiroyuki Masuno Page 5
  • 6. Arc System Works Co., Ltd. .SIG AudioAudio Digital Signal Processing 1 : EQ (x2x1x1) 0x4000-0x400F CPU: 6502A1.79MHz CPU 6502A+DAC=RP2A03Hiroyuki Masuno Page 6
  • 7. Arc System Works Co., Ltd. .SIG AudioAudio Digital Signal Processing 1 : EQ (1) (1983)(=19) MOS Technology 6502A, 1.79MHz 8 PC (2012)(=48) Intel Core-i7 3770K 3.9GHz, 4, 8 64 2,000Hiroyuki Masuno Page 7
  • 8. Arc System Works Co., Ltd. .SIG AudioAudio Digital Signal Processing 1 : EQ (2) CPUDSP Hiroyuki Masuno Page 8
  • 9. Arc System Works Co., Ltd. .SIG AudioAudio Digital Signal Processing 1 : EQ C -- : (2008/12) ISBN-10: 4274206505 ISBN-13: 978-4274206504 2,730Hiroyuki Masuno Page 9
  • 10. Arc System Works Co., Ltd. .SIG AudioAudio Digital Signal Processing 1 : EQ (0.21) Hiroyuki Masuno Page 10
  • 11. Arc System Works Co., Ltd. .SIG AudioAudio Digital Signal Processing 1 : EQ (2) WG (Wave Generator) VU BPM BPM(A4-BPM/A4-VMA)Hiroyuki Masuno Page 11
  • 12. Arc System Works Co., Ltd. .SIG AudioAudio Digital Signal Processing 1 : EQ 1 WindowsXAudio2XAPO XAPO: XAudio Audio Processing Object Hiroyuki Masuno Page 12
  • 13. Arc System Works Co., Ltd. .SIG AudioAudio Digital Signal Processing 1 : EQ ()(Attenuator) [][ ][APO] fIn fOut=fIn*0.5f fOutHiroyuki Masuno Page 13
  • 14. Arc System Works Co., Ltd. .SIG AudioAudio Digital Signal Processing 1 : EQ XAPO #pragma once // XAPO #include // class declspec(uuid("{5EB8D611-FF96-429d-8365-2DDF89A7C1CD}")) CA4FXAPOATT : public ATG::CSampleXAPOBase { public: // CA4FXAPOATT(); // ~CA4FXAPOATT(); // FXAPO (Xbox360, 48KHz, 16bit, 256samples1 WAVEFORMATEX) HRESULT LockForProcess(UINT32 InputLockedParameterCount, const XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS* pInputLockedParameters, UINT32 OutputLockedParameterCount, const XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS* pOutputLockedParameters); // FXAPO (Xbox360) void UnlockForProcess(); private: // ATGAPOBase // () void DoProcess(const A4FXAPOATTPARAMSTATS&, FLOAT32* __restrict pData, UINT32 cFrames, UINT32 cChannels); // RPC (FXAPO) void OnSetParameters(const A4FXAPOATTPARAMSTATS& params); };Hiroyuki Masuno Page 14
  • 15. Arc System Works Co., Ltd. .SIG AudioAudio Digital Signal Processing 1 : EQ XAPO (A4FXAPOATT.h) CA4FXAPOATT(); ~CA4FXAPOATT(); (360) HRESULT LockForProcess(UINT32 InputLockedParameterCount, const XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS* pInputLockedParameters, UINT32 OutputLockedParameterCount, const XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS* pOutputLockedParameters); void DoProcess(const A4FXAPOATTPARAMSTATS&, FLOAT32* __restrict pData, UINT32 cFrames, UINT32 cChannels); RPC(FXAPO) void OnSetParameters(const A4FXAPOATTPARAMSTATS& params);Hiroyuki Masuno Page 15
  • 16. Arc System Works Co., Ltd. .SIG AudioAudio Digital Signal Processing 1 : EQ void CA4FXAPOATT::DoProcess(const A4FXAPOATTPARAMSTATS &, FLOAT32 *__restrict pData, UINT32 cFrames, UINT32 cChannels) { // Locals int indexC, indexS; int indexAccess; int numSamples, numChannels; float fIn, fOut; // 1 numSamples = (int)cFrames; numChannels = (int)cChannels; // for (indexC = 0 ; indexC < numChannels ; indexC++) { for (indexS = 0 ; indexS < numSamples ; indexS++) { indexAccess = indexS * numChannels + indexC; fIn = pData[indexAccess]; fOut = fIn * 0.5f; pData[indexAccess] = fOut; } } }Hiroyuki Masuno Page