[squeakland] Playing musical notes

Steve Thomas sthomas1 at gosargon.com
Mon Jul 11 12:04:48 EDT 2011


Is there a way to play "instruments" other than tones, similar to
http://www.squeakland.org/showcase/project.jsp?id=7826?

Ie: How can I specify an instrument?  I can load midi files, but would like
to be able to do something similar to Scratch where I can specify the
instrument. and then have a script "Play the notes"

Stephen

On Mon, Jul 11, 2011 at 10:37 AM, Bert Freudenberg <bert at freudenbergs.de>wrote:

> Hi Christine,
>
> you can do "test counter > 5 and counter < 10" using two nested tests. The
> first would test for "counter > 5" and in its "yes" case there would be a
> test for "counter < 10". Of course that would be tedious for a whole song.
>
> Here is a way to use the timer as suggested by Steve:
>
>
>
> Each note is just a rectangle with an embedded text label. It has a
> variable for its frequency. Its width represents its duration. Many of them
> are put in a holder, and each can have their own frequency. The holder has a
> single variable, "until". This holds the timer value for the end of the
> currently playing note. When that time has passed, the next "until" is
> calculated from the width of the next note, and it is played.
>
> It's very simple to make more notes, you just duplicate them, and if
> necessary change freq and width. You could make a parts bin with all the
> preconfigured notes.
>
> This is similar to (though a lot simpler than) what I showed at Squeakfest.
> Ideas from that talk could be integrated as well - e.g., instead of playing
> the note right in the holder's script, each note could have a script that
> gets activated by the holder, and then could do more interesting things
> (like playing a rondo by repeating themes in ABACA form etc).
>
> - Bert -
>
> On 11.07.2011, at 14:34, Steve Thomas wrote:
>
> 1) You can use the timer in the playfield category (can change decimal
> places I believe accurate to milliseconds)
>
> 2) Use a "piano roll" and place notes on the roll and have a "needle" move
> across the roll (or the roll move) and when the "needle" touches the note,
> it will play that note.
>
> You could have kids play a frequency based on it's y position and have them
> draw a score.  They could also have the note sustain based on its length.
> You can also change the tempo by moving the needle at different speeds.
>
> Stephen
>
> On Mon, Jul 11, 2011 at 7:04 AM, Christine Murakami <
> cmurakami at columbusschoolforgirls.org> wrote:
>
>> Hi everyone!
>>
>> I have been working with students on creating music lessons, and there is
>> a gap in my knowledge of Etoys that is preventing them from going further in
>> their projects.
>>
>> Many of them would like a song to play (using the play frequency tile).
>> The only way I can think to do this is to either create a variable counter
>> that counts a beat or to use the playfield counter. Either way, it seems
>> like Etoys ought to have a command that does something like "while counter >
>> 5 and counter <10 play frequency 880" or even using a test in a similar way:
>> "test counter > 5 and counter < 10".  I just can't figure out how to have a
>> sound play for a specific amount of time - especially a few beats into the
>> song. The first few we can fudge, but after that it gets too complicated. I
>> need to help them find a better solution.
>>
>> I've looked at both Pling and the chord game for suggestions, which helped
>> with other issues but not this one.
>>
>> Any suggestions would be most appreciated! I've been struggling with this
>> since early May!
>>
>> Thanks!
>>
>> Christine
>> _______________________________________________
>
>
>
>
> _______________________________________________
> squeakland mailing list
> squeakland at squeakland.org
> http://lists.squeakland.org/mailman/listinfo/squeakland
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakland.org/pipermail/squeakland/attachments/20110711/cb631a25/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PastedGraphic-12.png
Type: image/png
Size: 38624 bytes
Desc: not available
URL: <http://lists.squeakland.org/pipermail/squeakland/attachments/20110711/cb631a25/attachment-0001.png>


More information about the squeakland mailing list