Package com.meapsoft

Examples of com.meapsoft.EDLChunk


        if(outFile != null)
        {
            Iterator i = outFile.chunks.iterator();
            while(i.hasNext())
            {
                EDLChunk chunk = (EDLChunk)i.next();

                if(chunk.commands != null)
                    chunk.commands.add(cmd);
            }
        }
View Full Code Here


            chunks.rebuildHeap();
           
            currChunk = (FeatChunk)chunks.deleteMin();
           
            // turn currChunk into an EDL chunk
            EDLChunk nc = new EDLChunk(currChunk, currTime);

            if(debug)
            {
                nc.comment = "    # feats = ";
                double[] feat = currChunk.getFeatures(featdim);
View Full Code Here

    while (c.hasNext())
    {
      FeatChunk ch = (FeatChunk) c.next();

      EDLChunk nc = new EDLChunk(ch, currTime);
      // hard-coded parameters of blip
      EDLChunk blip = new EDLChunk(blipWav, 0, 0.1, currTime);

      outFile.chunks.add(blip);
     
      //if we're in silent mode we don't write sound, just blips
      if (!silentMode)
View Full Code Here

    if (outFile != null)
    {
      Iterator i = outFile.chunks.iterator();
      while (i.hasNext())
      {
        EDLChunk chunk = (EDLChunk) i.next();

        if (chunk.commands != null)
          chunk.commands.add(cmd);
      }
    }
View Full Code Here

          //System.out.println(nnChunk);
          //System.out.println(chunks.size()+"\n");
 
          chunks.add(chunkNum, targetChunk);
 
          outFile.chunks.add(new EDLChunk(nnChunk, targetChunk.startTime));
 
          progress.setValue(progress.getValue() + 1);
      }     
    }
    else
    {
      while (chunks.size() > 1)
      {
          FeatChunk targetChunk = (FeatChunk) chunks.get(0);
          chunks.remove(targetChunk);
          dist.setTarget(targetChunk);
          FeatChunk nnChunk = (FeatChunk) Collections.min(chunks, dist);
          chunks.remove(nnChunk);
          //System.out.println(targetChunk);
          //System.out.println(nnChunk);
          //System.out.println(chunks.size()+"\n");
 
 
          outFile.chunks.add(new EDLChunk(nnChunk, targetChunk.startTime));
          outFile.chunks.add(new EDLChunk(targetChunk, nnChunk.startTime));
 
          progress.setValue(progress.getValue() + 1);
      }
    }
    // outFile now contains some chunks.
View Full Code Here

      dist.setTarget(currChunk);
            currChunk = (FeatChunk) Collections.min(chunks, dist);
            chunks.remove(currChunk);

      // turn currChunk into an EDL chunk
      EDLChunk nc = new EDLChunk(currChunk, currTime);

      if (debug)
      {
        nc.comment = "    # feats = ";
        double[] feat = currChunk.getFeatures(featdim);
View Full Code Here

             //divide length by the framerate (thanks ron!)
           AudioReader r = AudioReaderFactory.getAudioReader(fileName, outputFormat);
           double length = r.getFrameLength() / r.getFormat().getFrameRate();
          
             //create a big chunk and add it
             EDLChunk c = new EDLChunk(fileName, 0.0, length, 0.0);
             edl.chunks.add(c);
           }
           catch (Exception e)
           {
           e.printStackTrace();
View Full Code Here

     
      for (int i = 0; i < numChunks; i++)
      {
        double feature = 0.0;

        EDLChunk edlC = (EDLChunk)edlFile.chunks.get(i);
        FeatChunk fC = (FeatChunk)featFile.chunks.get(i);
 
        for (int j = 0; j < featureSize; j++)
        {
          if (featureNumber == -1)
            feature = fC.length;
          else
          {
            double[] featureArray = featFile.getFeatureByName(featureName, i);
            feature = featureArray[j];
          }
 
          if (feature < lowestValue)
            lowestValue = feature;
 
          if (feature > highestValue)
            highestValue = feature;
 
          if (edlC.dstTime < firstEventTime)
            firstEventTime = edlC.dstTime;
 
          if (edlC.dstTime > lastEventTime)
            lastEventTime = edlC.dstTime;
 
          if (edlC.dstTime + edlC.length > endTime)
            endTime = edlC.dstTime + edlC.length;
        }
      }
     
      //add chunks to events in new EDL order
      //System.out.println("adding chunks from FeatFile...");
      for (int i = 0; i < numChunks; i++)
      {
        EDLChunk edlC = (EDLChunk)edlFile.chunks.get(i);
       
        double sT = edlC.startTime;
       
        int matchChunkNum = -1;
       
View Full Code Here

   
    if (edlFile == null)
      return (FeatChunk)events.get(chunkNum);
    else
    {
      EDLChunk eC = (EDLChunk)events.get(chunkNum);
     
      for (int featChunkNum = 0; featChunkNum < numChunks; featChunkNum++)
      {
        fC = (FeatChunk) featFile.chunks.get(featChunkNum);
       
View Full Code Here

    {     
      //FeatChunk fC = getFeatChunkByNumber(chunkNum);
      //EDLChunk eC = (EDLChunk)events.get(chunkNum);
      FeatChunk fC = (FeatChunk)events.get(chunkNum);
      //EDLChunk eC = (EDLChunk)edlEvents.get(chunkNum);
      EDLChunk eC = null;
     
      for (int i = 0; i < numChunks; i++)
      {
        EDLChunk edlC = (EDLChunk)edlEvents.get(i);
        if (fC.compareTo(edlC) == 0)
        {
          eC = edlC;
        }
      }
View Full Code Here

TOP

Related Classes of com.meapsoft.EDLChunk

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.