It's about time hardsync and phase distortion came to sampled waves

Sampler and Sampling discussion (techniques, tips and tricks, etc.)
RELATED
PRODUCTS

Post

I've been getting into sampled Kontakt instruments such as the Hollow Sun stuff and have found some very compelling synth material there, against all my expectations. There's something about a janky broken oscillator that's been multisampled so that the out-of-tune-ness and wave distortions across the keyboard are captured that's really exciting to me.

But it's 2013 and STILL all we can do is mix and filter sampled waveforms? Is it really that hard for a computer to work out the wavelength of a quasi-periodic waveform? Do we have not pitch detectors that work reasonably well? And should the algoryhtm go wrong, who cares? It'll only produce a quirky, octave jumping, interesting sound. Call it character :)

I'm not a programmer, but it seems to me once you've established and can keep track of the pitch of a wave, and decide on a point to label zero degrees phase (like every nth negative to positive zero crossing), you can do periodic distortions such as hardsync, phase distortion/PWM (stretching a wave via it's midpoint), maybe even FM if you've got the CPU cycles to spare? Pretty much treating it as a live-updated wavetable.

As I've never heard of a sampler that can do these things, I have to assume it's because there are too many problems involved in creating a reliable system for this. And for arbitrary waveforms like running water I'd agree, but for sampled synth waveforms which are 99% predictably periodic I can't think what the problem would be.

So which developer will be the first to do this?
http://sendy.bandcamp.com/releases < My new album at Bandcamp! Now pay what you like!

Post

I can only remember that Roland JD-990 did hardsync with samples. It is extremely rare of a feature. Kurzweil can do PWM on samples, I can tell you that first-hand as I own one (PC3K8).

In VSTi world, I really don't know which synth can do it.

Post

Yeah, Rayblaster is a synth that can do sync kinda sounds out of samples pretty well, too. But other than that.... can't think of anything. Unless you count being able to load samples as single cycle waveforms, which I don't (it's just converting to a wavetable and you get none of the benefits of having a longer sample - i.e. the "spirit" of the source sample has a bigger window through which to shine with regards to subtle instabilities.
http://sendy.bandcamp.com/releases < My new album at Bandcamp! Now pay what you like!

Post

The Ensoniq ESQ1 and SQ80 could do it but it wasn't entirely convincing. Same with the Alesis Fusion. Both kind of gave the 'effect' of oscillator sync but don't compare with two true analogue oscillators tearing each other apart!


Stephen

Post

Ensoniqs were single-cycle waveforms only, though...

Post

Korg Wavestation has hardsync. Most "useful" results with single cycle waves. Sync seems to be a bit buggy with multisamples. Some work fine (e.g. the grandpiano) and some only sync during the loop phase of the sample. The results with sampled instruments are rather "meh" in my opinion.

In the Yamaha SY99 you can use samples as fm modulator. Best results again with single cycle waves or samples with low harmonic content. I mostly use this feature as the "7th" fm operator.

Yamaha EX5 also has fm, ringmod and even pwm for samples. Most interesting results with any kind of samples i found with ringmod and pwm (dunno how pwm with samples is done in this synth or if it is real pwm at all; to me it sounds more like some kind of phase shifting).

In the early 1990s i had a Kawai K4 which had amplitude modulation with two samples. Never found a single sound that was nearly interesting or even useful.
EAT - SLEEP - SYNTH
http://soundcloud.com/pocvecem

Post

Unless you resamle the samples on fly i cant see how it will work? You cant change the PW of a static sample.

Post

You can add DC offset then modulate the phase of it, the result is the same as PWM. Kurzweil does it like that.

Post

Kriminal wrote:Unless you resamle the samples on fly i cant see how it will work? You cant change the PW of a static sample.
Of course there's no realtime resampling. The Ex5 is from 1998. But if you choose a square wave sample for the pwm dsp function and alter the pulse wide it sounds like a, well, pulse wide modulation as we all know it. If i put in a choir sample it changes from the original sound to a more "flutish" or "squarish" choir sound.

I can get similar results in Alchemy where you can alter the even and odd harmonics in a sample.
EAT - SLEEP - SYNTH
http://soundcloud.com/pocvecem

Post

Sendy wrote: But it's 2013 and STILL all we can do is mix and filter sampled waveforms? Is it really that hard for a computer to work out the wavelength of a quasi-periodic waveform? Do we have not pitch detectors that work reasonably well? And should the algoryhtm go wrong, who cares? It'll only produce a quirky, octave jumping, interesting sound. Call it character :)
Here you are, from www.sampleism.com:
Dirty Sync (http://www.sampleism.com/noisymichael/dirtysync)
The soundcloud demo is here: http://snd.sc/194VxAC

Its an "Oscillator sync" sound, implemented using Kontakt programming and scripting. As others have pointed out here, sampling technology is not well suited to oscillator-sync. Brutally forcing Kontakt to do it (using a combination of scripting and nefarious Kontakt programming) results in a rich, gritty sound - "if the algorithm goes wrong, who cares :-). There is loads of control. The custom scripted interface allows you to select the mod source to be either the Mod wheel, a built-in envelope with or without velocity sensitivity, with controllable decay rate. It also provides front-panel controls for the filter (yours for a paltry £3.50).

Post

I'm not sure 100% but I think discoDSP Corona can do it. Maybe someone else could be able to confirm.

Post

Kriminal wrote:Unless you resamle the samples on fly i cant see how it will work? You cant change the PW of a static sample.
You would need to add a latency of at least one wavecycle, probably more. And I guess you would be resampling. When I refer to PWM I'm thinking more specifically of playing the first half of the wave quicker and the 2nd half slower. And obviously the case of a single-cycle waveform is trivial as wavetable synths can already do this.

So basically my original idea for PWM was something like this:

Static sample is played ---> Sampled into buffer ---> Pitch detector and zeropoint detector which "listens" for - to + zero crossings (which we'll treat as zero phase) ----> For half the predicted wavelength play the sound faster, for the other half play slower ---> Output

Similarly for sync the same process applies, but instead of speeding up and slowing down, you would speed up and repeat what was sampled into the buffer, with the extra space filling up with copies of the wave until the next - to + crossing signals another cycle. A quick crossfade could eliminate the nastiest clicks. Varying the "speed up factor" controls how many cycles are squeezed into each base cycle of the original waveform.

Obviously programmers could probably come up with a better algoryhthm than just looking for zero crossings. I'm no expert on pitch detection (just listen to me "sing" for proof of that :hihi: ).

MFB, thanks for posting that. Though it looks like it only lets you "sync" the one sound that it comes loaded with. The idea of being able to apply synth processes to samples is that it could process arbitrary content (with varying degrees of faliure, lol).
Last edited by Sendy on Wed May 22, 2013 8:11 pm, edited 1 time in total.
http://sendy.bandcamp.com/releases < My new album at Bandcamp! Now pay what you like!

Post

EvilDragon wrote:You can add DC offset then modulate the phase of it, the result is the same as PWM. Kurzweil does it like that.
True... I think I know what you're talking about, though DC offset doesn't have phase. I think it was the JV-1080 that let you add varying DC offset to samples before they went through a clipper, so a sort of moving asymmetrical distortion, causing a constantly changing distortion which produced PWM on square waves. But I think my idea of phase distorting the wavecycle would be more expressive and produce a better range of sounds on more subtle waveform material (i.e. with delicate overtones) - the distortion method works best on material that resembles a square wave.
http://sendy.bandcamp.com/releases < My new album at Bandcamp! Now pay what you like!

Post

Sendy wrote:
EvilDragon wrote:You can add DC offset then modulate the phase of it, the result is the same as PWM. Kurzweil does it like that.
True... I think I know what you're talking about, though DC offset doesn't have phase. I think it was the JV-1080 that let you add varying DC offset to samples before they went through a clipper, so a sort of moving asymmetrical distortion, causing a constantly changing distortion which produced PWM on square waves. But I think my idea of phase distorting the wavecycle would be more expressive and produce a better range of sounds on more subtle waveform material (i.e. with delicate overtones) - the distortion method works best on material that resembles a square wave.
Actually if you put square waves into this chain, you'd just get square waves out with no PWM, but on *sawtooth* waves you'd get the asymmetrical clipping resulting in PWM.

Post

Xhip generates sync from samples - the problem is that you're limited to either using loop points or a zero-crossing detector of some sort. Both result in fairly poor quality sync. In Xhip I have support for fractional loop points which are required to allow for proper sync. Unfortunately although RIFF wav does support this feature, it is very rarely used and most samples do not contain this information.

In order to allow it to work correctly I think it would require a sample / loop-point editor built into the plugin. These sorts of features are something that belongs in a sampler really, and I'm not sure if I'd ever bother to implement as part of Xhip. If I were to write a sampler plugin however it would definitely include this type of feature.

Actually I'm not sure if the last version did have this working. I know that I have experimented with it and it was at some time working perfectly but it may have changed in the last version. It's something that I'll definitely re-implement if it doesn't already work in the next release.
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
The coder's credo: We believe our work is neither clever nor difficult; it is done because we thought it would be easy.
Work less; get more done.

Post Reply

Return to “Samplers, Sampling & Sample Libraries”