[Plugin] MIDI plugin

0 favourites
From the Asset Store
Web MIDI
$6 USD
50% off
Incorporate WebMIDI into your Construct 3 projects
  • Update 2014-09-26:

    Plugin updated to 1.1 - looping was throwing an exception, and "Stop" didn't!

    Update 2014-05-16:

    Piano Sample r168 (no ChromeConsole plugin needed)

    Update 2013-05-21:

    I'm releasing the MIDI plugin. There's still lots to do & cleanup, but here's the first version.

    BHT_MIDI - 1.1

    Piano Sample

    Manual

    I'd like this to be more complete, but it's just dragging out. I will be filling in the manual throughout the week, and there may need to be a tutorial as well.

    Original post:

    I've got a long way to go, but I've started on a MIDI plugin.

    MIDI Sampler

    This is a whole lot of hack-work. This thread caught my eye: Web Audio API and MIDI, so it's based on this.

    So far, this is a hack of the MIDI.js code, the C2 Audio plugin, and Pode's DragnDropZone plugin.

    You need to press the Preload button first to get the sounds local to your computer, but from there you can try the three sample songs, press the piano keys, or drag a .MID file onto the gray drag-n-drop zone.

    There's some handy test files here: use the download link

    (Hmm, link works in IE but not Chrome: http://www.personalcopy.com/midi.htm)

  • Nice! some developer complained why HTML5 sucks because it won't support MIDI but you demostrate he is wrong :)

  • Yes!!!!

    I need this allot in the future.

    Great Work blackhornet <img src="smileys/smiley32.gif" border="0" align="middle" />

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Amazing.....

    it even works on mobile devices.......

  • Hot stuff

    Do you play from some kind of soundfont, or are those separate piano sounds?

    Also, did you see that post? How about a full-blown MIDI synthesizer? =)

  • When I tried the MIDI.js samples, there was only one that wouldn't crash on my iPod Touch. I immediately thought of how Ashley had already dealt with the issue of supporting sound across all platforms. For that reason, I decided to hook the backend of the MIDI.js implementation to the C2 Audio plugin. So, the sounds are standard C2 sounds, played via the MIDI player engine - one for each note. This is going to be the challenge of supporting MIDI. Unless I'm mistaken, there will be no guaranteed General MIDI sounds available across all platforms, so you are going to have to provide your own 'soundfonts'.

    I had seen the synthesizer post. I'll keep it in mind but there's plenty for me still to do on this plugin.

  • Interesting, but it will better if/when you add more than just piano notes.

  • great stuff, thanks for coding this!

    AWESOME!

  • tease us more

  • hey blackhornet,

    can you tease us 1 more time?

  • MIDI Sampler 2

    I wanted more to show, but there's a lot of work that can't be seen yet.

    New:

    3 instruments: (new) piano, guitar, bass.

        You can change the channel number, 0,1,2 and play the keyboard.

    The Entertainer plays piano on treble and guitar on bass.

    Swapped Maple Leaf Rag for Skyfall

        Just not ready for >2 channels

    A key change here is that where version 1 had a sound file for every note, this version uses a few notes, and uses the essential C2/WebAudio SetPlaybackRate command to bend the pitch of the known notes to any other note needed. This is essential to keep the number of files down.

    Chord ON/OFF added.

    Songs can loop.

    One technical problem I've hit though is that WebAudio does not support gapless looping. This will be critical for instruments that sustain notes indefinitely. This is a bleeding-edge requirement being worked on by others.

    Pre-load workaround is automated. Still need proper support for this.

  • MIDI Sampler 3

    ... and drums finally.

  • Great!

    Do you think we'll be able to have note display like

    Subscribe to Construct videos now

    with th plugin?

    Btw it only work with chrome now, I have a black screen for firefox (v1 was ok)

  • Stop teasing us with this great stuff, its too cool. <img src="smileys/smiley2.gif" border="0" align="middle" />

  • lemo

    Yes. That is part of the underlying interface. The silly thing is, the two actually aren't linked. They process separately, so I haven't concentrated on that part yet.

    The pre-pre-load is a browser killer. This is a matter of optimizing, which I haven't had time to do yet. The more I do, the more I rely on WebAudio, which only Chrome supports best, so far.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)