-
Notifications
You must be signed in to change notification settings - Fork 117
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
Adding Missing Audio Nodes #1417
base: master
Are you sure you want to change the base?
Conversation
getting link error right now
It looks like this method was not implemented? |
got it. Biquad filter coming before eod. |
- linker problem with DynamicsCompressor fixed, and constructor runs with success - BiquadFilter.GetFrequencyResponse() still needs to make call to labsound level - Constructor fails with FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal. 1: 00007FF729CFD50A v8::internal::GCIdleTimeHandler::GCIdleTimeHandler+4618 2: 00007FF729CA4F86 uv_loop_fork+79446 3: 00007FF729CA5C21 uv_loop_fork+82673 4: 00007FF72A1AF8C6 v8::V8::ToLocalEmpty+54 5: 00007FFCF5598282 webaudio::AudioContext::CreateBiquadFilter+386 [c:\exokit\deps\exokit-bindings\webaudiocontext\src\audiocontext.cpp]:L355
Awesome, is this ready for review? |
Back after a few days off. Only the Dynamics compressor is. I left off with the Biquad Filter erroring, see its commit for msg. Going to add Convolver today hopefully. |
- Have not tried running convolver constructor yet. - Biquad Filter contructor now runs, however this code: const filter = audioContext.createBiquadFilter(); filter.frequency.setTargetAtTime(1024,0,0.0001); results in saying cannot call setTargetAtTime of undefined
- fix previously added biquad filter node - delay node from lab sound has an additional parameter than in Web Audio - testing on delay node has not yet occurred
Ok, Delay node has also been added in addition to dynamics Compressor, Biquad filter, & convolver nodes. Both Delay & convolver have yet to be tried to run. The Biquad filter is now able to set its audio params. Plan to still add Channel Merger & Channel Splitter nodes before beginning tests which actually generate sounds. |
- Also BiquadFilterNode::GetFrequencyResponse() - Switched the order of arguments for Delay Node
Alright, all the Nodes are there which LabSound supports, & ready for testing / review. So far, the Dynamics Compressor & Biquad filter have been run & settings to their params performed. I have finished the complex One note about the Delay node. In webaudio, it takes a max delay time (default 1), where as LabSound takes (float sampleRate, double maxDelayTime). I kept the first arg the max delay. If no 2nd arg is supplied use the sample rate of the context. Tomorrow, will start running code which exercises by using examples in mozilla. Cannot run my stack yet, since this requires other fixes like missing context.decodeAudioData() & playbackRate missing from buffer source. Not sure if you want these right now too. |
Added a test file, which goes through all the Node types, does the create & sets all the values methods. It writes the results to the console. Here is what is produced right now on Exokit:
ConstantSource & Wave Shaper fail because there is no implementation. Not a priority, but wanted the test to have them. Delay is commented out right now as it the program to cease. None of the There is also a short "Exokit rules!" spoken with a reverb echo using a convolver node. It has reverb when I run it in Firefox & Edge. Chrome gives me a message saying it was not allowed to start cause no clicks. Maybe that is why the Params also failed. In exokit, you hear it but there is no reverb. |
Did some more by adding a dynamics compressor into the test speech graft. The sample still played. More bad news however. If you push the playback to begin into the future, it still plays immediately. Effectively there is no queuing. |
Hm, I think LabSound does support delayed playing in its nodes... |
Their code sure has spots for it. This sort of goes with all the I started looking at their example code, and have not come across anywhere a |
IIRC those parameter changes are processed on a change posted to the audio thread at a later point. It could be that this audio thread isn't being updated. |
I wonder about seeing what happens with an off line context? At first, it was just a contingency, but it clearly does not work in the same way. |
Is Offline context done differently? As far as I know the main audio processing is exactly the same, the only difference being the destination node that pulls data. |
Think I found the starting in the future problem. There is a hardcode 0, in the when parameter of the wrapper call. Now that I can do something about for sure, if parameters are not be looked at. NAN_METHOD(AudioBufferSourceNode::Start) {
// Nan::HandleScope scope;
AudioBufferSourceNode *audioBufferSourceNode = ObjectWrap::Unwrap<AudioBufferSourceNode>(info.This());
((lab::FinishableSourceNode *)audioBufferSourceNode->audioNode.get())->start(0);
} |
Now reading the when argument & playing & stopping in the future. |
I wanted to get the first node, Dynamics Compressor, as a template for the others. I compiles, but has linker problems. Probably missed a spot in the related files that need changing. Here is console message: