|
1 |
| -waveform-visualizer |
2 |
| -=================== |
3 |
| - |
4 |
| -audio theory |
5 |
| ------------- |
6 |
| - |
7 |
| -Analog audio consists of waves. To digitalize audio we take samples of the wave amplitude (http://en.wikipedia.org/wiki/Amplitude) at different intervals in time. |
8 |
| - |
9 |
| -The amount of samples taken during one second is called the sample rate (http://en.wikipedia.org/wiki/Sampling_(signal_processing)). For example the audio on CDs is sampled at 44.1kHz which means that we have to take 44100 samples per second. |
10 |
| - |
11 |
| -Each sample is a number within range of numbers called the bit depth (http://en.wikipedia.org/wiki/Audio_bit_depth), often that range is 16bit (means it can be a value from 1 to 65536), but a wave can be positive or negative which means our values can in the range -32768 to +32767 (-2^15 to 2^15-1 (minus one because of the zero)). |
12 |
| - |
13 |
| -PCM is an array of floating point values ranging from -1 to 1. they are represention a digital version of the wave. in webaudio, pcm the corresponds to an audio buffer. an audio buffer can store multiple channels. |
14 |
| - |
15 |
| -The PCM floating point numbers can be converted from or to a sounds bit depth, which then would be an array of intergers |
16 |
| - |
17 |
| -Flac is lossless but still the values got compressed but not in a way that alters them; mp3 and ogg are not lossless. aiff is the lossless non compressed apple format and wav the microsoft lossless and non compressed format. |
18 |
| - |
19 |
| -bit rate is a metric used to describe the amount of compression. common values are 128 and 192 kb/s. |
20 |
| - |
21 |
| - |
22 |
| -what is frequency? is a high frequency a high tone and a bass has a low frequency? frequency only for analog? the sample rate needs to be above frequency, right!? different notes produce different frequencies. minimum sample rate has be be at least twice the maximum frequency. maximum audible frequency is 22kHz!? |
23 |
| - |
24 |
| -what are decibels (dB)? the unit of amplitude!? only for analog sound!? bit depth of 16bit can be maximum of 98.09 dB whereas 20bit can 122.17 dB. |
25 |
| - |
26 |
| -what is volume? volume always the same. What does a reduction or increase in volume do? |
27 |
| - |
28 |
| - |
29 |
| - |
30 |
| - |
31 |
| - |
32 |
| - |
33 |
| -http://en.wikibooks.org/wiki/Sound_Synthesis_Theory/Sound_in_the_Time_Domain |
34 |
| - |
35 |
| -web audio api |
36 |
| -------------- |
37 |
| - |
38 |
| -audio context |
39 |
| -------------- |
40 |
| - |
41 |
| -The first thing you need to get is the audio context. If you already worked with canvas this might be something you have already done. |
42 |
| - |
43 |
| -The audio context is an object that has methods to interact with your audio in the browser. |
44 |
| - |
45 |
| -The audio context allows you to create audio nodes and then connect them together to build complex audio graphs. |
46 |
| - |
47 |
| -Audio nodes |
48 |
| ------------ |
49 |
| - |
50 |
| -There are different types of nodes, source nodes to get audio data from a server, from a microphone or even the audio tag. |
51 |
| - |
52 |
| -The modification nodes let you alter the audio sound and the analysis nodes does what its name suggests, it lets you analyze the audio for example to create visualizations. |
53 |
| - |
54 |
| -And finally destination nodes to output the audio. |
| 1 | +web audio API player |
| 2 | +==================== |
55 | 3 |
|
| 4 | +Web Audio API Working Draft 10: http://www.w3.org/TR/webaudio/ |
0 commit comments