How do I mute a SoundFile but still gets its current amplitude as if it was not muted?

edited September 26 in Library Questions

I'm overhauling a system to control lights, for Christmas and Halloween, it uses multiple audio tracks to control if the light is on or not based on its amplitude. But I don't want the control tracks to play audibly. I originally had this working with the old audio library minim but for various reasons I don't think I can use that anymore is this even possible with the processing audio library(processing.sound.*)? If so how do I do it?

Thank you so much for your time, any help would be greatly appreciated._

Answers

  • I don't think so, the processing sound library is minimal, you would need to use the old minim library - which I agree is not extensive enough for full audio flexibility. I don't think it is possible in minim to analyse a non audible sound, but perhaps you can shift the frequencies to non audible frequencies, or set the amplitude at only 1 percent (or do both).

  • Answer ✓

    Thank you for responding. I realized that using an audio file is kind of an inelegant solution to the problem, even though it worked for a smaller version of the project. I have rewritten my program to use a CSV file with timestamps for when the lights turn with a float for the amplitude and another small program to convert my existing audio files to a CSV file. It uses much less RAM (which could be a problem on the Raspberry Pi as I add more lights) and seems to work just as well even though it takes longer to convert the file then just running it straight. I realize this may not be useful to someone else having my problem but just in case I thought I'd outline what I did for a solution. Moving the sound to an inaudible frequency is a smart idea and I would probably be doing it if this solution didn't use less Ram. Thank you.

Sign In or Register to comment.