![]() If you comment out this line: startRecording() // If this isn't here, the note doesn't play when the media player has been told to start recording What I'm wondering is, is there a way to inject (for want of another term) outputs from audioNodes into an already running media stream? It would make life so much simpler! :-) The only way I can imagine getting this to work at the moment is to somehow create a Blob of each sound played and then chain them all together by pushing them into an array to play back the final recording. If anyone can help me solve this problem, I would be very grateful. I click the play button on the media player and the recording is played back with all notes present.I press key "1" a few times, the notes played and recorded.I click the 'start recording' button and the media player starts a recording session.So what I actually want to happen is this:Ĭoded so the media recorder starts recording when the 'start recording' button is clicked: My problem with this second scenario is that I want to play more than one note/sound with successive keystrokes throughout the duration of the recording period so, starting the startRecording function in my playNote function does not achieve this, because as soon as key "1" is pressed again, a new sound and new recording session are started. I click the play button on the media player and the recording is played back.I click the 'stop recording' button and the media player stops recording.I press key "1" and the note plays and the media recorder starts recording. ![]() Result: The media recorder didn't record my sound!Ĭoded so the media recorder starts recording when the playNote function runs: I click the play button on the media player and the media plays back a silent recording that lasts for the duration of the recorded session.I click 'stop recording' and the media player stops recording.I press key "1" and the playNote function does not run, I can hear nothing through the speakers.I press 'start recording' and the media player starts recording.When I click the 'play' button on the media player, it should play back the note, or notes that have been played.Ĭoded so the media player starts to record when the 'start recording' button is clicked.When I click the 'stop recording' button, the media player should stop recording.When I press key "1" the function playNote should play a sound.When I click the 'start recording' button, the media player should start recording (which it does).I don't want to record through the device's speaker but directly from audioNodes I have two buttons ('start recording' & 'stop recording') a media recorder and a keydown event listener attached to the window. ![]() I'm trying to create a little app that records sounds from audio nodes as they are played using the Web Audio API, but have run into a few problems.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |