title: iOS: Audio: Code needed for reading, processing, writing sound files + MIDI Processing
body: <p>What I think I need to do is create some code that lets me read in a bunch of raw sound files (ie a complete sound font for say a guitar),  processes these files (to construct chords),  and outputs the result as another set of files.</p>
  
  <p>My question: can anyone point me to some code that does something close to this task, that would save me from having to do everything from scratch?</p>
  
  <p>EDIT:  answer below have suggested I use garage band which I have had a look at.   it looks like a great tool.   I can construct my 24 chords on garage band. but then I need to save it as MIDI,  and write my own code to process this midi file, adjusting the volumes of individual notes, save it, then feed it back through garage band recording the sound.   Can anyone point me to some code that would get me started processing midi thus?</p>
  
  <p>Sam</p>
  
  <p>PS if it is of any interest, this is what I am working on:</p>
  
  <p><a href="http://imagebin.org/125562" rel="nofollow">http://imagebin.org/125562</a></p>
  
  <p>The difficulty I face is how to voice the chords... if I just do {C4 E4 G4} for the C major chord,  and {G4 B5 D5} for G, etc,  it is going to sound horrible</p>
  
  <p>A pianist simply doesn't move from C to G like that.  There is an art to voicing, so that each note attempts to move a minimal distance to its new resolution.</p>
  
  <p>And I can't see any formula for depicting this in a way that is key agnostic.</p>
  
  <p>So I am attempting instead to play all Cs Es and Gs, to create a sound texture for 'C major'</p>
  
  <p>If I put all of the  respective amplitudes under a bell curve,  each major or minor chord should have its energy centred around the same point,  so the effect would be that the texture changes without giving any overt / crude impression of moving up / down</p>
  
  <p>Does this make some sense now?   The task becomes:  how to construct 24 textures?</p>