Giter Club home page Giter Club logo

Comments (6)

tambien avatar tambien commented on September 10, 2024 1

ok should be fixed. sorry for the delay. just confirmed that in @tonejs/[email protected] you can now do this:

import { Midi } from '@tonejs/midi'

from midi.

tambien avatar tambien commented on September 10, 2024

i think the files referenced in the package.json might be pointing to files that are no longer there.

from midi.

stephaneeybert avatar stephaneeybert commented on September 10, 2024

I have the very same issue.

@tambien What step do we need to take to work around that ?

from midi.

stephaneeybert avatar stephaneeybert commented on September 10, 2024

The library source code contains missing file references.

The @tonejs/midi/dist/Header.d.ts file contains the source code line:

import { MidiData } from "./midi-file";
But there is no such ./midi-file file in the directory.

from midi.

stephaneeybert avatar stephaneeybert commented on September 10, 2024

I removed the ./ suffixes in the few instances they were present in the library files, and this worked around the issue.

I still have another issue though.

from midi.

stephaneeybert avatar stephaneeybert commented on September 10, 2024

I wonder how to traverse the control changes:

This one traverses the map but returns undefined values:

Object.keys(midiTrack.controlChanges).map(key => {
  const midiControl: any = midiTrack.controlChanges[key];
  const control = new Control(midiControl.number, midiControl.time, midiControl.ticks, midiControl.value);
  track.controls.push(control);
});

These two would not traverse the map:

Map.prototype.forEach((midiControl, key: number, midiTrack.controlChanges) => {
});
midiTrack.controlChanges.forEach((midiControl, key: number) => {
});

from midi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.