Sha256: 12171d89088af57249c0b21d007fd5f4bbe257ebcaccd20d7760d13720748555
Contents?: true
Size: 597 Bytes
Versions: 1
Compression:
Stored size: 597 Bytes
Contents
<% $waterfall_gradient ||= (0..127).collect do |i| r = g = b = Math.log((i+16)**6.35)*18-312 redshift = i - 64 if redshift > 0 b = g -= redshift * 3 end b *= 0.95 [r,g,b] end spectrum = case when $rig.rate <= 24000 then $rig.spectrum 1024, 1.0 when $rig.rate <= 48000 then $rig.spectrum 2048, 2.0 when $rig.rate <= 96000 then $rig.spectrum 2048, 4.0 else $rig.spectrum 2048, 8.0 end @response.body = [Radio::Gif.waterfall($waterfall_gradient, [spectrum])] @response.headers['Content-Type'] = 'image/gif' @response.headers["Cache-Control"] = 'max-age=0, private, must-revalidate' %>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
radio-0.0.2 | www/waterfall.erb |