Giter Club home page Giter Club logo

Comments (6)

tambien avatar tambien commented on September 10, 2024

MidiConvert has a UMD header on it, so it should work with AMD and CMD. If you are using requirejs, MidiConvert won't be on the global namespace, you'll have to 'require' it.

How are you currently using or importing MidiConvert into your project?

from midi.

 avatar commented on September 10, 2024

Uncaught ReferenceError: MidiConvert is not defined

requirejs.config({
    //By default load any module IDs from js/lib
    baseUrl: 'js/lib',
    //except, if the module ID starts with "app",
    //load it from the js/app directory. paths
    //config is relative to the baseUrl, and
    //never includes a ".js" extension since
    //the paths config could be for a directory.
    paths: {
        app: '../app',
	jquery: 'jquery-3.1.1.min',
	knob: 'jquery.knob.min',
	tone: 'Tone',
	MidiConvert: 'MidiConvert'
    }
});


// Start the main app logic.
requirejs(['jquery', 'knob', 'tone', 'MidiConvert', 'app/control'],
function   ($, MidiConvert) {});

from midi.

 avatar commented on September 10, 2024

Uncaught TypeError: Cannot read property 'parse' of undefined

from midi.

 avatar commented on September 10, 2024

https://github.com/subunits/Instrument/tree/master

from midi.

tambien avatar tambien commented on September 10, 2024

Just tested out MidiConvert with requirejs myself and the UMD header worked fine for me.

I think your issue is that your function parameter names don't line up with your include array

requirejs(['jquery', 'knob', 'tone', 'MidiConvert', 'app/control'],
function   ($, knob, Tone, MidiConvert, control) {});

from midi.

 avatar commented on September 10, 2024

Thank you for your time 👍

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.