©2003 Kåre Sjölander and Jonas Beskow
Introduction Download Documentation Links Forum
WaveSurfer user forum

FAQ  FAQ
Search  Search
Memberlist  Memberlist
Register  Register
Profile  Profile
Login  Login

changing amplitude with Snack

 
Post new topic   Reply to topic    www.speech.kth.se/wavesurfer Forum Index -> WaveSurfer
View previous topic :: View next topic  
Author Message
ek



Joined: 05 Sep 2002
Posts: 30
Location: Portland OR

PostPosted: Mon Oct 04, 2004 7:35 pm    Post subject: changing amplitude with Snack Reply with quote

How can I change the amplitude of a wavefile in a Snack script? I found how it's done within Wavesurfer, but it is not clear to me how to use it in a standalong tcl script.

Thanks, Esther
Back to top
View users profile Send private message Send email Visit posters website
kare



Joined: 16 Aug 2002
Posts: 371
Location: KTH, Centre for Speech Technology

PostPosted: Tue Oct 05, 2004 9:22 am    Post subject: Reply with quote

If you want to scale more than one file, Snack is definitely the right tool. Probably a lot easier to understand how to do that with Snack, than grasp how to get WaveSurfer to do batch processing. ("easier" is not the same as "easy" though icon_smile.gif)

You can use the filter map to scale a sound, like in the following code snippet
Code:

set s [snack::sound]
$s read file.wav
set f [snack::filter map 0.5]
$s filter $f


Alternatively you could use the mix command which alllows for a multiplicative factor, like in the following commands (shorter but less clear maybe)
Code:

set s [snack::sound]
$s read file.wav
$s mix $s -mixscaling 0.5 -prescaling 0.0



Kåre
Back to top
View users profile Send private message Visit posters website
ek



Joined: 05 Sep 2002
Posts: 30
Location: Portland OR

PostPosted: Tue Oct 05, 2004 4:47 pm    Post subject: Reply with quote

Thanks, that works like a charm.

Esther
Back to top
View users profile Send private message Send email Visit posters website
Display posts from previous:   
Post new topic   Reply to topic    www.speech.kth.se/wavesurfer Forum Index -> WaveSurfer All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2.0.1 © 2001, 2002 phpBB Group