From nextmusic@wri.com Mon Jan 11 23:46 EST 1993 Received: from dragonfly.wri.com by panix.com (5.64/A/UX-2.01-AMR) id AA05857; Mon, 11 Jan 93 23:46:47 EST Received: by dragonfly.wri.com id AA16419 (5.67a8/IDA-1.4.4 for ro@panix.com); Mon, 11 Jan 1993 22:39:42 -0600 Date: Mon, 11 Jan 1993 22:39:42 -0600 From: NeXTmusic Mailing List Message-Id: <199301120439.AA16419@dragonfly.wri.com> Subject: Tuning statements in Score language Reply-To: Rick McGowan Apparently-To: davidf@woof.music.columbia.edu Apparently-To: mara@woof.music.columbia.edu Apparently-To: ro@panix.com Apparently-To: hammill@u.washington.edu Status: RO Received by nextmusic: Mon, 11 Jan 93 18:40:19 -0800 Now that the source of MusicKit is around CCRMA... I don't suppose that anyone has made any ScoreFile language twiddles that can be used for more flexible Tuning statements? The current tuning (according to the language reference manual anyway) seems like it doesn't support the arbitrary tuning of the entire set of key numbers, but only "pitch-class" tuning within octaves. The MusicKit "TuningSystem" object, however, seems to be entirely flexible about pitch to keyNum coorespondence. It looks like in the kit, only one Tuning system is ever allocated (installed), and each time a Score file tuning statement is issued, the installed system is affected by transposition or setting key num and octaves... Is it REALLY the case that every time one reads a score file with a tuning statement in it, the performance of every score is affected by these statements? Seems I must be missing something... The application I have in mind is matching some DSP tunings to tunings I have in MIDI synthesizers... The score file seems to always be written out by the app in terms of 12-tone pitch class (e.g., "keyNum:d3k"). Rick From nextmusic@wri.com Mon Jan 18 22:51 EST 1993 Received: from dragonfly.wri.com by panix.com (5.64/A/UX-2.01-AMR) id AA18084; Mon, 18 Jan 93 22:51:39 EST Received: by dragonfly.wri.com id AA13814 (5.67a8/IDA-1.4.4 for ro@panix.com); Mon, 18 Jan 1993 21:44:12 -0600 Date: Mon, 18 Jan 1993 21:44:12 -0600 From: NeXTmusic Mailing List Message-Id: <199301190344.AA13814@dragonfly.wri.com> Subject: Re: Tuning statements in Score language Reply-To: david@jaffe.com (David A. Jaffe) Apparently-To: mara@woof.music.columbia.edu Apparently-To: ro@panix.com Apparently-To: hammill@u.washington.edu Apparently-To: mcyr@weber.UCSD.EDU Status: RO Received by nextmusic: Mon, 18 Jan 93 17:39:56 -0800 >It looks like in the kit, only one Tuning system is ever allocated (installed), and each time a Score file tuning statement is issued, the installed system is affected by transposition or setting key num and octaves... Is it REALLY the case that every time one reads a score file with a tuning statement in it, the performance of every score is affected by these statements? Seems I must be missing something... Yes, this is really the case. There is one installed tuning system and ScoreFile statements affect this tuning system. If you want this to not be the case, simply have your application grab a copy of the state of the installed tuning system after reading each scorefile. Then install that tuning system before playing the file. Note the following subtlety. If you have this in your scorefile: freq:c4 you get a floating point value that is the value of c4 at the time, even if a4 is later changed. Any Instrument accessing that value gets the floating point value. However, if an Instrument converts that value to a key number, than the conversion depends on the installed tuning system. Similarly, if you have this in your scorefile: keyNum:c4k then you set the keyNum parameter to c4k (MIDI key number 60). When that Note is sent to a Midi object, you will always get a value of 60. But if an Instrument converts that value to a frequency, then the conversion depends on the installed tuning system. Note also that there's a difference in semantics between reading a ScoreFile into a Score and then playing it with a ScorePerformer versus playing a ScoreFile on the fly with a ScorefilePerformer. The reason is that, in the former case, all ScoreFile statements have been executed by the time the first note of the Score is played. Thus, if late in the file there is a "tune" statement, this change will affect all notes. In the latter case, the "tune" statement only affects the notes it precedes. >The application I have in mind is matching some DSP tunings to tunings I have in MIDI synthesizers... This is a perfectly feasible application given the Music Kit tuning support (in fact, it was designed for just this kind of thing.) >The score file seems to always be written out by the app in terms of 12-tone pitch class (e.g., "keyNum:d3k"). The key numbers are written out this way, but d3k is just another way of saying 50--i.e. it doesn't necessarily mean d3. Note that pitches can be written out as frequencies or names. From musickit.h: /* Scorefile reading and writing. */ extern void MKWritePitchNames(BOOL usePitchNames); /* Selects whether values of the parameters freq0 and freq are written as * pitch names or as frequencies in Hz. If you write them as pitch names, * they are rounded to the nearest pitch. The default is NO. */ >I don't suppose that anyone has made any ScoreFile language twiddles that can be used for more flexible Tuning statements? The current tuning (according to the language reference manual anyway) seems like it doesn't support the arbitrary tuning of the entire set of key numbers, but only "pitch-class" tuning within octaves. The MusicKit "TuningSystem" object, however, seems to be entirely flexible about pitch to keyNum correspondence. I thought this was supported... I'll get back to you about this soon. From nextmusic@wri.com Tue Jan 19 01:41 EST 1993 Received: from dragonfly.wri.com by panix.com (5.64/A/UX-2.01-AMR) id AA28258; Tue, 19 Jan 93 01:41:23 EST Received: by dragonfly.wri.com id AA17105 (5.67a8/IDA-1.4.4 for ro@panix.com); Tue, 19 Jan 1993 00:33:59 -0600 Date: Tue, 19 Jan 1993 00:33:59 -0600 From: NeXTmusic Mailing List Message-Id: <199301190633.AA17105@dragonfly.wri.com> Subject: correction Reply-To: david@jaffe.com (David A. Jaffe) Apparently-To: davidf@woof.music.columbia.edu Apparently-To: mara@woof.music.columbia.edu Apparently-To: ro@panix.com Apparently-To: hammill@u.washington.edu Status: RO Received by nextmusic: Mon, 18 Jan 93 20:51:00 -0800 There was a typo in my previous message. It should have read: ============================= Note the following subtlety. If you have this in your scorefile: freq:c4 you get a floating point value that is the value of c4 at the time, even if c4 is later changed. ========================== By the way, for some reason, many of the lines in the message became double-spaced, making the message somewhat hard to read. I don't think I sent it that way. From nextmusic@wri.com Tue Jan 19 02:56 EST 1993 Received: from dragonfly.wri.com by panix.com (5.64/A/UX-2.01-AMR) id AA29440; Tue, 19 Jan 93 02:56:54 EST Received: by dragonfly.wri.com id AA19271 (5.67a8/IDA-1.4.4 for ro@panix.com); Tue, 19 Jan 1993 01:49:31 -0600 Date: Tue, 19 Jan 1993 01:49:31 -0600 From: NeXTmusic Mailing List Message-Id: <199301190749.AA19271@dragonfly.wri.com> Subject: more info about tuneing in scorefiles Reply-To: david@jaffe.com (David A. Jaffe) Apparently-To: davidf@woof.music.columbia.edu Apparently-To: mara@woof.music.columbia.edu Apparently-To: ro@panix.com Apparently-To: hammill@u.washington.edu Status: RO Received by nextmusic: Mon, 18 Jan 93 21:34:21 -0800 You can, indeed, tune individual notes in a Music Kit ScoreFile by just treating them as variables. For example: a4 = 441; a3 = 227 * 2 ^ (1.01/12); a2 = 116.123; a1 = 10000; bf2 = 7612; // etc. Note, however, that bf2 and as2 are the SAME variable--changing one changes the other. The same goes for all enharmonic equivalents.