MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Play Command Error

  • To: mathgroup at smc.vnet.net
  • Subject: [mg105581] Re: [mg105558] Play Command Error
  • From: DrMajorBob <btreat1 at austin.rr.com>
  • Date: Thu, 10 Dec 2009 04:55:32 -0500 (EST)
  • References: <200912091042.FAA16696@smc.vnet.net>
  • Reply-to: drmajorbob at yahoo.com

Here are the "notes" you're trying to play:

ClearAll["Global`*"]

notes = Table[N[(440/64)*2^((n + 3)/12)], {n, 60, 72, 1}];
Table[Sin[# 2 Pi t] & /@ notes, {t, 0, .5}]

{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}

The entries are not real, the amplitudes are (Integer) zero, you're  
playing 13 channels at once, and there's only one note.

I don't have a clue what the frequency or frequencies might be.

Bobby

On Wed, 09 Dec 2009 04:42:05 -0600, BenT <brtubb at pdmusic.org> wrote:

> I'm using v7. Please try this code:
>
> ClearAll["Global`*"]
>
> notes=Table[N[(440/64)*2^((n+3)/12)],{n,60,72,1}];
>
> Play[Sin[# 2 Pi t]&/@notes ,{t,0,.5}]
>
> Sound::ssnm: A good PlayRange could not be found since most of the
> samples are not evaluating to machine-size real numbers. >>
>
> I cannot understand why this error message is produced. Can anyone
> help? The values for the "notes" are certainly machine-sized! What's
> causing the Sin[# # Pi t] expression to NOT produce valid resuls?
>
> --- Benjamin Tubb
>


-- 
DrMajorBob at yahoo.com


  • Prev by Date: Re: Buttons and Overwriting a Cell
  • Next by Date: Re: Replacing notebook symbols with colored text
  • Previous by thread: Play Command Error
  • Next by thread: Re: Play Command Error