dywapitchtrack :  schmittMachine support schmittMachine Support Home
Discussions about dywapitchtrack 
Pages: Previous12
Current Page: 2 of 2
Re: dywapitchtrack open source C library Released !
Posted by: antoine schmitt ()
Date: January 08, 2012 09:05PM

Great idea ! winking smiley

Options: ReplyQuote
Re: dywapitchtrack open source C library Released !
Posted by: ecoldur ()
Date: February 14, 2012 03:03PM

Hello again Antoine... All seems to work fine with the pitch tracker now... I wanted to use this pitch tracking for an application that actually accompanies a singer using pre recorded musical instrument sounds. After our last talked I brought the application to the point where it tracks the note that the singer sings and sends that to an open al object and plays the sound without significant delay almost simultaneously. All is fine up to that point but...

In order for the pitchtracker to limit the decibels that it responds to, I tweaked a little with the level meter class and somewhat succeeded in that as well. My problem is, when the pitch tracker picks up a note and plays it, it also plays some different notes although the decibel input is below the limit that I put down. Is that because the buffers are already filled by then , and somehow continues to play those although the user stops ┼činging. Say I sing a perfect A for a period of time with the pitchtracker actually showing an A all through the period. But right after it plays the A, it somehow plays other sounds say a C D# whatever...It actually just fiddles around with other notes for a while until it stops. What I want it to do is,

Detect a note play that note until it detects another note over the decibel threshold play that and move on. Also, the level meter class has mpeaklevel and mavaragelevel none if which seem to give me a description as to what is the current decibel level is. In your project which is actually Apple's speakhere with the pitch tracking embedded, 10 buffers are used with 2 channel inputs. I realize this has been a long post, but I sure apprecitae the help. I can send you zipped copy of the project if you like to give you an idea.

But essentially it is the project that you sent to me via email with the pitchtracking facility just containing the openal player feature... Can you please help if you can. Do I have to play around with the buffer numbers, number of channels etc. I just can not figure out what those other notes are for... Thanks

Options: ReplyQuote
Re: dywapitchtrack open source C library Released !
Posted by: antoine schmitt ()
Date: February 14, 2012 08:56PM

Hi there,
I don't think that you should mess with the buffers, etc... There is no reason why these would interfere with the level input.
Maybe the pitch tracker hears the sound that you play through open AL ?

Does the problem happen also when you do _not_ play the open al sounds ?
Does the problem also happen when you do _not_ tweark the level meter ?

Cheers

Options: ReplyQuote
Re: dywapitchtrack open source C library Released !
Posted by: ecoldur ()
Date: February 14, 2012 09:15PM

Hi again;

As you know the pitchtracker picks up any sound that is out there. Even without the decibel level tweaking that I did, even before then, the pitch tracker pick up all kinds of notes based on the sounds in the environment. I naturally though I should limit the decibel level so that it will only pick up sounds above a certain decibel level instead of, say a car passing by outside. Was I wrong in doing that. About your comment on whether it picks up the sounds played by open al, I thought of that too so I tried it with headphones so the only sound that comes out is through headphones. So the tracker only hears my voice instead of what comes out of the computer. Do I have to do anything other than a headphoen soulution to accomplish that?

Options: ReplyQuote
Re: dywapitchtrack open source C library Released !
Posted by: antoine schmitt ()
Date: February 14, 2012 09:41PM

Hi,
no the headphone idea is good. If the problem still happens with the headphones, then it is not the openAL sounds that are picked up by the pitchtracker.
But lowering the input level will not influence the pitchtracker : it will compute equally on low sounds. Whet you can do is discard the pitchtracker output when the input sound level is too low. This is very often used method.
CHeers

Options: ReplyQuote
Re: dywapitchtrack open source C library Released !
Posted by: ecoldur ()
Date: February 14, 2012 09:50PM

That is exactly what I am doing. However, even when the DB level is limited, the open al plays notes other than the actual note taht I sing after it plays my note. It is weird because it is almost like it stutters, going back and forth between a few notes as if there is some other notes in the buffers that the tracker ispicking up after the note that I sang. I am totally baffled. The way things are set up in your project, the buffers re each 0.1 seconds long. So I thought if I limit the number of buffers to 1, then no other will be full until I play the one buffer to fill. Does that make sense. I am stuck smiling smiley

Options: ReplyQuote
Re: dywapitchtrack open source C library Released !
Posted by: antoine schmitt ()
Date: February 15, 2012 12:59AM

Remember a very important thing with computers : there is no mystery. Everything is rational.

True winking smiley

Please do not fiddle with the buffers : they are carefully tailored in size. If there is sound in the buffers, it means that sound came in the microphone. So you should look at the cause, not kill the messenger..

See if it is your sound playing algorithms that plays too many sounds, or if it is really the tracker that hears too many notes. If so, try to see where they come from. Insert logs in your code to see what happens..

Goo dluck !

Options: ReplyQuote
Re: dywapitchtrack open source C library Released !
Posted by: ecoldur ()
Date: February 18, 2012 08:56PM

Hello Again Antoine;

Imagine this scenario...

With your pitch tracker, that tracks the human voice every tenth of a second and works fine;

For now let us assume that the human voice is physically incapable of playing more than 3 different musical notes in any given second,

With your example we have 10 buffers each corresponding to 1/10th of a second. I want to make sure that once the tracker picks up a sound it stops everything for another 2 calls... (0.2 more seconds)

Consider the tracker picking up a G# at any given point in time. I know that while I am processing the g# in the callback, the tracker goes ahead and picks up the next buffer... What I want is, once the tracker picks up a note, it should clear all data that it has picked up to that point, as well as the ones it will pick up until another 0.2 seconds passes (in other words, once the tracker picks up a note, I want the queue to clear its contents, and wait for 0.2 more seconds before it processes any other input.

Any ideas on how to do this... I tried setting up a counter that gets reset every time the callback function is called for every three times (hence 0.3 seconds) but I still get weird notes in the buffers. Is there a way to clear the buffers and wait for a period?

Options: ReplyQuote
Re: dywapitchtrack open source C library Released !
Posted by: antoine schmitt ()
Date: February 18, 2012 11:11PM

I think that your are complexifying things too much.
If you are not interested in the notes computed by the tracker, you should just ignore them. Fiddling with the buffers is not at all the simplest way to go. Your counter idea is the best. Go this direction.

Options: ReplyQuote
Re: dywapitchtrack open source C library Released !
Posted by: ecoldur ()
Date: March 28, 2012 04:23PM

Hello Antoine,

I have a question again. Sorry for having to come back to you constantly on this...But bear with me please...For buffers of 0.1 seconds each as we talked above, let us assume that the singer sings for 0.5 seconds i.e 5 buffers long. What happens if somehow the singer changes the note that he sings in the middle of a buffer. I think that is the root of my problems here. If the user was able to sing each note for exactly 0.1 seconds long or multiples of that, each buffer will be filled with one dominant freq (or note) therefore not giving any problems...what happens if one buffer actually includes more than one dominant freq. So let us say he starts with a 440 Hz for 2.5 buffers and in the middle of the 3rd buffer he sings a different note. Would that not affect the pitch detected... I get mnixed readings from the pitchtracker from time to time and I am thinking this may be my problem but I am stuck...

Is this what they call a clipping problem. I have been reading a great deal about this but to no avail. I can send you the code if you like. It should not take you more than a few minutes to identify the problem but for me it is taking ages. Can you help please

Thanks

Options: ReplyQuote
Re: dywapitchtrack open source C library Released !
Posted by: antoine schmitt ()
Date: April 01, 2012 09:08PM

Hi !
Well, it is not possible for a human being to change note in 1/10th of a second. It takes some times to sing another note, for the vocal cords. Anyway, it is true that the pitch tracking algorithm cannot compute the note while the note is changing, during transitions. There is no way to cope with this.
But when one note is constantly sung, there should be no problem.
Cheers

Options: ReplyQuote
Re: dywapitchtrack open source C library Released !
Posted by: fringley ()
Date: April 02, 2012 11:58AM

Hi Antoine,

I also couldn't find that project in the zip download on your site. I would be most grateful if you could send it to me as well.

Many thanks,
Chris.


antoine schmitt Wrote:
-------------------------------------------------------
> Hi,
> yes, sorry, I thought that I had included this
> testbed in the dywapitchtrack delivery, which is
> not the case. I am sending you this testbed by
> email right now.

Options: ReplyQuote
Re: dywapitchtrack open source C library Released !
Posted by: antoine schmitt ()
Date: April 02, 2012 12:11PM

Hi,

I just added it to the zip file, there are so many requests for it.. winking smiley
Please redownload the zip file, and look into the examples folder.

Enjoy

Options: ReplyQuote
Re: dywapitchtrack open source C library Released !
Posted by: ecoldur ()
Date: April 25, 2012 03:03PM

Regarding you latest post for me :

Hi !
Well, it is not possible for a human being to change note in 1/10th of a second. It takes some times to sing another note, for the vocal cords. Anyway, it is true that the pitch tracking algorithm cannot compute the note while the note is changing, during transitions. There is no way to cope with this.
But when one note is constantly sung, there should be no problem.
Cheers

Consider someone siging into the mic Antoine. At any given time point, if we keep the buffers short enough, shorter than a human is capable of changing a note in, say 0.2 seconds or less, should we not get a steady note. In other words, the singers sung notes are changing while he sings of course, but if we break that continious stream of sound into small intervals, smaller than the human vocal chords are capable of changing I am thinking each buffer theoretically should have one dominant note.

The only problem should arise when the singer changes the note and that change point somehow coincides falls within a specific buffer. Let us take a second of singing broken up into 5 0.2 second buffers and assume that for the first 3 and half of the 4th buffer, the sung note is an A and right in the middle of the 4th buffer the singer switches to a C (ie starting from the 0.7 (0.2 times 3 buffers plus half of the 4th buffer) second time interval all the way to the end of the 5th buffer.

the first three buffers should not be a problem, should return an A the problem is the 4th buffer, half of which is an A and half of it is numbers corresponding to a C. Is there anyway to get over this problem and say, disregard that second half of the 4th buffer and return an A (the previoous sung note) for the complete 4th buffer, and then continue with the 5th buffer returning a C.

I am not sure if I can explain myself correctly that is why I am writing such long messages. Forgive me if I keep you frustrated a bit...

Thanks

Options: ReplyQuote
Re: dywapitchtrack open source C library Released !
Posted by: patricia ()
Date: June 20, 2013 04:23PM

Hello

I just discovered your lib and i am trying to use it, i have tried your example, and it works perfectly with the 5 low strings of a guitar, but the high E doesn't work, it seems that the frequency is too high ?


Do you know if it would be possible to adjust the algorithm so that it works for the high E of an acoustic guitar ?

High E -> 329.6 hz


thanks
pat

[www.audiobank.fr]

Options: ReplyQuote
Pages: Previous12
Current Page: 2 of 2


Sorry, only registered users may post in this forum.
This forum powered by Phorum.