GeorgeZaharia's Forum Posts

  • As the title says...

    Does anyone know what are the limits of loopindex and audio plugin analyser song read?

    because im trying to get a complete waveform of a song... but for some reason even though the loopindex works even for 2mil counts and above... audio plugin seems to not work properly... or cant read a song properly based on loopindex after 22500 ..... as more i test the C2 new versions it seems there is a limit always that ends in 25 same was for the new audio post that had a 0.025 wait ... now i seen lately nothing happens under 0.025 anymore is that the new tick count?

    the code to create a waveform is taking a "songlenght" multiplied by 1000 to get each millisecond and for X from 1 to songlenght creates a sprite

    however even if i can create more then 22500 objects .. the loopindex seems to stop at 22500 ... which is weird... is there something im missing?

    here is a capx file using the canvas plugin, i was thinking it wold work better by working around the sprite limits but its not ... Ashley have any idea why it stops? its exactly 2.25 seconds again the magic number "25"

    sorry for my confusing writing its really late ... didn't sleep for 2 days trying to find something about it ... either i was looking for the wrong words or dunno couldn't find nothing about waveform in c2

    Edited: as you can see instead of 1000 i used 1002.25 because i cant get the exact song length in milliseconds for the loopindex to match incrementally by 1

    however the multiplication has nothing to do with the song reading waveform ... it should not stop at 22500 or 2.25 seconds of the song.. im thinking the audio buffer is limited to 2 seconds?

    the 22500 its the song with 36000 HZ in name... since the total lenght is around 3 minutes but it stops at around 1% of the song basically.

  • This is interesting. Can you share the code on how to detect beats?

    the code is based on the C2 default Audio Analyser example ... however in order to properly use it i had to understand how audio Api works and how beat detection is matematically calculated.

    2 very good tutorials and reads i found where W3 audio Api and the info from gamedev for understanding the math behind it.

    and of course the badlogic onset detection helps or maybe "helps" is to strong... but proves the above 2 documentation about the audio processing.

    at the moment there is not much for me to share with you as code base since its not different then what audio analyser uses... but when im done with it i will release a tutorial about it since the links above are pretty hard to adapt to C2 plugin which is missing a few important calls... but that is another story and i dont want to sound as a broken record.

    but on a short explanation im using the Audio.AnalyserGetFrequencyBinAt("audio",0,audio.CurrentTime) which gives you the exact beats for every 0.01-0.001(686968691 as C2 shows), of the song then its a matter of detecting the lows (bass beats ) and highs (Snares/overal volume hits). by substracting an average -60 dB for Lows and -20 for highs. but i need to retest it a few times ... cause for some songs the procedural Generation works good and for some its braking... its something that has to do on how the song is transformed in .ogg on 441000 Hz or 32000 Hz etc also i did not tested yet... but i think it will be better for using mono mixes instead of stereos but again its not yet proven.

    then again im at the part of making a small "formula" to place the right beats in an array before playing the song and preLoad the samples in a song then i could generate any map or any song visually as Audacity does... but its to late here at this time so il see tomorrow about it...

    dont mistake the Audio.AnalyserPeakLevel with the Snares or high pitch ... same goes for the Audio.AnalyserRMSLevel its not the bass... Those are just the overall High and Medium dB of the song. they are not again... beat detection functions. they probably will help later on but at this current stage they did nothing but to make me look at the audio plugin in a wrong way. but then again its also my mistake not reading before using it haha... so yea... a lot of stuff to be read and applied before i have a near functional C2 beat detection using only the Already existing Audio Plugin... i dont have the time or skills to implement an already existing .js that does all this for us... so thats the story so far

    also let me know if you do some testings and if you manage to create something related with the audio plugin that might help me also

    Edited: in the current progress video the unaligned shape of the so called road... is the actual real waveform i compared the audacity form and the c2 2d audio form(proving im on the right track)... which i altered using the cos formula so its looking a bit smaller.

  • Some of you might seen some tests i have posted before... this is the next more polished stage of it.

    All started with this little test / test

    so ... here it is...Current Progress Video

    Milestones

    [Trying to implement the road assembly from this

    Test]

    [Custom 3D Ship obj]

    [Background Effects]

    [HUD&regular functions to be displayed (ie. scoring etc)]

    [importing .ogg files to be played]

    [Polishing the accuracy for Road Procedural Generation]

    [Adding beat/snare detection blocks]

    -> [A few more tests to be made to get a pre-rendered road before playing the audio..... i learned how C2 audio analyser effect its working and getting the frequencybitdataAt every 0.1 i have a good idea how to add a procedural pre-rendered before playing the audio.. even though normally we wold preload samples. In C2 doesn't exists that action... but it can be tricked ...so there i continue now ]

    Il start with last one.

    Current Events 28(from which 10 are for the 2d sprites and 5 or 10 global variables that i dont use anymore and forgot to delete them)

    As always il try keep everything under 100 events. And using the default C2 plugins ... minus the Q3d one

    another early test

    Keep in touch.

  • i think its a bit to hard at this stage to say something about it...

  • > some random thing i was occupied lately with <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile"> long way to finish it though <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

    >

    > https://drive.google.com/open?id=0B0lqV ... Dd6Z2tkUUE

    >

    Cool! is this using the Q3D plugin or is it sprites?

    Q3D but was an early test road was unaligned ... i have it almost ready got a pretty close clone of audiosurf as much as i could get

    since the c2 audio plugin doesnt have the most 2 important calls from the node audio api which is

    getFloatTimeDomainData (Float32Array array);

    getByteTimeDomainData (Uint8Array array);

    attribute unsigned long fftSize;

    readonly attribute unsigned long frequencyBinCount;

    attribute float minDecibels;

    attribute float maxDecibels;

    attribute float smoothingTimeConstant;

    so its like working with half a measure ... but yea Q3D

    Edited:

    Last news ... managed to work around the missing min max decibels and the bytetimedomaindata requirements.... the development continues <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

    soon will get a demo working merging this road assembly with this smooth road procedural generation

    then its a matter of adding a importing mp3 and converting in ogg inside the game so any song can be played by users choice ......

  • > Zelda Life v3 if you still need it... its similar with yours

    >

    Could you make this in the latest stable version, please? My gamekit is built in the latest stable version, so I prototype any features in separate projects in r227 before importing them.

    if you unzip the capx and go to the folder exported and edit with notepad the .caproj file inside... you will find on top of file version r229000 change the 9 to 7 and save and should work... its not recomended but i think the tilebg isnt changed in r229 so should work fine.

    its faster for you to just edit the caproj... i have to reinstall all plugins and etc again...

  • Zelda Life v3 if you still need it... its similar with yours

  • GameEnded

    curent score >localstorage highscore

      set localstorage highscore to score
      trigger once Audio play tadah.

    that should work hope it helps you.

  • there is no current C2 expression create object by name... however you dont actually need it... you can add a variable and say

    When Text = "sprite_alice"

    set variable to 1

    triggeronce

    variable=1

    create alice at x y

    When Text = "sprite_john"

    set variable to 2

    triggeronce

    variable=2

    create john at x y

  • As long as this isn't the one I UPLOAD to Google, can I create another build for my game using another Certificate?

    you can just you wont be able to update the old version via a webserver or something else.

    you can use unlimited signing certifications on google.

    the certification code... or the "apk signed" includes the com.developer.mygame code that you have in all your c2 projects. if that com.developer.mygame is different. then the google system looks at it as being a totally new game... however you can still upload it over the old apk of the same game. its just tedious work doing it like that.

    the apk signing or android developer certification it was used for stencyl mobile export if i recall correctly... not c2... on c2 things are much easier. depends which exporter you want to use to make an apk.

    you can create that keystore with intelxdk... but it was not needed before (6-7 months ago.)

    the fastest way of doing it is by using ludeis system... if you got lucky and got an account since they just launched and they where giving premium accounts. then you dont have to worry about certification and apk signing.

    just to update the version of the test project..(ie. version 1.0000, version 1.0001 etc) if you use the same com.developer.mygame code everytime.

    that certification is usually used .... so people cant hack your apps. as i recall... i might be wrong ... but thats what was the main reason of it .. i guess they updated their privacy now...

    however for just a test on mobile just connect your usb cable to your computer and test the app via intelxdk or via wi-fi network or on localhost:yourport...

    i think you can do that via browser also on mobiles directly... by accesing the preview of your project via your mobile browser. just type in your mobile browser the address that is shown on your computer browser when you preview a project.

  • dash platformer see if this helps you,it might be r227 if its bigger just edit the .caproj info.

  • whats angry at it?:) good game ;P

  • a small test

    QuaziGNRLnose do you have in plans adding an audio plugin for q3d?

  • 99Instances2Go

    no problem have fun with it ... i know i did

    maybe this capx will help you later lol...

    i know weird capx name but you will see why ...

    AudioConvulsionWormCapx

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • looks good