equation for tempo? Drum machine

wroachbarrettewroachbarrette Member Posts: 101
edited November -1 in Working with GS (Mac)
ALright hears what im working with, i need to create a drum machine basically, where someone has sixteen buttons and when the beat moves over that button it plays, but i have no idea how to convert the timer that gamesalad offers to tempo and how to make an equation that would handle that, anyone that can offer any help in this project i would greately appreciate it, i am very familiar with gamesalad, i am not however familiar with tempo

as of right now i have a drum machine that has 16 some pads and a few different sounds for each pad, i am going to have another window in which the actually drum machine will be and in that i will have say 5 sounds and sixteen places where they can activate the sounds im thinking of doing something with boolean attributes to trigger the sounds when beat hits the note but i just need help with the tempo itself and how to structure an equation that can be: changed form say 120 to 300, through the use of a keypad that ill enable, and that can cause a beat to hit when the tempo starts like a normal drum machine would

Comments

  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    BPM is just how many beats in a minute so you would have to work out the math for the corresponding tempos. 120 BPM is a pretty standard timing and that would just be every 0.5 seconds, 60 BPM would obviously be every 1 second so you would need to work out the math in relation to these?

    Ace
  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    The equation would just be 60/TEMPO to workout what to set the timer to

    Ace
  • wroachbarrettewroachbarrette Member Posts: 101
    thanks so much that works perfectly! Now i was wondering if you'd have any idea how to set a group of say sixteen actors to hit one after another according to tempo, actor one hits first then actor two and so on and so fourth based on the tempo. i know i could get them all to hit at once based on the tempo but how to do one after another is a different story
  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    If I understand you right, you could set an integer called BPMCounter that's dependant on the timer (every 0.5 seconds for 120 BPM for example) change attribute BPMCounter to BPMCounter + 1.

    Then on each actor, if BPMCounter = 1 play sound, next actor if BPMCounter = 2 play sound.

    This kinda what you meant?

    Ace
  • wroachbarrettewroachbarrette Member Posts: 101
    yea thats exactly what i meant, ha when you say it it sounds so simple im almost embarrassed for asking:P but thanks so much for your help
Sign In or Register to comment.