Examples of EDLChunk


Examples of com.meapsoft.EDLChunk

    {
      //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

Examples of com.meapsoft.EDLChunk

    while (outChunks.size() > 0)
    {
      FeatChunk match = (FeatChunk) outChunks.remove(0);

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

      if (debug)
      {
        NumberFormat fmt = NumberFormat.getInstance();
        fmt.setMaximumFractionDigits(3);
View Full Code Here

Examples of com.meapsoft.EDLChunk

       
    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);
      outFile.chunks.add(nc);
           
      currTime += ch.length;
View Full Code Here

Examples of com.meapsoft.EDLChunk

    {
      FeatChunk match = (FeatChunk) chunks.first();
            chunks.remove(match);

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

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

Examples of com.meapsoft.EDLChunk

     
      for (int i = 0; i < beatsPerMeasure; i++)
      {
        //System.out.println("i: " + i + " currPosition: " + currPosition);
       
        EDLChunk newChunk = new EDLChunk(chunks[currPosition], currTime);
        outFile.chunks.add(newChunk);
        currTime += newChunk.length;
       
        currPosition++;
        currPosition %= beatsPerMeasure;
View Full Code Here

Examples of com.meapsoft.EDLChunk

    Random rand = new Random();
    double currTime = 0;

    // get first chunk from startProbs
    int lastIdx = multinomialSample(rand.nextDouble(), startProbs);
    EDLChunk nc = new EDLChunk((FeatChunk) templateChunks.get(lastIdx),
        currTime);
    outFile.chunks.add(nc);
    currTime += nc.length;
    progress.setValue(progress.getValue() + 1);

    // use transitionMatrix for the remaining chunks
    for (int x = 1; x < sequenceLength; x++)
    {
      int currIdx = multinomialSample(rand.nextDouble(),
          transitionMatrix[lastIdx]);

      nc = new EDLChunk((FeatChunk) templateChunks.get(currIdx), currTime);
      outFile.chunks.add(nc);
      currTime += nc.length;
      progress.setValue(progress.getValue() + 1);

      lastIdx = currIdx;
View Full Code Here

Examples of com.meapsoft.EDLChunk

     
      //if we want chunks that are in the sweetspot
      if (inSweetSpot && insideThreshold)
      {
//        make a new EDL chunk from the current features chunk
        EDLChunk newChunk = new EDLChunk(ch, currTime);
        outFile.chunks.add(newChunk);
        currTime += ch.length;
        //System.out.println("inSweetSpot && insideThreshold, so writing chunk!");
      }
      //if we want chunks that are not in the sweetspot
      else if (!inSweetSpot && !insideThreshold)
      {
//        make a new EDL chunk from the current features chunk
        EDLChunk newChunk = new EDLChunk(ch, currTime);
        outFile.chunks.add(newChunk);
        currTime += ch.length;
        //System.out.println("!inSweetSpot && !insideThreshold, so writing chunk!");
      }
      //else
View Full Code Here

Examples of com.meapsoft.EDLChunk

      for (int i = numSubChunks - 1; i >= 0; i--)
      {
        // make a new EDL chunk from the current features chunk
        // EDLChunk original = new EDLChunk(ch, currTime);

        EDLChunk chunk = new EDLChunk(ch.srcFile, localStartTime
            + (i * length), length, currTime);

        // EDLChunk blip = new EDLChunk("data" +
        // System.getProperty("file.separator") + "blip.wav",
        // 0, 0.1, currTime);
View Full Code Here

Examples of com.meapsoft.EDLChunk

          match = c;
        }
      }

      // turn match chunk into an EDL chunk
      EDLChunk nc = new EDLChunk(match, currChunk.startTime);
      nc.comment = "    # dist = " + fmt.format(mindist);
      outFile.chunks.add(nc);

      progress.setValue(progress.getValue() + 1);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.