Super Newb Troubles: tutorials?

I am trying to develop an app where you press one of many buttons, it will start a song, with only the one track designated to that button to be heard, that way, when another track button is pressed, it will “unmute” and join in at the right time. I am willing to learn code better, understanding it will take a long time and a lot of work, but I don’t know where to start. I have this so far:

display.setStatusBar( display.HiddenStatusBar )
local bg = display.newImage( “Music BG.png”, 0, 0)
local song1 = display.newImage( “Song 1.png”, 86, -5)
local buttonOrange1 = display.newImage( “Play ButtonOrange.png”, 8, 50)
local buttonOrange2 = display.newImage( “Play ButtonOrange.png”, 8, 160)
local buttonOrange3 = display.newImage( “Play ButtonOrange.png”, 8, 275)
local buttonGrey = display.newImage( “Play ButtonPressed1S.png”, 215, 275)
local buttonGreen = display.newImage( “Play ButtonGreen.png”, 110, 50)
local buttonBlue = display.newImage( “Play ButtonBlue.png”, 110, 160)
local buttonRed = display.newImage( “Play ButtonRed.png”, 110, 275)
local buttonYellow = display.newImage( “Play ButtonYellow.png”, 215, 50)
local buttonPurple = display.newImage( “Play ButtonPurple.png”, 215, 160)
local reset = display.newImage( “Reset.png”, 8, 440)
local keyboardChords_mp3 = audio.loadSound(“HipHopKeyboard(Song1).mp3”)
local keyboardMelody_mp3 = audio.loadSound(“KeyboardMel(Song1).mp3”)
local allSoundActive = false

function onEnterFrame( event )
if (allSoundActive = false)
if (

function buttonGreen:tap( event )
audio.play(keyboardChords_mp3)
audio.play(keyboardMelody_mp3)

end

local function onEnterFrame( event )
buttonGreen.rotation = buttonGreen.rotation + 2
end

local function onTouch(event)
if (event.phase == “began”) then
Runtime:addEventListener(“enterFrame”, onEnterFrame)
end
end

function reset:tap( event )
audio.stop(keyboardChords_mp3)
audio.stop(keyboardMelody_mp3)
end

buttonGreen:addEventListener( “touch”, onTouch )
buttonGreen:addEventListener( “tap”, buttonGreen )
buttonGreen:addEventListener( “tap”, buttonGreen )
reset:addEventListener( “tap”, reset )

I don’t know if that made any sense, but could someone point me in the right direction? I also want the user to be able to export the finished song to their itunes. [import]uid: 189494 topic_id: 32290 reply_id: 332290[/import]

Hi there,
This is just my impression of the code above: it looks like you’re trying to bite off way too much at once for a Corona beginner. I suggest that you first get a solid basis of working with Lua and functions (and understanding scope). Then, work on touch events and buttons in Corona. When you’re familiar with all of that, start exploring the proper use of the audio APIs which are not exactly “complicated” but they’re also beyond beginner’s level (intermediate to advanced, depending on the usage).

Yes, this might sound like a daunting process, but it’s the best way to begin in Corona. I see alot of new users with great ideas dive right into code samples, or they cut-and-paste things from the documentation API pages before they fully understand the core Lua/Corona coding methods. This often leads to frustration and (sadly, in some cases) they give up on the entire concept. That doesn’t help anybody! :slight_smile:

Here are a few tutorials which should help you get started.
http://corona.techority.com/2011/01/12/corona-for-newbies-part-1/
http://www.coronalabs.com/blog/2012/07/10/best-practices-for-organizing-projects/
http://www.coronalabs.com/blog/2011/06/21/understanding-lua-tables-in-corona-sdk/
http://www.coronalabs.com/blog/2012/04/11/corona-touch-events-tutorial/

Best of luck!
Brent Sorrentino [import]uid: 9747 topic_id: 32290 reply_id: 128432[/import]

Thank you! I will go through those tutorials and I think I’ll put this project in the back burner until I’m better prepared. Thank you again for responding and being so supportive! [import]uid: 189494 topic_id: 32290 reply_id: 128446[/import]

Hey there - just to put it out there - Look at all four parts of Corona For Newbies on Techority. I’m the author and Brent linked to part one, but part two specifically covers audio and with part 1 (at the very least) should be tremendously helpful to you.

Peach :slight_smile: [import]uid: 52491 topic_id: 32290 reply_id: 128490[/import]

Hi there,
This is just my impression of the code above: it looks like you’re trying to bite off way too much at once for a Corona beginner. I suggest that you first get a solid basis of working with Lua and functions (and understanding scope). Then, work on touch events and buttons in Corona. When you’re familiar with all of that, start exploring the proper use of the audio APIs which are not exactly “complicated” but they’re also beyond beginner’s level (intermediate to advanced, depending on the usage).

Yes, this might sound like a daunting process, but it’s the best way to begin in Corona. I see alot of new users with great ideas dive right into code samples, or they cut-and-paste things from the documentation API pages before they fully understand the core Lua/Corona coding methods. This often leads to frustration and (sadly, in some cases) they give up on the entire concept. That doesn’t help anybody! :slight_smile:

Here are a few tutorials which should help you get started.
http://corona.techority.com/2011/01/12/corona-for-newbies-part-1/
http://www.coronalabs.com/blog/2012/07/10/best-practices-for-organizing-projects/
http://www.coronalabs.com/blog/2011/06/21/understanding-lua-tables-in-corona-sdk/
http://www.coronalabs.com/blog/2012/04/11/corona-touch-events-tutorial/

Best of luck!
Brent Sorrentino [import]uid: 9747 topic_id: 32290 reply_id: 128432[/import]

Thank you! I will go through those tutorials and I think I’ll put this project in the back burner until I’m better prepared. Thank you again for responding and being so supportive! [import]uid: 189494 topic_id: 32290 reply_id: 128446[/import]

Hey there - just to put it out there - Look at all four parts of Corona For Newbies on Techority. I’m the author and Brent linked to part one, but part two specifically covers audio and with part 1 (at the very least) should be tremendously helpful to you.

Peach :slight_smile: [import]uid: 52491 topic_id: 32290 reply_id: 128490[/import]