项目
在 GitHub 查看
a1k0n/jsxm
关于
使用 JavaScript 播放 FastTracker 2 的 .xm 模块
开发工具实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文xm.js
FastTracker 2 .XM player, written for fun.
There is an XM player and a visualizer which are separate components. The player API looks like this:
XMPlayer.init-> starts up audio context; it's available asXMPlayer.audioctxXMPlayer.load(ArrayBuffer)-> returnstrueif loaded, otherwise barfs randomlyXMPlayer.play()-> starts playingXMPlayer.pause()-> obviousXMPlayer.stop()-> obvious; call this before loading a new one
Loading trackview.js is optional; without it, the player won't do any visualizations. Or, you can override the following to get callbacks:
XMView.pushEvent(e)-> push an audio event onto the queue. Called once per tick (about 50Hz, controlled by song).econtains fields:t- audio timestampvu- Float32Array of RMS power (volume) for each channelscopes- [Float32Array] of oscilloscope data, one array per channel;XMView.scope_widthcontains # of samples to produce heresongpos- position in the song (# patterns played)pat- pattern number currently playingrow- row within pattern
XMView.pause()- pause visualizationXMView.stop()- stop/reset visualization
The code which defines what the buttons do and downloads songs and so
forth is in shell.js.
The player is fairly feature-complete, but is missing a bunch of effects.
MIT license.
探索相关项目
加载中…