Core Audio / Core Midi - general question

Discussion in 'Mac Programming' started by MacRohde, Feb 22, 2012.

  1. macrumors regular

    MacRohde

    Joined:
    Jun 1, 2004
    Location:
    Copenhagen, Denmark
    #1
    I am a programmer with some knowledge of playing instruments, but not much about MIDI and that stuff.

    But I would like to make an app (Mac app) for simple music notation. I would then like to be able to play back the notes in the app.

    My question is how that would be done. My guess is that I need to attach some sound bank/synthesizer of sorts which then is controlled via Core Midi to play the notes?

    I am talking about the simplest possible setup here.
     
  2. macrumors member

    Mark FX

    Joined:
    Nov 18, 2011
    #2
    To do what your asking, you will have to design and write Audio Units, using
    the Core Audio framework.
    If you check out the developer documentation in xCode, or at the Apple
    developer web site, there is a guide on the Core Audio frameworks.

    But be aware, that the Core Audio frameworks are some of the hardest to
    master, you will need a good knowledge of Objective-C for writing the audio
    unit interface and implementation, and a good knowledge of ANSI C for
    communicating with some features of the Audio Frameworks, and for writing
    complex math algorithms for use in audio filters.

    So check out the docs, and good luck.

    Regards Mark
     
  3. macrumors 68040

    Joined:
    Feb 2, 2008
    #3
    Actually no, he would have to use Core Midi, there should be no need for Audio Units unless he want's to play back audio.

    But that is only one part. Creating a GUI where notation symbols can be selected and placed on a note sheet, interpreted and translated into midi is the other. Quicktime player can play midi files so it could be done in steps I guess.
     
  4. thread starter macrumors regular

    MacRohde

    Joined:
    Jun 1, 2004
    Location:
    Copenhagen, Denmark
    #4
    Thanks for the replies. I have toyed a bit with Core Audio - only small apps like a recorder and such - but I haven't looked at the Core Midi part (yet).

    My confusion is partly about from where the actual sounds come from. Given I interpret the sheet notes and translate them into MIDI, wouldn't I need some MIDI keyboard/synthesizer attached to which I send the MIDI? Or am I looking at this wrong?
     
  5. macrumors member

    Mark FX

    Joined:
    Nov 18, 2011
    #5
    You can do it one of three ways, you can plug a midi instrument into your Mac, keyboard, drum machine ect, you can plug a midi keyboard into your Mac, that has no sounds of it's own, but can use the built in voice synth in OSX, or you could make a sofware instrument that also uses the OSX sound synth.

    As subsonix says you would be looking at the Core Midi framework as well, but
    I refer to the Core Audio frameworks as including Core Midi as well.
    You will find it hard not to have to make Audio units, to deal with an
    instrument interface, and also saving audio data to file.

    I can only repeat my previous advise, read the Core Audio programming guide in the Developer docs, it does explain a lot of what you will need, and will give
    you an idea as to how to plan such a project.

    Regards Mark
     
  6. macrumors 68040

    Joined:
    Feb 2, 2008
    #6
    That is sort of what your question implies, with nothing but Core Midi you would need a synthesizer connected to a midi interface. I believe you can use Audio Unit Instruments to play back midi data though.

    What you are asking is basically how to create a midi sequencer.
     
  7. macrumors member

    Joined:
    Mar 10, 2012
    Location:
    Australia
    #7
    Sorry for the late reply.

    Sibelius works REALLY well for this type of stuff. You can easily attach a MIDI keyboard for notation or you can manually enter the notes.

    It offers many features like score playback and the ability to export the audio from a score to mp3.

    Check out sibelius.com
    Unfortunately, this isn't in the Mac App store
     

Share This Page