From fa9aaa412fa5413f8baec7ff7f24ea02079ddc62 Mon Sep 17 00:00:00 2001 From: ganicke Date: Wed, 18 Sep 2024 14:53:55 -0700 Subject: [PATCH 1/3] set to alt api so hints match toolbox blocks --- docs/projects/v2-pet-hamster.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/projects/v2-pet-hamster.md b/docs/projects/v2-pet-hamster.md index cdecc13628f..9cefa388be8 100644 --- a/docs/projects/v2-pet-hamster.md +++ b/docs/projects/v2-pet-hamster.md @@ -39,7 +39,7 @@ input.onLogoEvent(TouchButtonEvent.Pressed, function () { 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) }) ``` @@ -67,7 +67,7 @@ input.onGesture(Gesture.Shake, function () { 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) }) ``` @@ -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) ``` @@ -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) }) @@ -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) From 87275c8a94482cdb814898428c82b144a57e80cf Mon Sep 17 00:00:00 2001 From: ganicke Date: Wed, 18 Sep 2024 14:54:41 -0700 Subject: [PATCH 2/3] correct freq back to Middle G --- docs/projects/v2-countdown.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/projects/v2-countdown.md b/docs/projects/v2-countdown.md index d06c39bb6cb..f434f8e6470 100644 --- a/docs/projects/v2-countdown.md +++ b/docs/projects/v2-countdown.md @@ -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!") ``` @@ -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!") ``` From b2389fba1e026f1d63363029cba8fdc50e80be07 Mon Sep 17 00:00:00 2001 From: ganicke Date: Wed, 18 Sep 2024 14:57:09 -0700 Subject: [PATCH 3/3] update melody parm symbology --- docs/projects/v2-pet-hamster.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/projects/v2-pet-hamster.md b/docs/projects/v2-pet-hamster.md index 9cefa388be8..1d3e3af45c1 100644 --- a/docs/projects/v2-pet-hamster.md +++ b/docs/projects/v2-pet-hamster.md @@ -33,7 +33,7 @@ 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 () { @@ -60,7 +60,7 @@ 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