3 Replies Latest reply on Dec 1, 2014 12:01 PM by Bruce Bullis

    calling exportOMF() Method using ExtendScript

    bpoole24

      Does anyone have any experience calling this method using ExtendScript? I'm trying to incorporate it into a script but so far have not been able to successfully call it. I'm assuming it needs an argument of the sequence you want to export an OMF from, but so far it keeps returning "bad argument list" whenever I try to call it with something like:

       

      seq = app.project.activeSequence;

      app.project.exportOMF(seq);

       

      I've tried using reflect.properties but haven't been able to find anything useful. Can someone point me in the right direction for calling this method, or tell me what arguments it is expecting?

       

      Thanks!

        • 1. Re: calling exportOMF() Method using ExtendScript
          Bruce Bullis Adobe Employee

          This snippet from the PProPanel sample should help:

           

          dumpOMF : function() {
          app.enableQE();
          var active_seq = qe.project.getActiveSequence();
          if (active_seq != null) {
          var output_path = Folder.selectDialog("Choose the output directory");
          if (output_path != null){
          var abs_path = output_path.fsName;
              var outname  = new String(active_seq.name) + '.omf';

           

           

                          var sep         = '\\';

           

           

                          if (qe.platform == 'Macintosh') {

                         sep = '/';

                          }

                         

                          var full_out_path_with_name = abs_path + sep + outname;

           

           

          app.project.exportOMF(app.project.activeSequence,            // sequence
          full_out_path_with_name,// output file path
          'OMFTitle',                    // OMF title
          48000,                    // sample rate (48000 or 96000)
          16,                        // bits per sample (16 or 24)
          1,                        // audio encapsulated flag (1 : yes or 0 : no)
          0,                        // audio file format (0 : AIFF or 1 : WAV)
          0,                        // trim audio files (0 : no or 1 : yes)
          0,                        // handle frames (if trim is 1, handle frames from 0 to 1000)
          0);                        // include pan flag (0 : no or 1 : yes)
          }
          } else {
          alert("No active sequence.");
          }
          },
          • 2. Re: calling exportOMF() Method using ExtendScript
            bpoole24 Level 1

            Thank you so much, this is exactly what I was looking for, solved my problem!

             

            Thanks again!

            — Bryce P.