Top Banner
Winamp Winamp Visualization Visualization Tutorial Tutorial Hadi Fadaifard Hadi Fadaifard
27

Winamp Visualization Tutorial Hadi Fadaifard. Introduction MP3 has become quite popular in the past 6 years. Good compression Winamp: The most popular.

Dec 21, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Winamp Visualization Tutorial Hadi Fadaifard. Introduction  MP3 has become quite popular in the past 6 years.  Good compression  Winamp: The most popular.

Winamp Visualization Winamp Visualization TutorialTutorial

Hadi FadaifardHadi Fadaifard

Page 2: Winamp Visualization Tutorial Hadi Fadaifard. Introduction  MP3 has become quite popular in the past 6 years.  Good compression  Winamp: The most popular.

IntroductionIntroduction

MP3 has become quite popular in the past 6 years.MP3 has become quite popular in the past 6 years. Good compressionGood compression

Winamp: The most popular MP3 player for WindowsWinamp: The most popular MP3 player for Windows

Other popular players:Other popular players: XMMS (Linux)XMMS (Linux) iTunesiTunes RealplayerRealplayer Windows Media PlayerWindows Media Player

Page 3: Winamp Visualization Tutorial Hadi Fadaifard. Introduction  MP3 has become quite popular in the past 6 years.  Good compression  Winamp: The most popular.

IntroductionIntroduction

All players have support for sound visualizationsAll players have support for sound visualizations

We will write a visualization plug-in for Winamp:We will write a visualization plug-in for Winamp: Free and most popular playerFree and most popular player Compact and user friendlyCompact and user friendly

Page 4: Winamp Visualization Tutorial Hadi Fadaifard. Introduction  MP3 has become quite popular in the past 6 years.  Good compression  Winamp: The most popular.

OverviewOverview

Plugin format and calling mechanismPlugin format and calling mechanism Drawing mechanismDrawing mechanism Conclusions and ResultsConclusions and Results

Page 5: Winamp Visualization Tutorial Hadi Fadaifard. Introduction  MP3 has become quite popular in the past 6 years.  Good compression  Winamp: The most popular.

Calling MechanismCalling Mechanism1

Plugin Module

Page 6: Winamp Visualization Tutorial Hadi Fadaifard. Introduction  MP3 has become quite popular in the past 6 years.  Good compression  Winamp: The most popular.

Calling MechanismCalling Mechanism1

Plugin Module

winampVisHeader

Page 7: Winamp Visualization Tutorial Hadi Fadaifard. Introduction  MP3 has become quite popular in the past 6 years.  Good compression  Winamp: The most popular.

Calling MechanismCalling Mechanism1

Plugin Module

Page 8: Winamp Visualization Tutorial Hadi Fadaifard. Introduction  MP3 has become quite popular in the past 6 years.  Good compression  Winamp: The most popular.

Calling MechanismCalling Mechanism1

Plugin Module

Page 9: Winamp Visualization Tutorial Hadi Fadaifard. Introduction  MP3 has become quite popular in the past 6 years.  Good compression  Winamp: The most popular.

Calling MechanismCalling Mechanism1

2

Plugin Module

winampVisHeader

Page 10: Winamp Visualization Tutorial Hadi Fadaifard. Introduction  MP3 has become quite popular in the past 6 years.  Good compression  Winamp: The most popular.

Calling MechanismCalling Mechanism1

2

Plugin Module

winampVisHeader

winampVisModule

Page 11: Winamp Visualization Tutorial Hadi Fadaifard. Introduction  MP3 has become quite popular in the past 6 years.  Good compression  Winamp: The most popular.

Calling MechanismCalling Mechanism1

2

Plugin Module

Page 12: Winamp Visualization Tutorial Hadi Fadaifard. Introduction  MP3 has become quite popular in the past 6 years.  Good compression  Winamp: The most popular.

Calling MechanismCalling Mechanism1

2

Plugin Module

Page 13: Winamp Visualization Tutorial Hadi Fadaifard. Introduction  MP3 has become quite popular in the past 6 years.  Good compression  Winamp: The most popular.

Calling MechanismCalling Mechanism1

2

Plugin Module

Page 14: Winamp Visualization Tutorial Hadi Fadaifard. Introduction  MP3 has become quite popular in the past 6 years.  Good compression  Winamp: The most popular.

Drawing MechanismDrawing Mechanism

Winamp calls Winamp calls RenderRender every every delayMSdelayMS msecs. msecs.

Data required by Data required by Render Render (e.g. (e.g. waveformDatawaveformData, , spectrumDataspectrumData) is passed to ) is passed to RenderRender as a pointer to the as a pointer to the current current VisModuleVisModule..

No restrictions on how No restrictions on how RenderRender draws onto the draws onto the visualization window; it can use any hardware visualization window; it can use any hardware accelerated API (e.g. DirectX or OpenGL) or no API at accelerated API (e.g. DirectX or OpenGL) or no API at all.all.

We will use OpenGL.We will use OpenGL.

Page 15: Winamp Visualization Tutorial Hadi Fadaifard. Introduction  MP3 has become quite popular in the past 6 years.  Good compression  Winamp: The most popular.

Render Function (simplified)Render Function (simplified)

Page 16: Winamp Visualization Tutorial Hadi Fadaifard. Introduction  MP3 has become quite popular in the past 6 years.  Good compression  Winamp: The most popular.

Drawing The WaveformDrawing The Waveform

Page 17: Winamp Visualization Tutorial Hadi Fadaifard. Introduction  MP3 has become quite popular in the past 6 years.  Good compression  Winamp: The most popular.

Improving Render FunctionImproving Render Function

A more complicated A more complicated RenderRender function: function:

1.1. Draw the Background.Draw the Background.2.2. Draw the Foreground: waveform and/or any other Draw the Foreground: waveform and/or any other

object in the sceneobject in the scene3.3. Save the frame buffer.Save the frame buffer.4.4. Add (blend in) the saved image to the background Add (blend in) the saved image to the background

image.image.5.5. Distort (transform) the background.Distort (transform) the background.

Page 18: Winamp Visualization Tutorial Hadi Fadaifard. Introduction  MP3 has become quite popular in the past 6 years.  Good compression  Winamp: The most popular.

Improving Render FunctionImproving Render Function

Problem: Processing the background image (e.g. Problem: Processing the background image (e.g. blending, blurring, etc) is computationally expensive.blending, blurring, etc) is computationally expensive.

Solution: Use the Graphics hardware (through OpenGL):Solution: Use the Graphics hardware (through OpenGL):

Create a 2D grid that covers the entire window (Offline).Create a 2D grid that covers the entire window (Offline). Texture map the background onto the grid (Online).Texture map the background onto the grid (Online). Transform the grid (Online).Transform the grid (Online).

Page 19: Winamp Visualization Tutorial Hadi Fadaifard. Introduction  MP3 has become quite popular in the past 6 years.  Good compression  Winamp: The most popular.

Improving Render FunctionImproving Render Function

Page 20: Winamp Visualization Tutorial Hadi Fadaifard. Introduction  MP3 has become quite popular in the past 6 years.  Good compression  Winamp: The most popular.

Improving Render FunctionImproving Render Function

Page 21: Winamp Visualization Tutorial Hadi Fadaifard. Introduction  MP3 has become quite popular in the past 6 years.  Good compression  Winamp: The most popular.

Improving Render FunctionImproving Render Function

Page 22: Winamp Visualization Tutorial Hadi Fadaifard. Introduction  MP3 has become quite popular in the past 6 years.  Good compression  Winamp: The most popular.

Improving Render FunctionImproving Render Function

Page 23: Winamp Visualization Tutorial Hadi Fadaifard. Introduction  MP3 has become quite popular in the past 6 years.  Good compression  Winamp: The most popular.

Improving Render FunctionImproving Render Function

Page 24: Winamp Visualization Tutorial Hadi Fadaifard. Introduction  MP3 has become quite popular in the past 6 years.  Good compression  Winamp: The most popular.

Improving Render FunctionImproving Render Function

Page 25: Winamp Visualization Tutorial Hadi Fadaifard. Introduction  MP3 has become quite popular in the past 6 years.  Good compression  Winamp: The most popular.

Render Function (improved)Render Function (improved)

Page 26: Winamp Visualization Tutorial Hadi Fadaifard. Introduction  MP3 has become quite popular in the past 6 years.  Good compression  Winamp: The most popular.

Drawing the BackgroundDrawing the Background

Transform the Grid (Rotate, Scale, Translate, etc)

Draw the Texture-mapped Grid

Page 27: Winamp Visualization Tutorial Hadi Fadaifard. Introduction  MP3 has become quite popular in the past 6 years.  Good compression  Winamp: The most popular.

ResultsResults

Winamp demoWinamp demo