This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2009-03-13 20:25:10

Tarham94
Scratcher
Registered: 2009-03-04
Posts: 6

Music Timing

Hello. I'm in the process in making a mini music video for a this song, and I want to have a TEMPO variable that increases by 1 with the beat. What I did was figure out the exact time between beats and say

FOREVER-   change TEMPO by 1, wait .198 seconds.

and it would be on time for the most part. The only thing is that when I start adding graphics and sprites, this variable is slowed down so all the timing gets messed up. I hope you understand what I mean by this. My question is if there is a way to automatically set a variable to increase with the tempo of a song.  I really wanted to do this project and I hope there is a solution to my problem. Thank You.

Offline

 

#2 2009-03-13 20:45:21

Jello715
Scratcher
Registered: 2008-10-11
Posts: 95

Re: Music Timing

<forever>
(Set Tempo to (<{ Variable Tempo }> )
<end>

<forever>
<change{ Variable Tempo }by( 1
<wait( 0.198
<end>

Last edited by Jello715 (2009-03-13 20:47:27)

Offline

 

#3 2009-03-13 21:01:32

bosox397
Scratcher
Registered: 2008-02-17
Posts: 1000+

Re: Music Timing

That didn't really answer his question...he wanted to know if theres a way so things won't get slowed down so much and I don't think there is.


Dear Scratch Users,
I'm done with scratch, or at least making projects. I have made one last big game, thats both fun and teaches a lesson about water. It'd mean a lot if you gave me feedback.                              http://scratch.mit.edu/projects/bosox397/569201

Offline

 

#4 2009-03-14 09:52:23

Tarham94
Scratcher
Registered: 2009-03-04
Posts: 6

Re: Music Timing

yeah, my computers a little slow

Offline

 

#5 2009-03-14 09:56:16

bosox397
Scratcher
Registered: 2008-02-17
Posts: 1000+

Re: Music Timing

Yah theres reallly no way to stop scratch from lagging


Dear Scratch Users,
I'm done with scratch, or at least making projects. I have made one last big game, thats both fun and teaches a lesson about water. It'd mean a lot if you gave me feedback.                              http://scratch.mit.edu/projects/bosox397/569201

Offline

 

#6 2009-03-15 11:06:30

Spine
Scratcher
Registered: 2009-01-15
Posts: 100

Re: Music Timing

Tarham94 wrote:

yeah, my computers a little slow

I've had the same problem with some things, what you need to do is change how long it waits, so that it waits less time, which would cause it to keep up.
It may be hard to find a good time to wait, but it's an idea.

-Spine

Offline

 

#7 2009-03-15 23:46:32

yambanshee
Scratcher
Registered: 2007-11-06
Posts: 500+

Re: Music Timing

there is a way. im not gonna do it in scratch blocks though
if(timer<i)
change TEMPO by 1
i = (timer+1)

I is a variable, and timer is the internal timer of scratch

Offline

 

#8 2009-03-16 11:16:40

SmartIrishKid
Scratcher
Registered: 2008-07-19
Posts: 1000+

Re: Music Timing

If you're wanting something that increases the tempo every beat, I'd recommend something like this:

Code:

forever
 rest for (1) beat
 change tempo by (1)

Discuss future Scratch RPGs, online games, and more!

Offline

 

#9 2009-03-16 18:40:57

DougSlimline1
Scratcher
Registered: 2009-03-16
Posts: 1

Re: Music Timing

Maybe you could find an instructional manual on the subject (yeah I know that sounds stupid but hey sometimes old fashioned is the way to go)  or audio books on it for that matter.

Offline

 

#10 2009-03-16 18:53:34

demosthenes
Retired Community Moderator
Registered: 2008-02-19
Posts: 1000+

Re: Music Timing

I have thought of a way! You need two computers first take the one where you know the time between beats is .198 seconds then go to a different computer and find the time between beats, then run this script on both computers:
<when green flag clicked>
<reset timer>
<repeat( 1000)
<end>
<say[ <timer>] then all you have to do is find the mathematical relationship between the values (this might not actually work).

Last edited by demosthenes (2009-03-16 18:54:01)


I've taken a long hiatus, but I still visit sometimes. Give me some time to answer any messages you post on my projects!

Offline

 

Board footer