Rawdio 0.1.0
I’ve wrapped up my WAV file wrapper and stuffed it into a gem. As it stands it can only take audio data as a byte string and write a WAV file for it, but sine/square/triangle wave helpers (and more!) are on their way. I’m also hoping to add support for other “raw” audio formats soon.
require 'rubygems' require 'rawdio' white_noise = Rawdio::WAV.new 8000.times { white_noise << rand(255).chr } white_noise.write('sweet_sound.wav')
Have at it (if you have the need):
sudo gem install rawdio
Doug said,
November 22, 2007 @ 2:09 am
Not sure what I’ll use this for but I love the idea. I shall have a tinker.
Steve Kyle said,
December 3, 2007 @ 5:44 pm
I’ll be really interested in using this once you’ve got a few helper functions!
monki said,
December 6, 2007 @ 6:59 pm
I’d like to play, but the gem is 404ing when you try to install…
Chris Shea said,
December 7, 2007 @ 12:34 pm
@monki,
Hmm. Maybe you caught Rubyforge at a bad time. I see the files and grab the gem just fine now.
monki said,
December 10, 2007 @ 3:57 pm
@Chris,
Yeah, sorry about that. It started being wonky with other gems too for some reason. I’m guessing something in my install. After a “gem update –system” everything seems on track again, thanks.