.cue() in SoundFile seems to have suddenly stopped working properly

.cue() seemed to have been working exactly as intended until I saved my processing sketch in a different location. (save as… same name, different location) I thought I was just making a copy of the code so I could safely experiment… Several other SoundFile methods continue to work just fine. .play(), .stop(), other FFT stuff works well. .cue(), on the other hand, only seems to work when the input is just right(?).

To be clear, I didn’t modify the code in any way that would affect this; simply saving the processing file to a different location seems to have done this. .cue() in the original file no longer works either.

I have uninstalled and reinstalled the Processing Sound library.
I have restarted the computer.

I’d like to just reinstall Processing, but I don’t want to lose all my sketches. I’ve tried reinstalling in the past and was unable to open my sketches.

I apologize for my ignorance about anything obvious.

Any ideas?

1 Like

sorry, but it could help if you explicitly name the used library
and the used example you tested, where the mentioned questionable command is used.
/ File / Examples / Libraries / Sound / ???
/ File / Examples / Contributed Libraries / Minim / ???

like on windows, when you unzip processing into a new folder
and start it, it will find the old system directory with the preference file
and from this will find your old sketch book path…

if you erase that settings ( and install new ) you need to
point processing preferences to the old sketchbook path again.

i not see how it will erase any files…

so actually i think you not find your way around on you harddisk / filemanager and finding files on it.

and must then learn how to set that path ( again ) for processing.

Thanks for the response!

Sorry, yes the library is just the Processing Sound library and .cue() is a method of SoundFile, but I don’t see an example in / File / Examples / Libraries / Sound / Soundfile that uses .cue()… I know the code in my program is fine because, as I mentioned, it worked perfectly until I saved the file at a different location. I don’t know if it helps, but here is the info I have about .cue() from the Processing reference.

Yeah, I suppose I should just uninstall and reinstall Processing. I know it won’t delete my sketches, I was just unable to figure out how to open them again. Attempting to open them would give an error message without letting me see the code and I never figured out how to point Processing’s preferences to them, as you mentioned. But that’s a different issue I guess.

if you use the
/ File / Examples / Libraries / Sound / Analysis / FFTSpectrum /
and change

//  sample.loop();

it looks like it works

and when you say
you must WALK up from the examples directory
( as you should never modify anything inthere )
to your sketch path and make a new sketch (below) there.

anyhow as you talk about a unknown example what you modified…
you should have posted it here??? for us to check?

Just to be clear, I was not modifying an existing sketch, I simply meant a sketch that I wrote had not been modified before it stopped working. I’m 100% certain the issue isn’t with the code itself; I just tried opening an empty sketch on a different computer, copy and pasting the code over from the original, and testing it out and it worked great. It’s only on the original that .cue() seems to have broken somehow. I tried the same technique of copying over the code to a new sketch on the original computer and it still does not work. I’m thinking my only option at this point is to reinstall Processing.

1 Like

So I completely uninstalled Processing, including the appdata/roaming/Processing folder. Reinstalled. Put my Projects folder back where it was, Processing opened properly. Needed to reinstall the Sound library. Ran the sketch, worked as before. .play() continues to work, .cue() does not.

Tried creating a new Projects folder. New sketch, copied the code over, just as I tried on a second computer earlier (which worked). .cue() still does not seem to want to cooperate.

Again, I know the code works, since I copied it directly onto a different computer and it worked perfectly. To explain what I’m seeing instead of the proper outcome, however, I’ll share this:

In draw(), I have my SoundFile object (called in) sync up with each frame so I can export each frame to a separate folder.

frmrate = 30.0;

frameCue = frameCount/frmrate;

This has worked perfectly for what I need until today. Typically when I do this, the image and sound will stutter as it syncs 30 times a second, but will do so consistently. Instead of that, however, I’ve been seeing the following: The frame will be empty and the sound will be silent until, seemingly randomly, there will be a tiny part of the sound and effect in the frame. It might happen again a few seconds later. I have noticed that it seems to be synced with the music (so it does seem to be playing silently and without being analyzed), the problem is that it doesn’t seem to be cueing and reacting consistently–and only now.

As I said, it has worked plenty of times before, and works perfectly on the second computer. For some reason it stopped only on this computer today lol

? is there also a .stop() after the .play() ?

anyhow i get the feeling that sound lib…
is not made to do
.cue() .play()
30 times a second.

please do not forget that processing is doing NOTHING of this,
it just talks to JAVA, and that talk to the operating system…

anyhow a question back to the install processing description:

-a- after delete
processing and
system settings folders and download / unzip processing 3.5.3
you say

Put my Projects folder back where it was

sounds wrong, as
-1- it should not be inside the processing folder ( what you deleted )
-2- you just have to link to it via the preference settings.

-b- also you say

Needed to reinstall the Sound library.
why that / i would understand a update but actually,
IF you found a BUG about .cue() in the new version
sound 2.2.2
that is what i ask you to try, after complete new install

  • delete processing
  • delete roaming…
  • backup your sketches only and
    delete sketch dir ( what contains the /libraries/ folder… )
    start processing and check for the
    new sketch dir, and sound lib version ?2.2.1?
  • this time NOT change sketch dir, and NOT update sound lib to 2.2.2
    only paste in the one sketch for test and run it.

Haha, I know what you’re saying but it has worked well for as long as I’ve known about it! Until this anyway. Continues to work very well on the second computer… but now that you mention it… The other computer has not updated its sound library to 2.2.2. Wow maybe that actually is the issue?

Yep! Reinstalled 2.2.1… works like a charm. I guess I updated it and forgot! Geez. I’ll submit a bug report then. Seems like 2.2.2 can’t call .cue() very quickly while 2.2.1 can.