MathGroup Archive 2009

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

Search the Archive

Using Lists with Mapping

  • To: mathgroup at smc.vnet.net
  • Subject: [mg101422] Using Lists with Mapping
  • From: BenT <brtubb at pdmusic.org>
  • Date: Tue, 7 Jul 2009 05:04:33 -0400 (EDT)

(* Given: *)

a = RealDigits[Pi,7,32]; b = RealDigits[E,3,32];

rule1 = {1 -> 2, 2 -> 4, 3 -> 5, 4 -> 7, 5 -> 9,
  6 -> 11} (* apply C Major scale to the chromatic scale *)

rule2 = {0->1/4,1->1/8,2->1/16} (* apply 3 duration values *)

a /. rule1;
b /. rule2;

(* How can the below function(s) be modified to allow another list (b)
to by mapped for substitution for the "1/8" duration parameter of the
function? *)

Sound[SoundNote[#,1/8] & /@ a, {0,8}]

Any help would be greatly apprecated.

Benjamin Tubb
brtubb at pdmusic.org
Mathematica 7 Home Edition User


  • Prev by Date: AbsoluteOptions for BarChart
  • Next by Date: Simplifying with KroneckerDelta
  • Previous by thread: Re: AbsoluteOptions for BarChart
  • Next by thread: Re: Using Lists with Mapping