Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

ESQ1 Project

Post any examples or modules that you want to share here

Re: ESQ1 Project

Postby Spogg » Tue Jul 03, 2018 10:34 am

I think I’ve sorted this now and the tuning is perfect!

I was misled by Christian saying that all the waveforms had a MIDI base note of middle C (60), so I used a wave reader that took this into account. This is simply wrong, for the periodic sounds at least.

We can actually ignore the original hardware for periodic sounds (oscillators)!

Take a page size of 256 samples for 1 cycle:
For A=440 the freq 0-1 value is 440/22050 = 0.0199546 (checked against Hz to freq in FS)
Since we have 256 samples, we get the counter step value from 0.0199546 x 256 = 5.1083776 samples per step.

So if we have say 1024 samples the step size for A=440 is 0.0199546 x 1024 = 20.4335104 so the larger waveform is read out with larger steps, which is what the resolution register is all about in the synth.

However, FS itself is running at 44100, and not 22050, so we need to halve the calculated value above to get the correct pitch. If we ignore the MIDI reference it works perfectly with no tuning offset. :D

The tuning offset I found, experimentally, was due to the MIDI note reference and this threw me off the scent.

So I’ve updated my tool to take this into account. I’ve also added a tuner for the fixed sample rate, so I can look into this semitone and fine thing with more confidence now. Once I’ve re-potted my sunflowers of course.

Also I want to look into making the sound more shitty, like the original. :lol:
Maybe there could be a quality selector added…

Cheers

Spogg
Attachments
SQ80 waveform tester dev 20.zip
(728.21 KiB) Downloaded 997 times
User avatar
Spogg
 
Posts: 3358
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England

Re: ESQ1 Project

Postby tulamide » Tue Jul 03, 2018 4:34 pm

Spogg wrote:Also I want to look into making the sound more shitty, like the original. :lol:
Maybe there could be a quality selector added…
Actually it's easier said than done. Well, at least for me. We just need to force Flowstone's streams to use the original rate and bit depth. Since FS works internally with 44.1kHz @ 32 bit, we just need to grab the signal as soon as it enters the polystream and downsample and bit-reduce (similar to a bitcrusher) the signal. Regarding downsampling, KG just discovered a method to do it in realtime with pretty much everything in FS. That could be helpful. The bit-reducing thing is just a matter of some math (in result the range will still be -1 to +1, but the intermediate steps are reduced).

However, please let us wait with all that, until we finally have created multi-sampled waves per ESQ1.
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: ESQ1 Project

Postby k brown » Tue Jul 03, 2018 7:11 pm

I vote for quality selector - yes, yes!
Website for the plugins : http://kbrownsynthplugins.weebly.com/
k brown
 
Posts: 1198
Joined: Tue Aug 16, 2016 7:10 pm
Location: San Francisco, CA USA

Re: ESQ1 Project

Postby ChrisHooker » Wed Jul 04, 2018 4:06 am

Does this help for the SR and Bit-Depth converters?
Attachments
SampleRate and Bit Depth Converters.fsm
(268.87 KiB) Downloaded 992 times
ChrisHooker
 
Posts: 55
Joined: Tue Jul 13, 2010 10:02 pm

Re: ESQ1 Project

Postby Spogg » Wed Jul 04, 2018 8:27 am

ChrisHooker wrote:Does this help for the SR and Bit-Depth converters?


That's great Chris, many thanks. :D

The ESQ-1 used unsigned 8 bit values for the samples. Since we now have 27 sound clips from the original synth's oscillator, each playing 4 different notes, we are in a great position to attempt to replicate that sound. That will need to address sample rate conversion too, as tulamide said, and I think I can hear imperfect de-multiplexing glitches too. This will be caused by using 1 DAC for all 24 oscillators.


Cheers

Spogg
User avatar
Spogg
 
Posts: 3358
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England

Re: ESQ1 Project

Postby Spogg » Wed Jul 04, 2018 2:10 pm

Here are all the waveforms extracted from ROMs 1-4 in WAV format.

The zip includes some important notes and the latest spogged version of the spreadsheet. I’ve added quite a bit to it.

This has taken a long time and a lot of work so far, and I must thank tulamide for everything he contributed.

Any queries or errors please speak up!

I’ve also attached the latest version of my SQ-80 auditioning tool. The main difference is the filter’s cutoff comes from the Reference tuner, and not the WAV indexing player.

Cheers

Spogg
Attachments
Waveforms ROMs 1-4 16 bit mono wavs.zip
(322.92 KiB) Downloaded 984 times
SQ80 waveform tester dev 22.zip
(729.41 KiB) Downloaded 991 times
User avatar
Spogg
 
Posts: 3358
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England

Re: ESQ1 Project

Postby tulamide » Wed Jul 04, 2018 7:05 pm

Wow! Thanks a lot! I have one question regarding your opening sentences in the readme.

All the extracted wavs had no interpolation applied for bit depth, so they retain the quantisation noise of the original. They are in a mono 16 bit 44100Hz format and load into Flowstone ok.
Do you mean you took the binaries and just forced a 16-bit, 44.1kHz header without interpolation of any kind? If so, the material is the real deal, but it is de-tuned against the original by 2.something semitones. This should be kept in mind!

Other than that, I bow deep before your energy. So much manual work and so little help. Bravo.

If they turn out to be true to the original (besides the detune), may I take those and offer them to Rainer Buchty? He might want to put them on his site.
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: ESQ1 Project

Postby tulamide » Thu Jul 05, 2018 9:03 am

I just wanted to point out that the float arrays are 100% pure original. They weren't interpolated or anything. They are the real deal. If you or anybody else has the impression that they sound superior to the ESQ1, the only reason is because of the quality drop in the Youtube video (those videos use lossy compression) and the high quality stream Flowstone provides. The waveform data itself is untouched.

8 bit has a maximum of 256 steps to describe the amplitude. The float arrays still only provide 256 steps. It's just that the number format is interpreted differently. What was 255 before has become 1.0, 128 has become 0.0, 1 has become -1.0, etc.
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: ESQ1 Project

Postby Spogg » Thu Jul 05, 2018 10:01 am

Thanks tulamide!

I didn’t change the sample size but they have to be in 16 bit format for FS to handle. The relative value of every sample is unchanged, (apart from signing) so they still have 256 discrete amplitude steps. We don't need to bitcrush to get the sound right. If you listen to a pure-ish tone on headphones, at lower pitches you can hear the quantisation noise.

Now, I’m puzzled about this alleged tuning error. Now that I’ve got rid of the MIDI note 60 tuning base nonsense, everything seems fine to me. I’ll lay out my thinking:

Let’s say we have a cyclic oscillator waveform with 1024 samples. Forget about bit depth for now. This is directly from the ESQ-1 ROM.

There are 2 ways to create a correctly pitched note of A=440 Hz.

The first method is to step through the whole wave data at a rate of stepping that directly produces the correct frequency, and every sample is read. This is variable sample rate and what you mention in your 100Hz example.

So, to get 440Hz we need a sample "clock" rate of 440 x 1024 = 450560 Hz.
This reads the whole data block 440 times per second. The sample rate has to be adjusted for whatever pitch is called for, so for 220Hz it would be 225280 Hz and so on. This is not what the DOC chip does.

The DOC chip skips samples in the data according to the pitch required, just like the index counter in FlowStone. It does this by manipulating the 24 bit phase accumulator (counter) for the counter step size. There was no interpolation which is partly why it sounds so rough.

For a 1024 waveform, the step size for A=440 will depend on the fixed sample rate in combination with the step-per-sample size.
So in the ESQ-1 we have a fixed sample rate of 1Mhz/26 = 38461.54 Hz to work with.
We still have a data block size for the waveform of 1024 values. To get an accurate 440Hz pitch:
Step size = 440/38461.54 X 1024 = 11.715 and this step size would give us perfect pitch in the ESQ-1.

Of course it will also give us dreadful aliasing, which is what we hear in the sound clips. You can’t step a fraction of a sample without interpolation of some sort.

To sum up, it’s the step size when reading out the samples in combination with the native sample rate of the instrument (or system), along with the file length, that determines the final pitch. A lower fixed sample rate will need bigger steps to be taken through the data, so the pitch remains correct. The ratio of 38461.54 to 44100 is therefore not relevant, since the step sizes will be different.

In my tool all the wavs play perfectly in tune. :D

Of course, if you agree with the above, please give these to Rainer.
One thing I would like you to ask him please, is exactly how to interpret the Semitone shift and Fine tune parameters in the spreadsheet. I thought I’d cracked the semitone thing but it only worked out for two waveforms. I took the hex value for semitones to be a signed 8-bit binary. This gives a range of -127 to 127 semitones. That looks good because it can cover the whole MIDI key number range with 1 byte. It worked for the 2 voice waveforms if I multiplied the value by 2. Maybe we need the resolution data from the WSR values, but if we can find out for sure it’ll be so much easier. The keymapping will then be correct. This is only relevant for the SQ-80 of course, since ROM #1 doesn't specify any tuning offsets, but I’d love to know for myself, to get it as right as possible.

I want to experiment with changing the sample size, so the step size is similar to the ESQ-1. This will either lead nowhere or give a more similar sound to the original. It may not be important to the sound but I don’t know yet until I try.

Cheers

Spogg
User avatar
Spogg
 
Posts: 3358
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England

Re: ESQ1 Project

Postby Spogg » Thu Jul 05, 2018 10:07 am

tulamide wrote:I just wanted to point out that the float arrays are 100% pure original. They weren't interpolated or anything. They are the real deal. If you or anybody else has the impression that they sound superior to the ESQ1, the only reason is because of the quality drop in the Youtube video (those videos use lossy compression) and the high quality stream Flowstone provides. The waveform data itself is untouched.

8 bit has a maximum of 256 steps to describe the amplitude. The float arrays still only provide 256 steps. It's just that the number format is interpreted differently. What was 255 before has become 1.0, 128 has become 0.0, 1 has become -1.0, etc.


This is out of sequence because you made this post while I was making my big one :lol:

I agree the float arrays are the purest form, the real deal for sure, and that's why I wanted them! The WAVs are the common currency for sound files though, so I want them to be as good as possible, for eveyone to use as they wish.

Cheers

Spogg
User avatar
Spogg
 
Posts: 3358
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England

PreviousNext

Return to User Examples

Who is online

Users browsing this forum: No registered users and 58 guests