-
Notifications
You must be signed in to change notification settings - Fork 719
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/add record button and playback button in sampler widget #3813
base: master
Are you sure you want to change the base?
Feat/add record button and playback button in sampler widget #3813
Conversation
@walterbender @pikurasa i have added recording and playback buttons to the sampler widget. Could you please review and suggest any further changes needed? |
It sort of kind of works. |
@walterbender sir I have made the changes as suggested by you |
I am not seeing any UX changes with your latest commit: I don't see the micorphone state change; the playback button status changing; or any signal on the waveform. |
@walterbender what I have done is that when the recording starts I am displaying a msg "recording started" and when I stop the recording the msg is displayed "recording complete" and I am disabling the playback button whenever there is no audio url |
I think it would be a better UX to change the button icon to show that recording has started/stopped... |
sure,will do that |
@walterbender could you please review it i have updated it. |
The UX is improved. But I don't seem to be able to use the sample in my code. The play button in the widget doesn't play my sample either. And the wave forms are still not working. |
Sure, will address the playback and waveform display issues |
@walterbender i have added the recorded audio sample to the list, and now the waveform is also getting displayed.could you please review it |
It seems to now play the sample via the widget, but it doesn't yet seem to be something that can be used in a user's code. @Mubashirshariq did you test it? Does it work within a user's code for you? |
This is my test: sampler-test.webmIn the video:
This represents a typical workflow |
@walterbender @pikurasa i was going through the code i noticed one thing, do we need to record the audio in .wav format ,because while uploading file we are checking that if the file format is .wav then only we are adding that sample .I think that might be the reason for waveform of the recorded file not being displayed |
It may be that it must be in .wav format, but I'm not 100% certain. Here are the instructions for adding a sample: https://github.com/sugarlabs/musicblocks/tree/master/sounds/samples which does not mention mp4 format, if that is helpful. @walterbender Can you confirm, please? |
I think that the file must be WAV in the current implementation. |
@walterbender @pikurasa sir could you please review it now i have used webm2wav converter to convert audio/webm to .wav ,now i am able to see the waveform and also now i can use it in my code |
Works for me. But I still don't see anything on the waveform/oscilloscope output. |
@walterbender i am able to see the waveform i am sharing the below video for reference ,maybe the amplitude of your waveform was too small screen-capture.1.webm |
@pikurasa do you see activity on the waveform? |
Also, watching that video, I'm confused. I would expect to see waveform activity soon after the record button was pushed. This is because it should be showing mic activity as the mic is recording. |
@pikurasa now how it is working is like first it records the audio then the audio sample is added to our list ,then whenever click play button it displays the waveform.Do you want it like during recording itself the waveform should be displayed |
If that's not too much trouble, yes, that would be best. Then the person recording has visual feedback as to how well the mic is getting the input, as well as whether the levels are too low or too high. |
sure will do that |
This pull request has been open for more than 60 days without any activity. It will be closed in 3 days unless the |
@Mubashirshariq It would be nice to land this. Do you have any particular questions, or do you need feedback on anything? |
@pikurasa the issue I am facing is showing the waveform simultaneously while recording itself. I am not able to figure that out. However, once the recording is completed, pressing play button shows the waveform. If I try to use it in the code, it works well |
Perhaps we don't need to have that feature for now. But we should probably put some indication that recording is happening. |
@pikurasa i am attaching few screenshots for your reference 2)Once we hit the mic ,the symbol of mic is getting changed and also on the top msg is being displayed that recording started and playback button is disabled. 3)And when we hit the mic again the symbol changed back to default state we are showing the msg recording complete 4)Once i hit the play button i am able to see the waveform as follows 5)And once i click "save sample" then i am able to use it in my code as follows |
fixes #3806
1)Added record button to record the audio in the browser itself
2)Added the playback button to play the recorded audio