-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: implement tuner in the sampler widget #4549
base: master
Are you sure you want to change the base?
Conversation
✅ All Jest tests passed! This PR is ready to merge. |
@haroon10725 please ignore the lint workflow failure i m working on that you need not to be worry about that |
✅ All Jest tests passed! This PR is ready to merge. |
✅ All Jest tests passed! This PR is ready to merge. |
@haroon10725 |
My setup shows the offset in cents and we can show that in this meter that you made. |
@Commanderk3 Yes sure, we can discuss the frontend and pitch detection approach in tomorrow's meet. |
Thanks
Yes, we can remove that button, allowing users to start by just clicking the tuner icon in the toolbar. |
✅ All Jest tests passed! This PR is ready to merge. |
@walterbender @pikurasa Now the user can just start and stop the tuner by just clicking the button in the toolbar. |
Now I am starting to implement the backend of it. @Commanderk3 you showed some demo for it. Can you please share the code here. May be we can take a look at it and implement it using Tone.js. I think this was the code, let me go through it https://github.com/cwilso/PitchDetect/blob/main/js/pitchdetect.js |
@haroon10725 Yes something like that. YIN uses correlation function and after that a series of other functions to refine the frequency. |
I made a draft PR @haroon10725 |
I think there is no need for it, I got your code. We can continue discussing here only. Don't create separate PRs for the same thing. |
Okay, I will close it then. |
Yes it would be easy for the maintainers, I am going through the code which you shared. You can then implement the backend code you shared. We can use Tone.js to open mic and close. Some of the analysis can also be done through it. Let me see. @Commanderk3 What do you think about it? |
I am confused about how you wanna use Tone here. Did you find anything? |
In Tone we have Then we can use the YIN algorithm on it. We can remove the Web Audio API, and use Tone.js. Tone.js also uses Web Audio API under the hood, by doing this our code will be consistent |
@haroon10725 Yeah i referred this repo to implement the feature which i demonstrated in meet. Here is the code for the feature 638b82a Its basically uses an auto-correlate function for for pitch detection. For the tuner feature we can use any method (YIN or auto-correlate) that works well. Im currently trying to use tone.js for listening to audio. will update 638b82a when its completed for your reference |
Alright, I get it now @haroon10725 |
Ive made changes to use tone.js for Tuner in https://github.com/farhan-momin/musicblocks/tree/tuner. I was getting incorrect outputs initially. The argument |
What is the status of this PR? |
@walterbender Frontend of the tuner is completed, implementing backend and then changing colors w.r.t to pitch has to be implemented. |
✅ All Jest tests passed! This PR is ready to merge. |
@walterbender @pikurasa Before moving on, can you please review the code?
I have implemented the frontend yet.
The colors are constant at the moment, they will be changing w.r.t pitch.