Scriptnode "oversample" node starting at 4x crashes in PC
-
@Christoph-Hart I am trying to make this work , do I understand correctly that I should create a MyChain in one of the Oversamplers and it would be moved around according to the combobox ?
If so , its not working for me, the Mychain appears in unused nodes.
HiseSnippet 1513.3ocyXs0aaaCElJIpsVqdXCXOr8FmeYNqooVYYYAnqas4VQ1ZRMpS6JPWQAsDiMQjHEjnisWQ+Ou+AamCIkkbs2PP.5VMhSDO7b46bkToatJhWTnxIdMNaZFm3ca+dSk5g6OjIjjiOf38o9mvJz7bpkzdSyXEE7Xhm2pOFI30XMh4ye9y6wRXxHdEIB4EJQD+IhTgthZ2G9qhjjiXw7yDo03d6GdbjRtuJQMBvyp9cHYrnKXC3mxP1Vwm3ciCiEZUdOMSyK.d1SEOs2P0Xok+WHJD8S33hPROPQVxj8GJRh6V5qEDh2Zcq77Usd9W3ehHVLidUD3yLaPqjndLvak4gzZyAov5PpSMHcjJIFU.xxhviTCcqYQG.BU7nDlddjgo.2FB07YmikZtrPnmVOE8+Jb+b+tBczvki2UVBdgD0GZ75R9M8O77y4Q5Jvtl+Qu75loCWJTVZgn2hwt.+dQ4hLMXeDH21sjdzKCmCPVxjUZbCe58tG8rgb5.kJlpR9FZJafHhVjwSRZF.cUEZ5krbZbQF8AzCkCDR9lQ4bvSNnH6TtdrJ+h1sfsas98aFzLvnOQAMhkjPg+JRyT4ZlTSKTT8PlF9EmFoR6q5qlPGKP6.BctHmSEZqf8g12lAfR2rfqORkOlkGuuRpyUIEmo5xxg9ZXxRQ6yYIE7YF9wbq1yUJMUph4aV2EPpmBDA+.07.t1f6PGvqXTcInZVZVB7Gf4W85R8uuwuAGIkWiIikJniJDxAzeomMB1L3bUdaAH9V2mJn+3Cng6fO7s.g0aF71lAT3ScKsY1nhgsQjYCusaAHRCEU77Mq3qE8NfVtCs0jVaXe3kzm1q05nO7NGLOUM1FoGyoCYWxwXRJUHoL3m7b1zMvchfUBHHhdDpeCWVXqPlqisJDCp+QwwVMpUlncgXfjkPivF.magoMHKw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BWA
-
@dustbro Did you get this switching working ?
-
@lalalandsynth only with the example posted. I'm just starting to get my feet wet with scriptnode.
-
@dustbro Yes, I was trying the example and could not get it to work , did yours look like my snippet ?
-
@Christoph-Hart +100 for an oversample button on the built-in convolution reverb without having to go to scriptnode!
-
@tomekslesicki or better yet, on the main container so all modules are affected.
-
@dustbro Well, now that would be something!
-
I like the idea of a global oversampler because it might address other issues as well, however it should make sure that it doesn't use absurdely high samplerates. Running an entire plugin with 16x oversampling in 96k would be total overkill.
What if we add a "HQ Mode", that just ensures that the internal samplerate is above a certain value? If you run HISE with 44,1k or 48k, it'll use a 2x oversampler, but if you run it in 88,2kHz or 96kHz it won't do anything?
Then all you need would be an API call like
Engine.setLowestSamplerate(44100.0 * 2); // or whatever
and it figures out the oversampling factor required to ensure this minimum samplerate.
-
If you're feeling out the room, I'd vote for something closer to the "overkill" method
Have you seen this video:
https://youtu.be/-jCwIsT0X8M?list=WLEven with an increased sample rate, there are instances (such as multiple levels of saturation) that would still require oversampling (sometimes up to 4X) to reduce aliasing. And at lower sample rates, this would put you into the 8X oversampling realm.
We are at your mercy with the implementation, and anything is definitely better than nothing. If you're leaning towards a single "HQ" style, I'd only request that it functions at higher sample rates as well.
-
I think this idea is very nice, @Christoph-Hart , it would make the system more adaptable I think and would allow the users to fit the performance to the specs of their rig, too.
-
Alright, good things take their time, but
Engine.setMinimumSampleRate()
has just arrived :) -
-
@Christoph-Hart holy crap! YA YAYAYAYYA!!!
-
@Christoph-Hart said in Scriptnode "oversample" node starting at 4x crashes in PC:
Engine.setMinimumSampleRate()
Any tips on implementation yet?
-
You could add a HQ button somewhere and do
if(value) Engine.setMinimumSampleRate(100000); else Engine.setMinimumSampleRate(40000);
in its callback. 100.000 will ensure that it's always 4x oversampled for lower samplerates and 40000 that it's never oversampled in non-HQ mode (using 48000 would cause oversampling in 44,1kHz).
It will fade out all voices and then reinitiliase the processing chain with the new samplerate .
-
@Christoph-Hart said in Scriptnode "oversample" node starting at 4x crashes in PC:
if(value)
Engine.setMinimumSampleRate(100000);
else
Engine.setMinimumSampleRate(40000);This is awesome! Is it just me or is the higher sample rate causing a volume boost? I think it was raised somewhere earlier on the forum.
-
What is oversampling?
-
@d-healey said in Scriptnode "oversample" node starting at 4x crashes in PC:
What is oversampling?
You can think oversampling as resolution of Total Harmonic Distortion. You can prevent aliasing problem with higher oversampling rates. 7 - 8 years earlier nobody was giving a f..k to the aliasing, even didn't aware of the aliasing. But nowadays everybody is a gearslut, and everybody wants higher oversampling rates, even they don't hear any difference between x1 and x16 oversampling rates :)
For the aliasing; you can watch this video: https://www.youtube.com/watch?v=Ic4bVbXfdW4
-
@orange So I only need to use this in my plugin if I'm making an effect plugin that will do some heavy processessing of the incoming audio?
-
@d-healey I believe this will also affect sounds generated within HISE.