Sound Bytes

A coding competition


Project maintained by coding-competitions Hosted on GitHub Pages — Theme by mattgraham

Crickets from Outer Space

by pswg

Listen

Some sweet serenade by spectral stenopelmata.

This is an example submission written in C#.

See special scoring considerations for .NET Core entries.

Program.cs


using System;
using System.IO;

class Program
{
  static void Main()
  {
    using (var b = new BinaryWriter(Console.OpenStandardOutput()))
    {
      for (int t = 0, u; t < 5292000; t++)
      {
        u = t % 104448 / 1632 + 1;
        b.Write((byte)(((t / 52224 * (t * 4 & t >> 4)) & 128) / 10 + (((t >> 8) * (t >> 4) * (t / 835584 % 2)) & 32) / u + (t * t >> 5 & 32) / u));
      }
    }
  }
}

Language

C# (console)

Golf Score

399

Parameters

Sample Rate: 44100 Hz
Sample Size: 16 bits
Channels: 2 (stereo)
Encoding: unsigned-integer

Commands

Run

dotnet run

Spectrogram

Spectrogram