Skip to content

Commit

Permalink
try and fix the main music page
Browse files Browse the repository at this point in the history
  • Loading branch information
ganicke committed Sep 21, 2023
1 parent 1dd448f commit 8e05cc6
Showing 1 changed file with 25 additions and 12 deletions.
37 changes: 25 additions & 12 deletions docs/reference/music.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,36 @@
# Music

Make music. Play melodies and tones.
Make music! Play songs, melodies, sounds, and tones.

## Songs
## Play music

Use the ``||music:play||`` block to play a song you compose, a short melody, or a built-in sound.

```cards
music.createSong(hex`00780004080200`)
music.play(music.createSong(hex`00780004080200`), music.PlaybackMode.UntilDone)
```

## Melodies
### Play a song

```cards
music.stringPlayable("", 120)
```block
music.play(music.createSong(hex`0078000408020200001c00010a006400f40164000004000000000000000000000000000500000430000400080001220c001000012514001800011e1c00200001222400280001252c003000012934003800012c3c004000011e03001c0001dc00690000045e010004000000000000000000000564000104000330000400080001290c001000011e1400180001251c002000012924002800011b2c003000012234003800011e3c0040000129`), music.PlaybackMode.UntilDone)
```

### Play a melody

```block
music.play(music.stringPlayable("D F E A E A C B ", 120), music.PlaybackMode.UntilDone)
```

### Play a built-in sound

```block
music.play(music.melodyPlayable(music.wawawawaa), music.PlaybackMode.UntilDone)
```

## Sound

```cards
music.play(null, music.PlaybackMode.UntilDone)
music.tonePlayable(262, music.beat(BeatFraction.Whole))
music.ringTone(0)
music.rest(0)
music.noteFrequency(Note.C)
Expand All @@ -30,16 +42,17 @@ music.setVolume(0)
music.stopAllSounds()
```

## See Also
## See also

[play](/reference/music/play),
[tone playable](/reference/music/tone-playable),
[string playable](/reference/music/string-playable),
[create song](/reference/music/create-song),
[string playable](/reference/music/string-playable),
[tone playable](/reference/music/tone-playable),
[ring tone](/reference/music/ring-tone),
[rest](/reference/music/rest),
[beat](/reference/music/beat),
[tempo](/reference/music/tempo),
[change tempo by](/reference/music/change-tempo-by),
[set tempo](/reference/music/set-tempo),
[set voluime](/reference/music/set-volume)
[set voluime](/reference/music/set-volume),
[stop All Sounds](reference/music/stop-all-sounds)

0 comments on commit 8e05cc6

Please sign in to comment.