views:

1111

answers:

4

I would like to port a desktop music application to run inside the browser. Cunningham et al proposed using Flash a couple of years ago. I don't think it ever got off the ground though. Probably because Flash isn't really suited for a complex interactive editing application. Aside from simplifying the animation of the caret and scrolling during playback, Flash doesn't seem to offer much here. (Would Flex be more appropriate?)

Since I'm mostly a Windows C++/C# developer I'm hoping that Silverlight will provide an API that allows access to the machine's sound generation capabilities. Does anyone know how to do this in Silverlight? Something like the old mmsystem.h would be fine. Mark-dot-net's blog has me pretty worried. Maybe since that old stuff is unmanaged they see it as a security risk for running inside the browser. Obviously you can't allow web apps to access a client's disk, but accessing their sound devices should be safe.

Another option I was considering was porting the application to run as a FireFox plugin. I would be grateful for any insights into that approach vs the Silverlight approach.

A: 

I do not believe you can access any sound "API" from silverlight on the client machine. Part of this is due to the fact that silverlight is cross-platform and also a plug-in for which I doubt there is much demand to access sound generation routines. The only thing I think you could do with silverlight to support what you want to do, would be to use silverlight to create a User Interface that would interact with the server through web service calls. All of the sound generation would be done server side and returned back down to the client.

Tom
Good point about Silverlight being cross-platform. Since sound generation is platform dependent maybe this can't be done.
+2  A: 

Actually, Flash has already been used to great effect in the creation of a 'music application'. Take a look at the HobNox Audio Tool.

defmeta
Interesting app. Flash is perfect for this kind of thing. Lot's of simple animations to do (like spin volume control knobs and move sliders). Thanks very much for the hobnox link. Have already picked up tons of UI coolness. They're spotlight effect during the walkthrough is awesome.
+1  A: 

Silverlight simply doesn't have the low-level audio APIs you would need to write an audio application in the browser. It doesn't even support playback of WAV files.

There is very little audio playback support in .NET. Its why I created NAudio, but that relies heavily on interop to native APIs which is why it is no use with Silverlight. I would love it if MS came up with a low-level streaming audio API for .NET, but at the moment it seems to be way down their priority list.

Mark Heath
A: 

Flash Player 10 added the API hooks that let music notation viewing and editing work much better now. Noteflight provides a web-based notation editor in Flash, while Legato provides a web-based sheet music viewer for retailers, also in Flash. Note that Flash platform apps can be written in several different tools including Flash Professional, Flex, and IntelliJ IDEA.

I don't know anything equivalent for Silverlight at this point.

Michael