2

I am writing a program which needs to join some guitar chords (in mp3 format), but without having that end of sound feeling for each part of it.. Using cat or mp3wrap still gives that kind of feeling...

Basically I don't know how to come up with the idea. For example, should i open each file as stream and delete some bytes at the end, then merge them? Or.. Whatever you guys suggest. I just need a direction. Thanks.

skaffman
  • 398,947
  • 96
  • 818
  • 769
israkir
  • 2,111
  • 7
  • 30
  • 39
  • IMHO because sounds are waves, it makes quite complicated to join seamlessly. Once the main theme stops, the background continues and differs among different soudn files. This makes it quite hard to merge sounds, I guess you would need to transform the waves, so you connect them the right way. I think there is something in calculus called seams, which can be used to create continues functions, but I do not know if this is the right way... – Gabriel Ščerbák Jun 20 '10 at 21:39
  • thanks for the info. at least you gave a direction;) – israkir Jun 20 '10 at 21:52

2 Answers2

1

If by "end of sound feeling" you're talking about a sort of click, that's caused by a sudden change in the signal or its derivatives when you jump from one sound to another, which give rise to undesirable high-frequency elements (the frequency spectrum of a square wave gives you some idea of what these high frequency components look like). Samplers have to deal with this all the time when looping samples. The classic ways samplers have dealt with this are 1) fade out and in, even quickly, to minimize the amplitude of the abrupt shift, or 2) crop the last sample such that it matches the first sample, where the slopes of the signal are at least both positive or both negative - make that transition as smooth as is feasible.

Apart from the click, you may feel some of that "end of sound" feeling is caused when you rapidly shift guitar chords. Here, what's missing is probably the extra sound of damping off the first chord before launching into the second - a short fade out may be good enough here, or you might try to model the sound of the damping more carefully by mixing in some of the percussive sound that makes.

Finally, you may also find it useful to insert some intermediate relatively noisy (spread-spectrum) sound to make the transition sound more natural. Like the sound of your fingers moving across the strings to the new chord position? (Assuming you're using an acoustic guitar sound.) A few of these transitions sprinkled in may work wonders.

Owen S.
  • 7,665
  • 1
  • 28
  • 44
0

Try shelling out into SoX to concatenate the sounds then play the concatenated sound back.... (you can even use SoX for this as well) - SoX is the swiss army knife for sound.

You can also manipulate the files - all command line and something you could parse out via a shell command...

http://sox.sourceforge.net/