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

Help needed for Ensoniq's Digital Oscillator Chip (DOC)

For general discussion related FlowStone

Re: Help needed for Ensoniq's Digital Oscillator Chip (DOC)

Postby tulamide » Tue Jun 26, 2018 12:20 pm

Indeed, the raw files come with background noise due to 8-bit encoding. I converted the raw file using Wavosaur and resampling from (1MHz/26) to 44100kHz with linear interpolation and bit-depth from unsigned 8-bit to 16-bit with no dithering.

I tested other options, but anything other than linear interpolation introduces noise at the end (the last 3 samples to be exact), and dithering would falsify the original harsh and digital sound.

I was considering doing the conversion with my tool as well, using the float array resample prim, but that would take me a lot more time to program. But maybe I'll do it later. Also, I'm not sure how to use the prim for best results.

original - 512 bytes @(1MHz/26) [~38461.538461538461538461538461538 Hz]
convert to float - 2048 bytes @(1MHz/26) [~38461.538461538461538461538461538 Hz]
resample to 44.1kHz - 512 samples to 587.0592 [ :shock: There always is only an integer number of samples in Flowstone, so what to do? Just taking 587? And excepting a slightly out of tune waveform?
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2687
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Help needed for Ensoniq's Digital Oscillator Chip (DOC)

Postby Spogg » Tue Jun 26, 2018 5:14 pm

Fascinating!

Here’s a few thoughts:

The original instrument was never pitch perfect. This was due to the resolution of the phase accumulator combined with the resolution switching. I calculate from your example that the maximum pitch error, assuming you chop off the last fractional value, will be no more than 4 cents, which is barely noticeable.

I investigated this when I was making the Wavemaker 4, since the same issue arose with fractional sample lengths. I was satisfied that it didn’t matter, by carefully listening and comparing with perfect pitches. There was a minimum of beating and at higher frequencies (where the chopped-off sample was a bigger proportion of the wave) the result still sounded ok to me.

Also, very slight tuning errors are characteristic of analogue synths. My ASS does this. My guess is this is part of the reason folk liked the analogue preset sounds on the original ESQ-1; that and the “real” filters of course.

What really matters most, in my view, is that the shape is correct and glitch-free. So I wouldn’t worry about the exact “base” pitch.
If you can supply the waveforms as Float Arrays, signed but in their original size, 256, 512, 1024 etc. (no resampling) and with byte values between -1 and 1 max, we can simply read out the values in Flowstone, using linear interpolation, to get the pitch we need. The pointer in the counter is simply incremented by (freq 0-1 value) x (file size in samples) and we need do no more.

Now here’s another approach: The Wavetable create prim takes a wave as a Float Array and does the conversion for you. The float array has to be a power of 2 samples, and we already have that format (Yay!!). As you know, this creates a whole table of progressively band limited waves. Now I know we have to use keymapping regions for the synth, but there’s no reason why we can’t do this with the wavetables system. The drawback with this method is for very large waveforms. It only behaves well for waves up to 2048 samples as I found out some time ago. Any more and it sounds horrible. I found that, for me, 1024 is the sweet spot for performance Vs. quality.

If I had to choose one approach, and not mix them up based on file size, I would go for supplying the waveforms as Float Arrays, and then we can experiment and find the optimum method of using them. I would personally just want the Float arrays, in original sizes, and I’d be a happy boy.


I’ve rambled on a bit but I hope this helps.

Cheers

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

Re: Help needed for Ensoniq's Digital Oscillator Chip (DOC)

Postby tulamide » Tue Jun 26, 2018 6:11 pm

A lot to read, and interesting facts!

I could create a binary format of headerless float values in the range -1 to +1, but this
Spogg wrote:If you can supply the waveforms as Float Arrays, signed but in their original size, 256, 512, 1024 etc. (no resampling) and with byte values between -1 and 1 max, we can simply read out the values in Flowstone, using linear interpolation, to get the pitch we need. The pointer in the counter is simply incremented by (freq 0-1 value) x (file size in samples) and we need do no more.

is either a typo, or you have misunderstood data formats. A float is a 32 bit data format (=4 bytes per sample), while the original is an 8 bit data format (= 1 byte). There is no such thing as an 8 bit float. Only the number of samples stays the same, the byte length increases by the factor 4. So, a 256 byte waveform consists of 256 samples in the original. Converted to float it will be a 1024 byte waveform, but still with 256 samples.

Also, once again, the wavetables. A wavetable is a collection of 128 (?) waveforms, one of them automatically chosen to be played for a certain midi key (= frequency). ESQ1 works with self-made wavetables of varying sizes (up to 6 waveforms, not 128). Those are the ones I just extracted. So, how will you use Flowstone's wavetable automatism, but make sure, that (for example) pulse.1, pulse.2, pulse.3 and pulse.4 are part of that wavetable and in exactly the spots needed to play at the correct midi keys? There's either some secret, I'm not aware of, or you need to use multi-sampling instead! (In Flowstone it's called "wave array prim")
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2687
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Help needed for Ensoniq's Digital Oscillator Chip (DOC)

Postby Spogg » Tue Jun 26, 2018 6:39 pm

Dammit!
As is often the case I was a bit sloppy :oops:
I meant sample values between -1 and 1 not byte values.

I'll have to think about the wavetable thing a bit more. As I said, it's not my preferred approach anyway. Not enough control over what happens and no good on large file sizes. Plus, if you modulate the requested frequency of the wavetable you get clicks as different wavetables are selected for different pitch ranges.

If you want to send me a couple of Float Arrays that would be wonderful, and I can have a play and report back...

Cheers

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

Previous

Return to General

Who is online

Users browsing this forum: No registered users and 43 guests