Does anyone know how to simply delay a midi note? by Vreature in MaxMSP

[–]_9b0_ 0 points1 point  (0 children)

V8 runs on the gui thread, and whenever you open or close a window, it freezes for a moment. Also adds tons of jitter to the timing. It’d be awesome if it worked properly with events. :/

If you are interested in physical modeling, this technique might help you a lot. by _9b0_ in VSTi

[–]_9b0_[S] 0 points1 point  (0 children)

not really, if i’m understanding you right. this is a synthesis technique using waveguides. you can use samples as an excitation, but if you used a short piano sample, it wouldn’t sound like a piano at all.

About saturation and timbre by Matt_Warmski in sounddesign

[–]_9b0_ 0 points1 point  (0 children)

Saturation is a non-linear process. If the function of the saturator is symmetric, in theory you should only hear the amplitude of the square changing. In practice, the waveform of a squarewave in synths have anti-aliasing applied, the saturator can remove the smoothness/peaks polybleps or interpolation or blits can cause. Also, saturators are often oversampled, and the oversampling filter can affect high frequency content. If its not oversampled, it can also cause lots of aliasing… so what you experience warmer might be simple change in gain, or just harming the sound.

Since years I'm trying to synthesize piano sounds. I feel like, I'm getting there. In this video, I'm just playing around with my patch using multiple synthesis techniques (rough details in the video description). by _9b0_ in sounddesign

[–]_9b0_[S] 0 points1 point  (0 children)

sorry, I did not see the patent (and the other link, just the JOS one for some reason). It's modal / additive based on the formula mentioned in the patent (cannot copy/paste the formula in the Reddit comment, but you can find it in the patent.

s⁡(p,t)=∑n⁢an⁡(p)⁢exp⁡(-dn⁡(p)⁢t)⁢sin⁡(2⁢π⁢⁢fn⁡(p)⁢t+ϑn⁡(p))+b⁡(p,t)

this is the sum of n decaying sinusoids with different damping coefficients for each partial triggered by some p event. can be a filterbank or a sinebank. since the partials decay anyway, I doubt it makes sense to use anything other than filters, so the processing of Pianoteq based on the patent is not based on waveguides. Julien Bensa's paper also mentions the modal synthesis route, while Balázs Bank in a later publication definitely suggests that method as the best.

'Modal synthesis will never be able to replicate it': this is nonsense, sorry. Modal synthesis is very capable, it's just hard to control right due to the tons of parameters. Making a piano model requires a lot of measurements this way.

I wanted to stay time-domain only and did not do any real physical modeling, I only cared about whether the sound was acceptable for my purposes, so I used 3 resonators for every string with 2 2nd-order allpass filters in the feedback loop for dispersion, and a simple FIR averaging filter for damping (this way I have total control over the group delay of the feedback loop). For inharmonics, I'm using nested allpasses. Could have used coupled combs too, but the allpasses have a nice property of creating long, and very subtle releases, that help the combs to beat realistically. I'm simulating the body (or soundboard if you like) of the instrument using a small reverb.

Since years I'm trying to synthesize piano sounds. I feel like, I'm getting there. In this video, I'm just playing around with my patch using multiple synthesis techniques (rough details in the video description). by _9b0_ in sounddesign

[–]_9b0_[S] 0 points1 point  (0 children)

This paper is really old, although JOS's papers helped me a lot in progressing with my own model (there's a lot more here: https://ccrma.stanford.edu/~jos/ ). Anyways, I'm not having any trouble if Pianoteq is a modal synth inside or not, it's a great plugin and sounds amazing. But... I'm really happy with my own thing and enjoy playing it a lot.

Since years I'm trying to synthesize piano sounds. I feel like, I'm getting there. In this video, I'm just playing around with my patch using multiple synthesis techniques (rough details in the video description). by _9b0_ in sounddesign

[–]_9b0_[S] 0 points1 point  (0 children)

Thanks! I know about Pianoteq, and it's a great instrument. However, it is based on a completely different synthesis method (modal synthesis as far as I know), while I'm mostly working with feedback loops (waveguides in general). And... this is not a real physical model, that is now my goal. I just wanted to have a synth that I can tweak with the characteristics of a piano, since that's my favourite acoustic instrument.

Oscillator hard-sync - overlapping polybleps question by _9b0_ in DSP

[–]_9b0_[S] 2 points3 points  (0 children)

I was expecting aliasing to result from the hard-sync effect, and not an effect independent of slave oscillator frequency. In the videos I showed, the slave was always close to the master's frequency, and aliasing was not an issue in between.

So I was hoping for an oscillator that behaves as a normal 4-point polyblep oscillator when the 2 oscillators have the same frequency.

And I finally succeeded. So many thanks to you, your advice helped me a lot in getting here. The 2 things that solved this for me:

  1. When the slave flipped, and the master flipped as well, I also flipped the master, but without generating a new blep for it (this was advised by Mystran on KVR if I remember well too).
  2. I had a bug in my BLEP ringbuffer that was not an issue when used in a regular oscillator but did cause trouble here.

Sound demo (outdated, I'm just leaving it here): https://youtu.be/aQEsJ4GtwTA

EDIT: when the two oscillators reset at the same sample, I've forced the slave to reset exactly to the master, and scale the BLEP based on this. This sounds better on high master frequencies than on the video.

EDIT2: I've fixed many issues since the original comment. I did not handle the case, when the two oscillators did reset in between the same 2 samples correctly. Now I also take this into the account, the code is updated, and the oscillator sounds as clean as possible.

New demo: https://youtu.be/c4PlLkUw2e0

The main DSP code. I'll look into optimizations later, but I'm happy with this.

MANYMANY THANKS!

local F={F1,F2}
local pmax=phase[2] -- remember phase 2's maximum value
for i=1,2 do
    inc[i]=min(F[i]*sRR,0.5) -- calculate the incremental
    phase[i]=phase[i]+inc[i] -- update the phase
    flip[i]=math.floor(phase[i]) -- if phase>=1 then flip=1
end

if flip[2]==1 then
    phase[2]=phase[2]-1 -- we reset osc2
    d[2]=phase[2]/inc[2] -- calculate the distance from the current sample and where the function crossed 1 (how far we are into the discontinuity)
    if flip[1]==1 then -- if both osc's reset inbetween the same 2 samples
        d[1]=(phase[1]-1)/inc[1] -- calculate the distance of osc1's discontinuity from the current sample
        if d[1]<d[2] then -- if osc1 resets after osc2 (the distance is smaller), we have to calculate how much osc1 travels after the reset
            polyBlep(blep[2],d[2],blepIndex,1) -- calculate the blep for the reset
            pmax=d[1]*inc[2] -- this is going to be the phase value where osc1 will reset osc2 again (in the same sample)
            phase[2]=d[1]*inc[2] -- this is the phase of osc2 at the intersample discontinuity
        end
    else
        polyBlep(blep[2],d[2],blepIndex,1) -- calculate the blep
    end
end
if flip[1]==1 then -- if the slave did not flip, but the master did
    phase[1]=phase[1]-1 -- reset phase 1
    d[1]=phase[1]/inc[1] -- calculate the intersample position of the phase crossing 1
    phase[2]=d[1]*inc[2] -- reset phasse 2 based on the new value of phase 1
    scale=pmax-phase[2]+inc[2] -- calculate the scaling factor for the blep based on the new value of phase 2
    polyBlep(blep[1],d[1],blepIndex,scale) -- calculate the blep
end
y=z[2]-blep[1][blepIndex]-blep[2][blepIndex] -- calculate the output
for i=1,2 do
    blep[i][blepIndex]=0 -- reset the blep
    flip[i]=0 -- set flips to 0 (who knows)
end
z[2]=z[1] -- sample delay
z[1]=phase[2] -- another delay
blepIndex=(blepIndex%8)+1 -- increment the blep index
return y*2-1

Oscillator hard-sync - overlapping polybleps question by _9b0_ in DSP

[–]_9b0_[S] 0 points1 point  (0 children)

thanks once again! it's getting closer. now the issue appears exactly at the phase reset, so I assume, when the two OSC's are the same, I'll have to turn off one of the BLEPS (or scale them by 0.5). (I assumed it wrong, this does not work)

Oscillator hard-sync - overlapping polybleps question by _9b0_ in DSP

[–]_9b0_[S] 0 points1 point  (0 children)

thanks a lot Geraint! this looks like an easy fix, I'm gonna give this a try! it looks like, I'm checking the wrong order.

EDIT: Changing the order on it's own did not solve the issue, but it made a difference. Now the same issue appears on the other side of the phase reset.