It is possible in version 2.1.x to auto detremine in and out points when loading new files into the playlist (by dragging files from the browser to the playlist).
How could I automaticly save these values in the on-the-fly database (or other database)?
It would be great to let the on-the-fly-database save the auto in and out markers for files that haven’t yet got any information regarding cue in and mix out points.
What could also help is to store the auto in and out points automaticly in the tag or metadata file of each audio item …
The Auto Cue In etc. options will also apply to any item newly added to the OTF database. I will however not affect any items already contained in the database - how would it know which items to update/overwrite? (Even if an item has no cue points, this could be in purpose.)
Possible solutions:
Enabled Auto Cue or Fade, delete the cache file and let rescan the complete folder. Note that any previous manual changes to the OTF items will be lost.
The cache file is nothing but an ordinary .mlp file. You can simply open it in the playlist, and then run a script that applies the auto position features for all items that don’t have any cue points yet. Let me know if you need such a script.
You can also manually apply the Auto Position features to single items. Just open the file in PFL, hold down shift and click SET (for Cue In, Fade Out or Cue Out).
begin
for i := 0 to CurrentPlaylist.GetCount - 1 do
if pioAutoPosition in CurrentPlaylist.GetItem(i).GetOptions then begin
if CurrentPlaylist.GetItem(i).GetCueIn.GetValue = 0 then
CurrentPlaylist.GetItem(i).GetCueIn.SetValue(CurrentPlaylist.GetItem(i).AutoSearchPosition(ptCueIn));
if CurrentPlaylist.GetItem(i).GetFadeOut.GetValue = 0 then
CurrentPlaylist.GetItem(i).GetFadeOut.SetValue(CurrentPlaylist.GetItem(i).AutoSearchPosition(ptFadeOut));
if CurrentPlaylist.GetItem(i).GetCueOut.GetValue = 0 then
CurrentPlaylist.GetItem(i).GetCueOut.SetValue(CurrentPlaylist.GetItem(i).AutoSearchPosition(ptCueOut));
end;
end.[/code]
Copy it into a text file and name it “autoposition.mls”. Open OnTheFlyCache.mlp inside the playlist (from the playlist context menu). Then run the script from mAirList’s main menu (Open -> Run script). It will take a while to process all files. mAirList will seem to “hang”, as the script blocks the foreground thread. Finally, save the playlist again as OnTheFlyCache.mlp from the playlist context menu.
You should make a backup of the .mlp file first. It’s also a good idea to deactivate the database during the process (just open your mAirList.ini file and rename the “Database0” section to “xDatabase0”) so that the cache file does not get accidently overwritten by the database system.
begin
for i := 0 to CurrentPlaylist.GetCount - 1 do
if pioAutoPosition in CurrentPlaylist.GetItem(i).GetOptions then begin
if CurrentPlaylist.GetItem(i).GetCueIn.GetValue = 0 then
CurrentPlaylist.GetItem(i).GetCueIn.SetValue(CurrentPlaylist.GetItem(i).AutoSearchPosition(ptCueIn));
if CurrentPlaylist.GetItem(i).GetFadeOut.GetValue = 0 then
CurrentPlaylist.GetItem(i).GetFadeOut.SetValue(CurrentPlaylist.GetItem(i).AutoSearchPosition(ptFadeOut));
if CurrentPlaylist.GetItem(i).GetCueOut.GetValue = 0 then
CurrentPlaylist.GetItem(i).GetCueOut.SetValue(CurrentPlaylist.GetItem(i).AutoSearchPosition(ptCueOut));
end;
end.[/code]
Copy it into a text file and name it “autoposition.mls”. Open OnTheFlyCache.mlp inside the playlist (from the playlist context menu). Then run the script from mAirList’s main menu (Open → Run script). It will take a while to process all files. mAirList will seem to “hang”, as the script blocks the foreground thread. Finally, save the playlist again as OnTheFlyCache.mlp from the playlist context menu.
You should make a backup of the .mlp file first. It’s also a good idea to deactivate the database during the process (just open your mAirList.ini file and rename the “Database0” section to “xDatabase0”) so that the cache file does not get accidently overwritten by the database system.
Torben
You can then call it from the mAirList menu.
Hi Torben,
This script isn’t working (v2.1.31). There is an error:
[Error] (5:8): Unknown identifier 'pioAutoPosition'
Didn’t use this script before so maybe I’m doing something wrong.
begin
for i := 0 to CurrentPlaylist.GetCount - 1 do
if picAutoPosition in CurrentPlaylist.GetItem(i).GetCapabilities then begin
if CurrentPlaylist.GetItem(i).GetCuePosition(ptCueIn).GetValue = 0 then
CurrentPlaylist.GetItem(i).GetCuePosition(ptCueIn).SetValue(CurrentPlaylist.GetItem(i).AutoSearchPosition(ptCueIn));
if CurrentPlaylist.GetItem(i).GetCuePosition(ptFadeOut).GetValue = 0 then
CurrentPlaylist.GetItem(i).GetCuePosition(ptFadeOut).SetValue(CurrentPlaylist.GetItem(i).AutoSearchPosition(ptFadeOut));
if CurrentPlaylist.GetItem(i).GetCuePosition(ptCueOut).GetValue = 0 then
CurrentPlaylist.GetItem(i).GetCuePosition(ptCueOut).SetValue(CurrentPlaylist.GetItem(i).AutoSearchPosition(ptCueOut));
end;
end.[/code]
The base directory is scanned recursively, so the database will contain all files, also from the sub-directories.
Hi Torben,
Sorry for the delay but today I tried again on an clean computer. On my own music directory, with sub-directories only, OnTheFly does not create any OnTheFlyCache.mlp mAirList is scanning something (connecting to database) but after startup of mAirList notihing is happend and I can’t connect the database in the explorer.
In the config:
OnTheFlyDatabase
D:\complete albums
true
true
Vincent, roughly how many albums/tracks do you have in the ‘big’ directory you are talking about?
Perhaps this is just a ‘patience’ issue … if you have more than a thousand tracks, I would suggest that you start the ‘scan’ and then check back after an hour, then each hour or so. If it still does not complete after (say) four hours, try starting it just before you go to bed, and then checking the results when you wake in the morning.
I am assuming that you are referring just to the OnTheFly database creation here, and not the ‘automatically set cue point’ script as well? That would definitely slow things down!
If it helps your estimates, remember that there are only 86,400 seconds available per day! If mAirList can add (say) five tracks to the OnTheFly cache per second, that would be 432,000 tracks per day or 18,000 tracks per hour in theory: but in practice, the larger each OnTheFly cache file becomes, the slower the processing.
There are a lot of tracks. Do you assume that the OnTheFly database is build in the background and not in the large startup time from mAirList?(I suggest 10 to 15 minutes)? Hmmmm I will start it now and see what is happening later this evening.
This is the maximum amount of sub-directories (5);
D:\complete albums\d\The Doors\The Doors- The best of The Doors\cd1\
Thanks! Vincent.
Vincent, roughly how many albums/tracks do you have in the 'big' directory you are talking about?
Perhaps this is just a ‘patience’ issue … if you have more than a thousand tracks, I would suggest that you start the ‘scan’ and then check back after an hour, then each hour or so. If it still does not complete after (say) four hours, try starting it just before you go to bed, and then checking the results when you wake in the morning.
I am assuming that you are referring just to the OnTheFly database creation here, and not the ‘automatically set cue point’ script as well? That would definitely slow things down!
If it helps your estimates, remember that there are only 86,400 seconds available per day! If mAirList can add (say) five tracks to the OnTheFly cache per second, that would be 432,000 tracks per day or 18,000 tracks per hour in theory: but in practice, the larger each OnTheFly cache file becomes, the slower the processing.
I alread know the large ‘automatically set cue point script’ time. That’s not what I mean. It’s only the OTF database creation.
I am assuming that you are referring just to the OnTheFly database creation here, and not the 'automatically set cue point' script as well? That would [b]definitely[/b] slow things down! ;)