0.4.4 • Published 6 months ago

midifile-performer v0.4.4

Weekly downloads
-
License
BSD-3-Clause
Repository
github
Last release
6 months ago

midifile-performer-js

This is an emscripted version of the libMidifilePerformer c++ library, based on the work of Jean Haury and Bernard P. Serpette.
It provides a main entry point, the Performer class.
A Performer must first be fed with a succession of MIDI note events extracted from a MIDI file.
These notes will be reorganized into Chronology classes.
Chronologies are degraded representations of the MIDI files that allow to reinterpret them with a few command keys in a very musically expressive way.

Usage

  • nodejs
const MidifilePerformer = require('midifile-performer');

MidifilePerformer.onRuntimeInitialized = function() {
  const performer = new MidifilePerformer.Performer({
    unmeet:             true,
    complete:           false,
    shiftMode:          MidifilePerformer.shiftMode.pitchAndChannel,
    temporalResolution: 0,
  });

  performer.setChordVelocityMappingStrategy(
    MidifilePerformer.chordStrategy.sameForAll
  );
}
  • browser
import MidifilePerformer from 'midifile-performer';

async initialize() {
  this.mfp = await MidifilePerformer();

  this.performer = new this.mfp.Performer({
    unmeet: true,
    complete: false,
    shiftMode: this.mfp.shiftMode.pitchAndChannel,
    temporalResolution: chordDeltaMsDateThreshold,
  });
  this.performer.setChordVelocityMappingStrategy(
    this.mfp.chordStrategy.none,
    // this.mfp.chordStrategy.clippedScaledFromMax,
  );
  this.performer.setLooping(true);
}

initialize();

/* ... */

Build instructions

requirements

  • cmake
  • emscripten (clone emsdk and follow installation procedure)

commands

  • npm run build
  • npm run test
0.4.4

6 months ago

0.4.1

6 months ago

0.4.0

6 months ago

0.4.3

6 months ago

0.3.3

6 months ago

0.3.0

2 years ago

0.2.0

2 years ago

0.3.2

2 years ago

0.3.1

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.0

2 years ago