Re: Representing musical timings on a helix

• To: mathgroup at smc.vnet.net
• Subject: [mg127746] Re: Representing musical timings on a helix
• From: W Craig Carter <ccarter at MIT.EDU>
• Date: Sat, 18 Aug 2012 03:45:24 -0400 (EDT)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com
• Delivered-to: l-mathgroup@wolfram.com
• Delivered-to: mathgroup-newout@smc.vnet.net
• Delivered-to: mathgroup-newsend@smc.vnet.net
• References: <20120817074724.C276F685F@smc.vnet.net>

```Andrew,
If I understand your problem statement correctly, here are some examples to get you started.
I didn't add any helpful comments, but using the help browser on things that are opaque is a good learning exercise.

Here are some examples:

time = Flatten[{{{0.0348299}, {0.476009}, {0.940408}, {1.3932},
{1.84599}, {2.29878}, {2.75156}, {3.18113}, {3.65714}, {4.12154},
{4.59755}, {5.03873}, {5.49152}, {5.92109}, {6.42032}, {6.90794},
{7.39556}, {7.87156}, {8.34757}, {8.82358}, {9.3112}, {9.79882},
{10.3445}, {10.983}, {11.5751}, {12.2369}, {12.9683}, {13.6882},
{14.4312}, {15.1859}, {15.9637}, {16.7416}, {17.5543}}}]

itime = ListInterpolation[time]

vertdistanceK = Sqrt[2];
beats = 8;

helix[t_] :=
Flatten[{{Cos[ 2 Pi t/beats], Sin[2 Pi t /beats]}/itime'[t],
vertdistanceK  itime[t]}]

helixPlot = ParametricPlot3D[helix[t], {t, 1, 33}, PlotStyle -> Thick]

Manipulate[
Show[helixPlot, Graphics3D[Sphere[helix[t], 1]]], {t, 1, 33}]

bCurve = BSplineCurve[Table[helix[t], {t, 1, 33, 32/100}]];

bTube = Graphics3D[{Yellow, Tube[bCurve]}]

Manipulate[
Show[Graphics3D[{Green, Opacity[0.5], Sphere[helix[t], 1]}], bTube,
PlotRange -> {{-3, 3}, {-3, 3}, {-1, 28}}], {t, 1, 33}]

W Craig Carter

On Aug 17, , at Fri Aug 17, 12 @3:47 AM, amcgraw wrote:

> Dear List,
>
> I'm a musicologist new to mathematica, hoping the readership will indulge my considerable ignorance for a moment. I'm trying to represent musical timings as points going around a helix. Each full revolution should include 8 beats (points) and the helix should "swell" with slower tempos (longer inter-onset intervals) and "compress" with faster tempos (shorter inter-onset intervals).
>
> Plotting this 2D is easy enough, but uninteresting.
>
> A colleague has suggested the following to graph this helix.
>
> C(t) counts # of beats elapsed at time t, then slope C'(t) = beats per minute at time t. Constants: K = vertical distance between cycles; N = number of beats in one cycle (here 8). Then the onsets are represented on the spiral using:
>
> x = (1/C'(t)) cos((2pi/N)t)
> y = (1/C'(t)) sin((2pi/N)t)
> z = KC(t)
>
> I'm wondering how the readership would go about realizing this within mathematica. Having just installed the program, I'm just now getting up to speed with basic importing and visualization of data, as well as playing with various ways to build and manipulate 3D graphics. Its bridging these two, in this example, that I'd greatly appreciate pointers on.
>
> Thank You!
> AM
>
> Sample timing data outlining 4 cycles of 8 beats, slowing down:
>
> {{{0.0348299}, {0.476009}, {0.940408}, {1.3932}, {1.84599},
> {2.29878}, {2.75156}, {3.18113}, {3.65714}, {4.12154}, {4.59755},
> {5.03873}, {5.49152}, {5.92109}, {6.42032}, {6.90794}, {7.39556},
> {7.87156}, {8.34757}, {8.82358}, {9.3112}, {9.79882}, {10.3445},
> {10.983}, {11.5751}, {12.2369}, {12.9683}, {13.6882}, {14.4312},
> {15.1859}, {15.9637}, {16.7416}, {17.5543}}}
>
>

```

• Prev by Date: Re: NDSolve bug?
• Next by Date: TemplateBox (was: compact notation for NonCommutativeMultiply that
• Previous by thread: Re: Representing musical timings on a helix
• Next by thread: Re: Representing musical timings on a helix