Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

1.3.1 beta notes

2

Comments

  • Posts: 447

    Simeon, see my previous comment.

    Also do testflight crash reports show anything useful? Anything I can do to make them more useful?

  • Posts: 447

    sorry for the confusion. Yes, do the opposite of that.

    That was how I got it to stop freezing.

  • SimeonSimeon Admin Mod
    Posts: 5,406

    I finally got the freeze.

    It's interesting. It occurs in this stage of the engine

    mesh:draw() -> update texture

    Update texture happens if the mesh needs to draw a texture but the image that is used for the texture has modified data — so it has to rebuild the texture and send it to OpenGL.

    It seems that the texture object and image are pretty corrupt at this point.

    It's telling me the image size is 7340144x7471205 (way too huge). It's also telling me that the texture is something like the 8194th texture allocated.

    The first pixel's colour in the image is (r,g,b,a) -> (5, 34, 14, 153)

  • Posts: 447

    I was starting to think I was crazy :)

    I don't think I update any mesh textures. My textures are sprites, except for a few of the buttons, where I create an image with setContext. I only create the image once and then the mesh from then on. I'll review the code closer to make sure that's what's happening.

    Is that the bottom right pixel? I'll see if I can find the sprite or image that it corresponds too.

  • SimeonSimeon Admin Mod
    Posts: 5,406

    It seems to be a corrupt image texture on a mesh (not a sprite texture). It's definitely our bug. But if it's easy enough to do: try to disable rendering of meshes where their mesh.texture has been set with an image, rather than a string.

  • Posts: 447

    I did try that, but still got freezes. Will do once again to confirm I did it right and send you a new version.

  • SimeonSimeon Admin Mod
    Posts: 5,406

    It seems quite intermittent. I have only managed to get the freeze that one time.

    I keep playing the solution through over and over again and haven't seen it since (with the start screen active).

    Perhaps something occurs on the start screen that increases the likelihood of the crash later on.

  • Posts: 2,161

    John, yes it is.

  • Posts: 2,161

    @John: confirmed. I added a caching step so that if an image has already been used then it uses that, otherwise recreates it. In the recording then those that were cached render fine but those that were done using setContext (during the recording) were garbled.

  • Posts: 1,255

    I'm having trouble with sound in the latest beta. No sound either when selecting the sound from the list or running the app. Tried the standard stuff (close and restart Codea, cold start the iPad) and while other apps are making noise, Codea remains silent.

  • SimeonSimeon Admin Mod
    edited February 2012 Posts: 5,406

    @Mark Is your iPad on silent? It's happened to a few people, double tap the home button and check.

    Edit: of course if other apps are making sound this is pretty unlikely.

  • Posts: 1,255

    Nope, I seem to running and cranked up to the max--but the only sound I'm getting is key clicks.

    If it's just me, I wouldn't worry about it until after the next iteration.

  • SimeonSimeon Admin Mod
    Posts: 5,406

    That's really odd. The only other step is to re-install Codea, but that seems a bit extreme and requires you to backup your projects.

  • Posts: 1,255

    My sound is back after the latest update. (shrug)

  • Posts: 2,161

    There used to be a way to get the description (that I see in TestFlight and in the emails) from within Codea. I wanted to get a copy of the new sound example projects, but couldn't figure out where the links were (email is on a different computer). Has it gone, or am I just imagining things?

  • SimeonSimeon Admin Mod
    Posts: 5,406

    Here's the notes

  • Posts: 2,161

    Great - but I was looking for a more robust solution! Are they no longer accessible from within Codea?

  • SimeonSimeon Admin Mod
    Posts: 5,406

    The notes are shown in Codea when TestFlight pops up its "Update Available" box. But once you update it doesn't do that any more.

    You can see the latest notes on the TestFlight page (using the web app).

  • BortelsBortels Mod
    Posts: 1,557

    I am crazy busy at work - but "soundbuffer(data, format, freq)" perked me right up.

    What formats, pray tell, are supported?

    And - not that I don't like the new color scheme, but how do you turn it off? Just curious.

  • SimeonSimeon Admin Mod
    edited February 2012 Posts: 5,406

    Sorry still haven't got around to putting in the settings panel. That will come soon.

    Supported formats:

    FORMAT_MONO8, FORMAT_MONO16, FORMAT_STEREO8, FORMAT_STEREO16
    

    (Not too sure how stereo works, whether every second sample is left or right. This is just exposing the raw OpenAL buffer to you)

  • Posts: 447

    does this mean one could write a little utility outside codea to convert other formats (eg mid) to these formats?

  • BortelsBortels Mod
    Posts: 1,557

    "the raw OpenAL buffer" should be sufficient for me to research.

    And yes, @ruilov, I think that's exactly what it means. Or I hope so. Probably not .mid, which is tones/durations/velocity, but I'm hoping sound samples. We should know later tonight or tomorrow :-)

  • BortelsBortels Mod
    Posts: 1,557

    And - it looks like it's PCM, which is rockin.

  • SimeonSimeon Admin Mod
    Posts: 5,406

    @Dylan told me that stereo works by having the left samples then the right samples. So it's not interleaved. It's just the two buffers concatenated.

  • Posts: 447

    interesting: "A PCM stream is a digital representation of an analog signal, in which the magnitude of the analog signal is sampled regularly at uniform intervals, with each sample being quantized to the nearest value within a range of digital steps." (wikipedia)

    so you could potentially take anything that plays to your sound card and convert to PCM no? (sorry I'm a super beginner on this stuff)

  • BortelsBortels Mod
    Posts: 1,557

    That's my understanding.

    This is the digital sample player I've been wanting - I think. It should be as simple as getting a big blob of PCM sound data, dropping it into the buffer, and playing it. AND because it's OpenAL, it should handle things pretty well - I suspect there's ways to drop in MP3 and the like. Not 100% sure on that, but the PCM should work.

    I'll know, tonight I hope. Or I'll post code asking for help :-)

  • Posts: 447

    @Bortels, success!

    http://ruilov.posterous.com/audio

    (fair warning, it's half a meg)

    Downloaded this thing called foobar, converted to 8-bit, mono wav, printed out the bytes to Data.plist and it worked the first time.

  • SimeonSimeon Admin Mod
    Posts: 5,406

    Wow nice work.

  • BortelsBortels Mod
    Posts: 1,557

    Oh, maaaannnn... you beat me by maybe 30 minutes. I have my sound file, it's encoded - I just needed to write a decoder. Congratulations!

    I like how you handled "a .. b" causing performance issues :-)

    Now - question is - can it handle compressed data, like mp3? Probably not at this point given the formats, but I'm hoping it's easy to add. A half a meg for 3 seconds of audio is a lot. :-)

    While I'm making suggestions - @Simeon, how hard would it be to turn on the microphone and have it fill a buffer? Just askin :-)

  • Posts: 447

    It is sampled at 44100, not sure we need that much for decent sound (but what do I know). Anyway, once we have some way to import sprites, my suggestion would be to have a way to import wav files as well

  • BortelsBortels Mod
    Posts: 1,557

    That's CD quality, albiet mono. For speech, you're good doing 1/4 of that, easy (16k). 8k will have issues, but if you add compression, you're back to good GSM cellphone quality.

  • DylanDylan Admin Mod
    Posts: 121

    It doesn't do mp3 (unless you decompress it yourself hah). Exposing the ipad's mp3 chip is a bit more work, unless we just use something like the sprite picker for mp3s. That's a discussion I will need to have with @Simeon.

    Soundbuffer is intended for smallish sound effects, not large things like music (unless you create a soundfont style system with it and use midi perhaps).

  • SimeonSimeon Admin Mod
    edited February 2012 Posts: 5,406

    We should probably add CAF/IMA4 format support. It's a lossy format that's fairly easy to encode and play. Much better than using uncompressed PCM for sound effects.

    @ruilov: Testing, 1, 2, 3 :)

  • Posts: 2,161

    Hmm, the more I think about this the less excited I am about it. Correct me if I'm wrong, but it is still the case that you prepare the whole sound and then send it off to the sound player and then lose all control over it after that. So you couldn't do a real piano simulator where the note was played for as long as you touched a key, for example. Ditto for a signal generator.

    Don't get me wrong - it sounds great enough, but isn't what I was looking for - unless I've misunderstood how it works.

  • BortelsBortels Mod
    Posts: 1,557

    You'd have to do it in teensy chunks, and I'm not sure the timing on Codea is tight enough for that sort of shenanigans to work. I'm just happy I can do digitized sound effects now - my photon torpedos will sound like photon torpedos! :-)

  • DylanDylan Admin Mod
    Posts: 121

    Yes, it is still limited @Andrew_Stacey
    We plan to make sound() return a token which you can use to manipulate the source that plays.

    This would allow for something like

    source = sound(buffer, 1, true) -- true means loop (needs to be implemented)
    --some time later
    source.volume = 0.2 
    source.cancel() -- stop it playing (looping)
    

    Would this be what you are looking for?

    There is scope in OpenAL to create a streaming buffer (ie, a buffer queue that you can stream bytes into). This would be much harder to expose, but is possible (the API will be interesting to design for it.)

  • Posts: 384

    I've played about with the sound buffer and got notes out of it. The good thing is that you can know which frequency you are playing.

    Being able to shape the sound during playback would be good. Likewise, a buffer queue that let you alter frequencies on the fly would let you create siren sounds etc.

    @ruilov's 123 was great, we just need an easy way to get stuff in... :)

  • Posts: 2,161

    Manipulating the current sounding sound is what I want so the token method sounds (ha ha) good.

    Since this is beta, you could do a very rough method for us to try out before figuring out what the "right" API should be - might turn out that not all of it is really necessary.

  • Posts: 384

    Hooray for the extra precision in encoded sounds in the latest beta... :) this means we can adjust the StartFrequency parameter in a table to make the note just right, and then can cache it for lag-free playback.

  • edited February 2012 Posts: 384

    Here is a beta version of the ABCplayer using the new coding, excuse the mess : http://fredbogg.posterous.com/abcplayercodea-v03-beta

  • SimeonSimeon Admin Mod
    Posts: 5,406

    Let me know what you guys think of the new sidebar and visual design in the latest beta.

  • edited February 2012 Posts: 2,161

    Not sure if it's important, but the last couple of beta updates haven't installed for me from within Codea. I have to do them via testFlight.

    I get the pop-up and click on "Install" but nothing happens. Then I go to testflight and it installs just fine.

  • Posts: 1,255

    The indicator between light / dark editor in the sidebar is pretty subtle. I had to go back and forth a couple of times before noticing the difference in the sidebar.

    I like being able to choose a background, but it's a little disconcerting to see the difference between the image as selected and the "green-ified" image as implemented.

    Still hoping for a more hierarchical method of project management somewhere down the line.

  • Posts: 2,161

    Still hoping for a more hierarchical method of project management somewhere down the line.

    Ditto, and easy transfer of files from one project to another (or - better still - using tabs from one project directly in another without copying). That would simplify my life considerably (and make it less likely that I do something stupid, like copying my files from the repository to the iPad instead of the other way around).

  • BortelsBortels Mod
    Posts: 1,557

    I don't see the original background as an option? (I PHEAR CHANGE).

    Having said that, the stars are nice. But I gotta be truthful - setting the background in the title page/project browser was not on my "list of things Codea needs". I mean pretty much at all. Cosmetics of the editor I stare all all the time - important. Cosmetics of the project choice page (as opposed to usability) - not so much.

    And to echo Mark and Andrew - I was excited when I read the description, and disappointed it was only "cosmetic". I named the game I'm working on "Trek", and when I open Codea I have to left-sweep 17 times to get to it (and if I sweep fast, I get bounceback and have to do it more). It makes me sad. Even a "text, no icon" mode would help. Please and Thank You.

    On the lighter side, my starfield is working, as is setting speed and steering (we had an all-hands meeting this morning, I brought the iPad). Time to add bad guys...

  • SimeonSimeon Admin Mod
    edited February 2012 Posts: 5,406

    Thanks for the feedback, everyone.

    The old background was 1024x768 pixels — I realise there are other desirable features, but we have to make sure the app is ready for whatever iPad Apple is rumoured to release in March. Maybe this is a personal thing, but I can't stand running a lower resolution app on a high density screen.

    @Mark unfortunately using them as-is makes things unreadable or clashes with the icon colours.

    @Andrew_Stacey I'm not too sure what that issue is. I've always installed from the web app, but I'll try from the popup next time. It could be that TestFlight has left some junk files somewhere and it's stopping it from working correctly.

    Edit: I know this might not be typical, but I code differently when I look at different images. As I was upgrading the resolution of Codea I couldn't settle on one new background and made it a choice of my favourite ones.

  • BortelsBortels Mod
    Posts: 1,557

    Choice is good. Forcing Change, not so much. I just got used to the old background - is a higher resolution version of the same not available? (Not that I care that much - like I said, I like the stars too)

  • Posts: 447

    @Andrew_Stacey, that was happening to me too. One day it wouldn't install even from the website anymore. I reset codea/ipad/profiles and still didn't work. Only went back to working after I logged out of testflight and back in.

  • SimeonSimeon Admin Mod
    Posts: 5,406

    @Bortels I think we have different philosophies regarding this. I'm a big fan of forced change, and change for the sake of change. I created the old image for the iPad 1 resolution, I could re-create it, but I thought the time was better spent creating a new, cleaner look that allowed for some personalisation.

  • BortelsBortels Mod
    Posts: 1,557

    @Simeon - for your own personal self, that's totally cool; growth is not possible without change. But - change really sucks if it's forced on you from the outside. Witness "remove .codea export/import". That was quite a change - did it make you happy, for change's sake? Nope - it was imposed from the outside. While change is good, that sort of change can be bad. What did some people do when they forced the change to remove .codea? They stopped upgrading, and resented the change.

    Now - the backdrop isn't nearly as important, it's just to illustrate the point.

    Think of the new dark code coloring - it's got rave reviews. Now - imagine the response if you said "this is the new way. If you liked the old colors, tough noogies".

    Coders are an odd bunch - I know I am. I love options. I hate being told "this is what you get, deal with it". If I didn't mind that - I'd be playing Angry Birds.

    Now, having said that, I don't actually care - I was just surprised the old background wasn't one of the choices. I suspect others will be as well. And out of many, I'll bet there are those this really annoys, because again, we're a quirky bunch.

Sign In or Register to comment.