I can not seem to find a clear explanation of the difference between Bootloaders, Firmware, and Sketches. There is a specific dilema I am trying to sort out that I will get to in a sec. I am a software developer with 15 years experience, but I am just now getting into chip programming. I have read through all the tutorials, and have had great success getting my Arduinos to do what I want, but I am having some difficulty understand the true definitions of Bootloader, Firmware, and sketches.
I am making a USB-MIDI Controller. I started by writing a sketch that sends MIDI Data over the serial port, and I had no problems reading the data in my software via the serial connection. But since I want the Arduino to be recognized as a true MIDI device, I reset the board, used "Atmel Flip" to upload MocoLufa to the Arduino. Sure enough, everything worked as planned. My original sketch remained on the chip and worked perfectly with MocoLufa.
So why didn't reseting the board and replacing the firmware (with MocoLufa) erase my original sketch? Is MocoLufa really acting as Firmware or a Bootloader, or both? Having looked through the source for MocoLufa and the original sketch (Core stuff included), I don't see them working together as 1 executable. Is the chip running 2 executables seperately?