We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSound,  Music Libraries › mixing sounds and exporting them to file
Page Index Toggle Pages: 1
mixing sounds and exporting them to file (Read 430 times)
mixing sounds and exporting them to file
Mar 27th, 2009, 11:56am
 
In short: I need to mix 2 audio at different volume levels to one fiile.
Any Idea or suggestion for a library to use?

I need to read out an audiofile to an float array and save the array as a soundfile again.
It does not have to be realtime and I need to manipulate the array.
Which library should I use and is there any procedure you can recommend?

detail:
I want to layer many "instances" of the same sample (a bit like an endless echo) and reduce the volume accoring to the number of overlaying samples (1 sample at 100% volume, if 2 samples are playing both should be at 50% volume etc).
Everytime it loops there shall be one more sample playing (with a random offset) so I get noise-like stuff.
I want to do this with many many instances of the sourcefile (like 6000) therefore I need an array that saves each run through so I allway add one sample to the array and don't need to handle thousands of samples and their volumes.

Another aproach:
replaying 2 samples and saving the payback
replaying the saved playback and one more sample to playback2
replaying the saved playback2 and one more sample... and so on
The Problem could be: Adding the 6000th sample I have to replay it at 1/60% volume which is very low and maybe to low to reach the lowest value possible. (I don't know how AIFFs or WAVs work just had the same problem with apha values<1/256 of images)

thx for reading this, didn't know how to shorten it.
Page Index Toggle Pages: 1