Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Match music play hints with toolbox blocks in 'V2 Hamster' #5961

Merged
merged 3 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/projects/v2-countdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ for (let index = 0; index <= 2; index++) {
basic.showNumber(3 - index)
}
// @highlight
music.play(music.tonePlayable(262, music.beat(BeatFraction.Whole)), music.PlaybackMode.UntilDone)
music.play(music.tonePlayable(392, music.beat(BeatFraction.Whole)), music.PlaybackMode.UntilDone)
basic.showString("GO!")
```

Expand All @@ -114,7 +114,7 @@ for (let index = 0; index <= 2; index++) {
music.play(music.tonePlayable(262, music.beat(BeatFraction.Quarter)), music.PlaybackMode.UntilDone)
basic.showNumber(3 - index)
}
music.play(music.tonePlayable(262, music.beat(BeatFraction.Whole)), music.PlaybackMode.UntilDone)
music.play(music.tonePlayable(392, music.beat(BeatFraction.Whole)), music.PlaybackMode.UntilDone)
basic.showString("GO!")
```

Expand Down
20 changes: 10 additions & 10 deletions docs/projects/v2-pet-hamster.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ input.onLogoEvent(TouchButtonEvent.Pressed, function () {

## {Tickle sound}

► From the ``||music:Music||`` category, get a ``||music:play melody [jump up] [in background]||`` and add it to the **bottom** of your ``||input:on logo [pressed]||`` container. Change the playback mode to ``||music:[until done]||``.
► From the ``||music:Music||`` category, get a ``||music:play [melody jump up] [in background]||`` and add it to the **bottom** of your ``||input:on logo [pressed]||`` container. Change the playback mode to ``||music:[until done]||``.

```blocks
input.onLogoEvent(TouchButtonEvent.Pressed, function () {
basic.showIcon(IconNames.Happy)
//@highlight
music.play(music.builtInPlayableMelody(Melodies.JumpUp), music.PlaybackMode.UntilDone)
music._playDefaultBackground(music.builtInPlayableMelody(Melodies.JumpUp), music.PlaybackMode.UntilDone)
})
```

Expand All @@ -60,14 +60,14 @@ input.onGesture(Gesture.Shake, function () {

## {Dizzy sound}

► From the ``||music:Music||`` category, find the ``||music:play melody [dadadum] [in background]||`` block and add it to the **bottom** of your ``||input:on [shake]||`` container. Change the playback mode to ``||music:[until done]||``.
► From the ``||music:Music||`` category, find the ``||music:play [melody dadadum] [in background]||`` block and add it to the **bottom** of your ``||input:on [shake]||`` container. Change the playback mode to ``||music:[until done]||``.
► Click on the **dropdown** and set it so Cyrus plays a sad sound until done.

```blocks
input.onGesture(Gesture.Shake, function () {
basic.showIcon(IconNames.Sad)
//@highlight
music.play(music.builtInPlayableMelody(Melodies.Wawawawaa), music.PlaybackMode.UntilDone)
music._playDefaultBackground(music.builtInPlayableMelody(Melodies.Wawawawaa), music.PlaybackMode.UntilDone)
})
```

Expand All @@ -81,13 +81,13 @@ Let's ensure that Cyrus will always go back to sleep after being shaken or tickl
```blocks
input.onGesture(Gesture.Shake, function () {
basic.showIcon(IconNames.Sad)
music.play(music.builtInPlayableMelody(Melodies.Wawawawaa), music.PlaybackMode.UntilDone)
music._playDefaultBackground(music.builtInPlayableMelody(Melodies.Wawawawaa), music.PlaybackMode.UntilDone)
//@highlight
basic.showIcon(IconNames.Asleep)
})
input.onLogoEvent(TouchButtonEvent.Pressed, function () {
basic.showIcon(IconNames.Happy)
music.play(music.builtInPlayableMelody(Melodies.JumpUp), music.PlaybackMode.UntilDone)
music._playDefaultBackground(music.builtInPlayableMelody(Melodies.JumpUp), music.PlaybackMode.UntilDone)
})
basic.showIcon(IconNames.Asleep)
```
Expand All @@ -99,12 +99,12 @@ basic.showIcon(IconNames.Asleep)
```blocks
input.onGesture(Gesture.Shake, function () {
basic.showIcon(IconNames.Sad)
music.play(music.builtInPlayableMelody(Melodies.Wawawawaa), music.PlaybackMode.UntilDone)
music._playDefaultBackground(music.builtInPlayableMelody(Melodies.Wawawawaa), music.PlaybackMode.UntilDone)
basic.showIcon(IconNames.Asleep)
})
input.onLogoEvent(TouchButtonEvent.Pressed, function () {
basic.showIcon(IconNames.Happy)
music.play(music.builtInPlayableMelody(Melodies.JumpUp), music.PlaybackMode.UntilDone)
music._playDefaultBackground(music.builtInPlayableMelody(Melodies.JumpUp), music.PlaybackMode.UntilDone)
//@highlight
basic.showIcon(IconNames.Asleep)
})
Expand All @@ -124,12 +124,12 @@ If you have a new @boardname@ (the one with the **shiny gold** logo at the top),
```blocks
input.onGesture(Gesture.Shake, function () {
basic.showIcon(IconNames.Sad)
music.play(music.builtInPlayableMelody(Melodies.Wawawawaa), music.PlaybackMode.UntilDone)
music._playDefaultBackground(music.builtInPlayableMelody(Melodies.Wawawawaa), music.PlaybackMode.UntilDone)
basic.showIcon(IconNames.Asleep)
})
input.onLogoEvent(TouchButtonEvent.Pressed, function () {
basic.showIcon(IconNames.Happy)
music.play(music.builtInPlayableMelody(Melodies.JumpUp), music.PlaybackMode.UntilDone)
music._playDefaultBackground(music.builtInPlayableMelody(Melodies.JumpUp), music.PlaybackMode.UntilDone)
basic.showIcon(IconNames.Asleep)
})
basic.showIcon(IconNames.Asleep)
Expand Down
Loading