Jump to content

Webmidi or OSC + Babylonjs?


lagauche
 Share

Recommended Posts

Hey all,

Has anyone integrated web midi with BabylonJS? I'd like to trigger events in Babylonjs with WebMIDI. I'd also like to explore OSC but WebMIDI is more important.

Unfortunately a google search turned up next to nothing. If anyone can point me to some libraries or pass me any tips i'd much appreciate it!

Link to comment
Share on other sites

1 hour ago, RaananW said:

I had an interesting discussion about WebMIDI and the actual need of it.

I know it is off-topic, but... Why do you need it? :) 

And no, I am sorry, I haven't seen a project using both, but it is living in the same eco-system, I don't see a reason why it wouldn't work just like using any other events.

I make electronic music. Lately I've been live coding. Long story short: I would like to make performance pieces that allow me to create music and interact with visuals at the same. The wonderful thing about midi is of course that I can use its data for both at the same time.  I have web midi working in another webgl engine, but I'm hoping to switch to Babylonjs. I'm just getting started with Babylonjs and I don't know what to expect : ) I'm not a game developer at all.

P.S.

You are definitely not off-topic. Any conversion about these things is good conversation : )

Link to comment
Share on other sites

I know MIDI very well, I have been using it quite a lot (producing music). And I know how helpful it can be, BUT - The MIDI standard defines inputs as octets (0 to 255).  It is quite limited! AFAIK, WebMIDI didn't change that. they are still using octets to define inputs.

I just think there are better and more precise ways of receiving input from an external device. Just think about pressure points from your keyboard (0 to 127). A stylus of the Samsung note 5 has more pressure points than a midi keyboard... And that's a few years old :) 

And besides, the only browser that supports WebMIDI is chrome, isn't it? They actually invested the time implementing this proposal... IMO, this makes Chrome the new IE6, but that's another long discussion :)

BUT! I really want to see what you do with midi and babylon, and will be more than happy to answer any qustions along the way. 

 

Link to comment
Share on other sites

Thank you! I'm going to take you up on your help offer. Please get ready for some very basic questions heading your way in the future : )

Open sound control is much more ideal considering your concerns yes, but it's tougher to setup, not to mention it's not native in any browser. If I can find a way to work with OSC instead (even if i'm restricted to a local web server), I will!

Despite people trying to retire midi for a long time, it's just omnipresent as far as support goes and of course every music application can send it, which opens up a lot of possibilities for me to incorporate any music applications. Also, it's very easy for any non-technical person to plug in a usb midi controller, open Chrome and have everything working. I'm not interested in developing for the general public right now, but you never know.

I loath the idea of sweeping a filter with 0-127 steps. I would just never do it : ) But maybe for visuals, I can make it work. Fingers crossed.

 

 

 

Link to comment
Share on other sites

@RaananW Do you know why I'm getting NaN? fade1 is the variable with a CC value between 0-127. 

I am very new to Babylonjs, Javascript and WebGL. Please bear with me. I learn quickly : ) I thought the screenshot code might work since object1.rotation.y += 0.02; rotates my mesh.

        scene = createScene( );
        engine.runRenderLoop( function( ) {

        object1.rotation.y = fade1 * 0.02;

          scene.render( );
        } );

 

NaN.png

Link to comment
Share on other sites

  • 3 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...