react-native-simple-note-pitch-detector 0.3.9 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -45,20 +45,21 @@ class PitchAnalyzer {
45
45
 
46
46
  if (!index.isNaN() && pitchInHz > 0) {
47
47
  val note = notes[index.toInt()]
48
- var noteAndDecibel = NoteAndDecibel(note, decibel)
49
-
50
- if (counter == notesBuffer.size) {
51
- var mostFrequentNote = getMostFrequentNote(notesBuffer)
52
-
53
- if (mostFrequentNote != null) {
54
- onChangeNote(mostFrequentNote)
55
- }
56
-
57
- counter = 0
58
- }
59
-
60
- notesBuffer[counter] = noteAndDecibel
61
- counter += 1
48
+ onChangeNote("$note $decibel")
49
+ // var noteAndDecibel = NoteAndDecibel(note, decibel)
50
+ //
51
+ // if (counter == notesBuffer.size) {
52
+ // var mostFrequentNote = getMostFrequentNote(notesBuffer)
53
+ //
54
+ // if (mostFrequentNote != null) {
55
+ // onChangeNote(mostFrequentNote)
56
+ // }
57
+ //
58
+ // counter = 0
59
+ // }
60
+ //
61
+ // notesBuffer[counter] = noteAndDecibel
62
+ // counter += 1
62
63
  }
63
64
  }
64
65
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-simple-note-pitch-detector",
3
- "version": "0.3.9",
3
+ "version": "0.4.0",
4
4
  "description": "a simple react native library to detect the pitch of the input recording",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",