Difference between revisions of "Music Composition"

From GMN Wiki
Jump to navigation Jump to search
Line 253: Line 253:
After the music recorder has started recording, it will record everything that is input using the [play command, and any other say commands (lyrics.) It will also estimate wait lengths, and round them down to the nearest 100 milliseconds.  
After the music recorder has started recording, it will record everything that is input using the [play command, and any other say commands (lyrics.) It will also estimate wait lengths, and round them down to the nearest 100 milliseconds.  


Note that the composition book is still editable after being filled in by the music recorder, in case of issues related to unusual or severe latency.  
Once it is stopped, you will be prompted to target a blank composition book. After targeting the book, you should review the information and make sure your wait times are correct.


Once it is stopped, a target will appear for you to select a blank composition book with. After targeting the book, you should review the information and make sure your wait times are correct.
If wait times seem to be in excess too often, you may try using a different client or assistant. We have found that the version of razor that comes alongside CUO when installing via the Angel Island Launcher seems to be more responsive than other versions, but feel free to check and see what works best for you.


===Sample Tunes===
===Sample Tunes===

Revision as of 21:48, 24 February 2022

General Information

Ultima Online has always been known for the freedom it lends its artists, whether decorating their characters, their homes, their outward personalities, or even their inventories in some cases. Now, exclusively on Angel Island, skilled musicians can also decorate the air (and make a good living doing so) using a brand new, custom designed Music Composition system!

In general, bards play musical notes using the [play command. Players can select from a variety of instruments, assign notes to hotkeys, and can even script complex compositions using assistants such as razor.

As well, a modernized, in-game music player has been added as a luxury item, which allows players to sell, sample and purchase scripted compositions from other players. Composers who contribute enough quality music to this system also unlock the ability to add the various sounds of Ultima Online to their compositions.

Sheet Music

The new Sheet Music system allows entrepreneurial troubadours to sell the music they compose. Creating Sheet music is also the first step towards adding compositions to the music box.

See Sheet Music for more information.

Music Box

musicbox1.png

This fully customized, luxury music player has been added to allow Angel Island homeowners to listen to music at their residences. It has been modernized to understand spoken commands, and works in conjunction with Sheet music to simplify the marketplace.

For more information, see Music Box

Instructions for Composers

Music composition uses the [play command. You do not need an instrument to use it, but require at least 80 skill in Musicianship.

If you don't select an instrument, the default instrument will play, which is a virtual harp. The other two options are the virtual lap harp or virtual Lute.

The basic format for using the [play command is as follows:

[play note|pause [note|pause] …

Note Values

There are 25 possible note values:

  • cl (low C)
  • csl (low C#)
  • d (D)
  • ds (D#)
  • e (E)
  • f (F)
  • fs (F#)
  • g (G)
  • gs (G#)
  • a (A)
  • as (A#)
  • b (B)
  • c (middle C)
  • cs (C#)
  • dh (high D)
  • dsh (high D#)
  • eh (high E)
  • fh (high F)
  • fsh (high F#)
  • gh (high G)
  • gsh (high G#)
  • ah (high A)
  • ash (high A#)
  • bh (high B)
  • ch (high C)

Note Offsets

Note offsets allow you to play different instruments on the same line, without explicitly changing instruments.

How it works:

[play uses an array of virtual instruments, which are assigned to a certain order:

[0] Harp
[1] LapHarp
[2] Lute

If you want to play an individual note on a different instrument, simply precede that note with either one or two plus or minus symbols, depending on which instrument you are playing.

For example, if you are playing a lapharp, you can:

[play a +a -a b +b -b c +c -c d +d -d

What this means is that 'a' is from the lapharp, '-a' is from the harp, and '+a' is from the lute. Similarly:

[play instrument lapharp [play a +a -a b +b -b c +c -c d +d -d [play instrument harp [play a +a ++a b +b ++b c +c ++c d +d ++d [play instrument lute [play a -a --a b -b --b c -c --c d -d --d

Incorrect Notes

You need at least 80.0 Musicianship to use [play

However, anything under GM and you will suffer a penalty where you have a chance to play notes incorrectly.

Music Karma

Musicians with high enough music karma can mimic the various sound files in the game client using the [play command. Music Karma is gained by publishing songs and selling them.

1000 music karma is required for playing sounds other than musical notes. You gain 100 points per composition added to the Music Box global repository (once approved) and an additional 100 points for every time your song gets purchased.

For a full list of available sounds and their corresponding numbers, see Sound List.

Player Options

The [play command (or "player") has multiple directives which must be specified using a variety of sub-commands:

[play Config

Displays the [play configuration settings.

[play Instrument

Selects the instrument.

Format: Harp, Lapharp, Lute.

Examples:

  • [play instrument harp
  • [play instrument lapharp
  • [play instrument lute

Default: Harp

[play NewTimer

Format: True or False

Example: [play newtimer true

This command directs the Player to use the more responsive New Timer System. This system allows greater flexibility during composition and playback.

Essentially, the new timer runs at a higher priority. It is finer-grained, which gives composers much better control over things like pauses.

For more information about New Timer usage, see the Advanced Usage section of this page.

Default: False

[play Prefetch

Note: Prefetch is available only when the New Timer is turned on by being set to true.

Format: True or False

Example [play prefetch true

Prefetch schedules the next pause immediately without waiting for the next timer cycle. The result is better responsiveness.

Note that existing tracks composed under the old timer will need their pauses reworked to work with prefetch.

For more information about prefetch usage, see the Advanced Usage section of this page.

Default: False

[play Tempo

Format: Number

Example: [play tempo 100

In the above example, 100 is the timer frequency you want. A tempo of 100 is a 100-millisecond timer and is the same granularity as the old-timer model.

a tempo of 50 is twice as fast as 100, 200 is twice as slow.

Setting the tempo to 200 for a tune composed at 100 will allow a nice slow playback to help the composer debug their tune.

Default: 100

[play Reset

The reset command resets the player configuration to all default values, which are:

instrument = harp

newtimer = false

prefetch = false

tempo = 100

[play +

Format: Number

Example: [play +480

In the above example, the musician has instructed the player to play a noise from the sound file list in the game client. +480 is the noise the game client produces when the cure spell is targeted.

Remember that this command only becomes available to players who have a combined total of 1000 or greater Music Karma, explained above.

[play chatter

Format: true or false

Example: [play chatter true

The chatter directive enables or disables the *Plays a tune* emote message.

Default: False

Music Capture System

The Music Capture System, or Music Recorder, is a cleaner way of entering the data from a music composition script into the composition book than simply pasting your razor scripts into them.

Using the recorder greatly enhances the user experience when editing and refining compositions.

Usage

The basic usage of the music recorder goes as follows:

1. [MusicRecorder start

2. Play your Razor script.

3. [MusicRecorder stop

4. Target your composition book.

Here is an example of what your script might look like:

say '[play -e 0.21 -fs b +eh 0.22 -e +eh 0.21 -g b +eh 0.21 -e b +eh 0.24 -fs 0.24 -e 0.19'

say '♪ Take my money,'

wait 1400

After the music recorder has started recording, it will record everything that is input using the [play command, and any other say commands (lyrics.) It will also estimate wait lengths, and round them down to the nearest 100 milliseconds.

Once it is stopped, you will be prompted to target a blank composition book. After targeting the book, you should review the information and make sure your wait times are correct.

If wait times seem to be in excess too often, you may try using a different client or assistant. We have found that the version of razor that comes alongside CUO when installing via the Angel Island Launcher seems to be more responsive than other versions, but feel free to check and see what works best for you.

Sample Tunes

Twinkle Twinkle Little Star

(Razor: Add a 2sec pause after the third line, and a 4sec pause before the last line.)

[play cl 0.4 cl 0.4 g 0.4 g 0.4 a 0.4 a 0.4 g 0.8

[play f 0.4 f 0.4 e 0.4 e 0.4 d 0.4 d 0.4 cl 0.8

[play g 0.4 g 0.4 f 0.4 f 0.4 e 0.4 e 0.4 d 0.8

[play g 0.4 g 0.4 f 0.4 f 0.4 e 0.4 e 0.4 d 0.8

[play cl 0.4 cl 0.4 g 0.4 g 0.4 a 0.4 a 0.4 g 0.8

[play f 0.4 f 0.4 e 0.4 e 0.4 d 0.4 d 0.4 cl 0.8 

Frere Jacques

(Razor: Add a 1sec pause between the 2nd and 3rd lines.

[play c 0.3 dh 0.3 eh 0.3 c 0.4 c 0.3 dh 0.3 eh 0.3 c 0.3

[play eh 0.3 fh 0.3 gh 1.0 eh 0.3 fh 0.3 gh 1.0 gh 0.1 ah 0.1 gh 0.1 fh 0.1 eh 0.3 c 0.3

[play gh 0.1 ah 0.1 gh 0.1 fh 0.1 eh 0.3 c 0.4 c 0.3 g 0.3 c 1.0 c 0.3 g 0.3 c 

Pop Goes the Weasel

[play d 0.2 g 0.6 g 0.2 a 0.6 a 0.2 b 0.2 dh 0.2 b 0.2 g 0.6

[play d 0.2 g 0.6 g 0.2 a 0.6 c 0.2 b 0.8 g 0.6

[play d 0.2 g 0.6 g 0.2 a 0.6 a 0.2 b 0.2 dh 0.2 b 0.2 g 0.8

[play eh 0.8 a 0.4 c 0.2 b 0.8 g 

Advanced Usage

The following information has been submitted by Galois to help Angel Island's musicians understand some of the more complex settings involved with the Music Composition system.

Understanding Prefetch and NewTimer

Here's a diagram of what's going on when you play some simple notes:

[play cl 0.1 d 0.1 e

musicbox14.png


The tempo parameter determines the duration of the "resonance" period. This means you can't just use tempo to arbitrarily scale the speed of your piece up and down - you'll have to adjust the designated pauses to match.

The prefetch parameter determines whether the music engine waits for a note to finish resonating before beginning the pause. [1] So with prefetch enabled, you can play notes very quickly:


[play cl 0.01 d 0.01 e 0.01 f 0.01 g

  Using a negative pause when prefetch is disabled makes that pause a prefetch pause. So you can use negative pauses to play notes quickly in succession, e.g.,  

[play cl -0.01 d -0.01 e -0.01 f -0.01 g


Taken together, you can use prefetching (either by using the prefetch parameter or by using negative pauses) to dial in your rhythm very precisely. See the below example for getting 3 notes against 2, for instance.

Repeating Notes

One wrinkle is that the client has a built-in limitation on repeating the same .wav file - probably to save our ears from obnoxious footstep sounds. So if you try to repeat the same note rapidly, any notes struck while a previous note is still sounding (literally while the .wav file for that note is still playing in the client) will be ignored.

The duration of the .wav files is different by instrument - so lutes can be repeated much faster than standing harps. Also, if you change instruments, you can repeat notes very quickly (since it's literally playing different .wav files), though you're limited to notes that exist within both instruments' registers.

Using Multiple Instruments

Here's an example of using multiple instruments within the same line, so the "accompaniment" (a rather unimaginative rendition of the repeating g-sharps and c-sharps from the Chariots of Fire theme) can be in on the standing harp, while the melody is on the lap harp (note the +cs, +fsh, etc):


say '[play newtimer true'

say '[play prefetch false'

say '[play tempo 90'

say '[play instrument harp'

 

say '[play csl 0.1 csl 0.1 csl 0.1 csl 0.1'

wait 800

say '[play csl 0.1 csl 0.1 csl -0.01 +cs 0.1 csl 0.1'

wait 800

  1. Note 3 against 2 rhythm

say '[play csl -0.01 +fsh 0.08 csl -0.07 +gsh -0.15 csl -0.15 +ash -0.07 csl 0.1'

wait 800

say '[play csl -0.01 +gsh 0.08 csl 0.1 csl 0.1 csl 0.1'

wait 800

say '[play csl -0.01 +fh 0.08 csl 0.1 csl 0.1 csl 0.1'  


[1] :  One quirk to keep in mind is that if no pause is specified (e.g., [play cl d e) prefetch won't be used. So [play cl d e will sound the same whether prefetch is true or false.

Additional Information

A Case Study: Making the 3-over-2 rhythm

Where did the particular pause durations come from, other than trial-and-error?

1. First, I figured out the tempo I wanted, and settled on tempo=90, with 0.1 pauses. That seemed like a good enough "feel" for the Chariots of Fire bassline.

2. Second, I had to figure out how long the actual "resonance" period was. I knew I'd be able to calculate that if I could make some pauses exactly twice as long as others. So I did some experiments. I started with:


[play cl 0.1 cl 0.1 cl 0.1 cl 0.1 g 0.3 g 0.3 cl 0.1 cl 0.1 cl 0.1 cl 0.1 g 0.3 g 0.3  

This would have been the best we could do with the old timer system, but it's not quite right. So I fiddled a bit, and ended up with:  

[play cl 0.1 cl 0.1 cl 0.1 cl 0.1 g 0.34 g 0.34 cl 0.1 cl 0.1 cl 0.1 cl 0.1 g 0.34 g 0.34  

So doing a little math, I reasoned that:

2 * (0.01 + x + 0.1) = 0.01 + x + 0.34

and calculated that the resonance period is about 0.13 at this tempo. Therefore, if those are eighth notes, 2 beats of them will be 4 * (0.01 + 0.13 + 0.10) = 4 * 0.24 = 0.96

That's conveniently divisible by 3, so we know that each triplet should be 0.32 total. So now it was just a matter of stacking up the notes so that baseline sounded on 0.0, 0.24, 0.48, 0.72 and 0.96, while the triplets sounded on 0.0, 0.32, and 0.64.