52 lines
1.3 KiB
JavaScript
52 lines
1.3 KiB
JavaScript
// ==ByteBeat==
|
|
// ^ above line must be exactly like that and be first.
|
|
// this header contains metadata for the song
|
|
// specify fields with lines like "// @field-name field-value"
|
|
// all fields come with defaults, shown below
|
|
//
|
|
//
|
|
// Playback mode. Possible values:
|
|
// - bytebeat : 0..255 ints, wrapped
|
|
// - sbytebeat : -128..127 ints, wrapped
|
|
// - floatbeat : -1..1 floats, clamped
|
|
// - funcbeat : floatbeat but you return a func
|
|
//
|
|
// @mode bytebeat
|
|
//
|
|
//
|
|
// Sample rate
|
|
//
|
|
// @freq 8000
|
|
//
|
|
//
|
|
// Set this to "no" if your code depends on side effects from
|
|
// previous samples, and doesn't work with constant jumps of
|
|
// `t` well.
|
|
//
|
|
// @parallel yes
|
|
//
|
|
//
|
|
// Set this to "no" if your code doesn't work with jumps of `t`
|
|
// at all. For example "Time Is A Suggestion", where `t` is not
|
|
// used at all and the song just guesses the correct value.
|
|
//
|
|
// @seekable yes
|
|
//
|
|
//
|
|
// If enabled, upscales the song to 48kHz with nearest neighbor.
|
|
// By default enabled if sample rate is below 44100.
|
|
//
|
|
// @f48k auto
|
|
//
|
|
//
|
|
// If enabled passes the entire song through a high-pass filter
|
|
// with a pass frequency of like 15 Hz. This ensures that the
|
|
// wavefront is centered at the, well, center. You may disable
|
|
// this if your song outputs a properly centered wave.
|
|
//
|
|
// @dcClean yes
|
|
//
|
|
// ==/ByteBeat==
|
|
|
|
t*(42&t>>10)
|