Mercurial > hg > multitrack-audio-matcher
changeset 42:6a7982661703
checked pitch tracking and added reset to onset detection
author | Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk> |
---|---|
date | Wed, 25 Apr 2012 23:25:10 +0100 |
parents | f3ac00083d5f |
children | b7ad807c9cde |
files | README.txt bayesianArraySrc/BayesianArrayStructure.cpp bayesianArraySrc/BayesianArrayStructure.h src/AudioEventMatcher.cpp src/RecordedMultitrackAudio.cpp src/testApp.cpp |
diffstat | 6 files changed, 19 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/README.txt Wed Apr 25 14:21:01 2012 +0100 +++ b/README.txt Wed Apr 25 23:25:10 2012 +0100 @@ -34,6 +34,9 @@ check: Should the offset potion be the alignment position or the actual time in - i guess the former but are we using the latter? +ofxAubioONsetDet +Check if we can get chroma calc in there just once +don't want so many chromatogram classes flotinh around +check the values are reset each channel… -
--- a/bayesianArraySrc/BayesianArrayStructure.cpp Wed Apr 25 14:21:01 2012 +0100 +++ b/bayesianArraySrc/BayesianArrayStructure.cpp Wed Apr 25 23:25:10 2012 +0100 @@ -177,7 +177,7 @@ updateCounter = 0; - posterior.offset = -1 * startingWindowWidth / 2;//is set from the audioEventMatcher class + posterior.offset = -1 * matchWindowWidth / 2;//is set from the audioEventMatcher class setNewDistributionOffsets(0); int zeroIndex = posterior.getRealTermsAsIndex(0); @@ -185,7 +185,7 @@ int offset = posterior.getIndexInRealTerms(0); printf("offset is %i\n", offset); - posterior.addGaussianShapeFromRealTime(0, 2000, 1);//one way to add at x msec + posterior.addGaussianShapeFromRealTime(0, startingWindowWidth, 1);//one way to add at x msec // posterior.addGaussianShape(posterior.getRealTermsAsIndex(10), 50, 1);//alternative way likelihood.addConstant(1);
--- a/bayesianArraySrc/BayesianArrayStructure.h Wed Apr 25 14:21:01 2012 +0100 +++ b/bayesianArraySrc/BayesianArrayStructure.h Wed Apr 25 23:25:10 2012 +0100 @@ -103,7 +103,7 @@ void translatePosteriorByMaximumSpeed(DynamicVector& translatedPosterior, const double& timeDifferenceInPositionVectorUnits); void printPostOffset(); - int startingWindowWidth; + int startingWindowWidth, matchWindowWidth; bool updatingSpeedDistribution;//false for testing };
--- a/src/AudioEventMatcher.cpp Wed Apr 25 14:21:01 2012 +0100 +++ b/src/AudioEventMatcher.cpp Wed Apr 25 23:25:10 2012 +0100 @@ -38,7 +38,8 @@ startedPlaying = false; recordedTempoIndex = 0; - bayesianStruct.startingWindowWidth = matchWindowWidth / 4; + bayesianStruct.startingWindowWidth = 100;//matchWindowWidth / 8; + bayesianStruct.matchWindowWidth = matchWindowWidth; // temporal.setUpEventTimeMatrix(); // recordedTempoData.setUpEventTimeMatrix(); }
--- a/src/RecordedMultitrackAudio.cpp Wed Apr 25 14:21:01 2012 +0100 +++ b/src/RecordedMultitrackAudio.cpp Wed Apr 25 23:25:10 2012 +0100 @@ -155,12 +155,13 @@ break; case 18: - kickfilename = "/Volumes/Supersaurus/TractorsAlbum/tractorsDiamondWhite/tractorsDiamondWhite/Bounces/diamondWhiteMultiTakeTwo/01bass di_bip.wav"; - snarefilename = "/Volumes/Supersaurus/TractorsAlbum/tractorsDiamondWhite/tractorsDiamondWhite/Bounces/diamondWhiteMultiTakeTwo/02kick_bip.wav"; - bassfilename = "/Volumes/Supersaurus/TractorsAlbum/tractorsDiamondWhite/tractorsDiamondWhite/Bounces/diamondWhiteMultiTakeTwo/03snare bottom_bip.wav"; + bassfilename = "/Volumes/Supersaurus/TractorsAlbum/tractorsDiamondWhite/tractorsDiamondWhite/Bounces/diamondWhiteMultiTakeTwo/01bass di_bip.wav"; + kickfilename = "/Volumes/Supersaurus/TractorsAlbum/tractorsDiamondWhite/tractorsDiamondWhite/Bounces/diamondWhiteMultiTakeTwo/02kick_bip.wav"; + snarefilename = "/Volumes/Supersaurus/TractorsAlbum/tractorsDiamondWhite/tractorsDiamondWhite/Bounces/diamondWhiteMultiTakeTwo/03snare bottom_bip.wav"; guitarfilename = "/Volumes/Supersaurus/TractorsAlbum/tractorsDiamondWhite/tractorsDiamondWhite/Bounces/diamondWhiteMultiTakeTwo/04guitar di_bip.wav"; + break; + - break; } if (kickfilename != NULL)
--- a/src/testApp.cpp Wed Apr 25 14:21:01 2012 +0100 +++ b/src/testApp.cpp Wed Apr 25 23:25:10 2012 +0100 @@ -95,6 +95,11 @@ } + if (m.getAddress() == "/startWindow"){ + eventMatcher.bayesianStruct.startingWindowWidth = m.getArgAsFloat(0); + } + + if ( m.getAddress() == "/start" ){ printf("start!\n"); printf("STRART TIME IN %i\n", ofGetElapsedTimeMillis());