Sound assets in project?

I’ve found sound files for my Asteroids exercise. If I DL them, unzip them, and put them in Dropbox.assets, I can access them as one would hope. Is there a way to move the files into the actual project, so that they’ll export with it? The only folders that show up under Codea in Files are Craft, Dropbox.assets, and Examples. None of my projects show up as folders.


Follow-up question: once I play a sound with loop=true, is there some way to stop it?

ANS: Secret method sound:stop(). s = sound(…); s:stop;

@RonJeffries in the asset picker click on edit (top right) then you should be able to move assets to the project assets or the documents assets. Beware, if moving .obj files in this way the associated .mtl file is not moved (Grrrr!).

@RonJeffries - you can copy files to you project.codea file using the assets facility. I can never remember how to do this so - what I do is create a project folder in the documents(ie Codea route) and add the plist and icons file into it together with graphics sound etc resources. This gives a project root folder in the asset facility with your own icon and resources so accessing assets is easy by using asset.documents.project. …

I posted a description of this some time ago so I’ll dig out the link, but may have to make a vid of this.

@piinthesky if you mean the asset picker under Assets on the front page of Codea, it does not show my project, so I can’t move my files from Dropbox.assets into it.

@Bri_G I don’t understand what you said here so hope you can find and verify a description of how to do this. I hope it doesn’t include editing a plist file …

@RonJeffries no, inside the code when you click on the sound() to choose the asset. I hope when Simeon finalises the new asset system, we will be able move assets around outside of the code.

@RonJeffries - on the plist front you don’t have to edit it. Just load a minimal one in, it seems to auto-update (or ignore) the actual contents of it but it works.

Will post the link later - still searching.


This thread is one:

And this one

@piinthesky wow, I didn’t even know that was there. It adds them without comment, but works a treat. Excellent, thanks!

I’m having trouble loading sound assets into my programs, it looks like I’m not the only one…Simon, where are you ? Help !

@kendog400 what type of files do you have?

I’ve downloaded wav. files from internet. They are card game sounds, shuffle and deal card. This diffulcty of getting sounds into a project gives the impression apple does not want sounds in projects because their may be some sort of copy infringment…

at the bottom of the linked article, i show how i moved some sound assets into my project. hoping to help …

in the linked article, i show how i moved was files into my codea project.

@kendog400 definitely take a look at @RonJeffries post (the section titled “Update” down the bottom)

To put your wav files into Codea you can also use the Files app. If you save the wav files into your On My iPad -> Codea folder in the Files app, they will show up in your sound picker under the Documents folder

Nothing shows up in documents folder, can’t seem to paste items in folder, seem to be locked out…

Is there any way to get files into this folder ?..

Seem to be stuck with poor sound selection, Help !!!

did you check my article and do like it says?

I took a peek, it looks like I have to put files into a dropbox folder and sync that with documents folder ??..I thought there would be an easier way…

it’s a few steps but works fine.