Question: I want to use some open source code that is licenced under the following "GNU General Public License (GPL), MIT License". I want to include this code in a product that i will sell.

[Here is the code in particular](http://mda.smartelectronix.com/)

What do i have to do to not get sued? :)

I dont mind distributing the source code that i have modified, but i dont want the whole application open source.

If i build the open source code into a library and open source the library can i link to it and not open the rest of my source?

EDIT: In the project it has the following 

"The mda VST plug-ins are released under the MIT license or under the GPL
"either version 2 of the License, or (at your option) any later version"."

Answer: 
From what I can tell, the software is dual-licensed as either MIT or GPL. That means you can choose whichever license is more suitable to your situation.

While you can use an MIT licensed library in proprietary software, I'd say it would be courteous, if nothing else, to let the author know what you're planning to do.
You only have to distribute the source code to the clients you sell the application to. See here [Practical ways around the GPL?](https://stackoverflow.com/questions/2534205/practical-ways-around-the-gpl-closed). Also, MIT and GPL are different licenses, with MIT being less restrictive.