top of page
Search

[22] L'lasons de Aether ver Beinags #4

  • Writer: Conlan Walker
    Conlan Walker
  • Feb 25, 2022
  • 1 min read

This week involves the research and creation of something involving the .wav format.

It's a really simple to learn/use format, because the format's header not only consists of a fixed length 44 bytes, but it's also extremely well documented. Furthermore, 22 of those bytes are always the same value. This is likely due to RIFF (Resource Interchange File Format) (the format standard it abides by,) having a bit of fluff in its structure.

The result of this research is the ability to create a .wav from scratch, with a high degree of freedom in its usability:

ree

These 90 lines will generate a .wav of a sine wave pitching up over the course of 3 seconds.

When ran, the program will generate this sound:

~30 of those lines are for simple validation and checks. Like, <= 0Hz doesn't really exist, and thus getSampleUnit returns a 0-value sample instead.


That's it for this week.

 
 
 

Comments


bottom of page