From 00c15976b7d7ff7816101bc878515b388715ef60 Mon Sep 17 00:00:00 2001 From: gaugendre Date: Sat, 14 Jun 2014 20:45:14 +0200 Subject: [PATCH] Updating from svn --- src/conteneurs/NoteGamme.java | 8 ++++---- src/processing/PostProcessScript.java | 3 ++- src/processing/buffer/Buffer.java | 4 ++++ 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/conteneurs/NoteGamme.java b/src/conteneurs/NoteGamme.java index af62487..119086e 100644 --- a/src/conteneurs/NoteGamme.java +++ b/src/conteneurs/NoteGamme.java @@ -197,15 +197,15 @@ public class NoteGamme extends Gamme { break; case 1: noteName = "dis"; break; - case 2: noteName = "c"; + case 2: noteName = "e"; break; case 3: noteName = "f"; break; case 4: noteName = "fis"; break; - case 5: noteName = "e"; + case 5: noteName = "g"; break; - case 6: noteName = "eis"; + case 6: noteName = "gis"; break; case 7: noteName = "a"; break; @@ -220,7 +220,7 @@ public class NoteGamme extends Gamme { octave++; break; } - for (int i = 2; i < octave; i++) + for (int i = 3; i < octave; i++) noteName+="\'"; return noteName; diff --git a/src/processing/PostProcessScript.java b/src/processing/PostProcessScript.java index 361121e..b5c43ad 100644 --- a/src/processing/PostProcessScript.java +++ b/src/processing/PostProcessScript.java @@ -157,7 +157,8 @@ public class PostProcessScript implements Runnable{ //Donne à chaque note une durée unified 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 ? "." : "")); } diff --git a/src/processing/buffer/Buffer.java b/src/processing/buffer/Buffer.java index 574cba9..66c535d 100644 --- a/src/processing/buffer/Buffer.java +++ b/src/processing/buffer/Buffer.java @@ -7,6 +7,10 @@ import processing.processes.Process; import javax.swing.*; import java.util.ArrayList; +/** + * Classe + * @param + */ public class Buffer { private final ArrayList bufferListeners;