How do I record a sound and then play its reversed version?
-
Do you want to Record it with Mathematica or are you fine with importing the sound? – Vahagn Tumanyan Sep 07 '16 at 07:48
-
6There are no hidden messages in Beatles records – Mike Honeychurch Sep 07 '16 at 09:45
-
importing is fine – Reza Naderi Sep 08 '16 at 08:20
-
This post have discuss the first question about how to record. – yode Oct 02 '16 at 17:19
-
@Mikehoneychurch Actually there is at least one. If the runout track on one side of Sgt Pepper vinyl is played backwards it says "Paul McCartney is dead" I have the LP and have done this. – Julian Moore Oct 03 '16 at 06:25
2 Answers
Let's first try with a sound sample from MMA examples repository:
s = Import["ExampleData/rule30.wav"]
A FullForm of s reveals that this object has the structure Sound[SampledSoundList[{listOfSounds},samplesRate]].
From this it looks like to play the sound in reverse we just need to Reverse listOfSounds, which we can do for example like this:
s /. SampledSoundList[{soundsList_}, r_] :> SampledSoundList[{Reverse@soundsList}, r]
Let's wrap this up in a function:
playInReverse[Sound[SampledSoundList[{soundsList_}, r_]]] := Sound[
SampledSoundList[{Reverse@soundsList}, r]
];
playInReverse[Sound[SampledSoundList[{soundsLists__}, r_]]] := Sound[
SampledSoundList[
Reverse /@ {soundsLists},
r
]
];
where I used a very specific pattern assignment because this method works only for that specific structure of a Sound object, and the second assignment rule is for tracks over more than one channel.
Here you can see how it works:
The exact same procedure works with sounds recorded from inside Mathematica.
See for example this answer for some methods to record sound. A simple way is to use SystemDialogInput["RecordSound"], which brings up a dialog to record the sound.
The generated object is exactly of the form mentioned above, so that you can use
playInReverse[SystemDialogInput["RecordSound"]]
to record a sound and have it directly reversed.
Just for the heck of it, I tried this with a Beatles song (Yesterday) in mp3 format, and it works (no hidden messages though).
-
1for fun try some of these.. https://en.wikipedia.org/wiki/List_of_backmasked_messages – george2079 Sep 07 '16 at 15:43
In version 11, *.wav files are now imported as Audio[] objects. Thus, using glS's example:
s = Import["ExampleData/rule30.wav"];
Audio[Reverse[AudioData[s]]];
So that people who were hoping to hear actual backmasking would not be disappointed, let me give another example: the opening theme from the Disney animated series Gravity Falls. Using the last 5 seconds of the theme:
gf5 = Import["https://a.clyp.it/1mftdou4.mp3"];
As this is a stereo (two-channel) sound file, Reverse[] has to be mapped across the two channels:
Audio[Reverse /@ AudioData[gf5]];
You should be hearing something like "three letters back" being whispered.
- 124,525
- 11
- 401
- 574
-
-
@glS, unfortunately Clyp seems to have changed its policies regarding anonymous uploads and the length of their validity. I'll ping you when I can find a more suitable host. – J. M.'s missing motivation Jul 26 '17 at 04:51


