How to recover signal repeated throughout other signal? I have an audio signal that contains, at various time offsets, various other short audio signals, often repeated, in addition to other audio content. Here is an example of how that could look like:

   0  1  2  3  4  5  6  7  8  9
A: x        x              x
B: x                       x
C:       x  x              


This terrible representation shows that A and B appear at 0 seconds, C appears at 2 seconds, A and C appear at 3 seconds and so on. These signals will additionally be scaled at every occurrence (their amplitude could be different at each occurrence) and possibly have an amplitude envelope applied to them.

Is there an algorithm to recover that takes all the position of the occurrences and recovers (to the best of its ability) A, B, and C?

To be more explicit in the task I have to solve, I have an old electronic music track I produced, but I lost the project file. Like most electronic music, it's a mix of synthesized (pseudoperiodic) sounds, electronic drums hits (called, confusingly, samples), vocals, effects and maybe some acoustic instrument. All those signals get summed together and processed in a "mastering chain": the thing relevant to this problem is that dynamic processing is applied to increase the average loudness, and saturation (in the case of this track, just soft clipping) is added to squeeze another bit of volume.

I need to change one of the drum hits. I don't need to recover it perfectly, because even if a bit of the old drum hit and a bit of noise is still there, the new drum hit that I'm going to replace it with will cover it.
This is a source separation problem, which, in general is quite difficult to solve. One way to attack it is to use non-negative matrix factorization (NMF) with short-time Fourier analysis. Please see this question and a sample script here.

The overarching idea is to try to isolate your component sounds A, B, C,... using a time-frequency decomposition (or, perhaps, some other kind of subspace analysis using a different transform, like wavelet transform). 

If the components don't always all play at exactly the same time, or have different onsets, you can hope to separate them temporally. If they don't all have identical frequency content, you have some hope of separating them in frequency. Or, a combination of both, which is what NMF of the STFT achieves.