Login / Register 0 items | $0.00 New @ KVR
nxcvi
KVRer
 
1 post since 7 May, 2018

Postby nxcvi; Mon May 07, 2018 7:38 am Compute Sound Similarity?

Hello everyone.
I am new to digital signal processing, and I would really appreciate it if you could point me to the right direction.
Say I have:
- a recording of a long C4 note played by a bass guitar.
- a recording of a synth playing the same note, that attempts to recreate the bass guitar sound.
Is there a method I can use to compute the similarity percentage between the two sounds, so as to tell how good the sound emulation is?

Thanks in advance :)
User avatar
Music Engineer
KVRAF
 
3764 posts since 8 Mar, 2004, from Berlin, Germany

Postby Music Engineer; Mon May 07, 2018 9:02 am Re: Compute Sound Similarity?

one general purpose measure of signal similarity is the cross-correlation function between the two signals. it is itself a sequence and we should look at the maximum value of that sequence. but i'm doubtful how applicable this method is to assess a subjective, human sense of similarity. probably not very much. perhaps it would make more sense to compare relative amplitudes of harmonics and (in case of non-steady, decaying sounds) their decay rates
Image
User avatar
Music Engineer
KVRAF
 
3764 posts since 8 Mar, 2004, from Berlin, Germany

Postby Music Engineer; Mon May 07, 2018 9:10 am Re: Compute Sound Similarity?

...but it gets more complicated. especially in the case of percussive and plucked sounds, the transient is perceptually very important as well - and that won't be captured by harmonic amplitudes and decay rates. in case of steady sounds, we may want to consider the "bandwidths" of the harmonics (which are idealized as infinitely narrow lines, but in practice, they have some nonzero width - at least in the case of acoustic instruments like flutes, bowed strings, etc.). ...soo..yeah - i think, this is a rather non-trivial task. i'd be interested in ideas for that, too
Image
stratum
KVRAF
 
1852 posts since 29 May, 2012

Postby stratum; Mon May 07, 2018 9:39 am Re: Compute Sound Similarity?

Speech recognition literature mentions dynamic time warping for this purpose.
https://en.wikipedia.org/wiki/Dynamic_time_warping

To adapt it to musical instruments, you would need to decide about what the relevant feature vectors for adjacent short time windows might be.
~stratum~
User avatar
luzifer
KVRer
 
22 posts since 18 Apr, 2018, from Berlin

Postby luzifer; Tue May 08, 2018 3:38 am Re: Compute Sound Similarity?

my intuitive approach would be to address this in the frequency domain. an absolute of the difference of the two input spectrums should give you some kind of 'distance' measurement. with zero being an absolute match and ever increasing with divergence of sounds. so at least if you'd need to rank sounds by similarity that might work. i have no idea what a 100% different sound should be anyways?
Kraku
KVRian
 
1397 posts since 13 Oct, 2003, from Prague, Czech Republic

Postby Kraku; Tue May 08, 2018 4:04 am Re: Compute Sound Similarity?

Correct me if I'm wrong (I might be talking out of my arse here), but aren't deep learning algorithms perfect for the job OP is asking about?

As far as I've seen, the examples on the internet seem to revolve around "how close the signal A is to signal B" or something along those lines.
User avatar
luzifer
KVRer
 
22 posts since 18 Apr, 2018, from Berlin

Postby luzifer; Tue May 08, 2018 5:08 am Re: Compute Sound Similarity?

yeah. in theory yes. but that also means that you would have to have an extensive training set available
User avatar
noizebox
KVRer
 
19 posts since 19 Nov, 2012, from Stockholm, Sweden

Postby noizebox; Tue May 08, 2018 5:14 am Re: Compute Sound Similarity?

The google Magenta project (https://magenta.tensorflow.org/) might be of interest here as it uses googles Tensorflow framework to do machine learning on audio data as well as a pretty large dataset of sounds.

They also have used it to build some kind of sample morpher. Doesn't sound super exciting to be honest. But could serve as a start.
https://nsynthsuper.withgoogle.com/
cron
KVRAF
 
3010 posts since 27 Dec, 2002, from North East England

Postby cron; Tue May 08, 2018 5:46 am Re: Compute Sound Similarity?

While I'm not a DSP guy, perhaps the MPEG-7 audio descriptors could be a good place to start. MPEG-7 attempts to define timbre scientifically/mathematically (albeit mostly focused on periodic/quasi-periodic sounds), so it might provide useful pointers regarding the types of things your analysis stage will need to look for when comparing two sounds.

https://books.google.co.uk/books?id=f6k ... &q&f=false

Moderator: Moderators (Main)

Return to DSP and Plug-in Development