Skip to content

Commit 59cfe64

Browse files
committedAug 12, 2020
feat: audio flow
1 parent 8219569 commit 59cfe64

18 files changed

+994
-3
lines changed
 

‎README.md

+60-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,63 @@
22

33
key: vue3、music、webapp
44

5-
es6 音频库
5+
## 技术
6+
7+
使用 Web Audio API 实现简单的音频可视化
8+
使用 HTML5 API(AudioContext)实现可视化频谱效果
9+
10+
## 资料
11+
12+
audio 标签
13+
Audio 对象的实例 new Audio()
14+
15+
HTML5 中提供了[Web Audio API](https://developer.mozilla.org/zh-CN/docs/Web/API/Web_Audio_API),开发者可以通过这个 API 为音频添加特效,实现音频可视化效果。
16+
17+
es6 音频库
18+
Howler.js
19+
Annyang.js
20+
...
21+
[10 个优秀的 Javascript 的音频库](https://blog.csdn.net/u012612399/article/details/50071801)
22+
23+
鲸鱼音效,音乐可视化效果
24+
25+
FFmpeg
26+
Port of FFmpeg with Emscripten
27+
[ffmpeg.js](https://github.com/Kagami/ffmpeg.js)
28+
29+
协议(RTMP/HTTP(HLS))
30+
31+
WebGL 实现的粒子效果
32+
33+
three.js:
34+
const listener = new THREE.AudioListener();
35+
const sound = new THREE.Audio(listener);
36+
const loader = new THREE.AudioLoader();
37+
38+
this.waveform = new Uint8Array(analyser.frequencyBinCount);
39+
this.frequency = new Uint8Array(analyser.frequencyBinCount);
40+
41+
WebGL(全写 Web Graphics Library)是一种 3D 绘图协议,这种绘图技术标准允许把 JavaScript 和 OpenGL ES 2.0(OpenGL for Embedded Systems,OpenGL 嵌入式版本,针对手机、游戏机等设备相对较轻量级的版本)结合在一起,通过增加 OpenGL ES 2.0 的一个 JavaScript 绑定,WebGL 可以为 HTML 5 Canvas 提供硬件 3D 加速渲染,这样 Web 开发人员就可以借助系统显卡来在浏览器里更流畅地展示 3D 场景和模型了,还能创建复杂的导航和数据视觉化。
42+
43+
简介:Three.js 是 WebGL 的 JavaScript 3D 库,其对 WebGL 提供的接口进行了非常好的封装,简化了很多细节,大大降低了学习成本,成为前端开发者完成 3D 绘图的得力工具。
44+
45+
three.js 官方文档 :threejs.org/
46+
three.js 中文文档 : techbrood.com/threejs/doc…
47+
Three.js 整体认知(附:Three.js 功能概览)
48+
49+
threejs 三大组件(场景-scene,相机-camera,渲染器-renderer)
50+
51+
gsap => TweenMax
52+
53+
## 参考
54+
55+
- [手把手教你用 Js 实现音频可视化](https://www.jianshu.com/p/7c4f58ee8972)
56+
- [Web Audio API](https://developer.mozilla.org/zh-CN/docs/Web/API/Web_Audio_API)
57+
- [音频可视化引发的思考](https://www.jianshu.com/p/002d83bd98a3)
58+
- [Web Audio 在音频可视化中的应用](https://segmentfault.com/a/1190000020498421)
59+
- [利用 AudioContext 来实现网易云音乐的鲸鱼音效](https://segmentfault.com/a/1190000017090438)
60+
- [音乐可视化-Web Audio Api 接口,AudioContext 对象](https://baijiahao.baidu.com/s?id=1624606995991147075&wfr=spider&for=pc)
61+
- [模拟制作网易云音乐(AudioContext)](https://www.cnblogs.com/rynxiao/p/7798419.html)
62+
- [margox/vudio.js](https://github.com/margox/vudio.js)
63+
- [https://alex2wong.github.io/vudio.js/](https://alex2wong.github.io/vudio.js/)
64+
- []()

‎package-lock.json

+12-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"dayjs": "^1.8.29",
1515
"lodash": "^4.17.19",
1616
"register-service-worker": "^1.7.1",
17+
"three": "^0.119.1",
1718
"vue": "^3.0.0-rc.4",
1819
"vue-class-component": "^7.2.3",
1920
"vue-property-decorator": "^9.0.0",
@@ -36,10 +37,11 @@
3637
"eslint": "^7.4.0",
3738
"eslint-plugin-prettier": "^3.1.4",
3839
"eslint-plugin-vue": "^7.0.0-beta.0",
40+
"gsap": "^3.4.2",
3941
"prettier": "^2.0.5",
4042
"sass": "^1.26.10",
4143
"sass-loader": "^9.0.2",
4244
"typescript": "~3.9.7",
4345
"vue-cli-plugin-vue-next": "~0.1.3"
4446
}
45-
}
47+
}

‎src/App.vue

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
<div>
1111
<router-link to="/about">(🌽 ) => About</router-link>
1212
</div>
13+
<div>
14+
<router-link to="/music">(🌽 ) => Music</router-link>
15+
</div>
1316
</div>
1417
<div id="content">
1518
<router-view />

‎src/assets/596d78dfa523e.jpg

3.4 MB
Loading

‎src/assets/596d78e1b27e5.jpg

83.1 KB
Loading

‎src/assets/5f1a7c95f359c.jpg

1.17 MB
Loading

‎src/assets/5f1a7c9a3b617.jpg

697 KB
Loading

‎src/assets/5f2a711033267.png

3.64 MB
Loading

‎src/assets/5f3344e5311d2.jpg

269 KB
Loading
8.23 MB
Binary file not shown.
Binary file not shown.
Binary file not shown.

‎src/music-files/lol.mp3

2.06 MB
Binary file not shown.
2.56 MB
Binary file not shown.

‎src/router/index.ts

+6
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ const routes: Array<any> = [
2222
component: () =>
2323
import(/* webpackChunkName: "about" */ "../views/Github.vue"),
2424
},
25+
{
26+
path: "/music",
27+
name: "Music",
28+
component: () =>
29+
import(/* webpackChunkName: "about" */ "../views/Music.vue"),
30+
},
2531
];
2632

2733
const router = createRouter({

‎src/views/Music.vue

+910
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)
Please sign in to comment.