react-native-simple-note-pitch-detector 0.3.7 → 0.3.8

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.
@@ -17,7 +17,7 @@ data class NoteAndDecibel(
17
17
  class PitchAnalyzer {
18
18
 
19
19
  private val notes = arrayOf("C","C#","D","D#","E","F","F#","G","G#","A","A#","B")
20
- private val notesBuffer = Array(6) { NoteAndDecibel() }
20
+ private val notesBuffer = Array(5) { NoteAndDecibel() }
21
21
  private var counter = 0
22
22
 
23
23
  private lateinit var onChangeNote: (String) -> Unit
@@ -73,7 +73,8 @@ extension ReactNativeSimpleNotePitchDetectorModule: PitchEngineDelegate {
73
73
 
74
74
  do {
75
75
  let note = try Note(frequency: pitch.wave.frequency)
76
- notes[counter] = note.string
76
+ let noteStr = note.string
77
+ notes[counter] = String(noteStr.prefix(noteStr.count - 1))
77
78
  counter += 1
78
79
  } catch {
79
80
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-simple-note-pitch-detector",
3
- "version": "0.3.7",
3
+ "version": "0.3.8",
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",