Jump to content
azslow3

Utility to extract PTN from ARP and convert MID to PTN

Recommended Posts

Cakewalk has build-in MIDI arp.

In addition to "usual" for arps sequences, it can use custom note sequences as the basis. The only supported format for these sequences is PTN.

Cakewalk by itself can load PTN files, as MIDI clips and as a part of arp configuration. Cakewalk also can save arp configuration (including the pattern) into ARP files.

But for some (which?) reason Cakewalk can't create PTN files nor extract them from ARP files.

The following utility tries to provide missed functionality. It is command line program which accept single file name as the argument:

  • if the argument has an extension "arp" (or "ARP"), it tries to extract PTN file from it. The extraction is verbatim (PTN files are saved "as is" in ARP files)
  • if the argument has an extension "mid" (or "MID"), it tries convert it into PTN file. Note that conversion is not "1 to 1", only Notes, Wheel and CC events are converted and all other parameters in resulting PTN file are constant (I don't know what they specify). In my tests that is sufficient for arp operations, please let me know if I have overseen something (I mean the result does not work as expected)

Background information about PTN files.

PTN are "Project 5" proprietary format to store MIDI clips. In general it seems like the format support all information in MIDI clips (and some extra, f.e. flam). But only a part of that information is used by Cakewalk arp.

Converting MIDI clip into PTN.

Prepare a MIDI clip, by loading existing PTN file (f.e. File/Import/MIDI..., select "P5 pattern" as file type) or from scratch. Original tempo will be reproduced with 1/32 setting in the arp (note that factory ARP do not follow that rule, so even if you load PTN extracted from an ARP into the same ARP, the tempo can be different). The first note defines the "origin" for transposing the whole clip according to actual note on the track. Select the clip. File/Export.../MIDI groove clip. Use the utility with created MID file name as parameter.

  • Thanks 7

Share this post


Link to post
Share on other sites

I made some small initial tests where I took a very simple pattern-like MIDI file and had it processed by your converter. I was then able to run the resulting PTN file through the CbB arpeggiator without any problems. I will make some more tests but as for the above use-case it worked very well. Great!

Question: would it be possible to have the program optionally accept more than one file argument? That way I could write my own Windows GUI frontend and through your utility have it make a batch conversion of multiple MIDI files in one single operation?

  • Great Idea 1

Share this post


Link to post
Share on other sites

I could implement multi-file support, GUI, DnD, etc... but I have decided to keep it "simple", at least for the moment.

The utility is so small that calling it for single files from batch/gui wrapper should take almost no time. With advantage it is simpler to analyze when particular file fails.

for /R %f in (*.arp) do <path to>\cakearp "%f"
called from a copy of "Cakewalk Core" took around 5 second to extract all ARP files I have.

PS. well, if for whatever reason you still think that is useful... the utility accept any number of arguments now.

Edited by azslow3
  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Thanks a lot. Much appreciated. 
 

Interestingly when I was searching for a little more info I found posts on the old Cakewalk forum going back to 2004 with requests for a utility to convert from .ptn to .mid files. I’ve linked the threads below for your interest. 
 

Link01

Link02

Link03

Link04

 

 

Edited by Michael Vogel (MUDGEL)
Added extra information.

Share this post


Link to post
Share on other sites
17 hours ago, azslow3 said:

PS. well, if for whatever reason you still think that is useful... the utility accept any number of arguments now.

Thanks! I’ve downloaded the new version and will soon check it out.

The reason I asked for the possibility to have multiple file arguments was that I assumed it would be more efficient during a batch conversion not having to call CakeArp.exe for each file to be processed, but as you say it might very well be that the utility is so lean that it wouldn't have made any noticeable difference. Still, many thanks for the addition!

Edit: As for the reason why SONAR was unable to save PTN files; of course, I’m only guessing here, but I can’t help wonder if the reason might have been that the ability to save PTN files could have been regarded as a unique selling point of Project5. Adding that ability to SONAR as well might have been regarded as product cannibalizing.

Edited by Canopus

Share this post


Link to post
Share on other sites
3 hours ago, Michael Vogel (MUDGEL) said:

Interestingly when I was searching for a little more info I found posts on the old Cakewalk forum going back to 2004 with requests for a utility to convert from .ptn to .mid files. I’ve linked the threads below for your interest.

PTN to MID was never a real problem, till people have tried to "escape" Cakewalk world. Sonar/CbB can load PTN and save as MIDI (f.e. as described in my first post, even faster with DnD). Originally I have thought to include that into utility (so giving PTN produce MID), but since that is natively supported, I have not implemented it.

1 hour ago, Canopus said:

Edit: As for the reason why SONAR was unable to save PTN files; of course, I’m only guessing here, but I can’t help wonder if the reason might have been that the ability to save PTN files could have been regarded as a unique selling point of Project5. Adding that ability to SONAR as well might have been regarded as product cannibalizing.

PTN files are fully usable in Project5 only. I don't see how a possibility to create files usable in a single program can be considered as a selling point for that program.
While initially Project5 and Sonar could be thought as complimenting products, most (all?) features of Project 5 was later added into Sonar.

Note that container format used in  ARP/PTN files is still in use by CbB (CWP files). If I understand the documentation right, Project5 could work with MID. So Cakewalk still has the code and it is a matter of adding an extra option into Export menu and calling that code...

But in practice PTN files make sense for arp only, and lets face it, arp in CbB is not the best arp on the market (I guess it is verbatim Project5 code, which in turn is the primary reason why it works with PTN...).

I think the problem is that CbB still supports archaic DX MIDI FX only. So routing VST MIDI effects is troublesome. And so when for someone Cakewalk arp provides wished functionality, it is the easiest to use. There is a least one DX MIDI FX style/arp plug-in: https://midi-plugins.de/#Plugins/VirtualBand  but I am not sure it is still possibly to buy it...

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...