Package com.meapsoft

Examples of com.meapsoft.EDLChunk


   
    double currentTime = 0.0;
   
    for (int i = 0; i < selectedChunks.size(); i++)
    {
      EDLChunk oldChunk = (EDLChunk)selectedChunks.elementAt(i);
   
      EDLChunk newChunk =
        new EDLChunk(oldChunk.srcFile, oldChunk.startTime, oldChunk.length, currentTime);
      newChunk.addFeature(oldChunk.getFeatures());
      eDLOutputFile.chunks.add(newChunk);
     
      currentTime += oldChunk.length;
    }
View Full Code Here


    if(playFeatChunks)
        oldChunk = (FeatChunk)selectedChunks.elementAt(i);
    else
        oldChunk = (EDLChunk)selectedChunks.elementAt(i);

    EDLChunk newChunk = new EDLChunk(oldChunk.srcFile,
                                             oldChunk.startTime,
                                             oldChunk.length, currentTime);

    // do some fading by default so it doesn't sound so bad
    newChunk.commands.add("fade");
   
    edl.chunks.add(newChunk);

    if (addBlips) {
        EDLChunk blip = new EDLChunk(blipWav, 0, blipDuration, currentTime);
        edl.chunks.add(blip);
    }
   
    currentTime += oldChunk.length;
      }
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);

      chunks2.add(nc);

      currTime += currChunk.length;

      progress.setValue(progress.getValue() + 1);
    }

    double currTime2 = 0;
    Random rand = new Random();
    int pointer;
    int pointer2;
    int clumpWidth;
    int moveWidth;

    while (currTime2 <= outFileLength)
    {
      pointer = rand.nextInt((int) chunks2.size());
      clumpWidth = rand.nextInt(maxClumpWidth) + 1;
      moveWidth = rand.nextInt(13) + 13;
      int pointersSize = 2 + rand.nextInt(3);
      int pointers[] = new int[pointersSize];
      pointers[0] = pointer;
      for (int pi = 1; pi < pointersSize; pi++)
      {
        pointers[pi] = pointers[0] + rand.nextInt(moveWidth);
      }
      ;
      for (int i = 0; i < rand.nextInt(maxClumpWidth) + 1; i++)
      {
        pointer = pointers[rand.nextInt(pointersSize)];
        for (int i2 = 0; i2 < rand.nextInt(maxClumpWidth) + 1; i2++)
        {
          pointer2 = pointers[rand.nextInt(pointersSize)]
              + rand.nextInt(clumpWidth + 1);
          if (pointer2 > (chunks2.size() - 1))
          {
            pointer2 = chunks2.size() - 1;
          }
          EDLChunk currChunk2 = (EDLChunk) chunks2.get(pointer2);
          EDLChunk nc = new EDLChunk(currChunk2.srcFile,
              currChunk2.startTime, currChunk2.length, currTime2);
          outFile.chunks.add(nc);
          currTime2 += nc.length;
        }
      }
View Full Code Here

      {
        int numEDLChunks = eDLFile.chunks.size();

        for (int j = 0; j < numEDLChunks; j++)
        {
          EDLChunk eC = (EDLChunk) eDLFile.chunks.elementAt(j);
         
          if (eC.startTime == cVI.startTime)
            cVI.dstTime = eC.dstTime;
        }
      }
View Full Code Here

    for (int i = 0; i < events.size(); i++)
    {
      ChunkVisInfo cVI = (ChunkVisInfo)events.elementAt(i);
      if (cVI.selected)
      {
        EDLChunk c =
          new EDLChunk(cVI.srcFile, cVI.startTime, cVI.length,
            cVI.dstTime);
        c.comment = cVI.comment;
        v.add(c);
      }
    }
View Full Code Here

      Iterator i = templateChunks.iterator();
      while (i.hasNext())
      {
        FeatChunk currChunk = (FeatChunk) i.next();

        EDLChunk nc = new EDLChunk((FeatChunk) templateChunks
            .get(quantizeChunk(currChunk)), currTime);
        outFile.chunks.add(nc);

        currTime += nc.length;
        progress.setValue(progress.getValue() + 1);
      }

    }
    else
    // quantize featsToQuantize
    {
      Iterator i = featsToQuantize.chunks.iterator();
      while (i.hasNext())
      {
        FeatChunk currChunk = (FeatChunk) i.next();

        EDLChunk nc = new EDLChunk((FeatChunk) templateChunks
            .get(quantizeChunk(currChunk)), currChunk.startTime);

        outFile.chunks.add(nc);
        progress.setValue(progress.getValue() + 1);
      }
View Full Code Here

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

            chunks2.add(nc);
        
            currTime += currChunk.length;

            progress.setValue(progress.getValue()+1)
        }
       
    double currTime2 = 0;
    Random rand = new Random();
    int pointer;
    int pointer2;
    int clumpWidth;
    int moveWidth;
   
    while(currTime2<=outFileLength)
    {
      pointer = rand.nextInt((int)chunks2.size());
      clumpWidth = rand.nextInt(maxClumpWidth)+1;
      moveWidth = rand.nextInt(13)+13;
      int pointersSize = 2+rand.nextInt(3);
      int pointers[] = new int[pointersSize];
      pointers[0]=pointer;
      for ( int pi = 1; pi<pointersSize; pi++) {
        pointers[pi] = pointers[0]+rand.nextInt(moveWidth);
      };
      for (int i = 0; i<rand.nextInt(maxClumpWidth)+1; i++) {
        pointer = pointers[rand.nextInt(pointersSize)];
        for (int i2 = 0; i2<rand.nextInt(maxClumpWidth)+1; i2++)
        {
          pointer2 = pointers[rand.nextInt(pointersSize)] + rand.nextInt(clumpWidth+1);
          if (pointer2>(chunks2.size()-1))
          {
            pointer2 = chunks2.size()-1;
          }
          EDLChunk currChunk2 = (EDLChunk)chunks2.get(pointer2);
          EDLChunk nc = new EDLChunk(currChunk2.srcFile, currChunk2.startTime, currChunk2.length, currTime2);
          outFile.chunks.add(nc);
          currTime2 += nc.length;
        }
      }
    }
View Full Code Here

    {
      // your current features chunk
      FeatChunk ch = (FeatChunk) c.next();

      // make a new EDL chunk from the current features chunk
      EDLChunk original = new EDLChunk(ch, currTime);
      // we're going to make one more chunk for the backwards part
      EDLChunk backwards = new EDLChunk(ch, currTime + ch.length);

      // tell the 2nd chunk to add the reverse command so that
      // when the synthsizer sees this chunk it will render the audio
      // in reverse
      backwards.commands.add("reverse");
View Full Code Here

      {
        int numEDLChunks = eDLFile.chunks.size();

        for (int j = 0; j < numEDLChunks; j++)
        {
          EDLChunk eC = (EDLChunk) eDLFile.chunks.get(j);

          if (eC.startTime == cVI.startTime)
            cVI.dstTime = eC.dstTime;
        }
      }
View Full Code Here

    for (int i = 0; i < events.size(); i++)
    {
      ChunkVisInfo cVI = (ChunkVisInfo) events.get(i);
      if (cVI.selected)
      {
        EDLChunk c = new EDLChunk(cVI.srcFile, cVI.startTime,
            cVI.length, cVI.dstTime);
        c.comment = cVI.comment;
        v.add(c);
      }
    }
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.