CITE THIS NOTEBOOK: Listening to substitution system by Madhumita Paul. Wolfram Community JAN 13 2023.
Have you heard of a sequence making sound?
Abstract: In this project I have used sequence that generates paper folding pattern and used the substitution system onto it. Then applying discrete Fourier Transform to it to get the power spectrum. After this plot the spectrum into auditory form. The auditory spectrum can be formulated in terms of time interval as well and the substitution system can be applied to sequences like Fibonacci sequence and can be made to auditory version as a future work scope.
Abstract: In this project I have used sequence that generates paper folding pattern and used the substitution system onto it. Then applying discrete Fourier Transform to it to get the power spectrum. After this plot the spectrum into auditory form. The auditory spectrum can be formulated in terms of time interval as well and the substitution system can be applied to sequences like Fibonacci sequence and can be made to auditory version as a future work scope.
Definitions about sequences
Definitions about sequences
In mathematics, sequence is a collection of objects with order, some of them may have structure and order . A paperfolding sequence which is also known as Dragon curve is a special type of infinite sequence of 0 s and 1 s and it is obtained from the repetition of the partial sequence . If a strip of paper is folded repeatedly in half in the same direction, i times, it will get - 1 folds, whose direction (left or right) is given by the pattern of 0' s and 1' s in the first - 1 terms of the regular paperfolding sequence . Opening out each fold to create a right - angled corner (or, equivalently, making a sequence of left and right turns through a regular grid, following the pattern of the paperfolding sequence) produces a sequence of polygonal chains that approaches the dragon curve fractal.
i
2
i
2
1
Spectrum of a sequence that generates paperfolding form
Spectrum of a sequence that generates paperfolding form
We consider the sequence {1,0} that creates a paperfolding form.The following is the spectrum of the sequence. A discrete Fourier transform is applied to the 'GenerateLimitSequence' in order to get the power spectrum.
The matrix form of the sequence
In[]:=
Reverse[FixedPointList[Inflate[1],Init[1][{1,0},2^7]]][[3;;-1]]//MatrixForm
The ArrayPlot of the limit sequence
In[]:=
ArrayPlot[Join[Reverse[FixedPointList[Inflate[1],Init[1][{1,0},2^7]]][[3;;-1]],{ConstantArray[_,Length[#]],#}&@GenerateLimitSequence[1][{1,0},2^7]],ColorRules->{0->Red,1->Blue,Verbatim[_]->White,"?"->LightGray}]
Out[]=
In[]:=
noisySpectrum=ListLogPlot[FourierPowerSpectrum[GenerateLimitSequence[1][{1,0},2^7]],PlotRange->All,PlotStyle->Red]
Out[]=
In[]:=
cleanSpecturm=ListLogPlot[FourierPowerSpectrum[Append[GenerateLimitSequence[1][{1,0},2^7],1]],PlotRange->All]
Out[]=
The observation to make here is the change in spectrum. The second plot gives the spectrum of a paperfolding sequence for 2^7 data points. However getting rid of the last data causes perturbation in the system creating the noisy spectrum, given by the first plot.
Comparison of the power spectra
Comparison of the power spectra
In[]:=
Show[noisySpectrum,cleanSpecturm]
Out[]=
Shape of the paperfolding sequence (Do look like a dragon)
Shape of the paperfolding sequence (Do look like a dragon)
In[]:=
Depict@GenerateLimitSequence[1][{1,0},2^7]GraphPlot[Depict@GenerateLimitSequence[1][#,2^7]]&/@Tuples[Range[4],4]
Another way to visualize (hexagonal formation) the curve :
Another way to visualize (hexagonal formation) the curve :
In[]:=
GraphPlot[Depict[#, 3] &@GenerateLimitSequence[1][#, 2^7]] & /@ Tuples[{1, 0}, 2]
Alright Let’s hear the sequence now
Alright Let’s hear the sequence now
In[]:=
ListPlay[Flatten[Table[FourierPowerSpectrum[GenerateLimitSequence[1][{1,0},2^7]],100]],SampleRate->1024]
Out[]=
THE DRAGON IS SPITTING FIRE
Want to hear another one ?
Want to hear another one ?
Generating spectrum of an aperiodic sequence
Generating spectrum of an aperiodic sequence
Let us consider another aperiodic sequence {1,2,3,4}. let us see how the spectrum of this sequence looks like. After generating the limit sequence for {1,2,3,4},
The matrix form of the sequence
In[]:=
Reverse[FixedPointList[Inflate[2],Init[2][{1,2,3,4},2^7]]][[3;;-1]]//MatrixForm
The ArrayPlot of the limit sequence
In[]:=
ArrayPlot[Join[Reverse[FixedPointList[Inflate[2],Init[2][{1,2,3,4},2^7]]][[3;;-1]],{ConstantArray[_,Length[#]],#}&@GenerateLimitSequence[1][{1,2,3,4},2^7]],ColorRules->{0->Red,1->Blue,Verbatim[_]->White,"?"->LightGray}]
Out[]=
This is the spectrum of the perturbed system
Let us see how the spectrum of the unperturbed system look like
Comparison of the power spectra
Let' s hear the sequence now
Let' s hear the sequence now
Function definitions
Function definitions
Conclusion
Conclusion
The paper folding sequence, which is an aperiodic sequence has its system perturbed by rank 1. The sequence has a dragon like structure as specified by the name Dragon Curve. We can hear the discrete spectrum of this sequence.
Future work: Given a bigger time window for this project I would have explored the time implementation for the auditory spectrum (The current result is in terms of frequency). I would also like to explore the substitution system for the Cantor set,Fibonacci sequence and create an auditory spectrum for that.
Future work: Given a bigger time window for this project I would have explored the time implementation for the auditory spectrum (The current result is in terms of frequency). I would also like to explore the substitution system for the Cantor set,Fibonacci sequence and create an auditory spectrum for that.
Keywords
Keywords
Substitution system,Spectrum,paperfolding sequence, Dragon curve, Hexagonal curve, Auditory spectrum, Fourier transform, Generating limit sequence,FixedPoint.
Acknowledgement
Acknowledgement
I am thankful to Stephen Wolfram for defining this project to me. I am thankful to my mentors Brad Klee and John McNally for helping me develop the project using Mathematica .
References
References