0.0.10 • Published 4 years ago
@pohy/ableton v0.0.10
Ableton
Parser for Ableton Live's .als file format.
Intro
Ableton project files are just XML underneath, so the parser returns a Cheerio object for the project file. You can then use all the normal jQuery commands to get the data out.
Install
$ npm install --save ableton
Use
Initialise
var Ableton = require('ableton');
var ableton = new Ableton('/path/to/project.als');
Read
ableton.read(function(error, $) {
if (error) {
console.error(error);
}
else {
// `$` is the Cheerio root object.
console.log($('ableton').attr('creator'));
}
});
Write
var xml = ... // An XML string representing an Ableton project file.
ableton.write(xml, function(error) {
if (error) {
console.log(error);
}
else {
console.log('Written successfully to ' + ableton.path);
}
});
License
MIT
0.0.10
4 years ago