Software to analyse sound and audio files (but special ones!!!!)
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Software to analyse sound and audio files (but special ones!!!!)
I want to connect to the audio "line-in" of the laptop a device that we use to listen to ultrasounds (for example bast or whales). The device takes ultrasounds and divides it by 10 hence it brings ultrasound into the audible range. When we analise the spectrogram to identify the species that is calling into the ultrasounds range, we need to multiply the frequency back by 10. In an ideal world we would like to do the recording, listen to it, see the spectrogram and record it at the same time.
I am currently using a Windows Software that does that, but it is proprietary, and I run it into a MS Window guest machine inside Virtualbox.
I would like to move to complete open source stack. I am using linux of course, 64 bit, kernel 3.8.0-27. Currently is a kubuntu installation, but I am happy to change if you know of a better distribution for my needs.
I have tried different applications (including Audacity, Sonic Visualiser and Waveform) and they are very good, but do not allow me to set a 10 multiplier for the frequency. Anyone who can help????
I need to take the line in and:
record the line in at sample rate 192Khz / 32bit (the sound card supports it)
listen to the sound whilst I record
save it in a wav file with FREQUENCY MULTIPLIED BY 10.<- this is the most important requirement!!!!
visualise the 3D sonogram real time BUT FREQUENCY MULTIPLIED BY 10.<- this is the most important requirement!!!!
ideally, identify peak frequencies in a specific window and so on
I am very happy to use the command line.
Best,
Thanks!
Last edited by ct529; 08-12-2013 at 07:38 AM.
Reason: It was difficult to understand, I changed the structure of one sentence
1) baudline which look quite promising, but I have not found a way to multiply the frequency by 10, and it seems to be unmaintained since 2010.
2) Sound Editor only takes 44100hz/16bit input, if I understand well.
3) sox does not allow for analysis of sonogram whilst listening and recording at the same time, as far as I am aware.
3) I cannot use jack at this stage because I have pulseaudio on the machine I use, and I do not think I can have both.
I was wondering whether it would be possible to at least record and listens at the same time from the command line, whilst using a software like Sonic Visualiser to actually visualise the sonogram by reading the file that is created by the command in the console.
we need to multiply the frequency back by 10. In an ideal world we would like to do the recording, listen to it, see the spectrogram and record it at the same time.
I'll give you some place to start. There are several ways to approach this.
An example of capturing your sound card line in. You'll need to find the correct device for your line in.
If you have a soundcard that won't allow capture then you will have to make a virtual loopback device.
See if your flavor of linux has snd-aloop
Add to your .asoundrc something like
Code:
pcm.!default {
type asym
playback.pcm "LoopAndReal"
#capture.pcm "looprec"
capture.pcm "hw:0,0"
}
pcm.looprec {
type hw
card "Loopback"
device 1
subdevice 0
}
pcm.LoopAndReal {
type plug
slave.pcm mdev
route_policy "duplicate"
}
pcm.mdev {
type multi
slaves.a.pcm pcm.MixReale
slaves.a.channels 2
slaves.b.pcm pcm.MixLoopback
slaves.b.channels 2
bindings.0.slave a
bindings.0.channel 0
bindings.1.slave a
bindings.1.channel 1
bindings.2.slave b
bindings.2.channel 0
bindings.3.slave b
bindings.3.channel 1
}
pcm.MixReale {
type dmix
ipc_key 1024
slave {
pcm "hw:0,0"
rate 48000
#rate 44100
periods 128
period_time 0
period_size 1024 # must be power of 2
buffer_size 8192
}
}
pcm.MixLoopback {
type dmix
ipc_key 1025
slave {
pcm "hw:Loopback,0,0"
rate 48000
#rate 44100
periods 128
period_time 0
period_size 1024 # must be power of 2
buffer_size 8192
}
}
Then
Code:
modprobe snd-aloop
Make sure that you have the mixer control for what you are trying to capture turned up.
To see the waveform of the audio while playing
Code:
ffplay -showmode 1 file.wav
In order to speed an audio file up you are going to have to compress or remove parts of it. I bet that's not what you want.
For speeding the audio up 10x try
Code:
mplayer -speed 10 file.wav
Or to slow it down
Code:
mplayer -speed .1 file.wav
I would not take an audio output, reduce it's frequency to file, then multiple the audio files frequency again.
Capture the high frequency output the way that it is. Then make a slowed copy for you to listen to.
And yes you can record and listen to a file at the same time. Either start capturing it then play the captured file with a media player, or send the capture to a named pipe, take the named pipe as an input.
I am afraid I do not really have the skills to modify a piece of software as complex as Audacity ....
I aheva already tried to capture with parecord for example, but how do I listen to the file at the same time as I capture?
Concerning the input, it must be dvided by 10 .... we are listening to the ultrasound range as I was saying! Hence we need to divide by 10 to hear it, then multiply by 10 to visualise the correct frequency in the sonogram.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.