[mary-users] F0CartTrainer: Long overlooked bug?
Jerome Perri
jerome.perri at hotmail.com
Sat May 4 16:55:26 CEST 2013
Hello!
In the F0CartTrainer I have seen something strange:
Datagram[] midDatagrams = waveTimeline.getDatagrams(unitFile.getUnit(mid), unitFile.getSampleRate());
Datagram[] leftDatagrams = waveTimeline.getDatagrams(unitFile.getUnit(first), unitFile.getSampleRate());
Datagram[] rightDatagrams = waveTimeline.getDatagrams(unitFile.getUnit(last), unitFile.getSampleRate());
if (midDatagrams != null && midDatagrams.length > 0
&& leftDatagrams != null && leftDatagrams.length > 0
&& rightDatagrams != null && rightDatagrams.length > 0) {
float midF0 = waveTimeline.getSampleRate() / (float) midDatagrams[midDatagrams.length/2].getDuration();
waveTimeLine is the file "timeline_waveforms.mry".
In the above one can see that midF0 is calculated by:
float midF0 = waveTimeline.getSampleRate() / (float) midDatagrams[midDatagrams.length/2].getDuration();
The timeline ("waveTimeline" in the upper code) is fed by:
/* Feed the datagram to the timeline */
waveTimeline.feed( new Datagram(duration, buff.toByteArray()), globSampleRate );
So the wavTimeLine contains an index, a byte pointer and duration.
But it does not contain any F0 values.
Jerome
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.dfki.de/pipermail/mary-users/attachments/20130504/bf23004e/attachment.htm
More information about the Mary-users
mailing list