def sinePictureSound():

  size = 320

  pic = makeEmptyPicture(size,size)
  snd = makeEmptySound(5)

  maxColorValue = 255

  sr = getSamplingRate(snd)
  samplesPerCycle = 1.0*size

  freq = sr / samplesPerCycle
  printNow(freq)

  maxCycle = 2*pi

  soundAmplitudeScale = 32768.0/maxColorValue
  printNow(soundAmplitudeScale)

  pos = 0
  for p in getPixels(pic):
    rawSample = sin((pos / samplesPerCycle)*maxCycle)
    sampleVal = int(maxColorValue*rawSample)
    setRed(p, sampleVal)
    setGreen(p, sampleVal)
    setBlue(p, sampleVal)

    setSampleValueAt(snd,pos+1,int(sampleVal*soundAmplitudeScale))

    pos = pos + 1

  return (pic, snd)

