ValliSoftware Posted October 22, 2018 Share Posted October 22, 2018 Here's a utility program I wrote to extract MIDI from Green Apple Loops, if there's MIDI in a Green Apple Loop. I've attached the file but watch the video to get an idea how it works. CafMidiExtractor.zip Quote Link to comment Share on other sites More sharing options...
vanhaze Posted October 23, 2018 Share Posted October 23, 2018 Superb, thank you so much Vallisoftware for making this available to The World. You make really great soft tools and Logic Scripts, highly appreciated. Warm Regards. Quote Link to comment Share on other sites More sharing options...
Sascha Franck Posted November 4, 2018 Share Posted November 4, 2018 Quite neat. Don't know whether I'll actually make use of those MIDI files, but having them can't be all too wrong and might save a step or two, so thanks! Quote Link to comment Share on other sites More sharing options...
Dewdman42 Posted May 19, 2020 Share Posted May 19, 2020 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... Quote Link to comment Share on other sites More sharing options...
ValliSoftware Posted May 20, 2020 Author Share Posted May 20, 2020 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. Quote Link to comment Share on other sites More sharing options...
Dewdman42 Posted May 20, 2020 Share Posted May 20, 2020 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... Quote Link to comment Share on other sites More sharing options...
ValliSoftware Posted May 20, 2020 Author Share Posted May 20, 2020 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. Quote Link to comment Share on other sites More sharing options...
ValliSoftware Posted May 20, 2020 Author Share Posted May 20, 2020 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. Quote Link to comment Share on other sites More sharing options...
Dewdman42 Posted May 20, 2020 Share Posted May 20, 2020 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.. Quote Link to comment Share on other sites More sharing options...
Dewdman42 Posted May 20, 2020 Share Posted May 20, 2020 But like I said, if you can figure out the step sequencer meta data, you could write a program that can convert simple apple midi loop CAF's into the step sequencer form...by filling in the meta data and populating the midi as noted above. Quote Link to comment Share on other sites More sharing options...
ValliSoftware Posted May 20, 2020 Author Share Posted May 20, 2020 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. Quote Link to comment Share on other sites More sharing options...
Dewdman42 Posted May 20, 2020 Share Posted May 20, 2020 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 Quote Link to comment Share on other sites More sharing options...
ValliSoftware Posted May 21, 2020 Author Share Posted May 21, 2020 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. Quote Link to comment Share on other sites More sharing options...
Dewdman42 Posted May 21, 2020 Share Posted May 21, 2020 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. Quote Link to comment Share on other sites More sharing options...
ValliSoftware Posted May 22, 2020 Author Share Posted May 22, 2020 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. Quote Link to comment Share on other sites More sharing options...
Dewdman42 Posted May 22, 2020 Share Posted May 22, 2020 I already had read apple’s document before you posted it. I was hoping we could have a colaboratove discusion but it appears not. Quote Link to comment Share on other sites More sharing options...
ValliSoftware Posted May 22, 2020 Author Share Posted May 22, 2020 I already had read apple’s document before you posted it. I was hoping we could have a colaboratove discusion but it appears not. 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. Quote Link to comment Share on other sites More sharing options...
Dewdman42 Posted May 22, 2020 Share Posted May 22, 2020 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 Quote Link to comment Share on other sites More sharing options...
Rolomoto Posted August 4, 2020 Share Posted August 4, 2020 Thanks! Here's a utility program I wrote to extract MIDI from Green Apple Loops, if there's MIDI in a Green Apple Loop. Quote Link to comment Share on other sites More sharing options...
anp27 Posted August 10, 2020 Share Posted August 10, 2020 Here's a utility program I wrote to extract MIDI from Green Apple Loops, if there's MIDI in a Green Apple Loop. This is great, love all your other MIDI FX stuff too, THANKS SO MUCH! Quote Link to comment Share on other sites More sharing options...
dirkalex Posted February 1, 2021 Share Posted February 1, 2021 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.