Samples in faust

Ah interesting. Hmm, I’ll check the bit depth of the wavs. I’ve tried KICK.wav and HAT.wav from your repo, and the wav files that came preloaded on the Witch so far. I’ll also try some new wavs with known bitdepth and sample rate.

The rest make sense, thanks again.

edit: so KICK.wav and HAT.wav for example is 8 bit, but a rather unconventional 16.4 kHz.

That’s from Bastle Drum Kastle samples, they are very lo-fi and are played by some Arduino level MCU :wink: Original data was in C arrays. And I think I might have worked on FAUST samples before we had support for external flash on OWL (0.5 MB for all patches and resource, now you have 8MB), that’s why I tried to keep them as small as possible.

I think you will get different playback speed depending on WAV SR to codec’s SR ratio. In this case data gets played ~x3 slower to keep pitch the same. Naturally it’s best to convert your audio to 48 KHz and avoid resampling altogether. I think I’ve left that funky SR to make sure that this crude resampling gives usable results. I.e. playing it with original speed would make it 3 times shorter and this is typically not what you want to hear.

Also, Witch patches are in C++, so they already have support for 32 bit data loading already. So you can run into samples that play on Witch patches but won’t work in FAUST, but I will resolve this soon.

That’s from Bastle Drum Kastle samples, they are very lo-fi and are played by some Arduino level MCU

Hah, I wondered about all that noise in the sample.

Well I’ve tried a few 16bit 48kHz mono files now, both generated and converted but the Witch returns “Unsupported format” on attempted run of my patch below (or yours) in all cases.


pluck = soundfile("Percussion[url:{'pluck2.wav'}]", 1);
process = so.loop(pluck, 0) <: _,_;

WAV file mediainfo

mediainfo ./PatchSource/pluck2.wav 
Complete name                            : ./PatchSource/pluck2.wav
Format                                   : Wave
File size                                : 11.3 KiB
Duration                                 : 119 ms
Overall bit rate mode                    : Constant
Overall bit rate                         : 776 kb/s

Format                                   : PCM
Format settings                          : Little / Signed
Codec ID                                 : 1
Duration                                 : 119 ms
Bit rate mode                            : Constant
Bit rate                                 : 768 kb/s
Channel(s)                               : 1 channel
Sampling rate                            : 48.0 kHz
Bit depth                                : 16 bits
Stream size                              : 11.2 KiB (100%)

Not sure why - are there any other reasons that a file can say it is Unsupported format? I can upload the wav file somewhere if it is helpful. Even though this should not affect this, I did upgrade firmware to 22.5.0 earlier and the always-unsupported-format behaviour has not changed unfortunately.

I don’t think so, this error message is only used when we check that bit depth is 8/16 bytes and nowhere else. It could be that something unexpected is in your file’s structure and we end up parsing it incorrectly. I guess I’ll need to take a look on the actual file to understand what’s going on.

I’ll keep trying some more wavs and see if I can get them to work. I’ll also upload the ones I’ve tried somewhere in case you can see anything unusual about them. I kind of suspect not though, so far a few have just been direct 16 bit export from audacity, some have been wavs I just have on my computer, some have been generated by a script I wrote (these one have no guarantees to be 100% correct), some have been KICK.wav etc from your repo. But all have failed with the same error message.

I’ll also try setting up the ability to compile and upload from a different machine, in the event that it is something about the code I’ve cloned and built on my machine that is at fault.

I’ll also try a direct upload using RESOURCE= too to rule out some kind of file munging using the rebeltech website’s resource uploader.