r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[Sound] discussion about sound and audio implementation in REBOL

Anton
21-Apr-2009
[233]
As you add together a larger number of waves, you will find the maximum 
amplitude is typically much less than the total of all the wave amplitudes. 
It might be easier to generate all the samples of the complex wave 
(using decimal!/float), keeping track of the maximum value, then 
scaling it to 8 or 16 bit integers afterwards. It would be nice to 
have a precise mathematical way of calculating the maximum peak values 
in advance, though...
ICarii
21-Apr-2009
[234]
yes - that would be nice.  Ill have a hunt about see what i can find. 
 I know a couple of sound engineers who might know
Geomol
21-Apr-2009
[235]
It makes me think of something called Fourier Transformations:
http://en.wikipedia.org/wiki/Fourier_transform
ICarii
21-Apr-2009
[236]
yes - they are good for decomposing waves.  very math/processor intensive 
though
Steeve
21-Apr-2009
[237]
hey guys,  I have somewhere an FFT implementation in Rebol, interested 
?
Anton
21-Apr-2009
[238]
Steeve, what did you use it for? Just experimenting?
Steeve
21-Apr-2009
[239]
it shows frenquencies for a sample, but i don't remember how i did 
that, i can post the demo
ICarii
21-Apr-2009
[240]
would be interesting to see one :)  My next project is to decompose 
complex waves into sheet music :)
Steeve
21-Apr-2009
[241]
FFT = Fast fourier transform
ICarii
21-Apr-2009
[242]
of course - thats about a month away at the rate of my current project 
:)
Anton
21-Apr-2009
[243]
Hoho!
Steeve
21-Apr-2009
[244x3]
ok i upload the old demo
*** UPLOAD at http://sites.google.com/site/rebolish/Home
(see FFT.R at the end of the page)
you have to load a wav sample
Anton
21-Apr-2009
[247x2]
Wow - first use of CP (alias of COPY) I ever saw. I override CP to 
be a unixiod file copy function.
long wave file .... crunch crunch...
Steeve
21-Apr-2009
[249]
it's an old script Anton
Anton
21-Apr-2009
[250]
I see a little graph :)
Steeve
21-Apr-2009
[251]
yep, it show a graph with some frequencies, don't remember why...
Anton
21-Apr-2009
[252x2]
:)
I've got an old script which uses FMOD library to show a spectrum 
window in rebol while a sound is playing. It's a Windows DLL but 
it works in wine.

 do-thru http://anton.wildit.net.au/rebol/audio/fmod/play-rebol-sound.r
Rebolek
21-Apr-2009
[254]
Icarii, calculate RMS of the sound.
Oldes
21-Apr-2009
[255]
Anton:
** Script Error: cv has no value
** Where: do-parse
** Near: cv mold type-converter/c-to-rebol-map
Rebolek
21-Apr-2009
[256]
Steeve, thanks for the FFT, I'm really interested. I had only DFT 
running for my modular synth. And maybe iFFT also, I don't remember, 
I hope the sources are still somewhere in deeps of the Internets.
Steeve
21-Apr-2009
[257]
Anton, you asked why i had an FFT implementation...

Because, i made some tests to extract frequencies from wav sounds, 
to be able to play sounds on an old 8bit sound chip.
And also, i wanted to use FFT to make an image compressor.
Geez, so much projects vanished...
Anton
21-Apr-2009
[258]
Oldes, thanks. Do this

 load-thru/update http://anton.wildit.net.au/rebol/os/make-external-library-interface.r
then try again.
ICarii
22-Apr-2009
[259]
new version of synth almost ready - added an oscilloscope so i can 
see where my complex waves are not behaving .. lol
Maxim
14-May-2009
[260x4]
just realized that altme (probably rebol itself..) fucks up my system 
volume  :-(
when it pings, my sound driver's "WAVE" slider resets to 33%   >:-(
has anyone noticed this side-effect with rebol before?
it should just set its own volumn, not the system's wave volume..
Henrik
14-May-2009
[264]
Maxim, RAMBO #4239
Maxim
14-May-2009
[265:last]
ah thanks.