National Poetry Month

    @stnew/ableton-parser

    0.4.1 • Public • Published

    @stnew/ableton-parser

    Install

    npm i @stnew/ableton-parser
    

    Node.js

    To use with Node.js, pass a file path or URL to the .als file in the Ableton constructor:

    import Ableton from '@stnew/ableton-parser'
    
    const parser = new Ableton('/path/to/file.als')

    Methods

    • getMidiTrack - Returns a promise containing MIDI note timecodes
    • getLocatorData - Returns a promise containing Locator timecodes, names, and annotations
    • getDuration - Returns a promise containing track duration

    Example

    const handler = async (req, res) => {
      const parser = new Ableton(req.url);
    
      const midi = await parser.getMidiTrack();
      const duration = await parser.getDuration();
    
      const data = {
        midi,
        duration,
      };
    
      res.setHeader('Content-Type', 'application/json');
      res.statusCode = 200;
      res.end(JSON.stringify(data));
    };

    CLI

    Install globally to process files via command-line:

    npm i -g @stnew/ableton-parser
    

    Options

      -h, --help      Show help                                            [boolean]
      -v, --version   Show version number                                  [boolean]
      -m, --midi      Extract MIDI note timecodes                          [boolean]
      -l, --locators  Extract Locator timecodes, names, and annotations    [boolean]
      -d, --duration  Extract track duration                               [boolean]
    

    Examples

    You must specify a flag and a file path or url to the .als file

      ableton --midi path/to/file.als
      ableton -mld https://example.com/path/to/file.als
    

    Keywords

    none

    Install

    npm i @stnew/ableton-parser

    DownloadsWeekly Downloads

    0

    Version

    0.4.1

    License

    MIT

    Unpacked Size

    6.91 kB

    Total Files

    9

    Last publish

    Collaborators

    • artofrawr
    • cabe
    • returningsam
    • ryanhefner