Music Composition

From GMN Wiki
Jump to navigation Jump to search

Wikisidebarart.png

Wikitop4.png

Tchestbase2.gif

Lit01.gif

Lit02.gif

Lit04.gif

Lit06.gif

64.png

Tchestlid2.gif

Wikilogo5.png

Aispwiki.png


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.

Volume

The Volume of each note can be set using the format vX, where X = any number from 0-20. This should be placed before any note or series of notes which you would like to change.

Example:

[play macro part1=v0 1 a v1 1 a v2 1 a v3 1 a v4 1 a v5 1 a v6 1 a v7 1 a
[play macro part2=v8 1 a v9 1 a v10 1 a v11 1 a v12 1 a v13 1 a v14 1 a v15 1 a v16 1 a 
[play macro part3=v17 1 a v18 1 a v19 1 a v20 1 a v21 1 a v22 1 a v23 1 a v24 1 a
[play macro part4=v25 1 a v26 1 a v27 1 a v28 1 a v29 1 a v30 1 a v31 1 a v32 1 a
[play %part1% %part2%  %part3%  %part4% 

You must also enable concert mode using the command [play ConcertMode True if you want other people to hear the differences in volume. Without concert mode activated, volume for others will remain at its default of 20 (ie. Max volume) which diminishes the further they are from the source of the music.

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.

Titles for Composers

After joining the NPC Bards guild, players can earn the profession based title of Composer by composing music. This title is based on "skill" level, ranging from Neophyte to Grandmaster (ie. Adept Composer.)

Similarly to Music Karma, points to upgrade your Composer skill level are earned through various uses of the composition system. These include:

  • # of songs published
  • # of times published songs have been sold.
  • # of times published songs have been played.
  • use of the [play command in general also helps to increase skill level. Bonus points are awarded for also using advanced music composition features.

Note that points earned for use of the [play command are not tracked until after your character has joined the Bards guild.

However, points will accrue even before joining for anything that is published and subsequently played or sold. These points will be automatically added to your character upon joining.

In addition to skill points, you will also gain regular Karma and Fame from getting works published, their plays and sales.

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.

Note that it is a good idea to set the tempo correctly at the beginning, before writing the song, as changing it after will require adjustments to pause lengths.

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

[play ConcertMode

Format: True or False

Example: [play ConcertMode True

Concert mode allows for all users within range of the music player to hear the volumes as set by the musician, regardless of how close or far they are from the source.

Default: False

Other Commands

The following is a list of other commands that pertain to the music composition system:

[FilterMusic

The filter music command is a toggle which enables or disables music composition sounds from playing. Note that this command only disables the audio on your end, but other players will still be able to hear it.

[StopMusic

The stop music command will halt your character from [playing music immediately.

Algebraic Macros

You can now write musical macros using algebra, which allows players to re-use preset pieces of music that you've already written quickly and easily. Here is an example:

[play macro bassline = cl 0.2 e 0.2 g 0.2 a

[play %bassline% 

Now you can play that macro in another instrument:

[play instrument harp

[play %bassline% 0.2 %bassline% 

But where these macros become more powerful is in the ability to transpose them, reverse them, or change their tempo.

Transposing

Here is an example:

[play %bassline[+5]% 

This will transpose the macro 'bassline' up by 5 notes, or half-steps (a perfect fourth, for the musicians) - so it becomes, in effect:

[play f 0.2 a 0.2 c 0.2 dh 

You can transpose up (with [+n]) or down (with [-n]). However, if you try to transpose notes downward such that they go beyond cl, they'll be dropped. Similarly, notes transposed up beyond ch will be dropped.

Reversing

[play %-bassline% 

This will play the macro 'bassline' in reverse order, so it becomes, in effect:

[play a 0.2 g 0.2 e 0.2 cl 

So we could turn our little %bassline% macro into a complete 12-bar blues bassline like this:

[play %bassline% 0.2 as 0.2 %-bassline%

[play %bassline% 0.2 as 0.2 %-bassline%

[play %bassline[+5]% 0.2 dsh 0.2 %-bassline[+5]%

[play %bassline% 0.2 as 0.2 %-bassline%

[play %bassline[+7]% 0.2 %bassline[+5]% 0.2

[play %bassline% 0.2 as 0.2 %-bassline%

 

Changing Tempo

[play %bassline<+0.1>% 

This will add 0.1 to every pause in the macro. So this would play, in effect:

[play cl 0.3 e 0.3 g 0.3 a 

Tempo adjustment supports all four of the arithmetic operators. Here's a quick reference:

[play %bassline%         =>  [play cl 0.2 e 0.2 g 0.2 a

[play %bassline<+0.01>%  =>  [play cl 0.21 e 0.21 g 0.21 a

[play %bassline<-0.01>%  =>  [play cl 0.19 e 0.19 g 0.19 a

[play %bassline<*2>%     =>  [play cl 0.4 e 0.4 g 0.4 a

[play %bassline</2>%     =>  [play cl 0.1 e 0.1 g 0.1 a 

Combining Operations

All of these operations can be mixed and matched to create the musical effect that you want. For instance, if we start with a couple of simple macros for a minor and a major arpeggio:

[play macro min = cl 0.1 ds 0.1 g 0.1 c

[play macro maj = cl 0.1 e 0.1 g 0.1 c 

We can turn these into something a little like ABBA:

[play %min[+2]</2>% 0.2 %-min[+2]</2>% 0.8 

[play %min[+2]</2>% 0.2 %-min[+2]</2>% 0.1 e 0.1 f 0.1 g 0.1 a 0.8

[play %maj[+5]</2>% 0.2 fh 0.05 eh 0.05 c 0.05 a 0.8

[play %min[+2]</2>% 0.2 %-min[+2]</2>% 0.8 

Or something a little like Pachelbel:

[play %maj[+12]<2>% 0.2 %maj[+7]<2>% 0.2 %min[+9]<2>% 0.2 %min[+4]<2>% 0.2

[play %maj[+5]<2>% 0.2 %maj<2>% 0.2 %maj[+5]<2>% 0.2 %maj[+7]<2>% 

... all with the same simple building blocks!

Many thanks to Galois for contributing the Algebraic Macros section.

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.