chiptune3 0.7.9-r21030 → 0.7.9-r21035
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -68
- package/libopenmpt.worklet.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
# Chiptune.js
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
## Info
|
|
4
|
+
This is a javascript library that can play module music files. It is based on the [libopenmpt](https://lib.openmpt.org/libopenmpt) C/C++ library. To translate libopenmpt into Javascript [emscripten](https://github.com/kripken/emscripten) was used.
|
|
5
|
+
|
|
3
6
|
Modernized ES6 module version with libopenmpt AudioWorklet backend
|
|
4
7
|
|
|
8
|
+
**Please note**: The compiled `libopenmpt.worklet.js` in this repository is maybe outdated.
|
|
9
|
+
|
|
10
|
+
Latest released and beta versions are available via "npm i chiptune".
|
|
11
|
+
|
|
12
|
+
## Demo
|
|
5
13
|
See: https://DrSnuggles.github.io/chiptune
|
|
6
14
|
|
|
7
15
|
Modland demo player: https://DrSnuggles.github.io/chiptune/demo.html
|
|
@@ -13,16 +21,32 @@ Drop in your favorite songs.
|
|
|
13
21
|
- NPM: "npm i chiptune3" will install latest release but there are also upcoming versions available
|
|
14
22
|
- See index.html or demo.html for working examples
|
|
15
23
|
|
|
24
|
+
## Features
|
|
25
|
+
|
|
26
|
+
* Play all tracker formats supported by libopenmpt (including mod, xm, s3m, it)
|
|
27
|
+
* Simple Javascript API
|
|
28
|
+
* Pause/Resume
|
|
29
|
+
* Play local and remote files
|
|
30
|
+
* Stereo playback
|
|
31
|
+
* Module metadata
|
|
32
|
+
* Looping mode
|
|
33
|
+
* Volume control
|
|
34
|
+
* Position control
|
|
35
|
+
* Pattern data
|
|
36
|
+
|
|
16
37
|
## Build
|
|
17
38
|
Docker was used to build the library
|
|
18
39
|
|
|
19
|
-
Exported_Functions: '_malloc','_free','stackAlloc','stackSave','stackRestore','UTF8ToString'
|
|
20
|
-
|
|
21
40
|
CD into docker and run build.bat (Win) or build.sh (Linux)
|
|
22
41
|
|
|
23
|
-
|
|
42
|
+
You can minify by "npm run minify"
|
|
43
|
+
|
|
44
|
+
## Chiptune Maintainers
|
|
45
|
+
- v3: [DrSnuggles](https://github.com/DrSnuggles)
|
|
46
|
+
- v1/v2: [deskjet](https://github.com/deskjet)
|
|
24
47
|
|
|
25
|
-
## History
|
|
48
|
+
## v3 History
|
|
49
|
+
- 2024-06-15: libopenmpt 0.7.8 + Emscripten 3.1.61
|
|
26
50
|
- 2024-05-12: libopenmpt 0.7.7 + Emscripten 3.1.59
|
|
27
51
|
- 2024-04-20: Emscripten 3.1.57 changes
|
|
28
52
|
- 2024-03-24: Bumped to 0.7.6
|
|
@@ -33,75 +57,13 @@ Afterwards you can minify by "npm run minify"
|
|
|
33
57
|
- 2024-01-23: Drag'n'Drop files. Build library using Docker.
|
|
34
58
|
- 2024-01-22: Libopenmpt 0.7.3 compiled with Emscripten 3.1.51
|
|
35
59
|
|
|
36
|
-
#### Version 2
|
|
37
|
-
This is a javascript library that can play module music files. It is based on the [libopenmpt](https://lib.openmpt.org/libopenmpt) C/C++ library. To translate libopenmpt into Javascript [emscripten](https://github.com/kripken/emscripten) was used. For audio output inside the browser WebAudio API is used.
|
|
38
|
-
|
|
39
|
-
**Please note**: The compiled `libopenmpt.js` in this repository is based on an outdated version of libopenmpt. Newer versions contain bugfixes and other improvements. Download the latest version from the libopenmpt developers [here](https://lib.openmpt.org/libopenmpt/download/) and replace `libopenmpt.js.mem` and `libopenmpt.js`.
|
|
40
|
-
If you prefer to compile `libopenmpt.js` yourself (to save space or make custom changes) follow the instructions in the "Development" section.
|
|
41
|
-
|
|
42
|
-
## Features
|
|
43
|
-
|
|
44
|
-
* Play all tracker formats supported by libopenmpt (including mod, xm, s3m, it)
|
|
45
|
-
* Simple Javascript API
|
|
46
|
-
* Pause/Resume
|
|
47
|
-
* Tested with Google Chrome and Firefox
|
|
48
|
-
* Play local (HTML5) and remote files (XHR)
|
|
49
|
-
* Stereo playback
|
|
50
|
-
* Module metadata
|
|
51
|
-
* Looping mode
|
|
52
|
-
|
|
53
|
-
## To do
|
|
54
|
-
|
|
55
|
-
* Playback information (e.g. position, speed, bpm)
|
|
56
|
-
* Mixer settings (e.g. sampling rate, resolution)
|
|
57
|
-
* Seekbar support
|
|
58
|
-
|
|
59
|
-
## Demo
|
|
60
|
-
|
|
61
|
-
See it in action [here](https://deskjet.github.io/chiptune2.js/).
|
|
62
|
-
|
|
63
|
-
Just drop a module (e.g. from [modarchive.org](https://modarchive.org)) on the demo page and enjoy.
|
|
64
|
-
|
|
65
|
-
## Development
|
|
66
|
-
Download the latest [emscripten](https://emscripten.org/) SDK. Follow the instructions for your OS. Make sure `emcc` and `em++` commands are available in the PATH.
|
|
67
|
-
Next download and extract the libopenmpt source code (unix like) from https://lib.openmpt.org/libopenmpt/.
|
|
68
|
-
Use this command inside the libopenmpt source folder to build:
|
|
69
|
-
|
|
70
|
-
make CONFIG=emscripten
|
|
71
|
-
|
|
72
|
-
If it compiles successfully these files (and a few more) will be created in the `bin` directory:
|
|
73
|
-
|
|
74
|
-
1. `libopenmpt.js` is libopenmpt compiled to JavaScript.
|
|
75
|
-
2. `libopenmpt.js.mem` is the memory initialization file `libopenmpt.js` will download/require it when loaded.
|
|
76
|
-
3. `libopenmpt_test.js` (and `libopenmpt_test.j.mem`) is the libopenmpt test suite and can be run in NodeJS.
|
|
77
|
-
|
|
78
|
-
Only the first two files are needed for chiptune2.js.
|
|
79
|
-
|
|
80
|
-
### Building Stylesheet
|
|
81
|
-
The stylesheet is built with [SASS+Compass](http://compass-style.org/). To build this yourself, follow the Compass [installation instructions](http://compass-style.org/install/), then change into the chiptune2.js directory and use this command:
|
|
82
|
-
|
|
83
|
-
compass watch
|
|
84
|
-
|
|
85
|
-
The stylesheet .css file with rebuild every time you make a change to the source file in the `sass` folder.
|
|
86
|
-
|
|
87
|
-
## Contributers (in order of appearance)
|
|
88
|
-
- [deskjet](https://github.com/deskjet)
|
|
89
|
-
- [manx](https://github.com/manxorist)
|
|
90
|
-
- [nyov](https://github.com/nyov)
|
|
91
|
-
- [DanialOaks](https://github.com/DanielOaks)
|
|
92
|
-
- [onikienko](https://github.com/onikienko)
|
|
93
|
-
- [okaybenji](https://github.com/okaybenji)
|
|
94
|
-
- [photonstorm](https://github.com/photonstorm)
|
|
95
|
-
|
|
96
|
-
Thanks to everyone!
|
|
97
|
-
|
|
98
60
|
## License
|
|
99
61
|
|
|
100
62
|
All code in this project is MIT (X11) licensed. The only exception are the compiled libopenmpt parts which remain under the OpenMPT project BSD license.
|
|
101
63
|
|
|
102
64
|
License text below:
|
|
103
65
|
|
|
104
|
-
>Copyright © 2013-2024 The chiptune2.js contributers.
|
|
66
|
+
>Copyright © 2013-2024 The chiptune2.js/chiptune3.js contributers.
|
|
105
67
|
>
|
|
106
68
|
>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
107
69
|
>
|