Commit graph

115 commits

Author SHA1 Message Date
Andy Sloane
65a2ea2863 [#5] implement volume effect vibrato 2015-11-20 17:43:48 -08:00
Andy Sloane
8b3f318f60 [#19] handle loops of length 0
also more robust way to find sample offsets to load in the file
2015-11-20 17:42:41 -08:00
Andy Sloane
2679587654 update screen if pattern changes without row changing
this is solely for strobe - CELL II, pretty much...
2015-11-20 12:09:57 -08:00
Andy Sloane
34e975ef55 changed my mind: render 000 effect as ...
also make the track view much taller in the standalone player
2015-11-19 20:47:28 -08:00
Andy Sloane
89e6b9c554 fix Dxx effect
argument is BCD, so 0x10 actually means 10 decimal
2015-11-19 20:24:00 -08:00
Andy Sloane
bf138a245c re-sort Dxx test 2015-11-16 19:21:51 -08:00
Andy Sloane
21e3f073d9 add test for Dxx effect 2015-11-16 19:20:29 -08:00
Andy Sloane
e347807abf Change cur_row to actually mean current row
It used to really mean "next row", and resulted in showing the wrong row
in the pattern view (row -1 instead of the last row).

Fixes #14.
2015-11-16 18:59:46 -08:00
Andy Sloane
215f72c19d Fix samples for instruments with >1 sample
The sample offset was incorrectly computed, and was including the sample
headers for all samples after the first one into the first sample's
data, causing various glitches at the beginning of the sample.

Fixes #10.
2015-11-16 18:47:41 -08:00
Andy Sloane
bb5555f5a1 Merge pull request #13 from hillerstorm/implement_Hxy_effect
Implement Hxy effect
2015-11-14 20:28:14 -08:00
Johan Hillerström
be1c0df30d Remove Hxy from missing effects 2015-11-15 00:38:55 +01:00
Johan Hillerström
007f0db8f7 Add test case for Hxy 2015-11-15 00:37:46 +01:00
Johan Hillerström
0f3888cfff Implement the Hxy effect 2015-11-15 00:37:35 +01:00
Andy Sloane
0e82964315 add license field to package.json
I was certain I had already added it, but somehow it went missing.
2015-11-14 09:38:43 -08:00
Andy Sloane
c35bb07fac fix some wrong comments here and there 2015-11-14 09:37:15 -08:00
Andy Sloane
05216f5ce0 implement E5x finetune override
nf_chill.xm just needs EDx now
2015-11-14 09:29:08 -08:00
Andy Sloane
9a410aa535 Merge remote-tracking branch 'hillerstorm/implement_Gxx_effect' 2015-11-14 08:39:27 -08:00
Andy Sloane
0f86a8d2c5 Merge pull request #11 from hillerstorm/fix_out_of_range_pattern_error
Fix non-existing pattern error
2015-11-14 08:35:04 -08:00
Andy Sloane
660729010b jshint cleanup of xmeffects 2015-11-14 08:30:35 -08:00
Andy Sloane
267ecbeffb test for effect Axy 2015-11-14 08:27:17 -08:00
Johan Hillerström
8fe05fb89d Remove Gxx from missing effects 2015-11-14 13:07:51 +01:00
Johan Hillerström
88584b9cd0 Add test case for Gxx 2015-11-14 13:04:43 +01:00
Johan Hillerström
eff3fd1ed6 Implement the Gxx effect 2015-11-14 13:04:29 +01:00
Johan Hillerström
b04e6c00b0 Introduce a global volume variable 2015-11-14 13:04:16 +01:00
Johan Hillerström
fc6be2b246 Add tests for non-existing song positions 2015-11-14 12:35:28 +01:00
Johan Hillerström
1f2b0ba419 Add safeguards when setting cur_pat 2015-11-14 12:35:18 +01:00
Andy Sloane
570aa33a20 added test for vibrato... and fixed vibrato
naturally when i actually tested it, it turned out to be subtly broken

also reorg'd the tests a bit, sorry @hillerstorm.
2015-11-13 22:06:50 -08:00
Andy Sloane
be463856db Add round 1 of tests 2015-11-12 10:57:02 -08:00
Andy Sloane
6a5fe5e024 Remove XM suffix from XMPlayer calls 2015-11-12 08:56:33 -08:00
Andy Sloane
ce5fd027a3 add build status and API docs to README 2015-11-11 22:49:40 -08:00
Andy Sloane
9bf35716f3 add travis testing 2015-11-11 22:32:56 -08:00
Andy Sloane
7ca90f9b98 really basic test runner
npm test now does... something somewhat useful.

now to write a bunch of tests.
2015-11-11 22:28:49 -08:00
Andy Sloane
8c37c8d96b Separate html "shell" javascript; player now standalone
Closes #3.

The code which defines what the buttons do and downloads songs and so
forth are now completely separated from the player, which has the
following API:

 - `XMPlayer.initAudio` -> starts up audio context; it's available as
   `XMPlayer.audioctx`
 - `XMPlayer.loadXM(ArrayBuffer)` -> returns `true` if loaded, otherwise
   barfs randomly
 - `XMPlayer.playXM()` -> starts playing
 - `XMPlayer.pauseXM()` -> obvious
 - `XMPlayer.stopXM()` -> obvious; call this before loading a new one

Loading trackview.js is now 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
2015-11-11 21:19:41 -08:00
Andy Sloane
8e114a16da Split viewer code into trackview.js
Also disabled iOS hack, as it seems to be causing issues, and fixed a
minor drag-n-drop bug (wouldn't load if track was already playing past
length of newly loaded track).

To play without a viewer, you still have to stub it out. Not sure the
best way to handle that case yet.
2015-11-11 18:01:15 -08:00
Andy Sloane
4b6e75332e Merge pull request #9 from hillerstorm/namespacing_and_global_leakage
Namespacing and global leakage
2015-11-11 16:12:14 -08:00
Johan Hillerström
1667ab502b Add window fallback 2015-11-12 01:09:20 +01:00
Johan Hillerström
664686f199 Add newlines 2015-11-12 01:05:59 +01:00
Johan Hillerström
7aa67803ed Use postfix increment operator 2015-11-12 01:04:59 +01:00
Andy Sloane
e34970c05f Merge pull request #8 from luckcolors/master
Added nw.js package.json file for building desktop app.
2015-11-11 15:49:23 -08:00
Johan Hillerström
ea36dceb55 Wrap in IIFE and namespace any shared info 2015-11-12 00:08:32 +01:00
Johan Hillerström
a37555ed58 Reorder to load without any issues 2015-11-12 00:00:43 +01:00
luckcolors
14d88e9a10 Removed toolbar. 2015-11-11 22:49:25 +01:00
luckcolors
41e8713b74 First commit for desktop app Nw.js 2015-11-11 22:28:21 +01:00
Andy Sloane
2cf8840665 Contact with the real world
Many, many fixes found after posting this on my website.

 - drag n drop supported
 - plays on OSX and iOS safari now
 - random other hiccups fixed

there seems to be some remaining issues cleaning up when loading a new
song.
2015-11-10 20:30:41 -08:00
Andy Sloane
5aa5c06ab0 update readme 2015-11-04 10:23:54 -08:00
Andy Sloane
541a9d721c no longer storing xms in git 2015-11-04 10:21:27 -08:00
Andy Sloane
7d6481ad73 file picker! 2015-11-04 10:21:04 -08:00
Andy Sloane
a547732063 render a nice big title and center stuff 2015-11-04 07:19:44 -08:00
Andy Sloane
f092f847f7 instrument list rendering with FT2 font. 2015-11-04 06:22:49 -08:00
Andy Sloane
54809c2b81 bugfix for 9xx offset effect 2015-11-04 05:50:29 -08:00