pitch detector
hello everybody,
i'm not a scope developer, just a pulsarian, but i post here to ask if anyone thougt to make a module for the modular that detects pitch of an incoming signal (of course monophonic) and outputs a freq. mvc type signal to drive pitch of the oscillator...
could anybody tell me the specs of mvc freq. out? what kind of values are output to the osc.?
i tried to drive directly with a guitar a modular osc and it sounds, but acting mostly like a weird filter.....but it must be possible to do something else.
i hope i didn't bother you
cheers, alfonso
i'm not a scope developer, just a pulsarian, but i post here to ask if anyone thougt to make a module for the modular that detects pitch of an incoming signal (of course monophonic) and outputs a freq. mvc type signal to drive pitch of the oscillator...
could anybody tell me the specs of mvc freq. out? what kind of values are output to the osc.?
i tried to drive directly with a guitar a modular osc and it sounds, but acting mostly like a weird filter.....but it must be possible to do something else.
i hope i didn't bother you
cheers, alfonso
We have everything we need to make a pich detector except for a critical component which is a frequency to "voltage" (control level) converter this is not to hard to make with analog components but probably quite difficult with DSP.
one way similar to analog pitch detector circuit would be an atom that sends out a fixed length pulse every zero crossing, and another one to count how many pulses there were per second (adjustable time period - accuracy vs speed) and output a "voltage"
you would need other circuitry to pre process the input, but thats all there allready.
one way similar to analog pitch detector circuit would be an atom that sends out a fixed length pulse every zero crossing, and another one to count how many pulses there were per second (adjustable time period - accuracy vs speed) and output a "voltage"
you would need other circuitry to pre process the input, but thats all there allready.
afaik a square wave only has two zero-crossings per cycle. and if you only trigger on positive ones that will leave one to trigger each cycle.
i don't understand why it should be more than one positive zero crossing, perhaps you could explain?
The only reason I can think of why it wouldn't work is if the base frequency is too low in amplitude so it gets overridden by it's formants, causing it to trigger more often. and you could solve this by putting filters in front of it.
i don't understand why it should be more than one positive zero crossing, perhaps you could explain?
The only reason I can think of why it wouldn't work is if the base frequency is too low in amplitude so it gets overridden by it's formants, causing it to trigger more often. and you could solve this by putting filters in front of it.
I do agree BUT... at which frequency should you start filter? Too low and the high notes don't get detected, too low and you still have the same problem.
I don't like to be negative but i doubt that you can solve the pitch detector problem with "a few lines of assembler". I think the issue is a little more complex then that even though i agree with your theory.
I don't like to be negative but i doubt that you can solve the pitch detector problem with "a few lines of assembler". I think the issue is a little more complex then that even though i agree with your theory.
with "needing jut a few rows of assembler" I was just refering to the part of the circuit defex was describing an atom based solution to(count zerocrosssings and output frequency). the rest of the circuit would be easier to do with standard atoms.
The tricky part of pitch detection as I see it is probably to pre-filter the signal in an effective matter. Perhaps a lo-cut filter set really low just to remove rumble and then a 6 or 12 dB/oct lowpass filter just to ensure that the base frequency is dominant. this filter could be set to the same low frequency as the lo-cut, since dynamic range shouldn't be a problem since the signal shouldn't be used as an audio signal anyway. the pitch detection algorithm doesn't care how quiet it is, it just cares about zero crossings and with a 32-bit dynamic range the lowpass filtering hopefully wont kill the signal too much (not a 6db/osct at least).
the frequency of these filters could be user controllable to be able to adjust it for the in signal. (still sharing the same frequency is probably as good idea for ease of use)
the signal could also be postfiltered with a simple lowpass to smooth it out a little.
a probably good idea would also be to implement an optional hold function that holds the pitch whenever the gate signal is off as you can release notes even if the source signal doesn't have any long release.
Of course, I haven't tried it since I don't have DP and there are probably further issues that you notice when you actually try it. Perhaps I'll try it in a vst plugin later. This is also just the pitch detection, to play something with an insignal you have to gate it in a smart manner which is probably quite more tricky than the pitch detection if you want a satisfying result.
The tricky part of pitch detection as I see it is probably to pre-filter the signal in an effective matter. Perhaps a lo-cut filter set really low just to remove rumble and then a 6 or 12 dB/oct lowpass filter just to ensure that the base frequency is dominant. this filter could be set to the same low frequency as the lo-cut, since dynamic range shouldn't be a problem since the signal shouldn't be used as an audio signal anyway. the pitch detection algorithm doesn't care how quiet it is, it just cares about zero crossings and with a 32-bit dynamic range the lowpass filtering hopefully wont kill the signal too much (not a 6db/osct at least).
the frequency of these filters could be user controllable to be able to adjust it for the in signal. (still sharing the same frequency is probably as good idea for ease of use)
the signal could also be postfiltered with a simple lowpass to smooth it out a little.
a probably good idea would also be to implement an optional hold function that holds the pitch whenever the gate signal is off as you can release notes even if the source signal doesn't have any long release.
Of course, I haven't tried it since I don't have DP and there are probably further issues that you notice when you actually try it. Perhaps I'll try it in a vst plugin later. This is also just the pitch detection, to play something with an insignal you have to gate it in a smart manner which is probably quite more tricky than the pitch detection if you want a satisfying result.
Pre filtering is (on some analog pitch detectors) an adjustable low pass filter to get rid of harmonics, and then the wave is over amplified to a square wave so the zero crossing detector can work better. that part may not be neccesary ona DSP based one because the circuit does not have hysterisis(sp?)
It would work counting the time between two zero crossing of the same polarity. This would give the period time, which is the inverse of the frequency.
I've played around with this a little and here is a vst-plugin that works by that principle.
http://www.vember.net/vstplugins/treemonster.dll
note that it doesn't have any prefiltering built in. It is actually intended for fx.
You could also count zero crossings during a specific time like you mentioned (f.ex. one second) and there directly get the frequency. But reducing the resolution to one bit isn't enough. you have to be able to detect the switch from -1 to 1 and be able to add it to a variable. I don't think this is possible without coding your own atoms and i don't have dp but you could try.
If youre really anal you can use a reciproc method to get better measurements, but thats not really needed in pitch detection and counting period time is still the fastest way.
Ive contacted creamware about obtaing /dp and they wanted to see something ive done before and wonder what i intend to bring to the platform. I sent som stuff to them but i haven't got any reply yet. If you're lucky, they like it and let me have dp so i can bring you some fresh new atoms for pitch-detection..
<font size=-1>[ This Message was edited by: claes on 2001-10-21 12:16 ]</font>
I've played around with this a little and here is a vst-plugin that works by that principle.
http://www.vember.net/vstplugins/treemonster.dll
note that it doesn't have any prefiltering built in. It is actually intended for fx.
You could also count zero crossings during a specific time like you mentioned (f.ex. one second) and there directly get the frequency. But reducing the resolution to one bit isn't enough. you have to be able to detect the switch from -1 to 1 and be able to add it to a variable. I don't think this is possible without coding your own atoms and i don't have dp but you could try.
If youre really anal you can use a reciproc method to get better measurements, but thats not really needed in pitch detection and counting period time is still the fastest way.
Ive contacted creamware about obtaing /dp and they wanted to see something ive done before and wonder what i intend to bring to the platform. I sent som stuff to them but i haven't got any reply yet. If you're lucky, they like it and let me have dp so i can bring you some fresh new atoms for pitch-detection..

<font size=-1>[ This Message was edited by: claes on 2001-10-21 12:16 ]</font>
Myself, I would *kill* for a audio-to-midi device in Pulsar. I play the violin and so far the only devices that can track pitch in real time are the Zeta Synthony (~1300$USD) (in conjunction with the Zeta electric MIDI violin (1000+$USD) and Max/MSP, which is 300$, but runs on Mac. And I have a PC. Actually, MSP can actually detect different attacks and stuff.
Anyhow, to make a irrelevent story short, has anybody actually made any progress on this sort of device for pulsar? (modv2?)
<font size=-1>[ This Message was edited by: Nick on 2002-03-29 13:16 ]</font>
Anyhow, to make a irrelevent story short, has anybody actually made any progress on this sort of device for pulsar? (modv2?)
<font size=-1>[ This Message was edited by: Nick on 2002-03-29 13:16 ]</font>
Nick, if you're serious, don't wait, get the Zeta. My girlfriend's father has one and it's simply awesome. If such a device was created I can't imagine it would be free or too cheap.
My studiomate has an electric guitar hooked up to a Yamaha G50 Guitar to Midi Converter, and it tracks pretty well, almost usable, especially in the higher frequency range. The G50 was over $600 used and still sells new for about that much... In the end it doesn't really give as much expression through midi as the instrument alone does. Perhaps tryin recording the Violin and running it through some wacked out effects instead... this actually sounds pretty awesome on violin, and isn't anywhere near as popular as on guitar!
My studiomate has an electric guitar hooked up to a Yamaha G50 Guitar to Midi Converter, and it tracks pretty well, almost usable, especially in the higher frequency range. The G50 was over $600 used and still sells new for about that much... In the end it doesn't really give as much expression through midi as the instrument alone does. Perhaps tryin recording the Violin and running it through some wacked out effects instead... this actually sounds pretty awesome on violin, and isn't anywhere near as popular as on guitar!

I think detecting the top of a cycle is easier than trying to extract a frequency from zero crossing. there is too much going on down there.
That way the filtering does not have to be so fancy, basically it just has to make sure the fundimental is the loudest partial in the waveform. It can probably be done with what we have.
When peak value is detected output a "1" signal which increments a counter. (gotta be sync though. can a sync counter be made with current atoms?)
once a certain time has gone by, sample the value and reset the counter.

That way the filtering does not have to be so fancy, basically it just has to make sure the fundimental is the loudest partial in the waveform. It can probably be done with what we have.
When peak value is detected output a "1" signal which increments a counter. (gotta be sync though. can a sync counter be made with current atoms?)
once a certain time has gone by, sample the value and reset the counter.