Re: [LAD] GuitarSynth now as lv2
Forgot to mention there's a conflict (possibly a symbol conflict) between A4 and aubio. I think I will have to link aubio statically to GuitarSynth. Will try that when I'm back from vacation. UI is the next thing I want to do, till then you have to use the lv2. Gerald On 23.05.2015 05:49, Len Ovens wrote: On Fri, 22 May 2015, Gerald wrote: Hi, GuitarSynth is now an lv2 plugin. Yep, it's true, thanks to falktx's DPF. You can get it at https://github.com/geraldmwangi/GuitarSynth-DPF. A new feature is the Overlay Input: It multiplies the synth output with the input signal frame by frame. Basically this results in the convolution of the frequency spectrum of the synth with that of the input. Have fun testing it and give me your thoughts. Builds ok - Ardour 4 crashes when I try to load it (both 4.0.0 and one of the later debug versions) - Ardour 3.5.* loads it ok. - running ./GuitarSynth sits and waits. There is no UI that I can see. I will play with it in Ardour 3.5 when I have more time. -- Len Ovens www.ovenwerks.net ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev
Re: [LAD] GuitarSynth now as lv2
On Fri, 22 May 2015, Gerald wrote: Hi, GuitarSynth is now an lv2 plugin. Yep, it's true, thanks to falktx's DPF. You can get it at https://github.com/geraldmwangi/GuitarSynth-DPF. A new feature is the Overlay Input: It multiplies the synth output with the input signal frame by frame. Basically this results in the convolution of the frequency spectrum of the synth with that of the input. Have fun testing it and give me your thoughts. Builds ok - Ardour 4 crashes when I try to load it (both 4.0.0 and one of the later debug versions) - Ardour 3.5.* loads it ok. - running ./GuitarSynth sits and waits. There is no UI that I can see. I will play with it in Ardour 3.5 when I have more time. -- Len Ovens www.ovenwerks.net ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev
Re: [LAD] GuitarSynth now as lv2/vst ..
Am 29.04.2015 um 13:50 schrieb Gerald: Hi The lv2 version of GuitarSynth is working, thanks to falktx's DPF. Get it from https://github.com/geraldmwangi/GuitarSynth-DPF.git if you like. I'll release (post to LAU) it with bugfixes on the weekend. Lg Gerald ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev Hi Gerald Nice Project For your README/ build instruction you should add the following commands before make: cd ./GuitarSynth-DPF git submodule init git submodule update regards hermann ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev
Re: [LAD] GuitarSynth
On Tue, 28 Apr 2015 13:48:54 +0200, Gerald wrote: On 28.04.2015 12:31, Ralf Mardorf wrote: PS: Keep in mind that A440 not necessarily is always true. When you program, please keep in mind, that one day, when your program should be able to do what you want it to do, users should be able to chose the pitch for non-standard A in decimal place steps. well the goal is to not that dependent on the frequencies being played, but rather on the timbre/frequency envelope of the instrument. This way not the current tuning would be the serious issue, but the declining quality of the strings over time. Hi Gerald, are you sure that even playing technique wouldn't be an issue that way? Bend, slide, hammer on, pull off, muted, fingertip, plectrum or even different kinds of strings, 09 - ... nickle round wound, 10 - ... steel flat wound etc.? Ok, if you don't mix the original guitar signal with the converted signal/MIDI instrument, you don't need to mute and perhaps you can resist to play a mix of fingertip and plectrum, but you likely will slide, hammer on and pull off, not only when playing monophonic, but also when playing chords. IOW even if your software can learn what the main timbre on different strings and octaves for different tones is, does it work for guitar playing techniques or does the guitarist need to play the guitar in a keyboard style? A simple example, without or even with compressor, play g string - fret 3 and slide to fret 5, hold the tone d string - fret 3 and slide to fret 5, hammer on and pull off fret 7 do the same, but instead of fret 3, start somewhere behind fret 12, at least without compression already the loudness could become an issue, while you still clearly hear changing frequencies. That were just 2 tones. Now play e string - fret 3 hold the tone b string - fret 3 hammer on and pull off fret 5 g string - fret 4 hold the tone d string - fret 5 hold the tone If you like you could slide the g chord to an a chord before you do the hammering. Do this on different positions, e.g. play a c chord this way. Perhaps I misunderstand what timbre/frequency envelope is. Regards, Ralf ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev
Re: [LAD] GuitarSynth
I understand. Thanks again Gerald On 28.04.2015 21:09, Chris Cannam wrote: On Tue, Apr 28, 2015, at 05:12 PM, Gerald wrote: By 'crude' do you mean it does the job, but not that well? What I really mean is that it wasn't written for use in a specific application, so it hasn't had any real testing or evaluation. The purpose of it is to be a handy tool that you can use to figure out whether this sort of transformation makes a difference to your feature extractor, rather than necessarily to be the final implementation you'd actually put in the extractor. Chris ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev
Re: [LAD] GuitarSynth
well the goal is to not that dependent on the frequencies being played, but rather on the timbre/frequency envelope of the instrument. This way not the current tuning would be the serious issue, but the declining quality of the strings over time. Gerald On 28.04.2015 12:31, Ralf Mardorf wrote: PS: Keep in mind that A440 not necessarily is always true. When you program, please keep in mind, that one day, when your program should be able to do what you want it to do, users should be able to chose the pitch for non-standard A in decimal place steps. ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev
Re: [LAD] GuitarSynth
Hi Ralf, this works pretty good with my lowpass-rectify-aubio pitch detection. What I want to work on (once GuitarSynth is ported to DPF) is a source-filter analysis (see U Zölzer: DAFX) to extract the spectral envelope (timbre) of the guitar. As Zölzer putts it, it is then possible to obtain a neutral frequency analysis, that just the tones/frequencies without their attenuation due to playing technique. This is done simply by dividing the FFT'd input signal by the envelope. I think that should be done before the pitch detection. And anyway I want to convolve/multiply the envelope with the synths (as an option in the GUI). Then GuitarSynth will really be a guitar synth ;) Gerald On 28.04.2015 15:58, Ralf Mardorf wrote: A simple example, without or even with compressor, play g string - fret 3 and slide to fret 5, hold the tone d string - fret 3 and slide to fret 5, hammer on and pull off fret 7 ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev
Re: [LAD] GuitarSynth
On Tue, Apr 28, 2015, at 04:10 PM, Gerald wrote: [...] dividing the FFT'd input signal by the envelope This LADSPA plugin https://code.soundsoftware.ac.uk/projects/preprocess will do a crude job of that, if you want to try it out. It uses a cepstral envelope estimator. Chris ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev
Re: [LAD] GuitarSynth
Thanks Chris. By 'crude' do you mean it does the job, but not that well? Gerald On 28.04.2015 17:45, Chris Cannam wrote: On Tue, Apr 28, 2015, at 04:10 PM, Gerald wrote: [...] dividing the FFT'd input signal by the envelope This LADSPA plugin https://code.soundsoftware.ac.uk/projects/preprocess will do a crude job of that, if you want to try it out. It uses a cepstral envelope estimator. Chris ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev
Re: [LAD] GuitarSynth
No problem. I wish I had polyphony!! It's only monophone since i'm not an expert on the matter. Right now i'm converting it into a lv2 plugin (actually lv2,vst, au by virtue of falktx's DPF). I have no idea when and how (well not quite how) i'll achieve polyphony, probably never. But alot of things can be learnt on the way (source-filter separation, non-neg matrix factorization, wavelets). Not to mention the code from the people on the list/IRC (thanks guys). It's my friday evenings hacking project, after the kids are in bed. And it's fun. Gerald On 28.04.2015 19:25, Ralf Mardorf wrote: Did you already release a git version that is able to handle polyphony? My apologies for not testing it. I promise I'll do ASAP. ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev
Re: [LAD] GuitarSynth
On Tue, Apr 28, 2015, at 05:12 PM, Gerald wrote: By 'crude' do you mean it does the job, but not that well? What I really mean is that it wasn't written for use in a specific application, so it hasn't had any real testing or evaluation. The purpose of it is to be a handy tool that you can use to figure out whether this sort of transformation makes a difference to your feature extractor, rather than necessarily to be the final implementation you'd actually put in the extractor. Chris ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev
Re: [LAD] GuitarSynth
PS: Keep in mind that A440 not necessarily is always true. When you program, please keep in mind, that one day, when your program should be able to do what you want it to do, users should be able to chose the pitch for non-standard A in decimal place steps. ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev
Re: [LAD] GuitarSynth
On Tue, 28 Apr 2015 01:55:04 +0100, Harry van Haaren wrote: On Tue, Apr 28, 2015 at 12:57 AM, Tim E. Real termt...@rogers.com wrote: The effect is striking. You can hear it without even plugging the guitar in. As you adjust the pickup ever higher, and pluck the strings, you can hear the horrible overtones from the frequency splitting. Wow really? I didn't know that.. but I'll try it tomorrow! Thanks for the 'note' ;) -Harry I adjust the highs of my single coils depending to what I do. I anyway have to do this all the times, since they lower when playing. A while back I sampled my guitar for the sound sampler of my tablet PC. Since I needed a blues g hexatonic, I decided to sample the scale close to the twelfth fret (IOW around the thirteenth and fifteens fret), because a single coil close to the neck then produces an unique sound. Indeed, when playing a guitar I seldom want the noise caused by to high coils, but when recording it to make a sampler sound it's wanted for one or he other tone, dirt makes a sound sample sound more natural. The day before I adjusted action and intonation. Too funny, just one day, perhaps caused by another temperature of the room and the intonation that was nearly perfect the day before, wasn't perfect anymore. I guess intonation of guitars could become a serious issue for converters. I place value on a good intonation, but if the tuning is perfect when playing open and for the twelfth fret, the tuning for the frets between open and twelfth fret still could be disastrous. I only can fit the intonation to the way I play my guitar, if somebody else should prefer to play chords and scales in other positions, the intonation likely is broken. However, the e guitar at least has a relatively good intonation. My classical guitar has got a very unique, odd intonation ;) and there's no action to adjust it. Regards, Ralf ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev
Re: [LAD] GuitarSynth
Interesting note, you must have ears if you can hear the overtones that clear without amplification. It also depends on the guitar body itself? A solid body (loke LP) would behave different than a strat? Gerald On 28.04.2015 02:55, Harry van Haaren wrote: On Tue, Apr 28, 2015 at 12:57 AM, Tim E. Real termt...@rogers.com wrote: The effect is striking. You can hear it without even plugging the guitar in. As you adjust the pickup ever higher, and pluck the strings, you can hear the horrible overtones from the frequency splitting. Wow really? I didn't know that.. but I'll try it tomorrow! Thanks for the 'note' ;) -Harry ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev
Re: [LAD] GuitarSynth
On Tue, Apr 28, 2015 at 12:57 AM, Tim E. Real termt...@rogers.com wrote: The effect is striking. You can hear it without even plugging the guitar in. As you adjust the pickup ever higher, and pluck the strings, you can hear the horrible overtones from the frequency splitting. Wow really? I didn't know that.. but I'll try it tomorrow! Thanks for the 'note' ;) -Harry -- http://www.openavproductions.com ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev
Re: [LAD] GuitarSynth
On April 27, 2015 07:59:36 PM Ralf Mardorf wrote: On Fri, 24 Apr 2015 23:13:12 -0400, Tim E. Real wrote: To reduce latency I even tried putting the guitar through a standard time-domain pitch shifter (up one octave) and then into the detector. Not bad, so so. Since dead strings aren't an option for me, this is something I'll test for monophonic converters, because they also suffer from accuracy and latency. I never tested this. Nice idea. The purpose there was to shift the guitar up one octave before it goes into the polyphonic detector, so that I could reduce the number of FFT bins required and therefore reduce latency. It worked better, kind of OK, but if you know standard time-domain SOLA pitch shifters, they leave artifacts in the sound, so it's not an ideal solution. A nice frequency-domain pitch shifter would be better - very little artifacts in the sound - but these shifters have large latency, so that cancels the purpose of this because time-domain SOLA shifters have very little latency, but just the artifacts. JFTR, if I'm short of money, I boil dead guitar strings in water. As long as they only suffered from skin fat and particles of skin and they aren't worn out or suffer from oxidation, this refreshes the strings without a side effect. Aw jeez, sad situation, buy a new set of strings, eh :-( If you lived in my city I'd give you a pack! Yeah I tried boiling them a few times long ago. All that really seemed to do was bring out the rust even more! I've always believed it's not so much the dirt or oxidation on the string which is the problem: That simply makes it appear like a slightly thicker string and thus the tuning changes slightly. Most of the dirt can be removed. The real problem is the dozens of small 'cuts' along the string length that are accumulated over time from bending, or just playing, against metal frets. This produces horrible overtones. The single fundamental frequency of a given fret position begins to 'split' into two or more fundamental frequencies. Ugly. Just a side 'note': A tip for players out there: There is a tendency to think that one should adjust the pickup as close as possible to the strings without touching them, for maximum output. Seems reasonable right? But no, don't do that. Because the strings then sit in a less linear portion of the magnetic field - on the 'down swing' they are attracted much more to the pickup magnet than on the 'up swing'. The result is mechanical nonlinear string motion, resulting in... split fundamental frequencies. The effect is striking. You can hear it without even plugging the guitar in. As you adjust the pickup ever higher, and pluck the strings, you can hear the horrible overtones from the frequency splitting. It's really gross sounding. So be careful. Enjoy your day :-) T. ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev
Re: [LAD] GuitarSynth
Well, I found that rectifying the signal before aubio pitch detection improves the result. This is because the time resolution is divided by 2 and due to uncertainity the frequency resolution is doubled. Furthermore the input is lowpassed at 6khz to reduce the effect plektrum and nail picking, which generate high frequencies. I assume that some better (freq-dependent) rectifying procedure could split the harmonic structure of the strings further apart in freq-domain, that is making the time/freq-resolution frequency dependent: low frequencies-high freq resolution high frequencies- low freq res. this could be achieved, i believe with wavelets. Thats the first step. Following step: Now imagine the frequencies as being samples in frequency domain: The samplingrate is a function the frequency, and get this function from the wavelets in the first step. With the Constant-Q-Transformation, one could map this function to a constant function, and thus the frequency domain to a domain in which all harmonic combs have equal distances between their partials, but different locations. It should be easy then to locate the combes, then do the inverse Constant-Q to get the fundamentals. ..but its probably b*** sh** ;) Gerald On 25.04.2015 05:13, Tim E. Real wrote: For FFT to distinguish among notes it needs a certain amount of samples in a block. More samples per block for lower notes. On guitar it was just sorta kinda usable, but fun. ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev
Re: [LAD] GuitarSynth
On Fri, 24 Apr 2015 23:13:12 -0400, Tim E. Real wrote: To reduce latency I even tried putting the guitar through a standard time-domain pitch shifter (up one octave) and then into the detector. Not bad, so so. Since dead strings aren't an option for me, this is something I'll test for monophonic converters, because they also suffer from accuracy and latency. I never tested this. Nice idea. JFTR, if I'm short of money, I boil dead guitar strings in water. As long as they only suffered from skin fat and particles of skin and they aren't worn out or suffer from oxidation, this refreshes the strings without a side effect. ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev
Re: [LAD] GuitarSynth
On Sat, Apr 25, 2015 at 08:35:56PM +0200, Albert Graef wrote: Question: I tried a demo product which did polyphony, with similar latency as my app, which claimed to have a full version with near-zero latency. Is this actually possible? Sounds like snake oil to me, but don't take my word for it. Sound very unlikely. One problem with polyphonic pitch detection is two or more notes that share a number of harmonic frequencies and start at the same time. This will occur with many chords that contain simple intervals like octave and fifth. It is possible to detect which harmonics are shared (they will have a different amplitude / phase profile) but this requires tracking them for some time and hence additional latency. I suspect the same is even true for human perception. If we hear a perfect fifth chord we may have the impression to have detected that it consist of two notes immediately. But there are many examples of our brain playing tricks and 'backdating' the result of an observation which has actually taken more time than we think. Real-time polyphonic pitch detection is still a research topic, just look at the publication dates of some of papers already mentioned. For a guitar it may be easier than the general case due to the restriced frequency range of each string and in general a clear attack of each note. Ciao, -- FA A world of exhaustive, reliable metadata would be an utopia. It's also a pipe-dream, founded on self-delusion, nerd hubris and hysterically inflated market opportunities. (Cory Doctorow) ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev
Re: [LAD] GuitarSynth
Do you still have code? Gerald On 25.04.2015 05:13, Tim E. Real wrote: I simply grabbed an open-source FFT library, and the rest was easy. Audio-to-midi polyphonic pitch converter. ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev
Re: [LAD] GuitarSynth
On Sat, Apr 25, 2015 at 5:13 AM, Tim E. Real termt...@rogers.com wrote: If it provides inspiration, I was doing this in the late 90's on Windows, in good ol' Borland C++ Builder. If you still have the code lying around somewhere, why not throw it up on github so that others can learn from it? Question: I tried a demo product which did polyphony, with similar latency as my app, which claimed to have a full version with near-zero latency. Is this actually possible? Sounds like snake oil to me, but don't take my word for it. Albert -- Dr. Albert Graf Computer Music Research Group, JGU Mainz, Germany Email: aggr...@gmail.com WWW:https://plus.google.com/+AlbertGraef ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev
Re: [LAD] GuitarSynth
Hi Gerald, cool project, I'm looking forward to give it a try. :) On Thu, Apr 23, 2015 at 7:24 AM, Gerald gerald.mwa...@gmx.de wrote: definately, but that comes with the cost of extra hardware (pickup, 6chan soundcard). I would build that into GuitarSynth if I had that gear. But I'm also rather interested multipitch out of one signal. It's just more convenient too Polyphonic pitch detection is much more involved and requires more advanced algorithms which are computationally intensive and thus hard to perform in real-time. Commercial closed-source software like Melodyne can do this, at least in off-line processing. AFAICT, the latest Melodyne versions also do some real-time processing, but I haven't used Melodyne for some time and so I don't know how well that works. I'm not sure either whether there are any good open-source codes for this available yet, maybe others can provide corresponding links. But here are some relevant answers from Stackoverflow and Stackexchange: http://stackoverflow.com/questions/9613768/multiple-pitch-detection-fft-or-other/9626849#9626849 http://dsp.stackexchange.com/questions/11433/polyphonic-detection-mulit-pitch-detection-chord-recognition Also, here's an interesting recent DAFx paper on doing polyphonic pitch detection using autocorrelation: http://www.dafx14.fau.de/papers/dafx14_sebastian_kraft_polyphonic_pitch_detectio.pdf And then there's the work of Anssi Klapuri and others at Tampere University: http://www.cs.tut.fi/~klap/iiro/ Also, there are algorithms for doing spectrum estimation such as filter diagonalization methods (FDM) and the classical Prony algorithm, but due to their complexity these probably aren't well-suited for real-time processing either (the Prony algorithm also suffers from numerical instabilities IIRC), and you still have to do the partitioning of the overtone series afterwards. There's surely more, but that's what I could find with a quick Google search or remember from the top of my head. Hope this helps, Albert -- Dr. Albert Graf Computer Music Research Group, JGU Mainz, Germany Email: aggr...@gmail.com WWW:https://plus.google.com/+AlbertGraef ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev
Re: [LAD] GuitarSynth
On April 25, 2015 02:37:34 AM Albert Graef wrote: Hi Gerald, cool project, I'm looking forward to give it a try. :) On Thu, Apr 23, 2015 at 7:24 AM, Gerald gerald.mwa...@gmx.de wrote: definately, but that comes with the cost of extra hardware (pickup, 6chan soundcard). I would build that into GuitarSynth if I had that gear. But I'm also rather interested multipitch out of one signal. It's just more convenient too Polyphonic pitch detection is much more involved and requires more advanced algorithms which are computationally intensive and thus hard to perform in real-time. Commercial closed-source software like Melodyne can do this, at least in off-line processing. AFAICT, the latest Melodyne versions also do some real-time processing, but I haven't used Melodyne for some time and so I don't know how well that works. I'm not sure either whether there are any good open-source codes for this available yet, maybe others can provide corresponding links. But here are some relevant answers from Stackoverflow and Stackexchange: http://stackoverflow.com/questions/9613768/multiple-pitch-detection-fft-or-o ther/9626849#9626849 http://dsp.stackexchange.com/questions/11433/polyphonic-detection-mulit-pitc h-detection-chord-recognition Also, here's an interesting recent DAFx paper on doing polyphonic pitch detection using autocorrelation: http://www.dafx14.fau.de/papers/dafx14_sebastian_kraft_polyphonic_pitch_dete ctio.pdf And then there's the work of Anssi Klapuri and others at Tampere University: http://www.cs.tut.fi/~klap/iiro/ Also, there are algorithms for doing spectrum estimation such as filter diagonalization methods (FDM) and the classical Prony algorithm, but due to their complexity these probably aren't well-suited for real-time processing either (the Prony algorithm also suffers from numerical instabilities IIRC), and you still have to do the partitioning of the overtone series afterwards. There's surely more, but that's what I could find with a quick Google search or remember from the top of my head. Hope this helps, Albert If it provides inspiration, I was doing this in the late 90's on Windows, in good ol' Borland C++ Builder. I simply grabbed an open-source FFT library, and the rest was easy. Audio-to-midi polyphonic pitch converter. It is a real riot! Super fun to try. I was able to play polyphonic guitar chords and have it come out as midi, for example piano. With velocity detection. And anti-retriggering. There is one drawback. Latency. For FFT to distinguish among notes it needs a certain amount of samples in a block. More samples per block for lower notes. On guitar it was just sorta kinda usable, but fun. To reduce latency I even tried putting the guitar through a standard time-domain pitch shifter (up one octave) and then into the detector. Not bad, so so. Question: I tried a demo product which did polyphony, with similar latency as my app, which claimed to have a full version with near-zero latency. Is this actually possible? And with properly timed chord notes (not high notes sounding before low notes ie lower latency for higher notes)? Related question: Albert (and list), I am desperately searching for a pitch shifting phase-vocoder audio plugin with lower latency than FFT. I have read about wavelets for a long time. They are said to be better for this than FFT. Hard to find real working examples except in commercial. In PD, there is a wavelet pitch shifter (I think in PD extended) but it is *broken* I emailed the list but got no reply except to contact the author, which I haven't done yet. Are wavelets good for polyphonic pitch detection too? Can anyone shed more light on them in this context? Thanks for the links Albert, bookmarked and will check them out. Tim. ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev
Re: [LAD] GuitarSynth
Am Wed, 22. Apr 2015 um 09:45:23 +0200 schrieb Gerald: Hi Gerald, Sorry, forgot to commit :) git push did nothing, and I didn't see it. attached you find a patch to get rid of an other ugly warning message which also enables a slightly smarter frequency number display. Guido -- http://wie-im-flug.net/ http://www.lug-burghausen.org/ diff --git a/mainwindow.cpp b/mainwindow.cpp index fc31f9b..2082807 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -21,7 +21,7 @@ This file is part of GuitarSynth2. #include gausssynth.h #include sawsynth.h #include QVBoxLayout -#include strstream + MainWindow::MainWindow(QWidget *parent) : QWidget(parent), ui(new Ui::MainWindow) @@ -76,7 +76,7 @@ QWidget * MainWindow::getSynthArea() void MainWindow::updateFreqLabel(float val) { -strstream t; -tvalstd::endl; -ui-freqLab-setText(QString::fromStdString(t.str())); +QString t; +t.setNum(val); +ui-freqLab-setText(t); } signature.asc Description: Digital signature ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev
Re: [LAD] GuitarSynth
Would the pitch detection be easier with a hex pickup with individual channels for each string? On Wed, Apr 22, 2015 at 2:51 PM, Gerald gerald.mwa...@gmx.de wrote: Hi Guido, thanks for the patch. I applied and pushed it up. Haven't tested it though. I'm thinking of using falktx's DPF lib to make GuitarSynth a plugin. Will deal with that on friday. Meanwhile, can someone point me to a paper or some code on polyphonic pitch detection or even blind source separation? Lg Gerald On 22.04.2015 19:53, Guido Scholz wrote: attached you find a patch to get rid of an other ugly warning message ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev
Re: [LAD] GuitarSynth
Sorry, forgot to commit :) git push did nothing, and I didn't see it. Lg Gerald On 21.04.2015 20:49, Guido Scholz wrote: but a git push seem to be missing yet. ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev
Re: [LAD] GuitarSynth
Am Mon, 20. Apr 2015 um 23:01:07 +0200 schrieb Gerald: Hi Gerald, Thanx. Fixed that and the warnings but a git push seem to be missing yet. Guido -- http://wie-im-flug.net/ http://www.lug-burghausen.org/ signature.asc Description: Digital signature ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev
Re: [LAD] GuitarSynth
Thanks. The pitch detection is done by aubio library, but I rectify the signal before since that stabilizes the detection. By 'the 6th string' I assume you mean the lower pitched E string? Thats due to the longer waveform of lower frequencies which would need more frames per period to be detected. Low frequencies are a problem if the algorithm detects only the fundamental freq and not the harmonic comb (I dont know if its the case with aubio' yinfft algo). I had better results with a harmonic comb algorithm at lower freq, but I used the CLAM Audio suit for that. Sadly CLAM hasn't been updated for sometime (since 2010), so I scraped it. Maybe I'll extract the relevant parts of CLAM for GuitarSynth. Gerald On 21.04.2015 03:33, Gianfranco Ceccolini wrote: FalkTX helped me with the QT4/QT5 issue and I got it working Nice to play around. Fast pitch detection and reliable in most cases. The performance drops a lot when using the 6th string though. Nevertheless, good work Gerald! Regards Gianfranco ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev
Re: [LAD] GuitarSynth
Thanx. Fixed that and the warnings On 20.04.2015 21:21, Guido Scholz wrote: Am Mon, 20. Apr 2015 um 20:09:17 +0200 schrieb Gerald: Hi Gerald, Yes thats true. I built it on Ubuntu 14.04 and on Arch Linux both with qt5. which distro are you on? if you fix line 21 in file synthcontrol.h from #include QtWidgets/QDial to #include QDial your code will compile with Qt4 as well. But btw. I got some serious compiler warnings. I recommend to carefully fix them too. Guido PS: Your e-mail quoting style irritates me. Gerald On 20.04.2015 19:57, Guido Scholz wrote: Am Mon, 20. Apr 2015 um 18:40:26 +0200 schrieb Gianfranco Ceccolini: When building in KXStudio I get the following error [...] from ../GuitarSynth/mainwindow.cpp:19: ../GuitarSynth/synthcontrol.h:21:27: fatal error: QtWidgets/QDial: No such file or directory #include QtWidgets/QDial ^ compilation terminated. Any hint on where I can find the QtWidgets/QDial ? $ locate QDial /usr/include/qt4/QtGui/QDial ... /usr/include/qt5/QtWidgets/QDial This looks like you should go for Qt5 instead of Qt4. Guido ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev
Re: [LAD] GuitarSynth
FalkTX helped me with the QT4/QT5 issue and I got it working Nice to play around. Fast pitch detection and reliable in most cases. The performance drops a lot when using the 6th string though. Nevertheless, good work Gerald! Regards Gianfranco Em 20/04/2015, à(s) 18:40, Gianfranco Ceccolini gianfra...@portalmod.com.br escreveu: When building in KXStudio I get the following error gian@gian-Latitude-D630:~/build$ make /usr/lib/x86_64-linux-gnu/qt4/bin/uic ../GuitarSynth/mainwindow.ui -o ui_mainwindow.h /usr/lib/x86_64-linux-gnu/qt4/bin/uic ../GuitarSynth/SynthBase.ui -o ui_SynthBase.h g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I../GuitarSynth -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -I../GuitarSynth -I. -o main.o ../GuitarSynth/main.cpp g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I../GuitarSynth -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -I../GuitarSynth -I. -o mainwindow.o ../GuitarSynth/mainwindow.cpp In file included from ../GuitarSynth/synthbase.h:21:0, from ../GuitarSynth/squaresynth.h:19, from ../GuitarSynth/mainwindow.cpp:19: ../GuitarSynth/synthcontrol.h:21:27: fatal error: QtWidgets/QDial: No such file or directory #include QtWidgets/QDial ^ compilation terminated. Any hint on where I can find the QtWidgets/QDial ? I already installed libqt4-dev Best Gianfranco 2015-04-18 0:30 GMT+02:00 Gerald gerald.mwa...@gmx.de mailto:gerald.mwa...@gmx.de: Hi guys, I've started/hacked a small project called GuitarSynth. It is meant as a playfield for exploring pitchdetection and synthesis for Guitar, since I'm a guitarist. You can get on Github (git clone https://github.com/geraldmwangi/GuitarSynth.git https://github.com/geraldmwangi/GuitarSynth.git). Its really basic but its fun to play with. It take an audio signal (your guitar) extracts the fundamental pitch and drives some wavetable synths. Feel free to manipulate it, I'll be happy to grant people write access to the repo. Btw on IRC my Nick is JimsonDrift, the name of my band (see www.jimson-drift.de http://www.jimson-drift.de/). Cheers Gerald ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org mailto:Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev http://lists.linuxaudio.org/listinfo/linux-audio-dev ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev
Re: [LAD] GuitarSynth
Yes thats true. I built it on Ubuntu 14.04 and on Arch Linux both with qt5. which distro are you on? Gerald On 20.04.2015 19:57, Guido Scholz wrote: Am Mon, 20. Apr 2015 um 18:40:26 +0200 schrieb Gianfranco Ceccolini: When building in KXStudio I get the following error [...] from ../GuitarSynth/mainwindow.cpp:19: ../GuitarSynth/synthcontrol.h:21:27: fatal error: QtWidgets/QDial: No such file or directory #include QtWidgets/QDial ^ compilation terminated. Any hint on where I can find the QtWidgets/QDial ? $ locate QDial /usr/include/qt4/QtGui/QDial ... /usr/include/qt5/QtWidgets/QDial This looks like you should go for Qt5 instead of Qt4. Guido ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev
Re: [LAD] GuitarSynth
Am Mon, 20. Apr 2015 um 18:40:26 +0200 schrieb Gianfranco Ceccolini: When building in KXStudio I get the following error [...] from ../GuitarSynth/mainwindow.cpp:19: ../GuitarSynth/synthcontrol.h:21:27: fatal error: QtWidgets/QDial: No such file or directory #include QtWidgets/QDial ^ compilation terminated. Any hint on where I can find the QtWidgets/QDial ? $ locate QDial /usr/include/qt4/QtGui/QDial ... /usr/include/qt5/QtWidgets/QDial This looks like you should go for Qt5 instead of Qt4. Guido -- http://wie-im-flug.net/ http://www.lug-burghausen.org/ signature.asc Description: Digital signature ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev
Re: [LAD] GuitarSynth
When building in KXStudio I get the following error gian@gian-Latitude-D630:~/build$ make /usr/lib/x86_64-linux-gnu/qt4/bin/uic ../GuitarSynth/mainwindow.ui -o ui_mainwindow.h /usr/lib/x86_64-linux-gnu/qt4/bin/uic ../GuitarSynth/SynthBase.ui -o ui_SynthBase.h g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I../GuitarSynth -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -I../GuitarSynth -I. -o main.o ../GuitarSynth/main.cpp g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I../GuitarSynth -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -I../GuitarSynth -I. -o mainwindow.o ../GuitarSynth/mainwindow.cpp In file included from ../GuitarSynth/synthbase.h:21:0, from ../GuitarSynth/squaresynth.h:19, from ../GuitarSynth/mainwindow.cpp:19: ../GuitarSynth/synthcontrol.h:21:27: fatal error: QtWidgets/QDial: No such file or directory #include QtWidgets/QDial ^ compilation terminated. Any hint on where I can find the QtWidgets/QDial ? I already installed libqt4-dev Best Gianfranco 2015-04-18 0:30 GMT+02:00 Gerald gerald.mwa...@gmx.de: Hi guys, I've started/hacked a small project called GuitarSynth. It is meant as a playfield for exploring pitchdetection and synthesis for Guitar, since I'm a guitarist. You can get on Github (git clone https://github.com/geraldmwangi/GuitarSynth.git). Its really basic but its fun to play with. It take an audio signal (your guitar) extracts the fundamental pitch and drives some wavetable synths. Feel free to manipulate it, I'll be happy to grant people write access to the repo. Btw on IRC my Nick is JimsonDrift, the name of my band (see www.jimson-drift.de). Cheers Gerald ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev