is gs able to create record buttons? if so how would it be the best way of making one?
I am making a drum machine app and everyone of my friends always ask me "where is the record button?" "you have to add a record button." So I guess I need a record button, but I have no idea on how to make it. It would be something like it would reproduce what just happend in the screen or I don't know something like that. Thank you!!
Best Answer
-
quantumsheep Posts: 8,188
Well that's a bit harder, and I've never done anything like that.
I imagine you could still do it with tables, recording which drum is pressed at which time.
A row for each drum type would allow for simultaneous drums to be 'recorded'.
So row 1 = kick drum
Row 2 = snare
Row 3 = hi-hat.
etc
Then basically increase time by 1 every half second or so. You could include a sound to indicate the tempo like a metronome.
If you press the snare drum after 6 seconds you'd change the cell value of row 2, column 6 to 1
In other words drum type snare (row 2) column (time 6).
The rest would equal 0 unless you pressed another drum.
Change cell values for drum type and record the seconds passed when a drum is pressed.
I would recommend limiting the amount of time you can record for.
Save the table.
On playback, use the values to play the correct sounds back.
e.g. if time = 6 (column 6) and row 2 = 1 play snare drum
Hopefully that should work,
QS =D
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
Answers
I think you'd have to 'record' your notes to a table. Then you could replay then from that table later. I've never done such a thing so I can't offer specific steps, but I'm sure it's doable.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
It depends on the type of app.
If you're making a 'proper' drum machine, with a time bar that plays chosen 'notes' as it moves forward, you could store the choices in a table.
Firstly, give your drum some definition - e.g.
Say you have one bar at 4/4 it would be divided into 16 segments to get the quaver and semi-quaver timings in.
So, first row of your table would store which sounds were played at that time.
So, your first row might look something like
2, 4, 4, 1, 2, 4, 4, 1, 2, 4, 4, 1, 2, 4, 2, 1
Second row would store the next bar and so on.
When 'record' is pressed, save the table.
On 'reloading' the table and pressing play, you should hear the same pattern that was earlier recorded.
Hope that gives you an idea of how to start off on this,
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
Thank you for the replies. I forgot to describe a little about the app, its an app that looks like an mpc so each tab plays a sound when pressed. basically is when touch is pressed then play sound. how could I add a record button to this.