Can Silverlight communicate with a MIDI instrument?
Asked Answered
L

3

6

Can Silverlight communicate with a MIDI instrument connected to the machine running the Silverlight application? In- or out-browser.

Labiche answered 19/10, 2009 at 12:6 Comment(0)
L
2

It appears that this is not possible in Silverlight. To communicate with a MIDI device, you would have to PInvoke methods in winmm.dll, and this (apparently) cannot be done in Silverlight. See:

http://forums.silverlight.net/forums/t/123673.aspx

This could be done easily in a WPF or WinForms application. It could also be done in a browser with XBAP, although you would need elevated permissions to access the winmm API, which would require a certificate. You can also still make ActiveX controls with .Net, but I think you would still need a certificate for this to get the proper permissions (although it might work with just a scary security confirmation dialog).

Lymphocytosis answered 19/10, 2009 at 12:46 Comment(0)
T
0

It's not possible to use .NET code directly in Silverlight because Silverlight has a different core.

All .NET classes that you want to reference in Silverlight need to be recompiled for Silverlight.

It's also not possible to access the underlying hardware directly, so i'm afraid you're stuck with a full-trust XBAP(you need to sign your app and the user will get an popup asking for permission). XBAP gives you all the .NET capabilities while running in the browser. XBAP will run on firefox/internet explorer on any >xp machine with .net 3.0 installed.

Hope this helps.

Tipperary answered 19/10, 2009 at 13:17 Comment(0)
N
0

Silverlight 3 has an extensible multimedia pipeline for audio and video. You can procedurally create your own audio and play it. To implement what you want, you would have to write your own midi synthesizer.

Newcomen answered 19/10, 2009 at 21:36 Comment(1)
I don't want to play a midi, I don't want to emit any sound at all, I want to read midi from a midi instrument.Labiche

© 2022 - 2024 — McMap. All rights reserved.