What you're looking for is a MIDI editor and sequencer. MIDI is a file standard for sequencing numbers to a time base that describe parameters like instrument, pitch and volume. The files don't contain data like an MP-3 or Wave file uses to replay the music, rather the numbers manipulate an audio wave table in the computer. By changing the numbers, you can easily compose and edit the music.
Operating the program takes a little study but once you get it, they are an asset Beethoven would have killed for. There are a lot of them on the market, many will run on a Mac system. Here's a list that links to the products:
http://en.wikipedia.org/wiki/List_of_MIDI_editors_and_sequencers