Open simotek opened 4 months ago
Thanks for reporting this @simotek 👍🏻 Definitely do need to document specifically what sample file formats are supported. I think @democloid is planning to work on this soon.
I also tried signed versions with
sox -S "$SAMPLE_DIR/$SAMPLE_PATH" -r 22050 -b 16 -c 1 "samplelib/$SAMPLE_FOLDER/$SAMPLE_OUT.wav
in http://simotek.net/downloads/BassSoxS22/ ffmpeg -i "$SAMPLE_DIR/$SAMPLE_PATH" -sample_fmt s16 -ac 1 -ar 22050 "samplelib/$SAMPLE_FOLDER/$SAMPLE_OUT.wav"
in http://simotek.net/downloads/BassFFMPEG22A/ ffmpeg -i "$SAMPLE_DIR/$SAMPLE_PATH" -acodec pcm_s16le -ac 1 -ar 22050 "samplelib/$SAMPLE_FOLDER/$SAMPLE_OUT.wav"
in http://simotek.net/downloads/BassFFMPEG22B/ so starting from this line, the code here is the source of truth on what wav file formats are supported.
Having a look at the code, it supports:
But interesting things to note:
I'll try to break this code out into a little harness and then run tests on arm emu against various sample files to see if theres also possibly any bugs in that code, possibly due to endianess differences.
Interestingly the samples work fine with LGPT
Interestingly the samples work fine with LGPT
@simotek VWould you know which version of LGPT you were using that worked? That would help with cross checking it's source with pT's to see what the difference is.
the things that would make legacy piggy barf the most is metadata in the wav header
@simotek As frustrating as this may sound, the problem you're having is not related to format, but with spaces on the filenames. I'm annoyed at not having looked at this earlier to identify the issue.
That said, wav files don't seem to support any arbitrary combination of int format and endianness. What's supported in wav, and picoTracker as well is: unsigned 8 bit signed 16 bit little endian 1 or 2 channels Any sample rate up to 44100Hz
I have tested all these combinations and there seems to be no problems importing any file like this.
That said, I have identified some other issues: Playback:
File system:
Most of the file system issues should be addressed by a new implementation we've been working on. The playback issues I have to work on. We also need better feedback to the user when encountering an invalid file.
I have tried a number of methods to convert samples into a format that will work on the picotracker. The most conservative was
sox -S "$SAMPLE_DIR/$SAMPLE_PATH" -r 22050 -b 16 -c 1 -e unsigned-integer "samplelib/$SAMPLE_FOLDER/$SAMPLE_OUT.wav"
with both the unsigned and signed 16 bit integer versions not working there are some samples at http://simotek.net/downloads/BassU22/I have also tried using ffmpeg with no luck. So far i've found very few samples that will work out of the box.