-
Notifications
You must be signed in to change notification settings - Fork 17
-
Notifications
You must be signed in to change notification settings - Fork 17
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
Question: Download processed audio without playing track #86
Comments
Thank you for your nice question. Sorry ... current version cannot record audio without playback. XSound.app.mp4Maybe, Also, I do not decide when to implement #18. Thanks ! |
Alrighty. I'm gonna try to implement OfflineAudioContext myself, then. If you wouldn't mind pinging me or just referencing this issue/question if you end up implementing either one of those, that would be sweet 😸 |
i did discovered this library today and its looks much awesome than tuna, <!DOCTYPE html>
<html>
<head>
</head>
<body>
<audio id="HTMLAudioElement" crossOrigin="anonymous" autoplay controls preload="none" src="track.mp3"></audio>
<script src="./recorder.js"></script>
<div id="controls">
<button id="recordButton">Record</button>
<button id="pauseButton" disabled>Pause</button>
<button id="stopButton" disabled>Stop</button>
</div>
<h3>Recordings</h3>
<ol id="RecordingsList"></ol>
<script>
/// DEFINE HTML AUDIO ELEMENT SELECTOR.
let HTMLAudioElement = document.getElementById("HTMLAudioElement");
/// ***** NONE RELATED FUNCTION *****
HTMLAudioElement.oncanplay = function(){
/// new audio context
var anAudioContextObject = new AudioContext();
/// SOURCE
var SourceVariable = anAudioContextObject.createMediaElementSource(HTMLAudioElement);
/// ================================> SIMILAR TO REVERBS (CREATE GAIN).
var gainNode = anAudioContextObject.createGain();
/// CREATE CONNECTION TO WHATEVER THE OBJECT
SourceVariable.connect(gainNode);
gainNode.connect(anAudioContextObject.destination);
///
/// ===============================================================================================
gainNode.gain.value = 0.5;
var rec;
rec = new Recorder(gainNode, {
numChannels: 1
})
rec.record();
setTimeout(function(){
gainNode.gain.value = 0.5;
}, 200);
setTimeout(function(){
rec.stop()
rec.exportWAV(createDownloadLink);
function createDownloadLink(blob) {
var url = URL.createObjectURL(blob);
var li = document.createElement('li');
var link = document.createElement('a');
link.href = url;
link.download = new Date().toISOString() + '.wav';
link.innerHTML = link.download;
RecordingsList.appendChild(li);
}
}, 3000);
};
</script>
</body>
</html> here is the library to include: dont forget to run this code on a real server otherwise it will not run |
Sorry if this is a silly question, but I'm trying to download the output from an audio module after applying effects without having to play the whole track. With the recorder module, it seems like I'm only able to record while the track is playing. Is there any way to process the whole track and get a AudioBuffer or something like that with the effects applied?
Also, do have an estimate on when #18 will be implemented?
Super cool library you've made. Currently working on a new tool on devina.io. Would you like me to plug any of your socials etc when it's done?
The text was updated successfully, but these errors were encountered: