Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chr15m/itwriter
Write Impulse Tracker modules with JavaScript [WIP]
https://github.com/chr15m/itwriter
algorave audio audio-library impulse-tracker impulsetracker javascript javascript-library mod-tracker music music-library tracker-music
Last synced: 15 days ago
JSON representation
Write Impulse Tracker modules with JavaScript [WIP]
- Host: GitHub
- URL: https://github.com/chr15m/itwriter
- Owner: chr15m
- Created: 2024-05-17T10:25:01.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-05-22T15:46:19.000Z (6 months ago)
- Last Synced: 2024-05-22T16:46:42.486Z (6 months ago)
- Topics: algorave, audio, audio-library, impulse-tracker, impulsetracker, javascript, javascript-library, mod-tracker, music, music-library, tracker-music
- Language: JavaScript
- Homepage:
- Size: 32.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Create Impulse Tracker .it files from a JSON song datastructure.
See the [browser demo here](https://chr15m.github.io/itwriter) and the node demo in the install section below.
## Install
```
npm i itwriter
```Run the node example:
```
cp node_modules/itwriter/example.js .
node example.js
xmp example.it
```## Use
Basic usage: `const bytebuffer = itwriter(song_structure)`
More detailed usage:
```javascript
import itwriter from "itwriter";// create a 10ms sinewave sample
const sine = [...(new Array(4410))].map((v, i) => Math.sin(i/10));const it = itwriter({
"title": "example",
"bpm": 120,
"samples": [{
"name": "sine wave",
"samplerate": 44100,
"channels": [sine]
}],
"patterns": [{
"rows": 32,
"channels": [{
0: {
"note": "C-5",
"instrument": 0,
"vol": "v64",
}
}]
}],
"order": [0],
});// in Node we can write to disk
import fs from "fs";
fs.writeFileSync("example.it", Buffer.from(it));// in the browser we can download a blob
document.location.href = URL.createObjectURL(new File([it], "example.it"));
```See [./example.js](example.js) for a detailed example of the JSON song structure.
## Notes
- Currently only patterns and 16-bit mono/stereo samples are supported, not instruments.
## Technical references used
-
-
-
-