Beta release for upload .sfz files!

67 views
Skip to first unread message

WVR Audio

unread,
Oct 24, 2022, 2:54:34 AM10/24/22
to WVR Audio
A popular request lately has been to accept xml files such as sf2, sfz, etc.
I have a beta implementation ready to try out. Please feel free to comment here or on the GitHub issue if you have feedback :) Hope it saves some people a whole bunch of time!


So far I have chosen the .sfz file format, and WVR can handle the following OPCODES:

pitch_keycenter,
hivel, 
key, 
lokey, 
hikey, 
loop_mode, 
volume, 
group, 
reverb_wet, 
disto_wet, 
pan, 
loop_start, 
loop_end, 
polyphony_stealing and of course 
sample

it will ignore any region with the tag `trigger` set.

here is the JS file that does the work if anyone is curious

more info in this issue:

Gnuv

unread,
Oct 24, 2022, 7:30:19 AM10/24/22
to WVR Audio
Wonderful ! I will test that soon. The great thing is that it’s going to be compatible with plugins like sforzando and sfizz and we also have the possibility to use Bjoerns Sample Mapper to creates the sfz file.

So, as we now have a parser on the way for sfz format, let me suggest you a compatible solution for round-robin :

The idea is to use 16 <group> headers to identify the 16 voices.
Then, to open the possibility to set the program change of each voices with the opcodes loprog= and hiprog= https://sfzformat.com/opcodes/hiprog

Then, to use the opcodes lorand= and hirand= https://sfzformat.com/opcodes/hirand to set the round-robin :

<group> //Voice 01
loprog=1 hiprog=1
<region> key=72 hirand=0.3 sample=kick_rr1.wav

<group> //Voice 02
loprog=1 hiprog=1
<region> key=72 lorand=0.3 hirand=0.6 sample=kick_rr2.wav

<group> //Voice 03
loprog=1 hiprog=1
<region> key=72 lorand=0.6 sample=kick_rr3.wav

With this solution, we can even have multilayers sounds, each one with his own round-robin (for example an attack sound with two round-robin on voices 1 and 2 and a release sound with three round-robin on voices 3, 4 and 5).

Of course, this could work only if several voices can be played together in you code. If not, a possibility is to put the lorand= and hirand= opcodes on the group and having the same round-robin for all the voices.

WVR Audio

unread,
Oct 24, 2022, 11:27:33 AM10/24/22
to WVR Audio
Yes WVR can play from several voices at once. I love this solution, and I think it would work!
However, I may have found a way to support round-robin without consuming voices.
The JSON library I use (cJSON) does not support streaming the output string, so I have been reserving a huge pool of ram (several MB) for a buffer to transfer out configuration data.
I found a library (ArduinoJSON) that does support streaming, so I should be able to port everything to that library and have access to all that psram, which is fast enough to hold voice config data, and enough space to multiply the number of note handles by 4 or 5, or maybe more. So 4 or 5 or maybe more round-robin layers. I am still not sure how to represent it in the WEB UI, and honestly that may be the hardest part.

WVR Audio

unread,
Oct 24, 2022, 11:29:33 AM10/24/22
to WVR Audio
I didn't notice hiprog/loprog, I will set those up today!

Toma Cristian

unread,
Oct 28, 2022, 2:39:22 PM10/28/22
to WVR Audio
WhatsApp Image 2022-10-28 at 20.35.29 (1).jpeg

WhatsApp Image 2022-10-28 at 20.35.29.jpeg


When I uploaded the sfz file the loop points are not set, what can that be? I posted an image with the sfz file, porbably is the way that file is built or some other issue.

WVR Audio

unread,
Oct 28, 2022, 3:06:42 PM10/28/22
to WVR Audio
To get ASR you need to set loop_mode to loop_sustain.
Then it will look for the loop_start and loop_end, otherwise they just default to 0
If you don't want the release to play, you will have to manually set all the notes to noteoff: HALT in the WEB UI, there isn't a setting in .sfz that I could find, to properly express that mode, or distinguish it. Open to ideas.

Reply all
Reply to author
Forward
0 new messages