Page 2 of 2

Re: Wav (Mem) to Float array issue.

PostPosted: Sun Sep 22, 2019 7:50 pm
by martinvicanek
Damned! Thank you, Hugh. Fixed in the original post.

Re: Wav (Mem) to Float array issue.

PostPosted: Sun Sep 22, 2019 9:47 pm
by Duckett
Found this interesting free wave editor (intended for wavetables for specific hardware units, but can save single-cycle .wav files): http://synthtech.com/waveedit/

Re: Wav (Mem) to Float array issue.

PostPosted: Mon Sep 23, 2019 10:21 am
by HughBanton
martinvicanek wrote:Fixed in the original post.

From which I deduce that the 'counter' in the original 2017 version can simply read -

Code: Select all
streamout index;
index += 1;


Is that right? I'll have to see if I can't optimise that a bit ;)

H

Re: Wav (Mem) to Float array issue.

PostPosted: Mon Sep 23, 2019 11:26 am
by Spogg
Martin, I just tried your latest (fixed) reader and the load time is now good and the CPU is even lower than your previous one.

Now here comes that big BUT…


The wrap-around glitch is back :o :shock:

With this version my nasty trick of resampling up to 2048 doesn’t fix it.

I should also mention that on one change of wav file the audio stream turned off. That never happened before with my current system. I suspect it’s something to do with writing stuff to memory 9 times, but I don’t know for sure.

Honestly Martin, unless you really want to carry on with this, please keep in mind that I’m happy with what I have. Of course if you would like to try other solutions I will happily test them.

Cheers

Spogg

Re: Wav (Mem) to Float array issue.

PostPosted: Mon Sep 23, 2019 1:20 pm
by HughBanton
Here's a basic note counter that plays Martin's wave readers from MIDI_in.

Annoyance Warning! - made in FS64 so will be 3.09 (or higher??) ...

Spogg'sWave player.fsm
(22.54 KiB) Downloaded 726 times


This is based on pretty much the same as I do. I do hear a slight 'buzzing', slightly more on some notes than others, but I can't see anything wrong as such with the numbers. The wrap-around slope value that it generates looks correct.

Maybe the sharp slope at the end is exessive for a 256-point waveform, and this is just regular aliasing as a result?

Dunno! Hope it's useful ...

H

Re: Wav (Mem) to Float array issue.

PostPosted: Mon Sep 23, 2019 10:41 pm
by martinvicanek
Spogg wrote:The wrap-around glitch is back :o :shock:


That's odd, it does work here. The attached demo showa a clean sinewave regardless of frequency. Distortion and aliasing would indicate a glitch but no such thing here.
:?

Re: Wav (Mem) to Float array issue.

PostPosted: Tue Sep 24, 2019 2:58 pm
by Spogg
Thanks Martin. I can confirm that your demo doesn’t show a glitch. I added a “Steady Scope” which works with the analyser and the sine wave was indeed pure.
I re-tried the reader from your test and used the counter from it as well (just in case) but I still got the issue.

glitch on sinewave .png
glitch on sinewave .png (31.96 KiB) Viewed 11972 times


So I’m puzzled!

Cheers

Spogg

Re: Wav (Mem) to Float array issue.

PostPosted: Tue Sep 24, 2019 9:26 pm
by martinvicanek
If yo post a stripped down schematic which shows the glitch we may sort this out.

Re: Wav (Mem) to Float array issue.

PostPosted: Wed Sep 25, 2019 4:51 pm
by Spogg
Well, this is fascinating!

I stripped down the schematic to almost nothing and added you reader and counter and there was no glitch.
So I copied that oscillator back into the original schematic and still no glitch. :o

I just can’t account for this so maybe it was a weird FS issue, not updating the compilation correctly or something. I would say that it could have been my mistake but I had already changed for your reader and counter on 2 separate occasions previously.

Whatever the reason, I can confirm that it works great now. The wav changeover is fast and the CPU is lower than before. So I’m left puzzled but happy. :? :D

Thank you so much Martin!

Spogg