rtmonoaudio2midi icon indicating copy to clipboard operation
rtmonoaudio2midi copied to clipboard

rtmonoaudio2midi gives me an error in python said, “[pylint] Instance of 'FluidSynth' has no 'initialize' member [E1101] self: FluidSynth”

Open Ellegarden1219 opened this issue 6 years ago • 2 comments

Hi Im new to this so this might be silly question, but after I installed pyfluidsynth for import it gives me an error,

""[pylint] Instance of 'FluidSynth' has no 'initialize' member [E1101] self: FluidSynth"

also in finish(), and self.sf as well. could you tell me what's wrong? and how to fix it?

def get_audio_stream_for_note(self, note): """ noteon -> channel, key, velocity """ self.initialize()

stream = []
self.fs.noteon(0, note.value, note.velocity)
# note duration is in sec
stream = np.append(stream, self.fs.get_samples(SAMPLE_RATE * note.duration))
self.fs.noteoff(0, note.value)
# 1 sec decay of the note
stream = np.append(stream, self.fs.get_samples(SAMPLE_RATE * 1))

self.finish()

return fluidsynth.raw_audio_string(stream)

Ellegarden1219 avatar Dec 03 '18 01:12 Ellegarden1219

Oh no, it looks like a leftover from some previous attempts. I removed that code in fb8b0eb126310ad312300094abe37bc6459a117b. Sorry about that and thanks for spotting! 🙏

aniawsz avatar Dec 27 '18 01:12 aniawsz

thanks a lot for your comment! It would be great if you can provide us tutorial video how to set up and how to use these codes, but this is still very useful and I really appreciate it, thank you!

Ellegarden1219 avatar Dec 27 '18 17:12 Ellegarden1219