Maximum Number of WAV Files?

That’s what I thought. Which makes this an odd one.
I have 345 files in the folder, all numbered correctly, but when I run ‘effect’ it says:

20:06:38.854 → Found force files: 7-345 using 2 digits in subdirs SOME FILES ARE MISSING! 339 != 17600 in FontPrem/Graflex

Screenshot 2023-11-09 at 20.10.02

Screenshot 2023-11-09 at 20.10.15

(Apologies for the screen shots Prof - just showing the SD card contents are correct).

Have tried the same folder on two systems with two SD cards, and both give the same result. I also tried deleting the first half dozen or so wavs, renaming everything else from force1, then adding the deleted wavs back at the end from 339 to 345.

As I say, no biggie - just odd.

You can list the files and use that instead of the screenshot.
Terminal.
Type cd then a space, then drag the folder you want to list onto the terminal window to autofill the path.
Hit return.
Type ls > list.txt to create the text file in that directory.

You didn’t show 339, although I assume it’s there since you said all numbered correctly.
Why it starts at 7 I have no idea.
It’s a bit of trial and error, but I’d be curious at what point the problem starts. Like, have 200 in there see if it works. Go up to 300, see if it still works, go to 350, did it break yet, etc…

All that said, I’m curious what the heck you got going on in 345 files? LOL

It’s possible a file is corrupt and the OS can’t read it, thereby thinking it’s missing?

LOL! Someone wanted a hilt with lots of quotes, and the font he said he wanted happened to have an enormous number of them. All I did was put them into a single folder and hit rename! LOL!

But anyway, thanks for the Terminal suggestion. It orders them a bit strangely, but below is the SD file contents in full.

Anyway yes, I’ll start peeling them out 25 at a time and report back.
:slight_smile:

force01.wav
force02.wav
force03.wav
force04.wav
force05.wav
force06.wav
force07.wav
force08.wav
force09.wav
force10.wav
force100.wav
force101.wav
force102.wav
force103.wav
force104.wav
force105.wav
force106.wav
force107.wav
force108.wav
force109.wav
force11.wav
force110.wav
force111.wav
force112.wav
force113.wav
force114.wav
force115.wav
force116.wav
force117.wav
force118.wav
force119.wav
force12.wav
force120.wav
force121.wav
force122.wav
force123.wav
force124.wav
force125.wav
force126.wav
force127.wav
force128.wav
force129.wav
force13.wav
force130.wav
force131.wav
force132.wav
force133.wav
force134.wav
force135.wav
force136.wav
force137.wav
force138.wav
force139.wav
force14.wav
force140.wav
force141.wav
force142.wav
force143.wav
force144.wav
force145.wav
force146.wav
force147.wav
force148.wav
force149.wav
force15.wav
force150.wav
force151.wav
force152.wav
force153.wav
force154.wav
force155.wav
force156.wav
force157.wav
force158.wav
force159.wav
force16.wav
force160.wav
force161.wav
force162.wav
force163.wav
force164.wav
force165.wav
force166.wav
force167.wav
force168.wav
force169.wav
force17.wav
force170.wav
force171.wav
force172.wav
force173.wav
force174.wav
force175.wav
force176.wav
force177.wav
force178.wav
force179.wav
force18.wav
force180.wav
force181.wav
force182.wav
force183.wav
force184.wav
force185.wav
force186.wav
force187.wav
force188.wav
force189.wav
force19.wav
force190.wav
force191.wav
force192.wav
force193.wav
force194.wav
force195.wav
force196.wav
force197.wav
force198.wav
force199.wav
force20.wav
force200.wav
force201.wav
force202.wav
force203.wav
force204.wav
force205.wav
force206.wav
force207.wav
force208.wav
force209.wav
force21.wav
force210.wav
force211.wav
force212.wav
force213.wav
force214.wav
force215.wav
force216.wav
force217.wav
force218.wav
force219.wav
force22.wav
force220.wav
force221.wav
force222.wav
force223.wav
force224.wav
force225.wav
force226.wav
force227.wav
force228.wav
force229.wav
force23.wav
force230.wav
force231.wav
force232.wav
force233.wav
force234.wav
force235.wav
force236.wav
force237.wav
force238.wav
force239.wav
force24.wav
force240.wav
force241.wav
force242.wav
force243.wav
force244.wav
force245.wav
force246.wav
force247.wav
force248.wav
force249.wav
force25.wav
force250.wav
force251.wav
force252.wav
force253.wav
force254.wav
force255.wav
force256.wav
force257.wav
force258.wav
force259.wav
force26.wav
force260.wav
force261.wav
force262.wav
force263.wav
force264.wav
force265.wav
force266.wav
force267.wav
force268.wav
force269.wav
force27.wav
force270.wav
force271.wav
force272.wav
force273.wav
force274.wav
force275.wav
force276.wav
force277.wav
force278.wav
force279.wav
force28.wav
force280.wav
force281.wav
force282.wav
force283.wav
force284.wav
force285.wav
force286.wav
force287.wav
force288.wav
force289.wav
force29.wav
force290.wav
force291.wav
force292.wav
force293.wav
force294.wav
force295.wav
force296.wav
force297.wav
force298.wav
force299.wav
force30.wav
force300.wav
force301.wav
force302.wav
force303.wav
force304.wav
force305.wav
force306.wav
force307.wav
force308.wav
force309.wav
force31.wav
force310.wav
force311.wav
force312.wav
force313.wav
force314.wav
force315.wav
force316.wav
force317.wav
force318.wav
force319.wav
force32.wav
force320.wav
force321.wav
force322.wav
force323.wav
force324.wav
force325.wav
force326.wav
force327.wav
force328.wav
force329.wav
force33.wav
force330.wav
force331.wav
force332.wav
force333.wav
force334.wav
force335.wav
force336.wav
force337.wav
force338.wav
force339.wav
force34.wav
force340.wav
force341.wav
force342.wav
force343.wav
force344.wav
force345.wav
force35.wav
force36.wav
force37.wav
force38.wav
force39.wav
force40.wav
force41.wav
force42.wav
force43.wav
force44.wav
force45.wav
force46.wav
force47.wav
force48.wav
force49.wav
force50.wav
force51.wav
force52.wav
force53.wav
force54.wav
force55.wav
force56.wav
force57.wav
force58.wav
force59.wav
force60.wav
force61.wav
force62.wav
force63.wav
force64.wav
force65.wav
force66.wav
force67.wav
force68.wav
force69.wav
force70.wav
force71.wav
force72.wav
force73.wav
force74.wav
force75.wav
force76.wav
force77.wav
force78.wav
force79.wav
force80.wav
force81.wav
force82.wav
force83.wav
force84.wav
force85.wav
force86.wav
force87.wav
force88.wav
force89.wav
force90.wav
force91.wav
force92.wav
force93.wav
force94.wav
force95.wav
force96.wav
force97.wav
force98.wav
force99.wav

Theoretically, the limit is 32768 I think.
However, once you go above a few hundred, you will start getting buffer underflows every time the effect is played. (Unless you have a Teensy4 setup, which reads SD cards much much faster than Proffiieboards.)

This suggests that it expected 339 files, but found 17600, which doesn’t really make much sense, unless alt-directories are involved somehow.

The more likely scenario here is there is a bug in the scanning code, and it’s double-counting some files for some reason. We’ve seen bugs like this before, but have not been able to narrow down what causes them. I might be able to add some VLOG statements to the code, which might help us figure it out though…

It’s within the rules, but it doesn’t show that all files are present. File 245 might still be missing.
However, it does show that the numbering is inconsisent.
force01.wav has two digits, while force345.wav has three.
There are two options: either make all files use the same number of digits, or remove all leading zeroes. (So it’s just force1.wav) ProffieOS should handle both cases.

1 Like

try ls | sort -n > list.txt

Yeh, that was me experimenting - initially it was just force1, force2… force345 etc. I tried adding two zeros to see if it made a difference but it didn’t. :confused:

And yes, the idea with the screen shots was to show they started at force1 and ended at force345, with the very bottom number showing that there were 345 files in that folder. But the point is noted and Brian’s suggestion was much better. Will make a note of it for next time as I seldom venture into Terminal.

I did wonder what the 17600 referred to. I thought it might be the amount of memory used, but clearly not. (And no, there’s nothing fancy in the config - no alt-directories or anything like that).

Turns out there is already PVLOG statements for this on github master, so could you:

  1. Try github master (let me know if you need instructions for how to do this)
  2. Add #define PROFFIEOS_LOG_LEVEL 500 to CONFIG_TOP
  3. have the serial monitor open and change to the preset that shows this problem. Then post the output.

?

This page won’t let me post it all as it gives a “500 Error”.
So I’ve added an rtf file to my Google Drive.
Here’s the link:

I’ve no idea if it’s relevant or helps, but I tried stripping out wavs 25 at a time.
Had to go down to 95 before it was OK. BUt then bizarrely I went back up a few increments and was still working at 125.

Full results below.
:slight_smile:

320 - Error

295 - Error

270 - Error

245 - Error

220 - Error

195 - Error

170 - Error

145 - Error

120 - Error

95 - OK

100 - OK

110 - OK

125 - OK

FYI I use the sequence option on this all the time for the voicepacks and such.

I took a look a the rtf (which seems to be some weird adobe forma?) anyways, I was able to just open it like a text file to read it…

It looks like the scan is working normally, so I don’t really understand where the 17k number comes from. I’m going to dig deeper tonight.

1 Like

Thanks Brian - I’ll take a look at that.
I’ve always just used the one built into MacOS, but it has its limitations - one of which is you can’t specify, for instance, Force01 - it will only let you do Force1. Looks like yours has a few other features too. Downloading now… :slight_smile:

So, this makes absolutely no sense.

  1. I looked at the code, and there is simply no way for the num_files_ counter to go to 17k without actually counting 17k files. (Which it absolutely did not do according to the serial monitor.)
  2. The code simply loops through the files, it shouldn’t matter if there are 10, 100 or 100000000. The only difference should be higher numbers and more time. The fact that the number of files matters makes no sense. It would be like a movie changing the second time you watch it. (And I don’t mean any special edition shenanigans.)

So… maybe it’s a compiler bug?
I suggest trying version 3.7.0 of the Arduino-Proffieboard plugin and see if that helps.
Instructions for how to do that can be found in this thread: Gcc 12.3 (new compiler maybe)

Thanks Prof.
Unfortunately I just tried loading that but got this error:

org/tukaani/xz/XZInputStream
java.lang.NoClassDefFoundError: org/tukaani/xz/XZInputStream
	at cc.arduino.utils.ArchiveExtractor.extract(ArchiveExtractor.java:103)
	at cc.arduino.utils.ArchiveExtractor.extract(ArchiveExtractor.java:82)
	at cc.arduino.contributions.packages.ContributionInstaller.install(ContributionInstaller.java:141)
	at cc.arduino.contributions.packages.ui.ContributionManagerUI.lambda$onInstallPressed$2(ContributionManagerUI.java:172)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: org.tukaani.xz.XZInputStream
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
	... 5 more

It might be my system as I’m on MacOS 10.15 Catalina which is a little long in the tooth now, but don’t want to change it as I have a couple of mission-critical apps I use which I can’t afford for Apple to break for me… sorry, I meant upgrade. :wink:

Ignore previous post - now installed.
Will give it a go and report back…

Apologies - I’m going round the houses a bit here. I thought I’d successfully loaded the 3.7.0 plugin, but it turns out it had indeed thrown the error from two posts ago. So unbeknown to me I’ve just loaded the config using 3.6.0…

…what’s weird is that has now fixed the font directory problem!

So maybe it was my 3.6.0 plugin that had got corrupted and messing around reloading it has straightened it out.

I will keep an eye on it, but for now it seems to be working. But as I say, the bad news is I can’t load the 3.7.0 plugin which I know is a work in progress.

When I try to upload a config with 3.7.0, I get the error. Will add this to the other thread too.

Arduino: 1.8.19 (Mac OS X), Board: “Proffieboard V2, Serial + Mass Storage, SDCARD (SPI), 80 MHz, Smallest Code”

fork/exec /Users/chrisandlindsey/Library/Arduino15/packages/proffieboard_experimental/tools/arm-none-eabi-gcc/12-3-rel1/bin/arm-none-eabi-g++: no such file or directory
Error compiling for board Proffieboard V2.

That generally means it wasn’t installed properly.
Also, Arduino 1.8.19 doesn’t support xz files, so you may need a newer Arduino.