Skip to content

Commit

Permalink
Merge pull request cwilso#1 from 700software/master
Browse files Browse the repository at this point in the history
fix syntax err in docs example
  • Loading branch information
markmarijnissen authored Sep 23, 2020
2 parents 39dc413 + 347a0d5 commit e91d21e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ var detector = new PitchDetector({
// We can interpolate (very hacky) by looking at neighbours of the best
// auto-correlation period and shifting the frequency a bit towards the
// highest neighbour.
interpolateFrequency: true // default: true
interpolateFrequency: true, // default: true

// Callback on pitch detection (Optional)
onDetect: function(stats, pitchDetector) {
Expand Down Expand Up @@ -81,10 +81,10 @@ var detector = new PitchDetector({
// at the same time!

// Signal Normalization (Optional)
normalize: "rms" // or "peak". default: undefined
normalize: "rms", // or "peak". default: undefined

// Only detect pitch once: (Optional)
stopAfterDetection: false
stopAfterDetection: false,

// Buffer length (Optional)
length: 1024, // default 1024
Expand All @@ -97,10 +97,10 @@ var detector = new PitchDetector({
maxFrequency: 20000,

minPeriod: 2, // by period (i.e. actual distance of calculation in audio buffer)
maxPeriod: 512 // --> convert to frequency: frequency = sampleRate / period
maxPeriod: 512, // --> convert to frequency: frequency = sampleRate / period

// Start right away
start: true // default: false
start: true, // default: false
})
```

Expand Down
3 changes: 1 addition & 2 deletions pitchdetector.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ function getLiveInput(context,callback){
"googNoiseSuppression": "false",
"googHighpassFilter": "false"
},
"optional": []
},
}, function(stream){
var liveInputNode = context.createMediaStreamSource(stream);
Expand Down Expand Up @@ -533,4 +532,4 @@ if(typeof module !== 'undefined') {
} else {
window.PitchDetector = PitchDetector;
}
})();
})();

0 comments on commit e91d21e

Please sign in to comment.