• Stars
    star
    486
  • Rank 90,527 (Top 2 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 9 years ago
  • Updated almost 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

FastTracker 2 .xm module player in Javascript

xm.js

Build Status

FastTracker 2 .XM player, written for fun.

Demo

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 as XMPlayer.audioctx
  • XMPlayer.load(ArrayBuffer) -> returns true if loaded, otherwise barfs randomly
  • XMPlayer.play() -> starts playing
  • XMPlayer.pause() -> obvious
  • XMPlayer.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). e contains fields:
    • t - audio timestamp
    • vu - Float32Array of RMS power (volume) for each channel
    • scopes - [Float32Array] of oscilloscope data, one array per channel; XMView.scope_width contains # of samples to produce here
    • songpos - position in the song (# patterns played)
    • pat - pattern number currently playing
    • row - row within pattern
  • XMView.pause() - pause visualization
  • XMView.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.

More Repositories

1

cycloid

self-racing car platform
Jupyter Notebook
182
star
2

a1gpt

throwaway GPT inference
C++
139
star
3

asciitracing

sphere tracing in ascii
C++
105
star
4

tronbot

a1k0n's 2010 Google AI Challenge entry
C++
90
star
5

texturesynth

texture synthesizer; mainly for tile engines
C++
34
star
6

arduboy3d

a simple 3D demo for arduboy
C
24
star
7

autorustler

experimental R/C car autopilot
Jupyter Notebook
18
star
8

opl2

Yamaha YM3812 (OPL2) in javascript
Jupyter Notebook
16
star
9

303

experiments in 303 bassline resynthesis
Python
15
star
10

balancebot

little balancing robot
OpenSCAD
11
star
11

x0xb0x

git re-pack of x0xb0x code from sourcefource CVS
C
9
star
12

ants

My 2011 AIChallenge.org ants bot
C++
8
star
13

asm662

OKI 66201/66207/66301 assembler and disassembler, used in pre-1996 Honda ECUs
C
8
star
14

donut-raymarch

C
5
star
15

ghidra-msm66q59x

CSS
4
star
16

litex-c2

Silicon Labs C2 debug interface peripheral in Migen / LiteX
Python
4
star
17

asm66q59x

disassembler (and assembler?) for OKI nX-8/500S
Assembly
3
star
18

docker-rpi3-gcc8

docker image for ARM Cortex-53 gcc 8.x compiler
Dockerfile
3
star
19

a1k0n.github.io

JavaScript
2
star
20

rpi-cv-camcal

Raspberry Pi OpenCV camera calibration
C++
2
star
21

gsynth

Abandonware from 2001
C++
2
star
22

zerowing

raspberry pi zero HAT for RC cars
C
1
star
23

tetris-dcpu16

Tetris for DCPU-16 (for Notch's upcoming 0x10c)
C++
1
star
24

wowintro

reverse engineering and reimplementing http://www.pouet.net/prod.php?which=62498
Assembly
1
star
25

raidquaza

pokemon go raid coordination bot for Discord
Go
1
star
26

lallocprof

Lua 5.0 memory allocation profiler
C++
1
star