Discuss Scratch

ARandomNumberIs7482
Scratcher
1000+ posts

Tone generating blocks

generate [square v] wave with a frequency of (200) Hz for (5) seconds :: pen // square, sine, triangle, sawtooth
(frequency :: pen)
INSERT-USER_NAME
Scratcher
1000+ posts

Tone generating blocks

ARandomNumberIs7482 wrote:

generate [square v] wave with a frequency of (200) Hz for (5) seconds :: pen // square, sine, triangle, sawtooth
(frequency :: pen)
Since there's a frequency variable, maybe it could be like this?
play [square v] wave for (1) seconds:: pen
set frequency to (512) hertz :: pen
(frequency::pen)
ARandomNumberIs7482
Scratcher
1000+ posts

Tone generating blocks

Since there's a frequency variable, maybe it could be like this?
play [square v] wave for (1) seconds:: pen
set frequency to (512) hertz :: pen
(frequency::pen)
makes sense
yavuz61035
Scratcher
500+ posts

Tone generating blocks

how about

start playing tone :: sound

stop playing tone :: sound

set tone frequency to (300) Hz :: sound
(frequency::sound)
set tone wave to [square v] :: sound

however this may also work
play tone :: sound

play tone for (3) secs :: sound // based off say ()

set tone frequency to (300) Hz ::sound // setting to negativehz would stop tone
(frequency :: sound)
set tone wave to [sine v] :: sound

set tone volume to (50) :: sound // this could be replaced with the existing block set volume to ()%

Last edited by yavuz61035 (April 30, 2023 21:11:49)

medians
Scratcher
1000+ posts

Tone generating blocks

oh come on


Powered by DjangoBB