Group Abstract Group Abstract

Message Boards Message Boards

Making microtonal music, and alter audio and images?

Posted 4 years ago
11 Replies

My gosh, I didn't know that either (I hope it was not something I implemented!) My apologies all around.

I guess the next likely culprit for causing trouble is the use of BaseForm. Maybe remove that and see if the behavior of the code improves.

POSTED BY: Daniel Lichtblau
Posted 4 years ago
POSTED BY: Rohit Namjoshi

I mean that the actual code for IntegerReverse is missing from the post. It is not possible to diagnose an issue when a crucial component is absent.

POSTED BY: Daniel Lichtblau

Well, -if you mean it's function, I can say that it reverses the sequence of numbers in an ordered list.

Thus, something like:

{3, 2, 0, 4 , 1} would become:

{1, 4, 0, 2, 3}.

Of course, I wish to apply this to Charlie Chaplin's Speech.

Suppose (as a pretty arbitrary example) you had a very short audio file, made up of three samples.

Here (arbitrarily speaking), -I might have something ;like:

{1345, 9060, 156}...

...as sample depths of the sample, out of a possible range between:

-32768--->32768,

OK?

Now, to apply the IntegerReverse function on these gives us:

{5431, 609, 651}.

In most circumstances digitized audio files would have thousands of sample/elements, and I wish to apply this concept of reversing the audio-file's digits to many audio-files..

As I said...-Naturally I wish to do this to all manner of samples, samples of speech, violins, pianos, cymbals, you get this idea?

I also wish to experiment with different multipliers and bases, really obscure ones like 5, 7, 17, 23, 31 etc...

So do you understand my idea now?

Feel free to E-Mail me if you wish to talk about this privately.

Please advise,

Regards,

Mr. Sarn Richard Ursell.

How is IntegerReverse defined?

POSTED BY: Daniel Lichtblau

The Cytospur Variant on Audio digit reversal:

piano = AudioData[Audio[SoundNote["C", 5, 1]]][[
  1]];(*This is using Mathematica's built-in audio samples*)

base7 =
Reverse[IntegerDigits[Round[Abs[512 #]], 7]] & /@
  piano;(*This converts each sample to base 7 as a list of \


flatList =
ToExpression /@
  Flatten[base7];(*This creates a flatten list of the previous list \
of lists*)

removeDC = # - Mean[#] &@
  flatList;(*This removes the DC offset in the signal*)

normalize = #/
    Max[Abs[#]] &@
  removeDC;(*This normalizes the signal to between-1 and+1*)

output =
Audio[GaussianFilter[final, 8],
  SampleRate ->
  44100]

The Sarn Ursell variant on reverse audio digits:

CharlieChaplinSpeach =
AudioData[
  Import["F:\\Mr. SRU-Hobbies and Interests 2006-2021\\Find Sounds \
Samples, And Wavs To Use\\Find Sounds\\Charlie Chaplin Speach.wav"]][[1]]

CharlieChaplinSpeachMultiplied = CharlieChaplinSpeach*1000000

CharlieChaplinSpeachMultipliedAbs = Abs[CharlieChaplinSpeachMultiplied]

CharlieChaplinSpeachMultipliedAbsRound =
Round[CharlieChaplinSpeachMultipliedAbs]

CharlieChaplinSpeachMultipliedAbsRoundAnotherBase =
BaseForm[CharlieChaplinSpeachMultipliedAbsRound, 6]

CharlieChaplinSpeachMultipliedAbsRoundAnotherBaseReverseDigits =
IntegerReverse[CharlieChaplinSpeachMultipliedAbsRoundAnotherBase]


Export["Charlie Chaplin Speach with Digit's Reversed",
  CharlieChaplinSpeachMultipliedAbsRoundAnotherBaseReverseDigits ,
  "wav"]

I am dealing with Audio Data now, and yet...the program still will not run, it would appear that Mathematica does not like using IntegerReverse on audio data, and I attach a *.jpeg of the error message that I got when I tried to run the program...

Please advise me, and instruct and also to suggest things to me.

Please read, enjoy and advise,

Regards,

Your friend,

Mr. Sarn Richard Ursell.

Apparently it is against the Wolfram Mathematica Forum's rules to request personal contact information with other Wolfram Mathematica forum members, but I am however allowed to give/volunteer mine.

So, here is my E-Mail, and if anyone wants to contact me personally to discuss these concept(s), then please feel free to do so.

Here is the E-Mail:

polyverse2002@yahoo.com.au

Kind regards,

Mr. Sarn Richard Ursell.

Are we allowed to swap E-Mails and communicate outside of the Mathematica forum?

Is this within the rules?

If not, the we won't do so, as I do not want to break the rules.

Do you feel comfortable with this suggestion?

Please advise,

Regards,

S R U.

Check the functions IntegerDigits and RealDigits for changing base. Example:

In[315]:= IntegerDigits[131, 3]

(* Out[315]= {1, 1, 2, 1, 2} *)
POSTED BY: Daniel Lichtblau

Welcome to Wolfram Community! Please make sure you know the rules: https://wolfr.am/READ-1ST

Please show your own Wolfram Language code trials first to make your question and ideas clear to other members. The rules explain several ways to include a well formatted code.

POSTED BY: EDITORIAL BOARD
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard