View Single Post
Old 06-14-2018, 05:19 AM   #2
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,902
Default

@mpl
EEL will be far more efficient from this ! I tried it :P



here is my EEL function for get pitch:


Code:
function GetPitch(take, nch, pos) local(ns, rv, spl, tonality, pitch, buf)(
  ns = 1;
  buf = 1000;
  tonality = 0;
  rv = GetMediaItemTake_Peaks(take,1000.0, pos,nch,ns,115,buf);
  rv & (1<<24) && (rv&0xfffff) > 0 ? (
    spl = buf[nch*ns*2];
    pitch = spl&0x7fff;
    tonality = (spl>>15)/16384.0;
  );
  pitch;
);
X-Raym is offline   Reply With Quote