Download

Granular Synthesis Playhead Position

Hi guys,

So let me preface this with I am very excited for the future of the UE4 audio engine.

But I have an issue. I can’t get the Granular synth to work at all. I have been printing the playhead and it is constantly at zero.

So I thought I would do something really basic, not even play the sound. I would just set sound wave, set playhead time as 5 seconds and print the string. Still reads as zero.

I am putting this down to human error. But I am really not sure what it is I have done wrong.

Hi jon,

You basically need to set all (or almost all) of GranularSynth’s parameters in order to get any kind of sound out of it. Some experimentation is in order, but it pays off - when it works it sounds fantastic! But it needs to know stuff like grain duration, probability, envelope type and pitch; ADSR; playback speed…the works. It’s worth writing a function or macro that sets your GranularSynth from a struct of vars that you use like a preset, to keep that big string of setters hidden tidily away - or, even better, look into cloning and modifying the Modular Synth Preset Bank to use for the Granular Synth. I’ve asked our C++ programmers to do that for me, but it’s not at the top of their list of priorities at the moment :wink:

At the very least, I suspect that default play speed might be 0, as might grain pitch and grain duration. These three are pretty critical, and like I say, it’ll take a bit of experimentation before you hear usable results. Best thing is to map all params to a MIDI controller - I hooked up a cheap pad+knob controller (8 of each) and GranularSynth became an instant robot indigestion machine. Capture those incoming values and serialise ones you like and…voila, a preset! Having movement on some of those vars is the best way to exploit GS’s capabilities, which is why testing with physical knobs is a good way to explore what sort of things will work best for each different sample.

That’s all fine and I understand that. But with this quick blueprint, shouldn’t my playhead be printing the number 5 and not just a zero value?

I think it’ll report playhead time as 0 here unless/until sample playback has started. It looks like you’ve got a 1 second lerp to 5s from Current Position, which is 0 when sample playback hasn’t started, and lerping presumably doesn’t start until playback does, so even with the 1s delay this would return 0. What happens when you monitor playhead time after triggering a NoteOn?

hmm, that is interesting

You’re right, I’m sure.
If lerp is unavoidable, maybe the bp node should change name, as “set” can be a bit misleading?

I think the lerp is 0 by default, and a lerp of 0 should let the node work as a “set” regardless of whether playback is in progress IIRC.

Sorry that I haven’t been active on this. Regular work took over pretty heavily. Hopefully I can carry on experimenting with this tomorrow. Thank you for the responses on this! Also, in terms of a synth world, the term “Lerp” is very confusing. I am not a professional in the slightest and am just playing around with things and the term “lerp” made absolutely no sense to me until I did some research.

You have to play a sound with “Start” node and “Note On” node