There are a few reasons for treating them differently.

First, the built in synthesizers have unique abilities that aren't available
for external synthesizers.  Most importantly, we can directly instruct them
to load a soundfont.  That isn't possible with external synthesizers, which
may not even use soundfonts.

Second, the way you configure the communication is very different for them. 
With an external synthesizer, data gets sent through JACK, and you need to
specify the port(s) and channel(s) to send data to.  With internal
synthesizers, that isn't necessary.  The data just gets passed to the
synthesizer directly through its own API.  MuseScore can define ports and
channels however it wants, since they don't need to correspond to any
external device.

The different classes will still of course share a lot of code.  That's what
subclassing is for.  But they'll also have differences.

Also remember that while the currently supported synths are limited to MIDI,
we may eventually want to go beyond that.  For example, VST3 has its own
event system that's more powerful than MIDI events.

> I suspect you in danger of over-complicating things which would result in
> sluggish, unwieldy code. 

Trust me, I don't write sluggish, unwieldy code. :)  If you want to look at
some of my code, here's what I do for my day job: http://openmm.org

Peter



--
View this message in context: 
http://dev-list.musescore.org/Playback-abstraction-layer-tp7579762p7579779.html
Sent from the MuseScore Developer mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial! http://pubads.g.doubleclick.net/
gampad/clk?id=1444514301&iu=/ca-pub-7940484522588532
_______________________________________________
Mscore-developer mailing list
Mscore-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mscore-developer

Reply via email to