KristofferStrube / Blazor.WebAudio

A Blazor wrapper for the Web Audio browser API.
https://kristofferstrube.github.io/Blazor.WebAudio/
MIT License
135 stars 9 forks source link

Audio Routing #7

Open colombo9 opened 3 days ago

colombo9 commented 3 days ago

Thanks for an awesome library. I have a multichannel audio interface (Presonus). How would I specify output channels in the destination node, other than the default ?

Also, having played with the Playground demo (really cool stuff) and the script below, the audio is jerky and distorted. I expected a delay, but this is too choppy.

Any help would be greatly appreciated. Thanks, Russ...

rect data-elementtype="media-stream-audio-source" id="2966df38" stroke="#28B6F6" stroke-width="2" height="100" width="250" x="104" y="168"></rect rect data-elementtype="audio-destination" id="cecb25e0" stroke="#EC407A" stroke-width="2" height="100" width="250" x="827" y="168"></rect rect data-elementtype="gain" id="d47e6838" stroke="#EE534F" stroke-width="2" height="100" width="250" x="469" y="168" data-gain="3.9"></rect line data-elementtype="connector" x1="364" y1="188" stroke="black" stroke-width="5" data-from-node="2966df38" x2="459" y2="188" data-to-node="d47e6838"></line line data-elementtype="connector" x1="729" y1="188" stroke="black" stroke-width="5" data-from-node="d47e6838" x2="817" y2="188" data-to-node="cecb25e0"></line

KristofferStrube commented 19 hours ago

Hey @colombo9 I'm happy that you are interested in the library. :)

I've made a link here for you above sample and adjusted the gain to something within the normal range. The above sample you had made had a gain above 1 which would mean that your audio would probably hit the peak of the speaker if the volume of the speaker was set to 100%. When audio playback hits the peak of the speaker it will generally sound really bad, so normally we should not set the gain above 1.0.

What browser and operating system are you using?

colombo9 commented 16 hours ago

Hello Kritoffer,

Thanks for the speedy reply. I tried you updated URL and it works better when the source is voice, but not music. I’m attaching a sample recording of the output.

I’m using Win11 and Chrome.

Also, how do I Configure the Audio Destination to use channels other than the default ?

Thanks for your help, Russ…

From: Kristoffer Strube @.> Sent: Monday, September 30, 2024 11:08 AM To: KristofferStrube/Blazor.WebAudio @.> Cc: russc phantomsystems.com @.>; Mention @.> Subject: Re: [KristofferStrube/Blazor.WebAudio] Audio Routing (Issue #7)

Hey @colombo9https://github.com/colombo9 I'm happy that you are interested in the library. :)

I've made a link herehttps://kristofferstrube.github.io/Blazor.WebAudio/Playground?code=H4sIAAAAAAACA5XS0W6DIBQG4Ps9BaHXbKKCNNEm22Lfg8JpJVVYlGbt2w%2BidnbZknnlycmR%2F%2BNo2YPySEsvCbTQgfX%2B9gEV7kAbSQbfg%2ByIvGjjyOAuvQKMjK5wuuVcHzOBURhx5%2FDCJhVvfM%2FnBvk02jdhEKMGzKnxFaZJgtHcZqG%2Bxl6O0S08ucC78iViduip%2FAM1OjQM3ljpjbMjRoE6pAySBaZ%2Bz5PidSVGpMUKzEmaKV%2FnBXDxsIy6Zlm%2BX5mfMzbmFxkeA2NGhZPnB09rLPziUc7aMOH6cBatcMbjZkNBxQJ2aKU6%2F2SxKe3Yu45Yp2H5fa9pgOURFgq6nWXeTZP3ywdhlP1fWFA2CeOpa4XfS49CQYtJGG%2F7KLz%2FHrPwC%2FGoogX0AgAA for you above sample and adjusted the gain to something within the normal range. The above sample you had made had a gain above 1 which would mean that your audio would probably hit the peak of the speaker if the volume of the speaker was set to 100%. When audio playback hits the peak of the speaker it will generally sound really bad, so normally we should not set the gain above 1.0.

What browser and operating system are you using?

— Reply to this email directly, view it on GitHubhttps://github.com/KristofferStrube/Blazor.WebAudio/issues/7#issuecomment-2383614749, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AF2VLBDY3Q2WNG6NR4PC2CTZZFZPPAVCNFSM6AAAAABO7U4ZG6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBTGYYTINZUHE. You are receiving this because you were mentioned.Message ID: @.***>