# Play note for an indefinite amount of time?

I'm trying to create a project where a user can hold down a key, and a note will play as long as that key is held.

"play note () for () beats" doesn't sound like a single held note when repeated.
"play frequency ()" can sort of work, but as far as I can tell it only allows one frequency to be played at a time, whereas I'd like to be able to play more than one note at once.

Is there any simple way to hold a note for an indefinite amount of time?

[scratchblocks] run ({play note (60 v) for () beats} @addInput :: ring grey) with inputs [any non-blank text] @delInput @addInput :: control [/scratchblocks]

(EDIT: (hopefully) fixed scratchblocks, thanks @snapenilk)

I had a play around and it seems the stop frequency block applies to individual sprites so using clones gets around this.

This should do what you are after

ProjectName=playTogether

[edit - launch removed as not needed]
[edit2 - even simpler ]

Surround the scratchblocks with p tags

[scratchblocks] run (my script) with inputs [Hello, world!] @delInput @addInput :: control[/scratchblocks]

Cool custom blocks! has the "start note ()" block, I think you want that.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.