Sound
Shared by PlayWithFire
blockspec:
('import sound' #- #importSound)
no code needed
What this block does:
This block allows you to import a sound.
Shared by Sparks
blockspec:
('record sound' #- #recordSound)
no code needed
What it does:
Opens the sound recording window and lets you record a sound.
Shared by Pecola1
blockspec:
('length of %S' #r #lengthOfSound:)
Code:
lengthOfSound: t1 | t2 | t2 _ self soundNamed: t1 ifAbsent: [^ 0]. ^ t2 totalSeconds
What this block does:
Reports the amount of seconds it would take to play the sound in the insert.
Shared by Pecola1
blockspec:
('play from %n to %n secs of %S' #- #playFrom:to:ofSound:)
Code:
playFrom: t1 to: t2 ofSound: t3 | t4 | t4 _ self soundNamed: t3 ifAbsent: [^ self]. t4 playFrom: t1 to: t2
What this block does:
Plays a sound from the first insert to the second insert. Note: It does not wait for the sound to end for it to change to another block.
Shared by meew0
blockspec:
('beep' #- #beep)
Code:
no code needed
Shared by Greenatic
Blockspec:
('number of sounds' #r #SoundAmount)
Code:
SoundAmount
| t1 |
t1 _ 0.
media do: [:t2 | t2 isSound ifTrue: [t1 _ t1 + 1]].
^ t1
What it does:
Reports the number of sounds the sprite/stage has (not the total for the whole project).
^ Back to Scratch Blocks
^ Back to Contents
█ █ █ █ █ █ █ █
Last edited by YourLocalBlockLib (2011-12-17 14:58:26)
Offline