Open xpollen8 opened 5 years ago
This would happen if no frames were detected. I'd guess one of three things is going on here-- 1) either the left and right channels are flipped 2) this isn't actually a PXL 2000 clip 3) there's some unusual corruption going on here.
I've experienced all 3. Can you open up the original .wav file in audacity, zoom in on a segment that's a couple seconds long, take a screen shot, and post it? That might help to understand what's going on.
... Or are you saying that given the same input, sometimes it works correctly, but sometimes it doesn't?
Here's a grab of 3 seconds of signal from the file which didn't generate any PNGs.
I just re-read your original comment--
-rw-r--r-- 1 del staff 658890 Oct 13 19:27 raw_frames.csv
Give the line above (and in particular, the fact that the file is very much non-zero in length), it clearly was able to parse out the various frames. It must have thrown an exception while running. Based on the files you have, it must have been when it was starting to generate the PNG's. I'll have to add some better error messaging to figure out what went wrong.
@xpollen8 I just committed a change that will re-throw an exception instead of suppressing it. Can you retry to see what output you get now? As a note, since the FFT is already calculated, it should re-use it instead of having to spend an potentially hours recalculating it.
Processing: PXL_2_19890705_2.wav..
Args are:
PXL_2_19890705_2.wav
Making Directory PXL_2_19890705_2
Performing FFT Pass.
Performing FFT Averaging Pass.
Performing Sync Finding Pass.
Performing Frame Finding Pass.
Drawing Frames.
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 6
at pxlConverter.getPixels4(pxlConverter.java:655)
at pxlConverter.drawFrames(pxlConverter.java:819)
at Main.main(Main.java:53)
For this one, it appears that the original wav file is truncated. Can you try opening it in Audacity, exporting a new copy of the wav file, and retrying?
Same outcome. When you say truncated, do you mean just obviously corrupt, or that leading/trailing frames may be incomplete?
This particular file is an excerpt from a full tape, and is 6 minutes in length.
Here is a zoomed-in example of the very start of the file - all looks good to me!
This excerpt dies at:
Drawing Frames.
Figuring out where to use the sound.
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:653)
at java.util.ArrayList.get(ArrayList.java:429)
at pxlConverter.findValidSoundLocations(pxlConverter.java:919)
at Main.main(Main.java:54)
This one looks a little different. It completed the step where it would have generated PNG files. I'm guessing you didn't get any?
Assuming you didn't get any frames, from your FFT output, it looks to me like the signals might be a little too low for it to have picked them up. You can check this by seeing if there's anything in raw_frames.csv. You could try opening up the FFT_Smoothed in Audacity, and amplify it ~4x (not sure what that is in db, but the idea is to raise up the low spikes.) Save the output with the same filename. Then, delete the following files: syncs.csv raw_frames.csv And finally re-run. If the low FFT spikes was the problem, this should fix it.
Of course, that all is a workaround. The application should at least give you a better error. I'll work on that.
Occasionally, the java processing does not generate any usable output:
Here is the contents of the directory after processing runs: