Examples of BlendContext


Examples of de.sciss.eisenkraut.io.BlendContext

      if( maxLeft + maxRight > blendLen ) {
        maxLeft  = (long) (maxLeft * (double) blendLen / (maxLeft + maxRight) + 0.5 );
        maxRight= blendLen - maxLeft;
      }
    }
    return new BlendContext( maxLeft, maxRight, CurvePanel.getControlPoints( prefs ) );
  }
View Full Code Here

Examples of de.sciss.eisenkraut.io.BlendContext

  {
    prConsumer    = source.context.getConsumer();
    prTotalSpan    = source.context.getTimeSpan();
   
//    prBlend      = new BlendContext( prTotalSpan.getLength(), CurvePanel.getControlPoints( prefs ));
    prBlend      = new BlendContext( prTotalSpan.getLength(), 0, CurvePanel.getControlPoints( prefs ));
    prBuf      = new float[ source.numAudioChannels ][];

    return prConsumer.consumerBegin( source );
  }
View Full Code Here

Examples of de.sciss.eisenkraut.io.BlendContext

      final AbstractCompoundEdit  edit;
      final Flag          hasSelectedAudio;
      final List          tis;
      final boolean        expTimeline, cutTimeline;
      final long          docLength, pasteLength, preMaxLen, postMaxLen;
      final BlendContext      bcPre, bcPost;
     
      hasSelectedAudio  = new Flag( false );
      tis          = Track.getInfos( selectedTracks.getAll(), tracks.getAll() );
      if( !AudioTracks.checkSyncedAudio( tis, mode == EDIT_INSERT, null, hasSelectedAudio )) return null;
View Full Code Here

Examples of de.sciss.eisenkraut.io.BlendContext

      final ClipboardTrackList    tl          = (ClipboardTrackList) context.getClientArg( "tl" );
      final long            insertPos      = ((Long) context.getClientArg( "pos" )).longValue();
      final int            mode        = ((Integer) context.getClientArg( "mode" )).intValue();
      final List            tis          = (List) context.getClientArg( "tis" );
      final AbstractCompoundEdit    edit        = (AbstractCompoundEdit) context.getClientArg( "edit" );
      final BlendContext        bcPre        = (BlendContext) context.getClientArg( "bcPre" );
      final BlendContext        bcPost        = (BlendContext) context.getClientArg( "bcPost" );
      final Span            insertSpan      = (Span) context.getClientArg( "insertSpan" );
      final Span            copySpan      = (Span) context.getClientArg( "copySpan" );
      final boolean          cutTimeline      = ((Boolean) context.getClientArg( "cut" )).booleanValue();
      final Span            cutTimelineSpan    = (Span) context.getClientArg( "cutSpan" );
      final long            delta        = insertPos - tl.getSpan().start;
View Full Code Here

Examples of de.sciss.eisenkraut.io.BlendContext

    // XXX sync
    protected ProcessingThread initiate( String procName, Span span, int mode )
    {
      if( !checkProcess() ) return null;

      final BlendContext      bc;
      final long          cutLength, docLength, newDocLength, maxLen;
      final Flag          hasSelectedAudio;
      final List          tis;
      final AbstractCompoundEdit  edit;
      final boolean         cutTimeline;
View Full Code Here

Examples of de.sciss.eisenkraut.io.BlendContext

    {
      final Span            span        = (Span) context.getClientArg( "span" );
      final int            mode        = ((Integer) context.getClientArg( "mode" )).intValue();
      final List            tis          = (List) context.getClientArg( "tis" );
      final AbstractCompoundEdit    edit        = (AbstractCompoundEdit) context.getClientArg( "edit" );
      final BlendContext        bc          = (BlendContext) context.getClientArg( "bc" );
      final long            left        = bc == null ? 0L : bc.getLeftLen();
      final long            right        = bc == null ? 0L : bc.getRightLen();
      final boolean          cutTimeline      = ((Boolean) context.getClientArg( "cut" )).booleanValue();
      final Span            cutTimelineSpan    = (Span) context.getClientArg( "cutSpan" );
      AudioTrail            audioTrail;
      Track.Info            ti;
      boolean              isAudio;
View Full Code Here

Examples of de.sciss.meloncillo.io.BlendContext

    // XXX sync
    protected ProcessingThread initiate( String name, Span span, int mode )
    {
      if( !checkProcess() ) return null;

      final BlendContext      bc;
      final long          cutLength, docLength, newDocLength, maxLen;
      final Flag          hasSelectedAudio;
      final List          tis;
      final AbstractCompoundEdit  edit;
      final boolean         cutTimeline;
View Full Code Here

Examples of de.sciss.meloncillo.io.BlendContext

    {
      final Span            span        = (Span) context.getClientArg( "span" );
      final int            mode        = ((Integer) context.getClientArg( "mode" )).intValue();
      final List            tis          = (List) context.getClientArg( "tis" );
      final AbstractCompoundEdit    edit        = (AbstractCompoundEdit) context.getClientArg( "edit" );
      final BlendContext        bc          = (BlendContext) context.getClientArg( "bc" );
      final long            left        = bc == null ? 0L : bc.getLeftLen();
      final long            right        = bc == null ? 0L : bc.getRightLen();
      final boolean          cutTimeline      = ((Boolean) context.getClientArg( "cut" )).booleanValue();
      final Span            cutTimelineSpan    = (Span) context.getClientArg( "cutSpan" );
      AudioTrail            audioTrail;
      Track.Info            ti;
      boolean              isAudio;
View Full Code Here

Examples of de.sciss.meloncillo.io.BlendContext

     */
    public int processRun( ProcessingThread context )
    {
      final CompoundSessionObjEdit  edit    = (CompoundSessionObjEdit) context.getClientArg( "edit" );
      final List            collTrns  = (List) context.getClientArg( "trns" );
      final BlendContext        bc      = (BlendContext) context.getClientArg( "blend" );
      final Span            span    = (Span) context.getClientArg( "span" );
      final float[][]          srcBuf    = bc == null ? null : new float[ 2 ][ 4096 ];
      final double          t_norm;
      final float[][]          interpBuf;
      final float[]          warpedTime;
      final float            v_start_norm, dv_norm;
      final long            interpLen, progressLen;
      Transmitter            trns;
      AudioTrail            at;
      int                len;
      long              t, tt;
//      BlendSpan            bs;
      // interpLen entspricht 'T' in der Formel (Gesamtzeit), interpOff entspricht 't' (aktueller Zeitpunkt)
      long              start, interpOff;
      long              progress  = 0;
      AudioStake            as;
       
      interpLen   = span.getLength();
      warpedTime  = new float[(int) Math.min( interpLen, 4096 )];
      interpBuf   = new float[2][ warpedTime.length ];

      t_norm      = 1.0 / (interpLen - 1);
      v_start_norm  = (float) (vStart * t_norm);
      dv_norm      = (float) ((vStop - vStart) / 2 * t_norm * t_norm);

//      initFunctionEvaluation();
     
      progressLen      = interpLen*collTrns.size();
     
      try {
        for( int i = 0; i < collTrns.size(); i++ ) {
          trns  = (Transmitter) collTrns.get( i );
          at    = trns.getAudioTrail();

//          bs = at.beginOverwrite( span, bc, edit );
          as = at.alloc( span );

          // XXX has to be called for each trns?
          initFunctionEvaluation();

          for( start = span.getStart(), interpOff = 0; start < span.getStop();
             start += len, interpOff += len ) {
            
            len  = (int) Math.min( 4096, span.getStop() - start );
            t  = interpOff;
            for( int j = 0; j < len; j++, t++ ) {
              tt        = t*t;
              warpedTime[j]   = v_start_norm * t + dv_norm * tt;
//              warpedTime[j]   = (v_start_norm * t + dv_norm * tt) * 1.5f - 0.25f;  // extrap.
            }
            evaluateFunction( warpedTime, interpBuf, len );
            if( bc != null ) {
              at.readFrames( srcBuf, 0, new Span( start, start + len ));
              if( interpOff < bc.getLen() ) {  // EEE getLen?
                bc.blend( interpOff, srcBuf, 0, interpBuf, 0, interpBuf, 0, len );
              }
              if( interpLen - (interpOff + len) < bc.getLen() ) {  // EEE getLen?
                bc.blend( interpOff - (interpLen - bc.getLen()), interpBuf, 0, srcBuf, 0, interpBuf, 0, len );
              }
            }
            as.writeFrames( interpBuf, 0, new Span( start, start + len ));
//            at.continueWrite( bs, interpBuf, 0, len );
            progress += len;
View Full Code Here

Examples of de.sciss.meloncillo.io.BlendContext

  public int processRun( ProcessingThread context ) throws IOException
  {
    final Span            span    = (Span) context.getClientArg( "span" );
    final AbstractCompoundEdit    edit    = (AbstractCompoundEdit) context.getClientArg( "edit" );
    final List            collTrns  = (List) context.getClientArg( "trns" );
    final BlendContext        bc      = (BlendContext) context.getClientArg( "blend" );
    final float[][]          srcBuf    = bc == null ? null : new float[ 2 ][ 4096 ];
    final float[][]          interpBuf;
    Transmitter            trns;
    AudioTrail            at;
    float[]              warpedTime;
    int                i, len;
    double              t_norm;
//    BlendSpan            bs;
    // interpLen entspricht 'T' in der Formel (Gesamtzeit), interpOff entspricht 't' (aktueller Zeitpunkt)
    long              start, interpOff, interpLen, progressLen;
    long              progress  = 0;
//    boolean              success    = false;
    AudioStake            as;

//    if( span.getLength() < 2 ) return DONE;
    if( !initFunctionEvaluation( (Point2D[]) context.getClientArg( "points" ))) return FAILED;

    interpLen    = span.getLength();
    warpedTime    = new float[(int) Math.min( interpLen, 4096 )];
    interpBuf    = new float[2][ warpedTime.length ];
    // '-1' because the last sample shall really equal the end point of the shape
    t_norm      = 1.0 / (interpLen - 1);

    progressLen    = interpLen*collTrns.size();

    try {
      for( i = 0; i < collTrns.size(); i++ ) {
        trns  = (Transmitter) collTrns.get( i );
        at    = trns.getAudioTrail();
        as    = at.alloc( span );
//        bs = at.beginOverwrite( span, bc, edit );
        for( start = span.getStart(), interpOff = 0; start < span.getStop();
           start += len, interpOff += len ) {

          len = (int) Math.min( 4096, span.getStop() - start );
          calcWarpedTime( warpedTime, interpOff * t_norm, t_norm, len );
          evaluateFunction( warpedTime, interpBuf, len );
//          at.continueWrite( bs, interpBuf, 0, len );
          if( bc != null ) {
            at.readFrames( srcBuf, 0, new Span( start, start + len ));
            if( interpOff < bc.getLen() ) {  // EEE getLen?
              bc.blend( interpOff, srcBuf, 0, interpBuf, 0, interpBuf, 0, len );
            }
            if( interpLen - (interpOff + len) < bc.getLen() ) {  // EEE getLen?
              bc.blend( interpOff - (interpLen - bc.getLen()), interpBuf, 0, srcBuf, 0, interpBuf, 0, len );
            }
          }
          as.writeFrames( interpBuf, 0, new Span( start, start + len ));
          progress += len;
          context.setProgression( (float) progress / (float) progressLen );
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.