Jump to content

Caf Midi Extractor - Utility Program


ValliSoftware

Recommended Posts

  • 2 weeks later...
  • 1 year later...
I just found this and thanks for sharing. Any chance you will put this source on GitHub? I am looking into how I can read CAF files to get not only midi out, but also other metadata that might be in there, and now with LogicPro 10.5, stepSequencer patterns can also be stored inside CAF files...
Link to comment
Share on other sites

I just found this and thanks for sharing. Any chance you will put this source on GitHub? I am looking into how I can read CAF files to get not only midi out, but also other metadata that might be in there, and now with LogicPro 10.5, stepSequencer patterns can also be stored inside CAF files...

 

 

https://developer.apple.com/library/archive/documentation/MusicAudio/Reference/CAFSpec/CAF_overview/CAF_overview.html#//apple_ref/doc/uid/TP40001862-CH209-TPXREF101

 

I read up on Music Mediadata section, in particular, MIDI chunk.

 

I think for your stepSequencer question, the Logic developers might have decided to use the Extending CAF section, since there you can define your own chunk.

 

Since writing that app, I've also notice there's several libraries that can read and write not only CAF files, but other audio files as well. You might want to use one of those libraries.

Link to comment
Share on other sites

Well i can see already from your program that the CAF's for step sequencer are bundling the sequence data into the midi file section, because your program extracts the midi..its not usable midi that way, but its some information. I'm sure there must be more metadata in there to define the pattern parameters..

 

It could be useful to be cable to convert some of the CAF midi loops into CAF step sequencer loops.

 

among other things...

Link to comment
Share on other sites

Well i can see already from your program that the CAF's for step sequencer are bundling the sequence data into the midi file section, because your program extracts the midi..its not usable midi that way, but its some information. I'm sure there must be more metadata in there to define the pattern parameters..

 

It could be useful to be cable to convert some of the CAF midi loops into CAF step sequencer loops.

 

among other things...

 

I can't upgrade to Logic 10.5 because the MACS I have, Apple won't allow past High Sierra, but I'm working on that with one of the MACS.

Can you zip and post one of the CAF files, I'm curious why the MIDI is not usable.

Link to comment
Share on other sites

Well i can see already from your program that the CAF's for step sequencer are bundling the sequence data into the midi file section, because your program extracts the midi..its not usable midi that way, but its some information. I'm sure there must be more metadata in there to define the pattern parameters..

 

It could be useful to be cable to convert some of the CAF midi loops into CAF step sequencer loops.

 

among other things...

 

I can't upgrade to Logic 10.5 because the MACS I have, Apple won't allow past High Sierra, but I'm working on that with one of the MACS.

Can you zip and post one of the CAF files, I'm curious why the MIDI is not usable.

 

No need to post anything, I was able to upgrade to Mojave on a unsupported MacBook Pro, I'm downloading Logic 10.5 now. woo-hoo. :mrgreen:

Link to comment
Share on other sites

well its not usable because Step sequencer data is not meant to be played that way, its meant to be manipulated.

 

They are storing the pattern for each "row" as a bar in the midi file. So bar 1 is the pattern for the first row, bar2 is the pattern for the second row, etc. In step sequencer those patterns will be played simultaneously..

Link to comment
Share on other sites

They are storing the pattern for each "row" as a bar in the midi file. So bar 1 is the pattern for the first row, bar2 is the pattern for the second row, etc. In step sequencer those

Now that I have Logic 10.5, can you point to an exact file that your looking at. Give me the full path including the file name.

I did a quick look at this and the information is being stored in a plist file, that's why I'm asking for an exact file to look at in your case.

Link to comment
Share on other sites

after you update all the LogicPro 10.5 content, look in the Apple Loops Folder. There is one folder called "Step Sequencer" which has a bunch of Step Sequencer patterns stored in CAF files...I guess the audio preview must be in there also, along with channel preset information, etc.similar as a midi loop CAF, but with a step sequencer pattern instead of regular midi
Link to comment
Share on other sites

So those MIDI files are usable MIDI files.

Obviously, use a drum MIDI with a drum instrument, etc...

The only thing I did was add a Transposer and set it to E Minor, otherwise its the same MIDI file from the CAF file.

 

For your goal of creating new patterns, there is a "pattern" file and it's in the form of a plist.

I'm sure that information isn't documented anywhere, so you'd have to examine the plist file while looking at it in the Step Sequence to get an idea how the plist is being laid out.

 

Look for a folder called Step Sequencer Settings in Logic Pro X in the Resources folder.

There you'll see all the default patterns for the Step Sequencer.

 

I changed the extension to .plist just so I can view it easier with Xcode.

1330525022_1800sImprovisation.thumb.png.cd5afe228e46c890af2634deb5386e85.png

Link to comment
Share on other sites

Logic appears to have two sets of factory step sequencer patterns. There are the plist files you mention here now....but these are separate from the provided CAF apple loops which are an additional set of patterns that also happen to have plugins assigned, etc.. as configured in the CAF.

 

So I am somewhat interested in parsing the CAF to obtain not only the midi but all the rest of the pattern oriented meta data that must be in those CAF files. As you can see from the plist patterns, there it much more then just raw midi data. I'm even more interested in converting midi CAF apple looks into step sequencer apple loops. This would convert the simple midi sequence into a more sophisticated step sequencer midi loop, adding the extra meta data...and keeping the channel preset information as well...so that it can function as an apple loop still...but in the step sequencer. That's why I asked about the CAF file format or any information you may have about parsing it.

 

I'd also like to convert the factory CAF step sequencer patterns into plist versions...so that I have them all accessible from the step sequencer pattern browser.

 

Converting a step sequencer pattern to midi is actually not all that interesting because you can already do that inside logicPro easily. LogicPro, however, does not provide a way to convert midi into step sequencer patterns, which is what I'm more interested in.

Link to comment
Share on other sites

That's why I asked about the CAF file format or any information you may have about parsing it.

Did you not read the link I posted above?

https://developer.apple.com/library/archive/documentation/MusicAudio/Reference/CAFSpec/CAF_overview/CAF_overview.html#//apple_ref/doc/uid/TP40001862-CH209-TPXREF101

 

In that link, it also has this link (Core Audio File Specifications)

https://developer.apple.com/library/archive/documentation/MusicAudio/Reference/CAFSpec/CAF_spec/CAF_spec.html#//apple_ref/doc/uid/TP40001862-CH210-SW1

 

The Core Audio File Specifications lays out the structure, to which you can read and extract the information your looking for, if it's there of course.

Link to comment
Share on other sites

I already had read apple’s document before you posted it. I was hoping we could have a colaboratove discusion but it appears not.

file.php?id=46323

Without documentation to the the above plist file, what you want to try to do is impossible since you don't know every defined keyword in that plist file.

 

Not sure why you think that the settings file is in the CAF file, I already point out the settings files and not sure if you know this but you create your own "user" settings, which then you can share with others but that doesn't require creating CAF files but SETTINGS files (plist).

 

You'd want to create a SETTINGS file because that doesn't get tied to a CAF file, which is the whole purpose of the SETTINGS file.

Link to comment
Share on other sites

The plist files are entirely seperate from the caf Apple loops.

 

I have already deciphered most of the plist tags and plan to write a converter that can convert midi files to plist pattern files.

 

My interest in this thread is about the caf files not the plist. Never mind, you’re making the discussion too hard mate. Good luck

Link to comment
Share on other sites

  • 2 months later...
  • 5 months later...
I just found this and thanks for sharing. Any chance you will put this source on GitHub? I am looking into how I can read CAF files to get not only midi out, but also other metadata that might be in there, and now with LogicPro 10.5, stepSequencer patterns can also be stored inside CAF files...

 

Me too, I tried by myself, it works (to extract midi, however, still a work in progress), check this out

https://github.com/dirkarnez/caf-to-midi

written in golang

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...