Loading...
Logo
Processing Forum
asdf's Profile
16 Posts
44 Responses
0 Followers

Activity Trend

Last 30 days

Loading Chart...

Show:
Private Message
    Hi,
    I found thiscode online showing bezier curves dashed line. The code shows one curve. I am using this to map on an image. Is there a way i can make 2 or more simultaneous curves from one Pvector to another. Been trying, but unsuccessfull. Few edits in there are/ might be off..Here's the code-

    1. float x1, y1, x2, y2, x3, y3, x4, y4, t;
    2. float bl = 0;
    3. int hselected = -1;

    4. PVector Delhi;
    5. PVector Mumbai;
    6. PVector Dubai;
    7. PVector Chennai;
    8. PVector Bangkok;

    9. int dashlength = 10;

    10. PImage img;


    11. void setup() {
    12.   size(1024, 709);
    13.   img = loadImage("map2.jpg");
    14.   background(0);
    15.   
    16.  Delhi = new PVector(427, 235);
    17.  Mumbai = new PVector(169, 325);
    18.  Dubai =  new PVector(36, 84 );
    19.  Chennai = new PVector(219, 453 );
    20.  Bangkok = new PVector(991, 433);
    21.  
    22.    t =0;
    23.   x1 = Delhi.x;
    24.   y1 = Delhi.y;
    25.   x2 = 294;
    26.   y2 = 75;
    27.   x3 = 162;
    28.   y3 = 101;
    29.   x4 = Mumbai.x;
    30.   y4 = Mumbai.y;
    31.   noFill();
    32.   

    33. }
    34. void draw() {
    35.   image(img, 0 ,0);
    36.   println(mouseX + "mouseY " + mouseY);
    37.   
    38.  // if(mouse
    39. //  delhi();
    40.   //mumbai();
    41.   DelhiOrigin(); 
    42.   
    43.   if(mousePressed)
    44.   if (hselected == 1) {
    45.     x1 = mouseX;
    46.     y1 = mouseY;
    47.   } else if (hselected == 2) {
    48.     x2 = mouseX;
    49.     y2 = mouseY;
    50.   } else if (hselected == 3) {
    51.     x3 = mouseX;
    52.     y3 = mouseY;
    53.   } else if (hselected == 4) {
    54.     x4 = mouseX;
    55.     y4 = mouseY;
    56.   }
    57. }
    58. void DelhiOrigin() {
    59. stroke(0.0);
    60.   strokeWeight(1.0);
    61.   beginShape();
    62.   vertex(x1, y1);
    63.   bezierVertex(x2, y2, x3, y3, x4, y4);
    64.   endShape();

    65.   ellipse(x1,y1,10,10);
    66.   ellipse(x2,y2,10,10);
    67.   ellipse(x3,y3,10,10);
    68.   ellipse(x4,y4,10,10);

    69.   bl = blength(x1, y1, x2, y2, x3, y3, x4, y4);

    70.   //find any point on the curve:
    71.   t+=0.01;
    72.   if(t>1) { 
    73.     t=0; 
    74.   }

    75.   double mu, mum1,mum13,mu3;

    76.   mu = t;
    77.   mum1 = 1 - mu;
    78.   mum13 = mum1 * mum1 * mum1;
    79.   mu3 = mu * mu * mu;

    80.   float xn = (float) ( mum13*x1 + 3*mu*mum1*mum1*x2 + 3*mu*mu*mum1*x3 + mu3*x4 );
    81.   float yn = (float) ( mum13*y1 + 3*mu*mum1*mum1*y2 + 3*mu*mu*mum1*y3 + mu3*y4 );

    82.   stroke(255.0, 0.0, 0.0);
    83.   strokeWeight(5.0);
    84.   point(xn, yn);

    85.   stroke(0.0, 100.0);
    86.   strokeWeight(1.0);

    87.   //line(x1, y1, x2, y2);
    88.   //line(x2, y2, x3, y3);
    89.   //line(x3, y3, x4, y4);
    90.   
    91.   stroke(255,0,0);
    92.   strokeWeight(2);
    93.   float dashnum = bl/dashlength;
    94.   float dx = x1;
    95.   float dy = y1;
    96.    float t = 0;
    97.   for (int i=0; i < dashnum*2; i++) {
    98.     t += 0.001;
    99.     float[] p = findPositionOnBezier(x1, y1, x2, y2, x3, y3, x4, y4, t);
    100.     while ( t < 1 && dist(dx,dy,p[0],p[1]) < dashlength) {
    101.       t += 0.001;
    102.       p = findPositionOnBezier(x1, y1, x2, y2, x3, y3, x4, y4, t);
    103.     }
    104.     if (t >= 1) { p[0] = x4; p[1] = y4; }
    105.     if(i*0.5 == Math.round(i*0.5)) {
    106.       line(dx,dy,p[0],p[1]);
    107.     }
    108.     dx = p[0];
    109.     dy = p[1];
    110.     if (t == 1) { break; }
    111.   }

    112. }

    113. void keyPressed() {
    114.   if (keyCode == 38) {
    115.     if (dashlength < 40) { dashlength++; }
    116.   } else if (keyCode == 40) {
    117.     if (dashlength > 4) { dashlength--; }
    118.   } else {
    119.     System.out.println(keyCode);
    120.   }
    121. }

    122. void mouseReleased() {
    123.   hselected = -1;
    124. }

    125. void mousePressed() {
    126.   if (dist(mouseX,mouseY,x1,y1) < 5) { 
    127.     hselected = 1;
    128.   } else if (dist(mouseX,mouseY,x2,y2) < 5) { 
    129.     hselected = 2;
    130.   } else if (dist(mouseX,mouseY,x3,y3) < 5) { 
    131.     hselected = 3; 
    132.   } else if (dist(mouseX,mouseY,x4,y4) < 5) { 
    133.     hselected = 4; 
    134.   } else { 
    135.     hselected = -1; 
    136.   }
    137. }

    138. float[] findPositionOnBezier(float x1,float y1,float x2,float y2,float x3,float y3,float x4,float y4, float t) {
    139.   float [] out = new float[]{0,0};
    140.   double mu, mum1,mum13,mu3;
    141.   mu = t;
    142.   mum1 = 1 - mu;
    143.   mum13 = mum1 * mum1 * mum1;
    144.   mu3 = mu * mu * mu;
    145.   out[0] = (float) ( mum13*x1 + 3*mu*mum1*mum1*x2 + 3*mu*mu*mum1*x3 + mu3*x4 );
    146.   out[1] = (float) ( mum13*y1 + 3*mu*mum1*mum1*y2 + 3*mu*mu*mum1*y3 + mu3*y4 );
    147.   return out;
    148. }

    149. float blength(float x1,float y1,float x2,float y2,float x3,float y3,float x4,float y4) {
    150.   float out = 0;
    151.   float t = 0;
    152.   float px = x1;
    153.   float py = y1;

    154.   for (int i=0; i<100; i++) {
    155.     t+=(0.01);
    156.     float[] p = findPositionOnBezier(x1, y1, x2, y2, x3, y3, x4, y4, t);
    157.     out+=dist(px,py,p[0],p[1]);
    158.     px = p[0];
    159.     py = p[1];
    160.   }
    161.   return out;
    162. }
    Hi,
    Totally new here in jQuery. I want to bring in 'Strings'( Time to be precise) from javaScript to processing IDE. Though pomax has also done a tutorial on how to do the same. I did got his example, but i am not able to do it with this code, i found online. So when someone, selects the country(let's say china), then it should send the selected country's time, date, day etc to processing 
    Can anybody please help me with this?
    ~asdf


    Hi, found this sketch on openprocessing. 
    I want to use this in some project and wanted to ask, how can i change the speed of the ellipse going from point A to B in the following code. 
    The cubic equations (xn and yn) are from wiki.[bezierPoint() wasn't exactly helping] Search 'Bezier curves' on wiki. Anyway, Here's the code-

    1. float x1, y1, x2, y2, x3, y3, x4, y4, t;

    2. void setup() {
    3.   size(200,200);
    4.   
    5.   t = 0;
    6.   
    7.   x1 = 10;
    8.   y1 = 180;
    9.   
    10.   x2 = 50;
    11.   y2 = 5;
    12.   
    13.   x3 = 100;
    14.   y3 = 10;
    15.   
    16.   x4 = 180;
    17.   y4 = 180;
    18.   
    19.   noFill();
    20.   
    21. }

    22. void draw() {
    23.   background(255.0);
    24.   stroke(0.0);
    25.   strokeWeight(1.0);
    26.   beginShape();
    27.   vertex(x1, y1);
    28.   bezierVertex(x2, y2, x3, y3, x4, y4);
    29.   endShape();
    30.   
    31.   //find any point on the curve:
    32.   t+=0.01;
    33.   if(t>1) { t=0; }
    34.   
    35.   double mu, mum1,mum13,mu3;
    36.   
    37.   mu = t;
    38.    mum1 = 1 - mu;
    39.    mum13 = mum1 * mum1 * mum1;
    40.    mu3 = mu * mu * mu;
    41.    
    42.   float xn = (float) ( mum13*x1 + 3*mu*mum1*mum1*x2 + 3*mu*mu*mum1*x3 + mu3*x4 );
    43.   float yn = (float) ( mum13*y1 + 3*mu*mum1*mum1*y2 + 3*mu*mu*mum1*y3 + mu3*y4 );
    44.   
    45.   stroke(255.0, 0.0, 0.0);
    46.   strokeWeight(5.0);
    47.   point(xn, yn);

    48.   stroke(0.0, 100.0);
    49.   strokeWeight(1.0);

    50.   line(x1, y1, x2, y2);
    51.   line(x2, y2, x3, y3);
    52.   line(x3, y3, x4, y4);
    53.   
    54.   //intersecion
    55.   float x12 = x1+(x2-x1)*t;
    56.   float y12 = y1+(y2-y1)*t;
    57.   float x23 = x2+(x3-x2)*t;
    58.   float y23 = y2+(y3-y2)*t;
    59.   float x34 = x3+(x4-x3)*t;
    60.   float y34 = y3+(y4-y3)*t;
    61.   line(x12, y12, x23, y23);
    62.   line(x23, y23, x34, y34);
    63.   
    64.   float x123 = x12+(x23-x12)*t;
    65.   float y123 = y12+(y23-y12)*t;
    66.   float x234 = x23+(x34-x23)*t;
    67.   float y234 = y23+(y34-y23)*t;
    68.   line(x123, y123, x234, y234);
    69.   
    70.   stroke(255.0, 0.0, 0.0);
    71.   strokeWeight(2.0);
    72.   point(x123,y123);
    73.   point(x234,y234);
    74.   
    75.   stroke(255.0, 0.0, 0.0, 100.0);
    76.   strokeWeight(3.0);
    77.   
    78.   beginShape();
    79.   vertex(x1, y1);
    80.   bezierVertex(x12, y12, x123, y123, xn, yn);
    81.   endShape();
    82.   
    83.   stroke(0.0, 255.0, 0.0, 100.0);
    84.   
    85.   beginShape();
    86.   vertex(x4, y4);
    87.   bezierVertex(x34, y34, x234, y234, xn, yn);
    88.   endShape(); 
    89.   
    90. }


    Hi,
    How can i place a 2D image in a 3D space with freedom to rotate/scale etc. Just as described in Jer thorp's Just landed project.
    Also, important point to note here is, how will i be able to permanently cast/store the points or positions into the image(map) even after rotation. Thanks
    Hello,
    Working with  this document file and  this 'frequency' in a week file[time.tsv] (converted to tsv) for Visualization  on an map of India.What would be the best way i should approach this particular case. Wanted to know if i am thinking in the right direction or not. Also, how can i  'cast' data to each other? 
    Till now, what i have done:

    1. Main tab is basically reading the tsv files. Something like -
    1. Flights[] data;
    2. Time[] time;
    3.  
    4.   void setup() {
    5.  map = loadImage("map2.jpg");
    6. ....
    7. ........
    8.  schedule = new Table("Indigo Flights.tsv");      ///usual "Table" class (ben fry)
    9.   schedule2 = new Table("Time.tsv");
    10.  // rowCount = schedule.getRowCount();
    11.   data = new Flights[schedule.getRowCount()-1];    //t = schedule
    12.   //println(data);
    13.   
    14.   String[] lines = loadStrings("Indigo Flights.tsv");
    15.   
    16.   println("data length is: " + data.length);
    17.   for(int i = 0; i < data.length; i++) {
    18.     
    19.     String[] pieces = split(lines[i], TAB);
    20.     
    21.     data[i] = new Flights(i, pieces[0], pieces[1], pieces[2], pieces[3], pieces[4]);
    22.   }
    23. ......

    24.  time =  new Time[schedule2.getRowCount()-1];
    25.    String[] timelines = loadStrings("Time.tsv");

    26.    for(int i = 0; i < time.length; i++) {
    27.     String[] pieces1 = split(timelines[i], TAB);
    28.     time[i] = new Time(i, pieces1[0], pieces1[1], pieces1[2], pieces1[3], pieces1[4], pieces1[5], pieces1[6], pieces1[7], pieces1[8]);
    29.    }
    30. }  ///// end of setup()///////
    Next i have is the class Flights- 

    1. class Flights {
    2.  Flights(int i, String FlightNumber, String Origin, String Destination, String DepartureTime, String ArrivalTime) {
    3.      
    4.      this.Count = i;
    5.      this.FlightNumber = FlightNumber;
    6.      this.Origin = Origin;
    7.      this.Destination = Destination;
    8.      this.DepartureTime = DepartureTime;
    9.      this.ArrivalTime = ArrivalTime;
    10.      
    11.      Count = i+1;
    12.      
    13.      FlightNumber = schedule.getString(i+1, 0);
    14.      Origin = schedule.getString(i+1, 1);
    15.      Destination = schedule.getString(i+1, 2);
    16.      DepartureTime = schedule.getString(i+1, 3);
    17.      ArrivalTime = schedule.getString(i+1, 4);
    18.    }
    19.    
    20.    
    21.    void getFlightNumber() {
    22.      println("Count is " + Count + "and " + FlightNumber);
    23.      
    24.    }
    25.    
    26.    void getOrigin() {
    27.      int l = 10;
    28.      textAlign(LEFT);
    29.      println(Origin);
    30.    }
    And the class time from the second link-

    1. class Time {
    2.  Time(int j, String FlightNumber, String Frequency, String Monday, String Tuesday, String Wednesday, String Thursday, String Friday, String Saturday, String Sunday){

    3. FlightNumber = schedule2.getString(j+1, 0);
    4.      Frequency = schedule2.getString(j+1, 1);
    5.      Monday = schedule2.getString(j+1, 2);
    6.      Tuesday = schedule2.getString(j+1, 3);
    7.      Wednesday = schedule2.getString(j+1, 4);
    8.      Thursday = schedule2.getString(j+1, 5);
    9.      Friday = schedule2.getString(j+1, 6);
    10.      Saturday = schedule2.getString(j+1, 7);
    11.      Sunday = schedule2.getString(j+1, 8);
    12.      
    13.   }.....
    14. etc
    15.       

    16. P.s. I also need to store location points on the map. Probably make a 2D array? [xpos][ypos]?                                         
    Hello,

    Since i am working on this data visualization project on an image, i wanted to ask about storing points on a map.
    So, what are the ways i can store points on an image? One would be Lat-longitude method(but my data does not have not that, so can't use that).
    Other would be storing each coordinate(as in x- and y- positions of the sketch window?) but that would work only with a static background image yes?
    How are points stored in those projects where the whole map is also being rotated/ zoomed in n out etc. but those points on the map/image cast itself to it.

    Hi, forum,
    I need help with moving balls on a bezier curve. 
    Taking the example from processing site itself. ( http://processing.org/learning/curves/)  I need them red dots/ellipses(the end points to move along the curve from one end point to the other). I know you can do that on spline curves but what about bezier curves
    NOTE: the curve is presently on an background image, so be careful of that. 

    1. void setup( ) 
    2. { size(150, 150); 
    3.  background(255);
    4.  smooth(); 
    5.  ellipse(50, 75, 5, 5); // endpoints of curve  <-- i want these ellipses to keep moving on the curve
    6.  ellipse(100, 75, 5, 5);
    7.  fill(255, 0, 0); 
    8.  ellipse(25, 25, 5, 5); // control points 
    9.  ellipse(125, 25, 5, 5); 
    10.  noFill();
    11.  stroke(0);
    12.  bezier(50, 75, 25, 25, 125, 25, 100, 75); }
    Hi,
    I want to draw 3D animation curves from one point in the picture( a map) to another. 

    1. Can i store points in the background image? Or should i keep it static to make it simple?

    2. Using curves(), how can i draw a curve from one point to another but the end point of the curve going in a slow motion towards the destination point? Also, if i draw ellipses on top of that line, how can they move through the curve?

    Any advice/links/ etc will be awesome! Cheers
    Hi,
    I need help with 'mapping' time on a line. Related to time and flights/arrival and destination time. 
    For example, let's say time right now is: 15:30:00
    The arrival time and the departure time are 14:00:00 and 17:30:00 respectively. As till now, for the time i have divided/splitted into H, M, and S like this-
    (function inside class)-

    1. void getDepartureTime() {
    2.      println(DepartureTime);
    3.    int p = DepartureTime.length();

    4.   
    5.    String[] H   = new String[p];
    6.    String[] M = new String[p];
    7.    String[] S = new String[p];
    8.   
    9.    int[] hours = new int[p];
    10.    int[] minutes = new int[p];
    11.    int[] seconds = new int[p];
    12.    
    13.    for(int k=0; k < p; k++) {  
    14.    String[] divide = split(DepartureTime, ":");
    15.     
    16.     H[k]   = divide[0];
    17.     M[k]   = divide[1];
    18.     S[k]   = divide[2];
    19.   
    20.    }
    21.   for(int k = 1; k < p; k++) {
    22.     hours[k]   = Integer.parseInt(H[k]);
    23.     minutes[k] = Integer.parseInt(M[k]);
    24.     seconds[k] = Integer.parseInt(S[k]);
    25.     
    26.    stroke(palette[4]);
    27.  //  map(hours[j], 0, 50, width/2, height);
    28.  //  line(width/2, height/2, hours[j]*40, minutes[j]*50);
    29.   }


     
    So, if i could draw a point on a line which signifies or maps the current time with respect to Arrival and destination time. I mean the point should be somewhere around 50% of the length of the line(as per the example which we took). It's the format (HH:MM:SS), which is confusing. 
    Hi, i am currently working with this project which uses the table class(from Ben Fry's Visualizing data), also a part of Processing 2(i think).
    But anyway, since the project will be up on the browser as processing js. Can anybody tell me whether it has some "Java" which might not be compiled in pjs?( also which might be the reason of the project not running in browser). Here's the Table class. 

    1. class Table {
    2.   int rowCount;
    3.   String[][] data;
    4.   
    5.   
    6.   Table(String filename) {
    7.     String[] rows = loadStrings(filename);
    8.     data = new String[rows.length][];
    9.     
    10.     for (int i = 0; i < rows.length; i++) {
    11.       if (trim(rows[i]).length() == 0) {
    12.         continue; // skip empty rows
    13.       }
    14.       if (rows[i].startsWith("#")) {
    15.         continue;  // skip comment lines
    16.       }
    17.       
    18.       // split the row on the tabs
    19.       String[] pieces = split(rows[i], TAB);
    20.       // copy to the table array
    21.       data[rowCount] = pieces;
    22.       rowCount++;
    23.       
    24.       // this could be done in one fell swoop via:
    25.       //data[rowCount++] = split(rows[i], TAB);
    26.     }
    27.     // resize the 'data' array as necessary
    28.     data = (String[][]) subset(data, 0, rowCount);
    29.   }
    30.   
    31.   
    32.   int getRowCount() {
    33.     return rowCount;
    34.   }
    35.   
    36.   
    37.   // find a row by its name, returns -1 if no row found
    38.   int getRowIndex(String name) {
    39.     for (int i = 0; i < rowCount; i++) {
    40.       if (data[i][0].equals(name)) {
    41.         return i;
    42.       }
    43.     }
    44.     println("No row named '" + name + "' was found");
    45.     return -1;
    46.   }
    47.   
    48.   
    49.   String getRowName(int row) {
    50.     return getString(row, 0);
    51.   }


    52.   String getString(int rowIndex, int column) {
    53.     return data[rowIndex][column];
    54.   }

    55.   
    56.   String getString(String rowName, int column) {
    57.     return getString(getRowIndex(rowName), column);
    58.   }

    59.   
    60.   int getInt(String rowName, int column) {
    61.     return parseInt(getString(rowName, column));
    62.   }

    63.   
    64.   int getInt(int rowIndex, int column) {
    65.     return parseInt(getString(rowIndex, column));
    66.   }

    67.   
    68.   float getFloat(String rowName, int column) {
    69.     return parseFloat(getString(rowName, column));
    70.   }

    71.   
    72.   float getFloat(int rowIndex, int column) {
    73.     return parseFloat(getString(rowIndex, column));
    74.   }
    75.   
    76.   
    77.   void setRowName(int row, String what) {
    78.     data[row][0] = what;
    79.   }


    80.   void setString(int rowIndex, int column, String what) {
    81.     data[rowIndex][column] = what;
    82.   }

    83.   
    84.   void setString(String rowName, int column, String what) {
    85.     int rowIndex = getRowIndex(rowName);
    86.     data[rowIndex][column] = what;
    87.   }

    88.   
    89.   void setInt(int rowIndex, int column, int what) {
    90.     data[rowIndex][column] = str(what);
    91.   }

    92.   
    93.   void setInt(String rowName, int column, int what) {
    94.     int rowIndex = getRowIndex(rowName);
    95.     data[rowIndex][column] = str(what);
    96.   }

    97.   
    98.   void setFloat(int rowIndex, int column, float what) {
    99.     data[rowIndex][column] = str(what);
    100.   }


    101.   void setFloat(String rowName, int column, float what) {
    102.     int rowIndex = getRowIndex(rowName);
    103.     data[rowIndex][column] = str(what);
    104.   }  
    105.   
    106.   //void setTime(int rowIndex, int colomn, float 
    107. }

    Hi,
    i am working on this data visualization project, and its like 40% done. Well, i suddenly realized about my code being not so efficient since functions are called from functions and similar trails.

    1. void setup() {
    2. ......
    3. ....
    4. .....
    5. schedule = new Table("asdf.tsv");
    6. setupMain();
    7. }
    8. void setupMain() {
    9. NumberOfRows = lines.length;
    10. .....
    11. ...........
    12.   
    13.   FlightNumber  = new String[NumberOfRows];  //initializing arrays
    14.   Origin        = new String[NumberOfRows];
    15.   Destination   = new String[NumberOfRows];
    16.   Frequency     = new String[NumberOfRows];
    17.   DepartureTime = new String[NumberOfRows];
    18.   ArrivalTime   = new String[NumberOfRows];
    19.   placeIndices  = new HashMap();
    20. ..........
    21. ..........
    22. setupTime(DepartureTime);    // Separate Functions
    23.   setupOrigin(Origin);
    24.   setupDestination(Destination);
    25.   setupFrequency(Frequency);
    26. }       <--- End of setupMain()

    27. setupTime(String[] DepartureTime) {
    28. ....
    29. ....
    30. }

    31. void draw() {
    32. ...
    33. }




    Hi, i am having this problem with processing 'javascript' mode in processing 2 beta 7.

    Well, in the javascript mode, the code runs fine in chrome when i execute from the processing IDE(using the 'play' button). But, when i click on 'Export Application' and then open the HTML file in chrome, it gives me nothing. #using no libraries, nothing.
    I mean its the same thing. :|
    Hey,
    I am using minim library in a project in eclipse(java), which is creating sounds. What i wanna do is send these sounds to max msp through 'jack'  http://jackaudio.org/ where i can process the sound/add effects to the sound through the max msp. Well the problem i am having is, i can't find the output sending line or whatever,in the minim library(inside my project), like where exactly am i suppose to change it's output? So that it can go to jack, and then to max msp...I did see the minim documentation(but that i can't relate :( .. I think it might be in the following , maybe, if not lemme know.., please help immediately....


    import ddf.minim.Recordable;
    import ddf.minim.spi.AudioOut;
    import ddf.minim.spi.AudioRecording;
    import ddf.minim.spi.AudioRecordingStream;


    public class JSMinim implements MinimServiceProvider
    {
    private boolean debug;
      private PApplet app;
      private Mixer   inputMixer;
      private Mixer   outputMixer;

    public JSMinim(PApplet parent)
    {
    debug = false;
        app = parent;
        inputMixer = null;
        outputMixer = null;
    }
      
      public void setInputMixer(Mixer mix)
      {
        inputMixer = mix;
      }
      
      public Mixer getInputMixer()  
      {
        return inputMixer;
      }
      
      public void setOutputMixer(Mixer mix)
      {
        outputMixer = mix;
      }
      
      public Mixer getOutputMixer()
      {
        return outputMixer;
      }

    public void start()
    {
    }

    public void stop()
    {
    }
    public void debugOn()
    {
    debug = true;
    }

    {
    samples = loadFloatAudio(ais, (int)ais.getFrameLength() * format.getFrameSize());
    long length = AudioUtils.frames2Millis(samples.getSampleCount(), format);
    meta = new BasicMetaData(filename, length);
    }
    AudioOut out = getAudioOutput(format.getChannels(), 
                                                bufferSize, 
                                                format.getSampleRate(), 
                                                format.getSampleSizeInBits());
    if (out != null)
    {
    SampleSignal ssig = new SampleSignal(samples);