0

I've been trying to make a loop pedal for Android. I have 1 track working pretty well. I want to know what sort of resources/interfaces I need to implement multiple tracks. I'm using OpenSL ES, and I've read the specification doc.

Some thoughts so far:

How do I include n tracks in the output mix? Aren't they going to compound on each other? How would I normalize the output mix? Once one track is recorded, how could I join the two tracks into one?

Why are these functionalities so under-supported? Am I misusing the library or using the wrong one?

I'm very interested in programming with music/sound and would like to be familiar with the most used technologies.

covercash2
  • 173
  • 1
  • 2
  • 11

1 Answers1

1

Just mix the tracks yourself by adding them together and sending the sum to the output. The simplest normalization can be achieved by dividing the sum by the number of tracks.

HerrLip
  • 151
  • 3
  • This is correct, but remember that summing integers can overflow. It's best to do this in floating point, or at the very least use a wider data type for your intermediate result (e.g. int32_t rather than int16_t). – Ian Ni-Lewis Jun 14 '16 at 13:05