Delay sample node
-
I can't get decimal value sample delay with Simple Gain Delay (with using getMilliSecondsForSamples) and Latency Compensation. For sample delay, only integer values are working.
For example, there is no difference between 2.2 and 2.4 sample delay. Hise applies 2 samples on both of them. Am I missing something?
-
@orange delay can only be multiples of one sample. Any ms value is rounded to the nearest sample, so the opposite is only integer samples can be computed to decimal ms for a given samplerate.
Or in other words, a system cannot compute between samples since it is the lowest discrete value.
That been said, if you need more precision, then you should consider oversampling in scriptnode and set the delay in there. (But I am not sure in the end this will be delayed of the amount you set in the oversampled container when going back to the original samplerate world) -
@orange What you need is a interpolating delay line, then you can delay by non-integer sample values. There is a index type in SNEX which offers interpolation.
It's actually used in the PitchShifter example (which also needs a varying interpolating delay line for the Doppler effect):
-
I will check it out, thanks guys!
-
@Christoph-Hart So is your example a good start for designing filters? If I mix pre and post delay with coefficients...
Or is there a "node only" way for the novice? -
@Christoph-Hart Hmm... I just copied/pasted your sample delay script above in a SNEX file and this is what I get:
-
I think you have to name the snex file exactly lile the class, so
sample_delay
.However I think I need to think about a better way of quickly sharing examples, something like the HiseSnippet function for SNEX - currently all Snex code management is file based.
-
@Christoph-Hart Thanks this seems to work...
-
And what is the purpose of the clickable SNEX logo?
-
At first, I thought it would call a code editor, but apparently, we can only edit the SNEX file externally right?
-
So when we edit and save a SNEX file, does Hise automatically handle the update without restarting?
-
-
If your in the workbench you can edit the snex node code when you press the snex button but I have no idea what it does in HISE lol.
-
@Christoph-Hart :)
I think I might more often use SNEX from within Hise than the workbench at least for little things. Or maybe we can work in both at the same time, then each time you save in the workbench Hise takes the update into account...