Skip to content

Commit

Permalink
Updates README again plus comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
TimArt committed Jul 19, 2017
1 parent f554f7b commit 5ffca99
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ Since the original demonstration above, I’ve fixed a lot of bugs, cleaned up s
- **OpenGL and shaders** are a pain to setup, but they are super powerful and modular once you know how to use them. (To other first time OpenGLers: don’t get discouraged, you’ll get it eventually. Also this website is insanely helpful: [LearnOpenGL.com](https://learnopengl.com/)). I’m no expert on OpenGL at all, but was able to make this.
- **Audio Waveform visualizations** actually exclude a good amount of data. They tend to average the data because there is so much of it. For example, the most standard audio sampling rate is 44,100 samples per second. If you were to attempt to visualize all 44,100 samples in a single second of audio with one sample per pixel on your screen, it wouldn’t even fit on the screen. My Mac has a horizontal resolution of 2,880 pixels. That would only allow you to visualize 1/15th of all the audio stored in a single second! Various strategies are used to average this data and produce a good looking waveform. This [blog post](http://www.supermegaultragroovy.com/2009/10/06/drawing-waveforms/) was very helpful. For my oscilloscope visualizations I used an interpolation technique instead of averaging samples together. I may write a post on this technique later.
- **OpenGL and the GPU** can handle a lot, including calculating and generating 3D points in realtime. In the 3D oscilloscope visualizer I used the geometry shader to calculate many points on the fly on the GPU. The upside to this is less CPU processing is used to calculate points, allowing the audio thread utilize the CPU without worry. The downside is that it takes a bit of extra time to load this visualizer because it must instantiate a lot of variables on the GPU for processing. In this situation I probably would’ve just calculated the points on the CPU since it wouldn’t really have been that intensive to calculate.
- **Dry-erase boards** are freaking awesome. To get a lot of the audio visualization algorithms mapped out I avidly used the dry erase boards. I looked like a mad scientist: [add funny image here . . .]
- **Dry-erase boards** are freaking awesome. To get a lot of the audio visualization algorithms mapped out I avidly used the dry erase boards. I looked like a mad scientist: ![oscilloscope drawing](https://timart.me/img/3davosc.jpg)
2 changes: 1 addition & 1 deletion Source/Oscilloscope2D.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class Oscilloscope2D : public Component,
uniforms->audioSampleData->set (visualizationBuffer, 256);
}

// Define Vertices for a Square
// Define Vertices for a Square (the view plane)
GLfloat vertices[] = {
1.0f, 1.0f, 0.0f, // Top Right
1.0f, -1.0f, 0.0f, // Bottom Right
Expand Down

0 comments on commit 5ffca99

Please sign in to comment.