/* Spectroscopic Toolkit version 1.66 by Pieter Suurmond, august 18, 2003. This composition was renamed to "boog" on friday april 9. 2004. */ #include /* For FILE. */ #include "ST_wavelets.h" /* For ENGINE. */ #include "c00.h" /* For c02_smear() and others. */ short c07_composition2003_part1(ENGINE E, FILE* msg, double starttime) { /* Variable starttime but fixed duration. */ short e; double fixedDayDur = 24.0 * 60.0 * 60.0 / 2048.0; /* 42.1875 seconds per day. */ /* Subtle shaping of the massive iron cloud. */ const double FeShapeFreqs[] = { -1001.471801, /* One before last (highest) of Ag. */ (-1316.874668 + /* Average two highest of Ag. */ -1322.420292)/2.0, 268.827745, /* First of Hg (almost lowest). */ 225.807860, /* Second of Hg (lowest). */ 0.0 }; /* End with 0.0. */ if (msg) fprintf(msg, "Starting c07_composition2003().\n"); /*---------------------------- Sunday: ------------------------------------------*/ if (msg) fprintf(msg, "Au starttime=%.3f.\n", starttime); e = c02_smear(7900, /* 7900=Au (100 * Atomic number + ionisation level). */ 3.00, /* Linear overall amplitude about 3.20 is ok for Au. */ /* Not too loud: 3.00 is better than 3.20. */ starttime, /* Starttime in seconds. */ fixedDayDur, /* 'effective duration' in seconds. */ 1, /* 0 for down, 1 for up (ascending pseudo-glissando). */ 0, /* jj=0 does not scramble times (with J levels). */ /* ONLY Au gets no scrambling. */ E, /* Pass DSP engine. */ msg); /* NULL, stdout or some logfile. */ /* H coloring: play 6th harmonic on starting a: */ e |= c06_HcolorAu2003(starttime, fixedDayDur, E, msg); if (e) goto finish2003; starttime += fixedDayDur; /*---------------------------- Monday: -------------------------------------------*/ if (msg) fprintf(msg, "Ag starttime=%.3f.\n", starttime); e = c02_smear(4700, /* 4700=Ag (100 * Atomic number + ionisation level). */ 2.80, /* Linear overall amplitude about 4.20 is ok for Ag. */ /* Not too loud: 3.00 seems better than 4.20. */ starttime, /* Starttime in seconds. */ fixedDayDur, /* 'effective duration' in seconds. */ 1, /* 0 for down, 1 for up (ascending pseudo-glissando). */ 1, /* jj=1 scrambles TOP times (with J levels). */ E, /* Pass DSP engine. */ msg); /* NULL, stdout or some logfile. */ /* H coloring, plays overtones on last 2 Ag tones: */ e |= c06_HcolorAg2003(starttime, fixedDayDur, E, msg); if (e) goto finish2003; starttime += fixedDayDur; /*---------------------------- Tuesday: ------------------------------------------*/ if (msg) fprintf(msg, "Fe starttime=%.3f.\n", starttime); e = c01_shapedCloud(2600, /* 2600=Fe (100*Atomic num + ionisation lvl). */ 0.18, /* Linear overall amplitude (0.18=OK for Fe). */ starttime + /* Starttime in seconds. */ /* 0.30 ? */ 0.26 * fixedDayDur, /* 0.52 of time for fade-in plus fade-out. */ /* 0.40 ? */ 0.48 * fixedDayDur, /* 'effective duration' in seconds. */ FeShapeFreqs, /* Shape with surrounding elements. */ E, /* Half of it, otherwise it overwhelms */ msg); /* the preceding day. */ if (e) goto finish2003; starttime += fixedDayDur; /*---------------------------- Wednesday: ----------------------------------------*/ if (msg) fprintf(msg, "Hg starttime=%.3f.\n", starttime); e = c02_smear(8000, /* 8000=Hg (100 * Atomic number + ionisation level). */ 3.00, /* Linear overall amplitude. */ starttime, /* Starttime in seconds. */ fixedDayDur, /* 'effective duration' in seconds. */ 1, /* 0 for down, 1 for up (ascending pseudo-glissando). */ 1, /* 1 is weird CP: jj=1 scrambles TOP times (with J levels). */ E, /* Pass DSP engine. */ msg); /* NULL, stdout or some logfile. */ if (e) goto finish2003; starttime += fixedDayDur; /*---------------------------- Thursday: -----------------------------------------*/ if (msg) fprintf(msg, "Sn starttime=%.3f.\n", starttime); e = c02_smear(5000, /* 5000=Sn (100 * Atomic number + ionisation level). */ 3.00, /* Linear overall amplitude. */ starttime, /* Starttime in seconds. */ fixedDayDur, /* 'effective duration' in seconds. */ 1, /* 0 for down, 1 for up (ascending pseudo-glissando). */ 1, /* 1 is weird counterpoint: jj=1 scrambles TOP times (with J levels). */ E, /* Pass DSP engine. */ msg); /* NULL, stdout or some logfile. */ if (e) goto finish2003; starttime += fixedDayDur; /*---------------------------- Friday: ------------------------------------------*/ if (msg) fprintf(msg, "Cu starttime=%.3f.\n", starttime); e = c01_massiveCloud(2900, /* 2900=Cu (100*Atomic num + ionisation lvl). */ 0.80, /* Linear overall amplitude (0.88=OK for Cu). */ starttime + /* Starttime in seconds. */ /* 0.30 ? */ 0.26 * fixedDayDur, /* 0.52 of time for fade-in plus fade-out. */ /* 0.40 ? */ 0.48 * fixedDayDur, /* 'effective duration' in seconds. */ E, /* Half of it, otherwise it overwhelms */ msg); /* the preceding day. */ if (e) goto finish2003; starttime += fixedDayDur; /*---------------------------- Saturday: ----------------------------------------*/ if (msg) fprintf(msg, "Pb starttime=%.3f.\n", starttime); e = c02_smear(8200, /* 8200=Pb (100 * Atomic number + ionisation level). */ 3.00, /* Linear overall amplitude. */ starttime, /* Starttime in seconds. */ fixedDayDur, /* 'effective duration' in seconds. */ 0, /* 0 for down, 1 for up (ascending pseudo-glissando). */ 0, /* 1 is weird CP: jj=1 scrambles TOP times (with J levels). */ E, /* Pass DSP engine. */ msg); /* NULL, stdout or some logfile. */ if (e) goto finish2003; starttime += fixedDayDur; /*--------------------------------------------------------------------------------*/ finish2003: if (msg) fprintf(msg, "Finished, c07_composition2003() = %d.\n", e); return e; } /*------------------------------------------------------------------------*/ short c07_composition2003_part2(ENGINE E, FILE* msg, double starttime) { /* Variable starttime but fixed duration. */ short e = 0; starttime -= 4.00; /* First 4 seconds of birds are silent. */ e |= c05_niceHydrogenBirds(starttime, E, msg); e |= c06_HHeP_bells(E, msg, starttime + 17.8); /* 15.8 seconds = at first top of high bird. */ /* 18.0 and 17.9 are acceptable but 17.8 is the best. */ return e; }