Code Monkey home page Code Monkey logo

Comments (16)

jpcima avatar jpcima commented on May 10, 2024 1

Below are measurements of the disto effect for depth=0 (default) to depth=100.
This is an amplitude transfer function. (with X input signal and Y the output)

It can be seen the function is symmetric but it works like a schmitt trigger.
When the function goes over ±3/4 amplitude, it switches to the other curve.
The steepness of this curve is varied by disto_depth.

Also there's a spiral effect at the start, which may have something to do with filtering part of this effect. (disto_tone 0-100)

dataset.zip

default
depth=0
depth=25
depth=50
depth=75
depth=100

from sfizz.

jpcima avatar jpcima commented on May 10, 2024 1

I attach the disto curves, cleaned and both parts separated, to use it for curve fitting.
Link of model to use: https://en.wikipedia.org/wiki/Generalised_logistic_function

disto-separated.tar.gz

from sfizz.

jpcima avatar jpcima commented on May 10, 2024

Add image: Bitred reference vs Oversampling 2x
bitred2x

from sfizz.

jpcima avatar jpcima commented on May 10, 2024

Regarding the strings effect, see
Simulation of piano sustain-pedal effect by parallel second-order filters

from sfizz.

paulfd avatar paulfd commented on May 10, 2024

For the Gibbs type effect on these, and also for LFOs synthesis, I recall something I studied at one point from this article right here. Searching back for it I found a master's thesis which might be more pedagogical in the approach. The required polynomials could possibly be tabulated.

I'll cross-post this in the LFO discussion.

from sfizz.

jpcima avatar jpcima commented on May 10, 2024

It seems another instance of the same processes used in music DSP, expressed in different ways.
(you know, the usual 😁)
I list you a few refs that are oriented towards this problem.
Minimum phase band limited step
Polynomial band limited step
Band limited ramp

I've also posted a plugin that contain some slightly improved implementations of these effects.
(has a basic step function and oversampling)
https://gitlab.com/jpcima/bitcrusher

from sfizz.

jpcima avatar jpcima commented on May 10, 2024

To elaborate on this matter of bitcrushing/lofi effects:

Anti-aliasing is not critical in these effects, they are a part of the tone. I have it, Cakewalk has it also.
The thing is that antialising behavior is not controlled in such a way that both of effects match, you can hear a very evident tone difference between both, despite the waves more or less matching visually on the scope.

For now, the "big boss" of effects is the strings one.
It'll be nice if RGC can provide info of what this one really is.

I suspect it to be in fact a convolution with a fixed IR signal. As I tested it on simple signals, the parameter strings_number did not seem to affect anything. The piano paper above links a webpage with a IR file of Steinway piano.
http://research.spa.aalto.fi/publications/papers/dafx08-pedal/

(on this topic, there exist also an IR convolver effect in the lot, that accepts a sound file.)

from sfizz.

jpcima avatar jpcima commented on May 10, 2024

The strings effect is a sympathetic string resonator.

To make it, one has to instantiate N waveguide string oscillators in parallel.
It's physical models which are tuned starting at the note C1 and up from there.
There are as many of them as the opcode strings_number indicates, 36 being typical.
strings_wet_onccN (0-100) sets the strength of resonance.

The dry signal is fed as excitation signal into the waveguide oscillator bank to make them generate, and then outputs are summed with the dry signal.

The harmonics have a more of less strong damping, so the input must not be applied equally, it must have its gain adapted by harmonic.
Secondly, a sound should only strongly resonate with other strings which are harmonically related to its fundamental.

Jaffe 1983
Smith 1993

from sfizz.

paulfd avatar paulfd commented on May 10, 2024

I guess this is closed by #84 or do you want to keep it to track additional effects?
This string resonator sounds interesting.

The harmonics have a more of less strong damping, so the input must not be applied equally, it must have its gain adapted by harmonic.

If I had to and without checking the state of the art, I would do string resonance by creating a "basis" of resonance for each note in the piano using their reference frequency, interpolate this over frequency, and then use the spectrogram as a impulse to act as a gain on the basis components.

from sfizz.

jpcima avatar jpcima commented on May 10, 2024

do you want to keep it to track additional effects?

Yes.

If I had to and without checking the state of the art, I would do string resonance by creating a "basis" of resonance for each note in the piano using their reference frequency, interpolate this over frequency, and then use the spectrogram as a impulse to act as a gain on the basis components.

It sounds an interesting idea. Do you want to extract this information based on existing piano sample sets?

from sfizz.

alcomposer avatar alcomposer commented on May 10, 2024

srings is very much a piano resonance opcode.

It would be exciting to have in future either a custom_mode for strings or a strings_custom opcode, which would allow setting custom tuned frequencies of multiple waveguides. (To allow Sitar etc sort of resonance)

from sfizz.

jpcima avatar jpcima commented on May 10, 2024

An initial curve fit with 3 parameters. Not too bad for a start.
curvefit.py.gz
curvefit2.py.gz

from sfizz.

jpcima avatar jpcima commented on May 10, 2024

Attaching the current experimental fverb
fverb5.dsp.gz
fverb4.dsp.gz
fverb3.dsp.gz
fverb2.dsp.gz

from sfizz.

jpcima avatar jpcima commented on May 10, 2024

We have 4 new entries recently

  • comp
  • gate
  • disto
  • fverb

@paulfd, feel free examining any of these if you want

Regarding fverb, there remains to do:

from sfizz.

ephemer avatar ephemer commented on May 10, 2024

Hi @jpcima @paulfd, could you elaborate on how these effects are to be used in sfizz?

We are building sfizz as a standalone (non-VST etc.) library and would like to use the same set of (piano) samples in two ways: one with reverb with certain parameters and one without (or with different reverb parameters).

From what I saw in #84 these effects seem to be specified in the sfz file. Is there a way to add/alter them programatically as well via the public C/C++ API? If not, are there any examples you could point me to of how to correctly set up the parameters in the sfz file(s)? (The reverb effect in particular would be extremely useful).

from sfizz.

paulfd avatar paulfd commented on May 10, 2024

Hi, sorry I missed this comment. There is no way to add effects programmatically for now, although the OSC interface might be extended for this (if you feel like it you may do so !).

In an SFZ file, here is a very minimal example adding the fverb effect on the main bus.

<region>
    sample=*sine

<effect> 
    type=fverb
    reverb_input=100
    reverb_dry=100
    reverb_wet=10 

We could probably have better defaults for the reverb, but these will make it sound :) You can consult sfzformat.com for other effects and their opcodes. Right now there are no effect modulation but these will come.

from sfizz.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.