Incorrect timing of envelope?

Post your sforzando questions here

Moderators: eric_telemaque, davidv

jschultz
Posts: 5
Joined: Wed Oct 26, 2016 7:24 pm

Incorrect timing of envelope?

Postby jschultz » Thu Oct 27, 2016 11:21 am

Hi,
I am developing my own simplistic sfz parser for importing sfz files into an existing program, and use sforzando to cross-check my interpretation of the "standard".
I noticed some behavioural differences between the original sfz plugin and sforzando, where sfz's behaviour seems to be closer to what the Cakewalk documentation suggests. So this could be a bug in sforzando, or a misunderstanding on both my side and sfz's. Consider the following example from the original test suite:

Code: Select all

<region>
sample=440.ogg
loopstart=12629 loopend=56728 loopmode=loop_continuous
pitcheg_decay=1 pitcheg_sustain=0 pitcheg_depth=1200

In sfz (and my own importer), you can hear a sample sliding down one octave for exactly one second, as "pitcheg_decay=1" suggests. In sforzando, this slide happens in the fraction of a second. Why? The same happens with the other envelope types as well.

davidv
Site Admin
Posts: 1567
Joined: Tue Mar 02, 2004 7:23 pm
Contact:

Re: Incorrect timing of envelope?

Postby davidv » Thu Oct 27, 2016 1:15 pm

The perceived timing difference is due to the exp curve thats used in our EGs by default.

If you try this in sforzando, you should get a 1 second pitch dip.

Code: Select all

<region>
sample=*sine
pitcheg_decay=1
pitcheg_decay_shape=0.5
pitcheg_depth=2400
pitcheg_sustain=0


Its been a long while since I tried sfz.dll vs dimension and drop zone (which were SFZ 2.0), so I do not recall if i noticed the pitcheg's seemingly linear maths in the decay stage. That sort of issue (changing the curve calculations under the hood depending on the target) is really bad for a spec, hence why we all work with SFZ 2.x's numbered eg's instead. (which have somewhat more of a standardized behaviour)
David Viens,
Plogue Art et Technologie Inc. Montreal.
http://www.plogue.com

jschultz
Posts: 5
Joined: Wed Oct 26, 2016 7:24 pm

Re: Incorrect timing of envelope?

Postby jschultz » Thu Oct 27, 2016 3:57 pm

Is there a documentation of the *_decay_shape parameter? I suppose it also exists for other stages of the envelope?

davidv
Site Admin
Posts: 1567
Joined: Tue Mar 02, 2004 7:23 pm
Contact:

Re: Incorrect timing of envelope?

Postby davidv » Thu Oct 27, 2016 5:22 pm

jschultz wrote:Is there a documentation of the *_decay_shape parameter? I suppose it also exists for other stages of the envelope?


_shape maths are implementation dependent I'm afraid.
Dimension Pro/Drop Zone docs and SFZ2 books never explained the maths behind the EG curves.
So we did our own maths, so that wont help you much.

See curvatures here:
http://plogue.com/phpBB3/viewtopic.php?f=14&t=4389
David Viens,

Plogue Art et Technologie Inc. Montreal.

http://www.plogue.com

jschultz
Posts: 5
Joined: Wed Oct 26, 2016 7:24 pm

Re: Incorrect timing of envelope?

Postby jschultz » Thu Oct 27, 2016 5:54 pm

Thanks, I guess I will just ignore that mess in my importer then...

By the way, the link on http://ariaengine.com/overview/sfz-format/ to the Cakewalk forums is dead. It should be replaced by a link to the web archive version: https://web.archive.org/web/20141109193 ... px?aid=108

Sadly sfz really doesn't seem to be the "open and non-proprietary" it once (cl)aimed to be. I am barely scratching the surface of existing opcodes and there are already so many questions, starting from a formal definition of the syntax (especially because of such things as spaces in filenames, or #defines) to questions how to interpret parameters. Do you know if any effort was ever done in that direction to formalize the format and find a consensus between manufacturers? I know it's a pipe dream but having some specification on the level of the SF2 specs or similar would be great, and sfzformat.com is certainly a step into the right direction. It's really not good for the format that information is scattered over so many different places or has to be obtained through a semi-expensive book.

pljones
Posts: 100
Joined: Wed Oct 15, 2014 2:05 pm

Re: Incorrect timing of envelope?

Postby pljones » Fri Oct 28, 2016 1:16 am

René's definition of "open and non-proprietary" was pretty much "implementation-dependent behaviour". It's the same with handing MIDI events, of course (I do not mean GM) -- they're just events that devices are free to respond to however they wish.

jschultz
Posts: 5
Joined: Wed Oct 26, 2016 7:24 pm

Re: Incorrect timing of envelope?

Postby jschultz » Fri Oct 28, 2016 7:36 am

It's the same with handing MIDI events, of course (I do not mean GM) -- they're just events that devices are free to respond to however they wish.

It's on a different level though - if you look at MIDI CCs, well, they are just numbers, without a name (until GM comes into play, as you say). But if you look at sfz opcodes, they have descriptive names, clearly telling their purpose. They are so clear that their behaviour should not be up for discussion. Most of the time this is given (by things like "volume in dB", "tuning in cents", etc.). This is probably all but a new idea but if there is going to be a potential SFZ 3.0, then maybe some effort could be put into it by the "biggest players" (Cakewalk, Plogue, linuxsampler developers?) to agree on some interpretations and standardisations?

davidv
Site Admin
Posts: 1567
Joined: Tue Mar 02, 2004 7:23 pm
Contact:

Re: Incorrect timing of envelope?

Postby davidv » Fri Oct 28, 2016 8:53 am

jschultz wrote: "biggest players" (Cakewalk, Plogue, linuxsampler developers?) to agree on some interpretations and standardisations?


Without getting into too much NDA/political land, I can just say that I've tried to make this happen more times than I can count. In the long term, I really hope 3.0 becomes a reality. A well written spec.
David Viens,

Plogue Art et Technologie Inc. Montreal.

http://www.plogue.com

jschultz
Posts: 5
Joined: Wed Oct 26, 2016 7:24 pm

Re: Incorrect timing of envelope?

Postby jschultz » Fri Oct 28, 2016 9:52 am

Thanks, I really appreciate your efforts. Good luck for 3.0. :)


Return to “sforzando”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest