天道酬勤,学无止境

onset-detection

一个音符的录音会产生多个开始时间(Recorded audio of one note produces multiple onset times)

问题 我正在使用 Librosa 库进行音高和起始检测。 具体来说,我正在使用 onset_detect 和 piptrack。 这是我的代码: def detect_pitch(y, sr, onset_offset=5, fmin=75, fmax=1400): y = highpass_filter(y, sr) onset_frames = librosa.onset.onset_detect(y=y, sr=sr) pitches, magnitudes = librosa.piptrack(y=y, sr=sr, fmin=fmin, fmax=fmax) notes = [] for i in range(0, len(onset_frames)): onset = onset_frames[i] + onset_offset index = magnitudes[:, onset].argmax() pitch = pitches[index, onset] if (pitch != 0): notes.append(librosa.hz_to_note(pitch)) return notes def highpass_filter(y, sr): filter_stop_freq = 70 # Hz filter_pass_freq = 100 # Hz

2021-10-15 09:24:13    分类:技术分享    python   signal-processing   librosa   pitch-tracking   onset-detection

Recorded audio of one note produces multiple onset times

I am using the Librosa library for pitch and onset detection. Specifically, I am using onset_detect and piptrack. This is my code: def detect_pitch(y, sr, onset_offset=5, fmin=75, fmax=1400): y = highpass_filter(y, sr) onset_frames = librosa.onset.onset_detect(y=y, sr=sr) pitches, magnitudes = librosa.piptrack(y=y, sr=sr, fmin=fmin, fmax=fmax) notes = [] for i in range(0, len(onset_frames)): onset = onset_frames[i] + onset_offset index = magnitudes[:, onset].argmax() pitch = pitches[index, onset] if (pitch != 0): notes.append(librosa.hz_to_note(pitch)) return notes def highpass_filter(y, sr)

2021-07-11 09:25:44    分类:问答    python   signal-processing   librosa   pitch-tracking   onset-detection

Music transcription [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago. Improve this question I'm working on a polyphonic music transcription project. I have read some papers and gone through articles which explains similar tasks. I'am very confused about many aspects of the problem domain. Hope someone will be able to help me. So far I have obtained a stream of decoded audio data from a given mp3. I have understood onset detection is the first step towards

2021-05-17 11:25:26    分类:问答    java   fft   onset-detection   audio

音符发作检测(Note onset detection)

问题 我正在开发一种系统,以帮助音乐家进行转录。 目的是在单个乐器单声道录音上执行自动音乐转录(不一定是完美的,因为用户稍后会纠正小故障/错误)。 这里有人在自动音乐转录方面有经验吗? 还是一般的数字信号处理? 无论您是什么背景,都非常感谢任何人的帮助。 到目前为止,我已经研究了使用快速傅立叶变换进行音高检测的方法,并且在MATLAB和我自己的Java测试程序中进行的大量测试表明,它足够快速,准确,可以满足我的需求。 任务中需要解决的另一要素是以乐谱形式显示生成的MIDI数据,但这是我现在不关心的事情。 简而言之,我正在寻找一种用于音符开始检测的好方法,即信号中新音符开始的位置。 由于缓慢的起病可能很难正确检测,因此我最初将系统与钢琴录音配合使用。 部分原因是我弹钢琴,应该处于更好的位置以获得合适的录音以进行测试。 如上所述,该系统的早期版本将用于简单的单声道录音,根据未来几周的进展,可能会稍后发展为更复杂的输入。 回答1 下面的图形说明了阈值方法来进行音符发作检测: 此图显示了一个典型的WAV文件,其中连续播放了三个离散音符。 红线表示选定的信号阈值,蓝线表示由简单算法返回的音符开始位置,该算法在信号电平超过阈值时标记开始。 如图所示,很难选择合适的绝对阈值。 在这种情况下,第一个音符会被很好地拾取,第二个音符会完全丢失,而第三个音符(几乎没有)会启动得很晚。 通常

2021-04-10 23:06:42    分类:技术分享    audio   signal-processing   onset-detection

Note onset detection

I am developing a system as an aid to musicians performing transcription. The aim is to perform automatic music transcription (it does not have to be perfect, as the user will correct glitches / mistakes later) on a single instrument monophonic recording. Does anyone here have experience in automatic music transcription? Or digital signal processing in general? Help from anyone is greatly appreciated no matter what your background. So far I have investigated the use of the Fast Fourier Transform for pitch detection, and a number of tests in both MATLAB and my own Java test programs have shown

2021-03-30 12:24:51    分类:问答    audio   signal-processing   onset-detection