@d-healey OnBeatChanged gives you the position in beats, Engine.getPlayHead().ppqPosition
I think is the most accurate and probably the one you want (and works regardless of transport state)

Posts
-
RE: Expanded AudioPlayHead functionality
-
RE: Phaselocking 2025 and other sampler related discussions
@Christoph-Hart Single time for fade into and fade out of legato sample is fine. Curve has been very important to adjust in the past, but I realize that's always been in the context of typical unaligned legato, where it might play in or out of phase.
So, going on the assumption that the phase-align-o-matic does its job, the crossfade should be linear as it is now, and probably doesn't need to be adjustable.
-
RE: Phaselocking 2025 and other sampler related discussions
@aaronventure Aligning legato samples to the sustains as Christoph is implementing certainly doesn't require bone dry nor pitch-locked samples. It's just like editing a loop, the crossfade happens over a few hundred ms, so the pitch variations don't have time to throw it more than a few degrees out of phase. Even on an ensemble the difference is subtle, but definitely audible.
As for pitch-squashing / phase-locking of different dynamic levels, you probably have the most experience with that of anyone here, and I agree with your analysis that it's practically useless on anything other than bone dry samples.
@clevername27 Depends what you mean by the "right" problem! Aligning legatos to sustains is a problem that every Kontakt developer who has ever done legato has encountered, and has no way of solving. Without switching to HISE, of course ;)
-
RE: Phaselocking 2025 and other sampler related discussions
@d-healey Audio embeds already work!
-
RE: Phaselocking 2025 and other sampler related discussions
@Christoph-Hart Oh boy my favorite subject :)
First off, automatically aligning the legatos to sustains is one of those coveted features that's impossible to do in Kontakt, at least without squashing your samples to a consistent pitch (and rendering them unlistenable in the process, which you then remedy by re-applying a pitch curve). What you are working on is beautiful and super exciting.
RE: a few of your points.
Sine waves
This alignment will be most noticeable on solo instruments that are already closer to sine waves than to the chaos of an ensemble. I imagine testing with sine wavs is a totally suitable stand in, and aligning based on rising/falling zero crossings should already give very good results.
Legato Parameters
I would like to have access to:
- Attack and release time, and curve, for source sustain, legato sample, target sustain.
- Volume for each legato sample (I don't see any reason this would be removed but just in case. Maybe it's possible to include this in a "legato adjustment" ui?)
Most of the time you will want the crossfades to be the same length on both sides, ie. sourceSustain > legato will have an xfade of ~180ms, and this value will be adjusted for both. This is what I eventually settled on for Poeesia. However, sometimes having the source sustain play a little longer can help preserve ambience, eg. sourceSustain.Release = 220ms, legato.Attack = 180ms.
There might also be situations where you want release samples to have yet another setting, so targetSustain.release would change depending on whether you're playing to a new legato sample, or to a release sample.
Whether it's worth exposing all the parameters separately depends on how annoying it is for you to implement.
sourceSustain > legato, crossfadeTime sourceSustain > legato, crossfadeShape legato > targetSustain, crossfadeTime legato > targetSustain, crossfadeShape
is probably sufficient, and in fact probably the nicest dev experience.
Legato length
What I loved about building Poeesia in HISE was I wasn't forced to choose a "best fit" setting for the legato sample length like you're forced to in Kontakt.
I just got the length of the legato sample from the samplemap, and delayed playback of the target sustain by that amount. I was then free to set unique start end end points (and volume) for every legato sample in the library. This is the main reason the instrument sounds better than it ever could in Kontakt.
Sustain offsest
Legato sounds much more natural if you jump very far into the target sustain. I know this is tricky in HISE with the maximum offset being relatively small, I forget the name of the remedy you and David came up with.
Phase locking sustains
I do not pitch/phase lock my samples because it's never really been an option, and is only really beneficial on solo instruments with multiple dynamics. As usual, doing it in Kontakt is a pain, though I know some devs have done it.
However, I assume using loris to flatten the pitch, and re-applying the extracted pitch curve from one dynamic layer to all dynamic layers using the sample editor envelope in HISE, would be an extremely pleasant workflow.
Even on raw, non-phase-locked samples, aligning the phase of sustains to legatos is very noticeable, just like it is for loops.
Polylegato
You probably know this already, but just to recap. Two different conditions should trigger a legato sample:
- key released, and another one pressed soon after (jump legato)
- key pressed, and another one released soon after (overlap legato)
Either one of these on their own is also technically polylegato, but it is much less playable for the enduser, to the point where I wouldn't include it in a library.
The only parameter that needs to be exposed is the "legato window", which also represents the added latency. I experimented with different times for jump/overlap legato, but settled on adjusting them together and exposing that setting in the UI of the instrument.
-
RE: My HISE choir
@d-healey I'm lucky it's playable on my little keyboard and laptop, because the secret is that I don't have anything more to show at the moment!
-
RE: My HISE choir
I finally finished the walkthrough if anyone's curious to see how the thing plays.
-
RE: My HISE choir
@Lindon Funny, I did update the entire site all at once after years of inactivity, which must have tripped their heuristic for what it looks like when a site gets compromised. I emailed their support but I'm not hopeful.
-
My HISE choir
I finally released Poeesia, this choir instrument I've been working on for years.
It sings a poem in Estonian, has a bunch of fun Estonian vowels like Ü Ä and Õ, and polyphonic legato, all of which combined made it totally impossible to build in Kontakt. Thanks to Christoph for making this possible, and thanks to all you fine forum folk for the help!
I removed all the swear words from the repo but there there's still lots of spaghetti, so don't look too closely please: https://codeberg.org/IvyAudio
If anyone wants a copy just send me a DM :)
-
RE: Adding Console on Compiled Plugin For Debugging
@Lindon Does the profiler print custom messages to an external file that I can optionally ask the user to enable and send to me if they have a strange behavior in a particular DAW?
-
RE: Adding Console on Compiled Plugin For Debugging
Poked around in the source code, haven't figured out where the log is created, nor whether or how I can print messages to it. As the fileLogger is already set up I'll stick with that.
-
RE: Adding Console on Compiled Plugin For Debugging
Yes I found it, but I have yet to figure out what it does or how it works.
-
RE: Adding Console on Compiled Plugin For Debugging
@d-healey ........ I had no idea, you learn something new every day!
-
RE: Adding Console on Compiled Plugin For Debugging
@Christoph-Hart I'm considering leaving this in a finished plugin, and toggling it with a debug switch in the UI settings, so I can instruct users to send me debug logs if need be. Your warning is only about extra memory usage but the all caps CAUTION is a little scary, do you anticipate anything catastrophic happening if I do?
-
RE: AU Plug-in not showing up
Super mega necro pro-tip:
auval
doesn't show the full list when run over ssh!! You have to be sitting in front of the machine or over remote desktop. -
RE: Audio stops playing while mics are being purged.
@Christoph-Hart I understand it's probably a pain to implement, but in Kontakt you can load or unload samples and it doesn't stop playback, so it is a small deviation from what people are used to.
-
RE: Audio stops playing while mics are being purged.
@Christoph-Hart I have a close/far slider, it would be cool if it could automatically purge the silent mic when at either extreme and load it again when the slider is moved away from the extreme, but this behavior makes that impossible.
-
RE: Sample Installer Script Issues with WhiteBox Packages
@Christoph-Hart
It's a race between him and grumpy customers.
-
RE: Sample Installer Script Issues with WhiteBox Packages
Weeeell if Casey confirms before I release this thing, we'll know, otherwise I expect I'll find out soon enough from a grumpy customer email.