help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sound() in Octave


From: Hugo Coolens
Subject: Re: sound() in Octave
Date: Wed, 28 Nov 2012 22:17:42 +0100

2012/11/28, nickecarlo <address@hidden>:
> Hey,
>
> I apologize if this has been covered before but I am required to study
> Octave at my university. The way they're going through the exercises, they
> already assume that sound() works with Octave out of the box. However that
> does not seem to be the case. I am doing a distance learning course so I
> can't get direct help from the university on this.
>
> Could anyone tell me how I could play audio of, say, a sampled sine wave.
> My
> university teaches sound(x, 8000) for example where x contains the
> calculations for the sine wave and 8000 is the sampling rate.
>
> I have sox installed but I have no idea how sox and Octave work together,
> nor do I know if there is any other function I can use instead of sound().
>
> I'd really appreciate any kind of help that you can give me on this.
>
> Regards,
>
> Nick
>

2012/11/28, nickecarlo <address@hidden>:
> Hey,
>
> I apologize if this has been covered before but I am required to study
> Octave at my university. The way they're going through the exercises, they
> already assume that sound() works with Octave out of the box. However that
> does not seem to be the case. I am doing a distance learning course so I
> can't get direct help from the university on this.
>
> Could anyone tell me how I could play audio of, say, a sampled sine wave.
> My
> university teaches sound(x, 8000) for example where x contains the
> calculations for the sine wave and 8000 is the sampling rate.
>
> I have sox installed but I have no idea how sox and Octave work together,
> nor do I know if there is any other function I can use instead of sound().
>
> I'd really appreciate any kind of help that you can give me on this.
>
> Regards,
>
> Nick
>
If you have made your sound-sample array e.g. y first with wavwrite you can use
playaudio(y) to play it.
Note that y should be a column matrix, so it might be necessary to
transpose it i.e. playaudio(y')
I also noticed that on a Debian Squeeze machine I had to do
the following: su -c 'apt-get install oss-compat'  because otherwise
my system complained with a  "/dev/dsp permission denied" message

hope this helps
hugo














>
>
> --
> View this message in context:
> http://octave.1599824.n4.nabble.com/sound-in-Octave-tp4647334.html
> Sent from the Octave - General mailing list archive at Nabble.com.
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://mailman.cae.wisc.edu/listinfo/help-octave
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]