convertir pourcentage de vitesse en valeur de pitch
Bonjour à tous.
Ceci est une question assez rudimentaire pour les matheux je pense.
Je connais la formule pour déduire le pourcentage de vitesse en fonction du pitch :
Il s'agit de pitch=p vitesse=v
(P/12)exp2 * 100
qu'en est il de l'inverse ? A savoir déduire la valeur du pitch en fonction de la vitesse ?
Merci
Ceci est une question assez rudimentaire pour les matheux je pense.
Je connais la formule pour déduire le pourcentage de vitesse en fonction du pitch :
Il s'agit de pitch=p vitesse=v
(P/12)exp2 * 100
qu'en est il de l'inverse ? A savoir déduire la valeur du pitch en fonction de la vitesse ?
Merci
Salut Joffo,
J'avais fait un petit script pour avoir une nouvelle vitesse quand on change le pitch.
En entree, le tempo original et le pitch, en sortie le nouveau tempo.
J'espere que ca t'aidera.
Sylvain
//////////////////////////////////////////////////////
// Paramters declaration
//////////////////////////////////////////////////////
var input : Tparameter;
var output: Tparameter;
var inpitch : Tparameter;
//////////////////////////////////////////////////////
// initialisation procedure
//////////////////////////////////////////////////////
procedure init;
begin
input := CreateParam('original BPM',ptDatafader);
SetIsOutput(input,false);
SetMin(input,0);
SetMax(input,500);
inpitch := CreateParam('pitch',ptDatafader);
SetIsOutput(inpitch,false);
SetMin(inpitch,-24);
SetMax(inpitch,24);
output := CreateParam('new BPM',ptDataFader );
SetIsInput(output,false);
SetMin(output,0);
SetMax(output,500);
end;
// Global Variables
var inval, inpitchval : single;
var a, outval : single;
//////////////////////////////////////////////////////
// Main Loop procedure
//////////////////////////////////////////////////////
Procedure Process;
begin
inval := getValue(input);
inpitchval := getValue(inpitch);
a := inpitchval/12;
outval := inval * exp(a*ln(2));
setvalue(output,outval);
end;
//////////////////////////////////////////////////////
J'avais fait un petit script pour avoir une nouvelle vitesse quand on change le pitch.
En entree, le tempo original et le pitch, en sortie le nouveau tempo.
J'espere que ca t'aidera.
Sylvain
//////////////////////////////////////////////////////
// Paramters declaration
//////////////////////////////////////////////////////
var input : Tparameter;
var output: Tparameter;
var inpitch : Tparameter;
//////////////////////////////////////////////////////
// initialisation procedure
//////////////////////////////////////////////////////
procedure init;
begin
input := CreateParam('original BPM',ptDatafader);
SetIsOutput(input,false);
SetMin(input,0);
SetMax(input,500);
inpitch := CreateParam('pitch',ptDatafader);
SetIsOutput(inpitch,false);
SetMin(inpitch,-24);
SetMax(inpitch,24);
output := CreateParam('new BPM',ptDataFader );
SetIsInput(output,false);
SetMin(output,0);
SetMax(output,500);
end;
// Global Variables
var inval, inpitchval : single;
var a, outval : single;
//////////////////////////////////////////////////////
// Main Loop procedure
//////////////////////////////////////////////////////
Procedure Process;
begin
inval := getValue(input);
inpitchval := getValue(inpitch);
a := inpitchval/12;
outval := inval * exp(a*ln(2));
setvalue(output,outval);
end;
//////////////////////////////////////////////////////
Merci Sylvain.
Ca je sais faire.
C'est l'inverse que je cherche
Ca je sais faire.
C'est l'inverse que je cherche
PS: comment fait on pour copier le texte dans un script avec l'éditeur mac ?
Oups, voici
//////////////////////////////////////////////////////
// Paramters declaration
//////////////////////////////////////////////////////
var input1 : Tparameter;
var input2 : Tparameter;
var output: Tparameter;
//////////////////////////////////////////////////////
// initialisation procedure
//////////////////////////////////////////////////////
procedure init;
begin
input1 := CreateParam('original BPM',ptDatafader);
SetIsOutput(input1,false);
SetMin(input1,0);
SetMax(input1,500);
input2 := CreateParam('new BPM',ptDatafader);
SetIsOutput(input2,false);
SetMin(input2,0);
SetMax(input2,500);
output := CreateParam('pitch',ptDataFader );
SetIsInput(output,false);
SetMin(output,-24);
SetMax(output,24);
end;
// Global Variables
var inval1, inval2 : single;
var a, outval : single;
//////////////////////////////////////////////////////
// Main Loop procedure
//////////////////////////////////////////////////////
Procedure Process;
begin
inval1 := getValue(input1);
inval2 := getValue(input2);
outval := 12*ln(inval2/inval1)/ln(2);
setvalue(output,outval);
end;
//////////////////////////////////////////////////////
// Paramters declaration
//////////////////////////////////////////////////////
var input1 : Tparameter;
var input2 : Tparameter;
var output: Tparameter;
//////////////////////////////////////////////////////
// initialisation procedure
//////////////////////////////////////////////////////
procedure init;
begin
input1 := CreateParam('original BPM',ptDatafader);
SetIsOutput(input1,false);
SetMin(input1,0);
SetMax(input1,500);
input2 := CreateParam('new BPM',ptDatafader);
SetIsOutput(input2,false);
SetMin(input2,0);
SetMax(input2,500);
output := CreateParam('pitch',ptDataFader );
SetIsInput(output,false);
SetMin(output,-24);
SetMax(output,24);
end;
// Global Variables
var inval1, inval2 : single;
var a, outval : single;
//////////////////////////////////////////////////////
// Main Loop procedure
//////////////////////////////////////////////////////
Procedure Process;
begin
inval1 := getValue(input1);
inval2 := getValue(input2);
outval := 12*ln(inval2/inval1)/ln(2);
setvalue(output,outval);
end;
Pour copie/colle un texte dans le script, c'est un peu tricky (en fait j'avais jamais essaye, seulement d'un script a un autre script).
En fait, ca met tout sur un seule ligne, si tu remets les enters (retour a la ligne), ca peut fonctionner, mais c'est pas genial.
Je vais en toucher un mot a Senso.
En fait, ca met tout sur un seule ligne, si tu remets les enters (retour a la ligne), ca peut fonctionner, mais c'est pas genial.
Je vais en toucher un mot a Senso.
Désolé mais c'est impossibe de copier le script sous mac
Un petit export dans l'uploader peut être...
Un petit export dans l'uploader peut être...
Merci nay. Entre temps j'ai retrouvé une version patch :


Who is online
Users browsing this forum: No registered users and 4 guests
