playing multi-sounds
J. Landman Gay
jacque at hyperactivesw.com
Fri Jan 30 14:29:57 EST 2009
Judy Perry wrote:
> Scott,
>
> Was that really the case for 2.4?
>
> I have a vague recollection of a SNDChannel external but don't recall coming
> across it in HC 2.4. But I could be wrong.
Sound channels were implemented directly into the HC engine sometime
after the 2.0 release (can't remember exactly when.)
The advantage of this approach was that some very complex music could be
created on the fly, using scripting only, without the need for large
sound files. Similar to MIDI notation, long or complex music could be
generated using only a short script, and the only resource necessary was
a small sampling of an instrument sound file. The resulting music
probably wasn't good enough for commercial work (with the exception
possibly of some children's software,) but it was wonderful for dynamic
music generation.
The very best use of sound channels I ever found in HC was a rendition
of a Bach Chorale. It employed 4-part synchronized harmony, played by
the embedded "flute" sound that shipped with HyperCard, using a small
and compact little script. I'm sorry I don't know who transcribed it.
I'm also sorry that none of my emulators will play all the sound
channels any more, as it was a beautiful little thing. :(
-- from Bach, Choral(Cantata Nr.39, "Brich dem Hungrigen dein Brot")
-- 1-4
put the soundChannel into originalLevel
set the soundChannel to 4
play flute tempo 80 b3bq a bb f g ae bb c4 c3 fq g a bb g fe eb fq b2bh
set the soundChannel to 3
play flute tempo 80 dq c b3b a bb c4 ce b3b aq d4 c b3be a bbq bb a fh
set the soundChannel to 2
play flute tempo 80 fq f f f fe e fq e c g f f eb f fe eb dh
set the soundChannel to 1
play flute tempo 80 bbq c5 d c b4b a g f bb c5 d eb d c b4bh
-- 1-4repeat
set the soundChannel to 4
play flute tempo 80 b3bq a bb f g ae bb c4 c3 fq g a bb g fe eb fq b2bh
set the soundChannel to 3
play flute tempo 80 dq c b3b a bb c4 ce b3b aq d4 c b3be a bbq bb a fh
set the soundChannel to 2
play flute tempo 80 fq f f f fe e fq e c g f f eb f fe eb dh
set the soundChannel to 1
play flute tempo 80 bbq c5 d c b4b a g f bb c5 d eb d c b4bh
-- 5-8
set the soundChannel to 4
play flute tempo 80 bb2q c3 d ebe f g f ebq dh d4q bb3 eb f
ge a bbq fh
set the soundChannel to 3
play flute tempo 80 fq eb a3e b c4q bb3 eb4 a3h bbe c4 dq ebe
d cq bb3e c4 d e fh
set the soundChannel to 2
play flute tempo 80 bbq ae g f gs ab gq g g gbh fq bb bb a
g fe g ah
set the soundChannel to 1
play flute tempo 80 d5q eb f eb d c dh fq f g f eb d ch
-- 9-13
set the soundChannel to 4
play flute tempo 80 b3bq b2b c3 d3 ebe d cq b2be c3 dq g2h g3q d eb e fe
eb d b2b f3h b2bh.
set the soundChannel to 3
play flute tempo 80 fe eb dq c f3 g a bb a gh bbq b c4 g3 a bb bb a fh.
set the soundChannel to 2
play flute tempo 80 bbq bb bbe a bb a g f ebq de e f#q gh gq ab ge a bbq
ae g fq fq. ebe dh.
set the soundChannel to 1
play flute tempo 80 d5e eb fq eb de c b4bq c5 dh b4bh d5e eb fq eb d c d
ch b4bh.
set the soundChannel to originalLevel
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list