From: BenT on
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

From: Nasser M. Abbasi on

----- Original Message -----
From: "BenT" <brtubb(a)pdmusic.org>
Newsgroups: comp.soft-sys.math.mathematica
Sent: Wednesday, December 09, 2009 4:41 AM
Subject: Play Command Error


> 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
>

I never used Play before. But I was wondering if you meant to add the tones
before playing them? like this

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

--Nasser


From: Bob Hanlon on

notes = Table[N[(440/64)*2^((n + 3)/12)], {n, 60, 72, 1}];

Attributes[Play]

{HoldAll,Protected}

Since Play has attribute HoldAll you should use Evaluate.

Play[Evaluate[Sin[# 2 Pi t] & /@ notes], {t, 0, .5}]


Bob Hanlon

---- BenT <brtubb(a)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



From: DrMajorBob on
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(a)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(a)yahoo.com

From: David Park on
Do you mean this?

notes = Table[N[(440/64)*2^((n + 3)/12)], {n, 60, 72, 1}];

Show[Play[Sin[# 2 Pi t], {t, 0, .5}] & /@ notes]


David Park
djmpark(a)comcast.net
http://home.comcast.net/~djmpark/


From: BenT [mailto:brtubb(a)pdmusic.org]


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