1
$\begingroup$

My question is about reversing the integers of an audio object file's data.

If I make an audio object, and I wish to convert the audio-data to integers between 0 and 10000, I then wish to access the effect of reversing the sequence of the audio integers.

Thus, if I were to take one audio sample, and the integer associated with it were 5691, the the reverse of this is 1965.

I need to apply the IntegerReverse function to ALL of the audio samples in my audio object, and when I tried the following code, I get some error messages, and I sort of do not know what they mean exactly.

AudioPlay[IntegerReverse[Round[Abs[(10000*
  Audio["F:\\Mr. SRU-Hobbies and Interests 2006-2020\\Find Sounds \ Samples, And Wavs To Use\\Find Sounds\\softmiddleC.wav"])]]]
]

The error message was:

AudioStream: An internal error occurred: the provided function did not generate a buffer of audio samples.

Please advise.

$\endgroup$
8
  • $\begingroup$ If my answer seems childish, I beg for your forgiveness. Please remember that I am a beginner to Mathematica. I entered, this: AudioPlay[IntegerReverse[Round[Abs[(10000* Audio["F:\\Mr. SRU-Hobbies and Interests 2006-2020\\Find Sounds Samples, And Wavs To Use\\Find Sounds\\softmiddleC.wav"])]]]] the error message was: AudioStream: An internal error occurred: the provided function did not generate a buffer of audio samples. $\endgroup$
    – ursellsarn
    Jan 2 at 3:07
  • $\begingroup$ Yes, indeed! I believe that I might have done it. I got Mathematica to apply the digit reversal to the audio sample. At least, I think I have...-and...-The results?/Noise, and intermittent static. I guess, that...-The fact that the mind perceived a pattern in the data, -however... does not necessarily follow that the ear will. I do have many other projects that I need doing, so please bear with me and in due course I will send them to Maths Stack Exchange, OK? $\endgroup$
    – ursellsarn
    Jan 2 at 6:17
  • $\begingroup$ Yes, indeed, I did this on a pure tone output by Audacity...-and a regular waveform was produced with this digit reversal process. I believe that it might be doing what I wanted to, but the thing is to experiment with different multipliers and different number bases, because BOTH of these things are relevant and will drastically effect the output of a sound when altered by the IntegerReverse function of Mathematica....and, as you say, -yes, indeed 00001 becomes 10000 under this function...A word of many thanks for all your help and the people of Maths Stack Exchange (MSE). $\endgroup$
    – ursellsarn
    Jan 2 at 6:51
  • $\begingroup$ Yes! You are on to it! Something like 7.564 would become:7564 if I multiplied it by 1000, and then this reversed would be:4657. But, depending on the amount of decimal places you had, -this would alter the sound. I also used an abs and then a rounding function in Mathematica AFTER I multiplied by 10000, but I could have just as easily have multiped by 100, 10000000, or even 10, -and then took the abs function then rounded. As I said, the result will differ greatly depending on what you multiply by and also what base you used. I would dearly like to her you people's ideas and comments! $\endgroup$
    – ursellsarn
    Jan 2 at 7:17
  • 1
    $\begingroup$ The discussion in comments appears to have strayed from the original question. I will suggest closing this and, if needed, opening a new one that addresses the actual matter(s). $\endgroup$ Jan 2 at 15:43

Browse other questions tagged or ask your own question.