title: Frequency Domain of a Periodic Fourier Transform Signal
body: <p>I've been working on a project to send data via sound waves.
  The way I've carried this out is by encoding the data in pulses in the frequency domain, and then creating a unique sound wave containing that information.  I've used python to plot that, which has given me:</p>
  <pre><code>import scipy as sp
  import math
  import numpy as np
  from scipy import signal
  from scipy import fft
  import matplotlib.pyplot as plt
  
  
  paynowString = &quot;00020101021126380009SG.PAYNOW010100211+658128992803010520400005303702545800.005802SG59006009Singapore620401006304&quot;
  
  characters = []
  
  def split(word):
      return [char for char in word]
  
  characters = split(paynowString)
  print(characters)
  
  ascii_characters = [ord(char) for char in characters]
  print(ascii_characters)
  
  positive_x_domain = np.zeros(9*len(ascii_characters))
  
  rhs = []
  xr = list(positive_x_domain)
  for i in range(len(ascii_characters)):
      rhs = rhs + xr[i*9:(i*9+9)]+[ascii_characters[i]]
  positive_x_domain = rhs + xr[(i+9)*9:]
  positive_x_domain = np.asarray(positive_x_domain)
  print(positive_x_domain)
  
  negative_x_domain = np.flip(positive_x_domain)
  print(negative_x_domain)
  
  origin = np.array([0])
  
  x_domain = np.concatenate((negative_x_domain, origin), axis = None)
  x_domain = np.concatenate((x_domain, positive_x_domain), axis = None)
  print(x_domain)
  
  
  plt.plot(np.arange((-(len(x_domain)-1)/2), ((len(x_domain)-1)/2)+1), x_domain)
  plt.margins(0.1, 0.1)
  plt.xlabel('Time [samples]')
  plt.ylabel('Amplitude')
  plt.grid(True)
  plt.show()
  </code></pre>
  <p>After which, this gives me a graph that represents the frequency domain:
  <a href="https://i.stack.imgur.com/9L3hO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9L3hO.png" alt="Frequency Domain" /></a></p>
  <p>Following this, I then apply the Fourier Transform on the frequency graph to get:</p>
  <pre><code>sound_wave = fft.ifft(x_domain)
  
  plt.plot((-(len(x_domain)-1)/2), (((len(x_domain)-1)/2)+1), sound_wave)
  plt.margins(0.1, 0.1)
  plt.xlabel('Time [samples]')
  plt.ylabel('Amplitude')
  plt.axis([-0.1, 2500, -0.1, 1])
  plt.grid(True)
  plt.show()
  #end of sending the sound wave
  </code></pre>
  <p>This gives me another graph that represents the sound wave:
  <a href="https://i.stack.imgur.com/AzFc6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AzFc6.png" alt="Sound Wave" /></a></p>
  <p>However, I was trying to get a periodic sound wave, which I was not able to get from this graph. From my understanding, if the positive and negative frequencies are reflected across the y-axis, i.e. the magnitudes of the pulses in the positive and negative x-axis of the frequency domain are the same, then the sound wave produced after the Fourier Transform will be periodic.</p>
  <p>Is there something wrong with my understanding, or does my code have some issues?
  If so, how can I ensure that the sound wave that is produced by my Inverse Fourier Transform will be periodic, as well as playable?
  Thank you!</p>