Updating from svn

This commit is contained in:
gaugendre 2014-06-14 20:45:14 +02:00
parent bbd7c1dce8
commit 00c15976b7
3 changed files with 10 additions and 5 deletions

View file

@ -197,15 +197,15 @@ public class NoteGamme extends Gamme {
break; break;
case 1: noteName = "dis"; case 1: noteName = "dis";
break; break;
case 2: noteName = "c"; case 2: noteName = "e";
break; break;
case 3: noteName = "f"; case 3: noteName = "f";
break; break;
case 4: noteName = "fis"; case 4: noteName = "fis";
break; break;
case 5: noteName = "e"; case 5: noteName = "g";
break; break;
case 6: noteName = "eis"; case 6: noteName = "gis";
break; break;
case 7: noteName = "a"; case 7: noteName = "a";
break; break;
@ -220,7 +220,7 @@ public class NoteGamme extends Gamme {
octave++; octave++;
break; break;
} }
for (int i = 2; i < octave; i++) for (int i = 3; i < octave; i++)
noteName+="\'"; noteName+="\'";
return noteName; return noteName;

View file

@ -157,7 +157,8 @@ public class PostProcessScript implements Runnable{
//Donne à chaque note une durée unified //Donne à chaque note une durée unified
for (int i = 0; i < buffer.getNotesNbr(); i++) { for (int i = 0; i < buffer.getNotesNbr(); i++) {
double fac = Math.log(EcartsReference.get(indexEcartMostUsed)*4/ buffer.getNote(i).getDuration())/Math.log(2); double duration = i!=buffer.getNotesNbr()-1?buffer.getNote(i+1).getStart().substract(buffer.getNote(i).getStart()):buffer.getNote(i).getDuration();
double fac = Math.log(EcartsReference.get(indexEcartMostUsed)*4/ duration)/Math.log(2);
buffer.getNote(i).setUnifiedDuration(String.valueOf(Math.round(Math.pow(2, (int) fac))) + (fac % 1 < 0.5 ? "." : "")); buffer.getNote(i).setUnifiedDuration(String.valueOf(Math.round(Math.pow(2, (int) fac))) + (fac % 1 < 0.5 ? "." : ""));
} }

View file

@ -7,6 +7,10 @@ import processing.processes.Process;
import javax.swing.*; import javax.swing.*;
import java.util.ArrayList; import java.util.ArrayList;
/**
* Classe
* @param <T>
*/
public class Buffer <T> { public class Buffer <T> {
private final ArrayList<BufferEventListener> bufferListeners; private final ArrayList<BufferEventListener> bufferListeners;