User Tools

Site Tools


tutorials:musicmaster:mairlistdb-sync-files

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tutorials:musicmaster:mairlistdb-sync-files [2017/08/21 12:54] – [Export from mAirListDB] twtutorials:musicmaster:mairlistdb-sync-files [2019/07/09 16:18] (current) – external edit 127.0.0.1
Line 63: Line 63:
 Note that there are two sections that must be edtied: ''[LibImportMapAdd]'' is for adding new songs, and ''[LibImportMapUpdate]'' is for the update of existing records. Note that there are two sections that must be edtied: ''[LibImportMapAdd]'' is for adding new songs, and ''[LibImportMapUpdate]'' is for the update of existing records.
  
-Once the .def file is correctly set up, you can open MusicMaster, go to ''Dataset -> Library -> Synchronize'', select //mAirList Library Synchronization// and run it. +Once the .def file is correctly set up, you can open MusicMaster, go to //Dataset -> Library -> Synchronize//, select //mAirList Library Synchronization// and run it.
  
 +{{ :tutorials:musicmaster:pasted:20170821-145507.png }}
  
 +Now all songs from your CSV file should be added to or updated in the MusicMaster database.
 ===== Schedule Export (and Import) ===== ===== Schedule Export (and Import) =====
  
 +This section is about scheduling export, that is, exporting the music log created in MusicMaster and loading it into the mAirListDB playlist view.
 +
 +We assume that you have used the Automatic Scheduler in MusicMaster to create some music schedules. We use one export file per day, so you should have scheduled at least one entire day that we are now going to export.
 +
 +The file format being used is mAirList's [[reference:text_playlist_import_format_specification|Text Playlist Import (TPI) Format]], essentially a special kind of CSV format (which is good because you can easily open and review the files in any text editor). We use //I// lines ("Internal ID") most of the time, so it is important that MusicMaster has the mAirListDB internal IDs stored in one of its fields.
 +
 +==== MusicMaster setup ====
 +
 +Before you can export the schedule from MusicMaster, you must create an appropriate export definition in the MusicMaster Export File Designer.
 +
 + {{ :tutorials:musicmaster:pasted:20170821-152230.png?400 }}
 +
 +Again, we recommend that you let the MusicMaster support assist you in this step. We will provide a template file that will help you to create the definitions quickly. 
 +
 +The crucial part is the 4th column for the three "Song" types (ControlItem, NonMusic, Music), which must use the ID column that contains the mAirListDB internal IDs. 
 +
 +Also make sure that, in the Design Properties, the //Output filename pattern// must be set to ''@y1@m1@d1.TPI'' (= YYYYMMDD.TPI), and the correct folder (''C:\MM_Sync\Schedule'') is set as the //Default output path//.
 +
 +==== Perform the export ====
 +
 +Once the design is ready, save it, then go to //Dataset -> Schedule -> Export -> Export to Automation//, select the //mAirList Log Export// format and the desired start/end date, and click //OK// to start the export. Check the output folder -- there should be one TPI file per day, named ''YYYYMMDD.TPI''. When you open them in a text editor, the content should look like this:
 +
 +  00:00:00 N I 2640
 +  00:03:49 N I 2634
 +  00:08:47 N I 2639
 +  00:13:04 N I 2599
 +  00:18:07 N I 2642
 +  ...
 +  
 +The first column is the start time, the second the timing ("Normal"), the third is the line type ("Internal ID"), and the last column the ID of the scheduled song.
 +
 +Hint: If the ID column is missing or empty, you have selected an incorrect field for the 4th column in the Export Designer; also check that the ID field has been propagated correctly with the mAirListDB Internal IDs during CSV import.
 +
 +==== mAirListDB setup ====
 +
 +Now that we have created the TPI files, we can set up the import in mAirListDB, using appropriate hour and music templates. **Because even when we use MusicMaster as an external music scheduling software, we will still use the mAirListDB Mini Scheduler in order to import the TPI files into the mAirListDB playlist!** We will just advise the Mini Scheduler to pick up the TPI files rather than using the internal music scheduling function. (In fact, you can even combine the internal scheduler and TPI import, e.g. use the hour template to schedule fixed elements like news breaks and advertising, and only use MusicMaster for the music items.)
 +
 +So the first thing to do is to set up one or more Hour Templates in mAirListDB, as described in the [[tutorials:mairlistdb:music-scheduling|mAirListDB Music Scheduling Tutorial]]. In the most simple case, the hour template will just contain the //Start of Hour// and //End of Hour marker//, and then one large //Fill with music// section in between where content from the TPI file will be inserted:
 +
 +{{ :tutorials:musicmaster:pasted:20170821-153931.png?400 }}
 +
 +Note: Use //Music block// instead of //Fill with music// in order to import the entire log MusicMaster generated for that hour, including any possible overplanning.
 +
 +Next, we create a new Music Template. In the definition of Block 1 (we only work with Block 1 all the time), set the source to //External scheduler//:
 +
 +{{ :tutorials:musicmaster:pasted:20170821-154306.png?400 }}
 +
 +Then click //Configure// and set up the import file location and format:
 +
 +{{ :tutorials:musicmaster:pasted:20170821-154502.png?400 }}
 +
 +The important bits are:
 +
 +  * File format: TPI
 +  * File style: One file per day
 +  * Split hour by: automatic
 +  * Split block by: automatic
 +  * Source folder: ''C:\MM_Sync\Schedule''
 +  * Filename format: ''%Y%M%D.TPI''
 +
 +The import tasks can be left untouched as we will not deal with unknown files.
 +
 +Save the template, and assign it to all 24x7 hours in the Template Assignments grid.
 +==== Peform the import ====
 +
 +Once the Hour Template and Music Template have been set up, run the Mini Scheduler (click the //Generate// button in the main toolbar of the //Playlist// tab). The scheduler will now generate the playlists for the selected hours, picking up the TPI files and using their content for the //Fill with music// etc. sections.
 ===== Reconciliation ===== ===== Reconciliation =====
  
tutorials/musicmaster/mairlistdb-sync-files.1503320095.txt.gz · Last modified: 2019/07/09 16:19 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki