Mike Winters
2014-10-16 18:32:21 UTC
Dear SC-Users,
I'm having an interesting problem in SC working with large mono WAV files
(>100MB). I'm searching for a method that would allow me to quickly
normalize pairs of these soundfiles with respect to each other and not
independently (e.g. not buf1.normalize; buf2.normalize;)
My first thought was that if I could find the max value of each buffer, I
could use the ratio of the two to set the peak value of the buffer with
smaller magnitude. To determine the max value of all samples in a buffer, I
believe the most efficient way would be to convert it to a soundfile first:
SoundFile.use(buf1.path,{|f| f.channelPeaks})
The technique avoids first loading the buffer to a collection and then
calling .maxItem. However, it still takes four seconds for one mono 112MB
file, and would take at least eight seconds for a pair.
I think it would be faster to load pairs of mono soundfiles into a two
channel buffer and then call .normalize. Am I right in thinking this would
work? Would it indeed be faster? Most importantly, how would I use SC to do
this?
Thanks very much,
Mike
--
View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/Convert-Pairs-of-Mono-Soundfiles-to-Two-Channel-Buffer-tp7614037.html
Sent from the SuperCollider Users New (Use this!!!!) mailing list archive at Nabble.com.
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
I'm having an interesting problem in SC working with large mono WAV files
(>100MB). I'm searching for a method that would allow me to quickly
normalize pairs of these soundfiles with respect to each other and not
independently (e.g. not buf1.normalize; buf2.normalize;)
My first thought was that if I could find the max value of each buffer, I
could use the ratio of the two to set the peak value of the buffer with
smaller magnitude. To determine the max value of all samples in a buffer, I
believe the most efficient way would be to convert it to a soundfile first:
SoundFile.use(buf1.path,{|f| f.channelPeaks})
The technique avoids first loading the buffer to a collection and then
calling .maxItem. However, it still takes four seconds for one mono 112MB
file, and would take at least eight seconds for a pair.
I think it would be faster to load pairs of mono soundfiles into a two
channel buffer and then call .normalize. Am I right in thinking this would
work? Would it indeed be faster? Most importantly, how would I use SC to do
this?
Thanks very much,
Mike
--
View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/Convert-Pairs-of-Mono-Soundfiles-to-Two-Channel-Buffer-tp7614037.html
Sent from the SuperCollider Users New (Use this!!!!) mailing list archive at Nabble.com.
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/