Sinewave Primer .sf2 file ( fluidsynth)

#1

Putting a 1KHz sinewave test tone into the .sf2 namespace of the zynthian.

Audacity seems like a good starting point altho’ I wish it was available as an Android app (Anyone got any good alternatives?)

  • So we use the Generate Tome to make a 1KHz test tone which will be in mono.
  • Select one cycle of sine wave. and copy it
  • Tracks/New Stereo Track.
  • Paste
  • Delete original mono track (just to be neat)
  • Think of a name and a place to store it
  • File / Export to WAV ( fill in a bit of Meta Data, it helps)

So this gets you a 48000Hz stereo sine wave cycle.

1 Like
#2

Next we need to make up the .sf2 bundle that fluidsynth uses . . .

For that we use a wonderful tool called Polyphone

Select Samples

Lots of good stuff here. . . . 60 the default MIDI note, you shouls be able to preview it and lots of reasones for putting in excess high end if you intend to run it all through a synth filter later in the process. . .

Right Clock on Samples
Select New Sample
Choose WAV file you exported in the Audacity section.

This should give you …

and when yo select only one of the samples . … .

1 Like
#3

But we need a bit of object building…

Instruments and Presets.

Now go back and multiple select the samples in the samples section and bind them to the newly created instrument.

#4

And you start to see the power that the .sf2 format starts to bring to the sampler device . . . .

#5

And finally we get to presets . . . .

THese are best illistrated by pulling in the Fluid3_GM.sf2 file which will probably be pretty familiar if you’ve used Fluidsynth on a zynth . . . Dig around see how it’s done . . .

Perhaps now it’s obvious why it can take a while to load a soundfont file. If live PRELOAD IT !!! :smiley:

So we make a new preset for our humble sine wave cycle . . .

by right clicking on Presets …

and then we bind the instrument to the preset. . . .

So finally we can save our newly created .sf2 file . . .

1 Like
#6

And now we can actually add it to our zynth in the webconf . . . . …

Now select the sf2 folder. this will bring up the upload dialog.

and after selecting out .sf2 file . .

image

and it’s there!!

1 Like
#7

and there it is . . . .

image

The Filename of the .sf2 file appears in the menu . . .

Press a key and you should here a sinewave pitched by your MIDI keyboard . . . .

Isn’t that a lot for free…?
But just one thing . .
So how do we know which note is 1000Hz as we want for our test tone…?

And more importantly how do we know it’s right…?

#8

B5 is 987.77|
C6 is 1046.50

Finetuning via MIDI-Setting

#9

and why do you want 1000 and not 440?

#10

Because I was trained by the BBC (god bless er…) and we did all audio alignment against a 1Khz tone. It was probably a better tone for audio quality rather than musical pitch as it sat closer to the centre of the A weighted (human voice like) than 440Hz did. Or at least that’s what I was taught in conditions that were straight out of an English public school . . :smiley:

#11

you won’t get a pure 1khz because we only have full Herz tuning.
B5 at 446 is 1001.24

880 is higher than 440 :slight_smile:

#12

so the next thing I’m trying is Audacity 1Khz tone and zynth tone and look for beats !!!

Now this is why we do test tones… :smiley: and what do I tell My Violin playing friend who tunes off an oboe at 442Hz…?

IT all gets VERY Confusing :smiley:

#13

my zynthians are tuned to 442 as well, because I play them in an orchestra…

#14

And of course you get velocity dynamics as well. …!!

So now I’m looking for an absolute 1Khz test tone cos I’m not trusting anything digital (including Audacity) in all this!!!

Ideally we want to be able to do an invert and add and look for nothing to confirm a successful test. . . .

I’ll try the mix within the Nord modular as this probably has the most precise timing environment of any kit I have.

#15

why not something like https://x42-plugins.com/x42/x42-testsignal in jalv?

1 Like
#16

Well done! But… a single oscillator no-mods no-effects patch in helm was not enough? :smiley:

image

And it should be almost as easy on ZynAddSubFX, except that I hate its UI :sob:

#17

Hello @wyleu Chris,

what about some MOD-UI plugins like swh analogueOsc, swh sinCos,swh fmOsc, CAPS sin, MDA TestTone, InvadaTesttones…

Rename the topic and some info in your posts and you have a primer about building your own soundfonts with polyphone and importing into zynthian.
Posting a link on the wiki and on sf related mailing lists/ other forae might be of interest for the polyphone user folks. We might get someone interested in zynthian as well.

Thank you anyway for this nice attribution to soundfont creation.
God bless you, Marius

1 Like
#18

Well I’d like to produce something for as many engines as we support to allow us to ensure that each engine produces similar levels under similar conditions.
There is an element of automated testing here and the ability to confirm a particular engine is producing a recognised signal is a good starting point. We have a powerful system and the ability to ‘tame’ so many different engines and present them in as generic fashion as we can will help the overall project.

the name is basically a generic that can be applied to any engine with the sinewave part allowing each engine implementation to be grouped togeter.

1 Like
#19

Bloody TV boys! We radio bods use 900Hz. We know about audio :yum:.

#20

I think we may have here an explanation for quite how the Music disaster at
1.36 might have occurred…

. . .https://www.youtube.com/watch?v=_wSBC5Dyds8&t=25s

This IS the sort of thing that inconsiderate setting up of broadly non commercial broadcasting can lead to . . . .

You have been warned.