Skip to content

SFZ

QuasiUnaFantasia

I will probably get into sfz "stuff" in the coming weeks and months, and while sniffing around just now, a rather active discord server dedicated to sfz revealed itself to me. If anyone else feels like getting into that, here the link, as I found it, is:

https://discord.gg/t7nrZ6d

There is of course also the sfz web site (where I found the link to the discord server):

https://sfzformat.com/


dore_m

I was just on that server asking for the GUI sdk. If you need help let me know.


QuasiUnaFantasia

Okay, I'm already taking you up on that. 😀

I'm studying your Fazioli Audience.sfz file, and one thing is catching my attention, leaving me with a couple of questions.

You have this block:

//--------------------------------
<group> //DM87 Pedal Up p samples
//--------------------------------

volume=4

//Below are the Envelope parameters (.005sec attack fade in, release fadeout...)

// Velocity Range - change lovel and hivel number to change velocity layer threshold

lovel=1 hivel=39 amp_velcurve_1=.48 amp_velcurve_39=.87

Does this mean that MIDI level 1 is played at 48% of the maximum amplitude found in the wav-file, with MIDI level 39 played at 87% of the maximum amplitude, and intermediate MIDI levels are interpolated between these two?

If so, why are the wav-files not normalized (to maximum dynamic extent) prior to use (in which case the percentages would be relative to maximum amplitude possible)?


dore_m

QuasiUnaFantasia Does this mean that MIDI level 1 is played at 48% of the maximum amplitude found in the wav-file, with MIDI level 39 played at 87% of the maximum amplitude, and intermediate MIDI levels are interpolated between these two?

If so, why are the wav-files not normalized (to maximum dynamic extent) prior to use (in which case the percentages would be relative to maximum amplitude possible)?

I profess to be an expert, but I am not.... I usually have to tweak these numbers with a quick experiment to verify. But I think you are correct.

That's an excellent question, and it's been suggested that I do that - normalize all samples and then re-velocity map the relative volumes. You could definitely argue that I SHOULD do that, and maybe I've just kept up old habits. The Soundfont editor Polyphone, I believe, does this.

Anyway, my workflow is like this - I first make the instrument in Kontakt, which has all of the controls of SFZ, but is much easier to tweak with GUI tools. Then, I use those parameters to create the SFZ file after I feel it's finished. So, the lovel=1 hivel=39 numbers come directly from what I've done in the graphical editor in Kontakt. I admit that I've gotten lazier in subsequent libraries and the SFZ files are pretty much the same between Yamaha and Steinway. I ran a test last night, and I could definitely smooth out the velocities more. You know, 90% more work for 10% better performance.

I record all of the velocities/volumes without changing microphone gains so I can get a real dynamic range recorded. I then use those signals without making any changes really to preserve that dynamic range. I suppose I could clone those files, normalize, and then re-adjust according to the original files. This could make for a more consistent instrument. However, I don't think the commercial libraries do this, as I've experimented with recording the same velocity on a number of notes with Garritan and Noire, and the note volumes are all over the place at one velocity.

Sorry for the long answer. Maybe I'm not up to reprocessing all of the files to compare both methods, or I'm just stubborn. Wait - There is a way for me to try the difference - and you can try too if you like. The reason I mentioned Polyphone earlier is that

https://sites.google.com/site/soundfonts4u/

hosts "remixed" versions of my pianos that have been processed like I've been discussing. As I recall, I don't particularly like these sf versions - not because they're not good, but because they don't feel like the real instrument. Since I'm the only one who actually has played the real instruments, I'm the only one who cares - so don't take my opinion. However, you can compare the differences in "normalization" philosophies if you like.


QuasiUnaFantasia

dore_m Sorry for the long answer.

Thank you for that clear and detailed answer; I am trying to learn, so this kind of verbosity is most welcome.

All of this brings back an issue that has been discussed here, and on PW recently, about the lack of "playability" in virtual instruments relative to digital piano's. I suppose some of it could be due to increased latency in VI's, but I am speculating that mismatches between velocity curves and digital piano actions is behind a lot of it.

I feel this myself all the time, because the Roland FP-30, which I use, never works well with any VI out of the box. Instead I have to mess with the velocity curve to get it "right".

One question that I ask myself is "how loud is a sound really?" Clearly, how loud a piano sound is must be related to which MIDI level it is associated with. But how do you measure loudness? I can think of many quite different ways, and none of them leaps out at me as the obvious best one. I think this is something that will play in the back of my mind for some time to come. My gut feeling is that there must exist some way to easily tune the velocity curve to the player/action. Pianoteq has made a stab at this, and not a good one, if you ask me.


dore_m

QuasiUnaFantasia I am trying to learn, so this kind of verbosity is most welcome.

Anyone I can get into this hobby and have a nice discussion with is welcome. Helping each other get better at it is really the fun in doing it.

QuasiUnaFantasia I am speculating that mismatches between velocity curves and digital piano actions is behind a lot of it.

Probably true. It takes some patience to tune your velocity curve. You can do it by feel and by ear, or you could use some tools. Think of it this way - there are 3 (AFAIK) variables here -

  1. The VST manufacturer's programmed default velocity vs loudness/brightness
  2. Your KB actions output of the MIDI velocities
  3. Your personal feel about what sounds and feels like p, mp, mf, f, etc.

The first is really easy to characterize and even compare - I was doing it a bit last night - just make a midi file of one note with increasing velocities, render it, and look at the waveforms. Does your favorite VST increase linearly? Is it different than another VST?

I guess for number two and three, you could record yourself playing at what you feel is mf, or p, pp and see what those actual velocities are (possibly averaged). An expert MIDI app could be made to do this, and then auto-create a velocity curve, theoretically.

Just some thoughts.


dore_m

Again, tonight I'm playing around with the velocities as I mentioned in my last post. Here are some screen shots to illustrate my point. One note, velocity increasing by 4 steps/note. Black spots (near the top of the graph) are upper frequencies that have been cut out for noise reduction.

Noire:

Pretty gradual increase in volume, color is brightening fairly uniformly. Any discontinuity probably represents a velocity layer change that is not blended well.

My Fazioli (I've been optimizing):

You can see the black spots at the top - just ignore the noise reduction. You can see my gradual increases, even with 5 layers is really good. So playability should be approaching commercial vst's, maybe equal or better.

My Steinway B:

You can see my newest library can use some work. Not only are the colors (representing timbre/brightness) is discontinuous, but the volumes (wave form amplitude increases) are discontinuous too, especially in lower and middle range.

Pianoteq 8:

It's pretty much perfect. The reason you see any issues is because I did not quantize my notes and the note lengths are not consistent.

@Rhodes74 , that's a partial explanation of why the number of velocity layers don't matter as you mentioned on PW.


dore_m

not to beat a dead horse, but here's Spitfire Audio's Janglebox piano (a $30 VST) that I won because of my PB contributions:

It's good for a character sound, but for piano playing, well, 'nuff said...

My VSL 30 demo license expired - when I activate another one, I'll post it, unless someone else wants to volunteer a wav/mp3 file - again - velocities increasing 4,8,12, 16,20, etc. Second C from the lowest. Post the wav/mp3 and I'll post the spectral analysis.


vagfilm

Very interesting comparison (as always). Can you post your .mid file (I can create a new one, but the timings would be different)?
Btw, I am sure you mentioned this already but what do you use for these spectra? Izotope?


QuasiUnaFantasia

dore_m Just to make sure I understand the diagrams correctly: the blue is the wave itself, and the golden stuff is a representation of the power spectrum with higher frequencies at the top, and lower frequencies at the bottom?


vagfilm

QuasiUnaFantasia
Note @dore_m here, but you are correct. The pair of diagrams are the stereo channels (not really needed for this general velocity). Sudden changes in the pattern of golden horizontal stripes indicate sudden changes in timbre, while the blue peaks indicate amplitude/volume of the note.


Frédéric L

QuasiUnaFantasia One question that I ask myself is "how loud is a sound really?" Clearly, how loud a piano sound is must be related to which MIDI level it is associated with. But how do you measure loudness?

The MIDI specifications doesn’t propose a precise mapping between velocity (on a 1-127 scale) and the loudness. Then, no two virtual pianos behave the same. This explains that the VPC1 controller has some preset for 4 VST and a curve you can tweak to adjust to your VST. And many VST has also a curve which can be tuned to fut a given controller.

There are several loudness scale about digital signal : dBFS, LUFS. But only the relative loudness is important (dB between velocity 64 and velocity 96 for example). A louder VST can have its loudness normalised with the volume knob of the audio interface. Note also that the velocity control the loudness, but also the color/brightness of the sound. A loud note on a piano will involved more deeper hammer felt then will be brighter (then a single sample per note is not adequate).


Rhodes74

dore_m @Rhodes74 , that's a partial explanation of why the number of velocity layers don't matter as you mentioned on PW.

Et voilá, i knew you were hooked!
Btw, did you calibrate the signals with some headroom? The partial white-outs at low freq/ high volume appear to indicate a saturation. But maybe i am misinterpreting…

-Rhodes74


dore_m

QuasiUnaFantasia dore_m Just to make sure I understand the diagrams correctly: the blue is the wave itself, and the golden stuff is a representation of the power spectrum with higher frequencies at the top, and lower frequencies at the bottom?

As @vagfilm said... Yes. Note I used a low note in this comparison, and it should be understood that the upper notes are more difficult to blend. Also, often you can hear the changes that are more difficult to see in these plots. Suffice to say that if you see it in the plots you will hear it. But sometimes you hear what you don't see immediately.


dore_m

Rhodes74 Btw, did you calibrate the signals with some headroom? The partial white-outs at low freq/ high volume appear to indicate a saturation. But maybe i am misinterpreting…

That's a great point, and should definitely stay aware of that. I set up the mics with one gain and do all of the sampling with that gain so I can determine the entire dynamic range of the piano. If you record a live band, with unpredictable transients, you need to record with alot of headroom so you don't clip. But with a single piano key, you only need to make sure you don't clip at fff/pedal down across the keyboard. (I think I'm doing it right, please comment further if something sounds wrong).

The brightness on the plot is just a random contrast setting that I used, so it might be deceiving.

You can also see at the end (right side) of the Fazioli Plot, my Fazioli doesn't have damper sound releases (it's all dark). I can't wait to get back to that beast to record them. I swear, it won't take more than 2 minutes to record (but maybe 20 min to set up).


dore_m

vagfilm Very interesting comparison (as always). Can you post your .mid file (I can create a new one, but the timings would be different)?
Btw, I am sure you mentioned this already but what do you use for these spectra? Izotope?

Sorry, I should have thought of that myself - it was getting late.

I use Izotope RX7. But for the spectral analysis and waveform view, you can just do it in Reaper for free (demo license). You just drag the wave file onto a track, highlight it, right click and hit spectral edit/show spectrogram. Not as pretty, and you can't edit the sound as easily as RX7.

vel-increase.mid
326B

vagfilm

dore_m you can just do it in Reaper for free (demo license).

Dore, the Reaper Wizard... No idea that Reaper could do that... Very helpful.


dore_m

vagfilm Dore, the Reaper Wizard... No idea that Reaper could do that... Very helpful.

oh, hopefully that midi file was playing the correct C (second from lowest). Just made a midi output of what was left on my screen, and last night I was moving the note around to see how well the velocity increases were in different parts of the KB. In any case, if it's wrong, either let me know or just transpose to the correct note.


vagfilm

This is the amplitude and frequency plot for VSL Steinway D274 (I was unable to get both traces superimposed, and my spectrogram seems more blurred than yours. And I could not find any setting for spectral analysis in the Preferences). Anyway, for my untrained eyes, both the amplitude and timbre look to have a very smooth progression (with Steinway's unbridled low frequency dominance...)


dore_m

@vagfilm Post me a wave or mp3 file and I can make a iZotope plot. I'm interested at seeing the vel curve compared to my other plots.


Next Page »