GeorgeZaharia's Forum Posts

  • is there any animation to them?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • and the cow

  • is for you guys "write a tutorial" working? when i click it just refresh the page of tutorials and thats it... is it closed because of the spam bots?

    or is just chrome?

  • there are a few Highlighted Marks in the store when u are trying to upload the items.. they(the marks) are asking you ... do you own the copyright of the images...assets etc? meaning if one of ur stuff included there is not your's scirra can reject your zip file. you are asked like 3 times before you press the upload button not sure how you didn't seen it !

    and as kyatric said... you should read the seller agreement.... i mean its a business.... you should read the papers...

    (ps. is that the avatar that has a overlaid banned user text? or ur account got banned? im confused...)

    Everybody says this is not supported because of the 2 file types. That is a no brainier.

    But Since we are compiling 2 versions of code for different platforms we know how to set audio for that which we are working on.

    Now to the question at hand. How to call an audio file from a web server.

    you mean play an audio file? as mp3 etc? ... if so then u can use the video plugin i think its called you can play any file in it.. including mp3s since has the .h264 codec in it... however the file has to be on a public folder where anyone can read it.. outside that its pretty easy was a example in tutorials somewhere called ... playlist mp3 something...

  • try reinstalling i have no issues.... try also running it always as administrator...you can change the settings in properties of the .exe or desktop shortcut to always start with administrator rights.

  • Very cool!

    What are those calls for?

    are a Web Audio API analyser code snippet to get some beat detection but im passed that point now

  • R0J0hound

    yea the formats post i read it and remember the reasons about the mp3 licensing which i agree they are pretty high and i understand the inconvenience ... but a link playing request i guess wold solve it

  • Why not just use the Audio plugin?

    the project im working on(to kill my time and make something cool using C2 and Q3D) requires mp3/ogg/wave audio formats to be played... but users after i finish the project wont sit to convert to .ogg or any other format.. they will want to import a mp3 file directly since its the most common format on internet ...

    i have a combination of filechooser and browser js snippet to play any audio format and read a song pcm data

    which gives me a full preloaded waveform of any audio format...

    but i cant add the audio analyser effect to it since the audio plugin is not playing that song but a new audio object that i made in the browser...

    so now i need to get a js execution and basically reinvent everything to work around the audio plugin inability of playing mp3's and read the full waveform before playing the audio file in this case the music files that users wold choose to import.

    all this wold be avoided if audio plugin could play mp3's alone with the other formats

    the audio plugin works perfect for the rest of the project... but mp3s and pcm data is the main game (ex of gameplay :

    Subscribe to Construct videos now

    )

    with the help of R0j0Hound i have the bellow capx...

    which i adapted to work with the Q3d and i have a pretty close simulation as audiosurf... just now im missing the analyser effect which wold give me the beats reading while playing and ability to use those as speed boosting and notes/blocks spawning.

    its a pretty easy project ... but gives me headaches since im a bit more clumsy then normal people with js.

    capx: import any audio format and create a linear waveform - doesn't require custom plugins.

    now since i explained what im doing...

    the main audio js execution i need.. is for me to stop the audio playing... if i import a new song in the above capx .... for that i know i need a tag or name for each audio object i create... or i could destroy the audio object of the previews song and then create a new one when a new file is imported. ... or i can change the source... but for that i need to stop creating a new audio ... and that i have no clue how to do..

    but as i said above... my js skills are similar to a preschool kid assembling puzzles.

    as for the audio analyser its not a problem... i can calculate the length of each waveform line and convert it to a fictional speed when player is in proximity creating the illusion of speed boosting on beat.

    i just going to use unity + blox and it seems like construct1000 !

    thats more like stencyl logic then scratch.... even though both use the same colored blox... stencyl has similar logic as the unity+ blox thing interesting

    Really looking forward to this.

    Adding in the ability to do Javascript code snippets would be killer.

    you already can do that using the browser plugin and execute javascript

  • im currently playing audio files with browser

    by using the bellow execution

    "var aud = new Audio();

    aud.src = '"&FileChooser.FileURLAt(0)&"';

    aud.play();

    "

    everytime i import a new song it plays over the old one and sound duplicates

    i tried using this "sound.pause();

    sound.currentTime = 0;

    " before i play a new audio but if i do that the global volume stops and the audio files aren't heard anymore

    is there a way when i load a new song to stop the old song? i know i have to add a tag or name to the object but my skills are really poor on js.

  • normal buttons are a different type of objects they cant be toggled invisible unless you use CSS to make it so... or move it outside the layout. but there is no point of using buttons when you have sprites unless you need that custom CSS feature of them.

  • R0J0hound

    oh i see so if we keep the normal "bob" we have to basically add an extra " "bob" " system as for the words in a text variable. thats cool i guess thats why i was getting those issues i never added the extra quote signs

    that means i can use any js in w3 school

    thanks again Mr R0j0.

  • Ok I had a look and to me it looks like the audio analyser in webaudio isn't meant to read the entire song, only what's currently playing as a real time analysis. Maybe instead you could utilize the following to take a sound file and decode it into the raw pcm data and analyse that somehow:

    https://developer.mozilla.org/en-US/doc ... eAudioData

    Here's a the result:

    https://dl.dropboxusercontent.com/u/542 ... eform.capx

    ..... i wish i was near you to kiss you ... your my hero... this is perfect...... this solves a big problem of what i needed <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy"> now fun part comes haha <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy"> il keep you updated

    also what is the c2 brakets system for js ? cause i tried a few times using a normal javascript code but i always get some missing tips poping up cause of the closing being wrong does it have to be always between ("")? cause if thats how it works... how we replace the quote sign inside the js? with a ( ' ) ?

  • 22500 is a common sample rate for sounds so maybe that has something to do with it. It could be just how far ahead the plugin looks. You could try searching for the number in the audio plugin's source code to see if it's ever used.

    On another note in webaudio the analyzer effect seems to mainly just be used to get the waveform in sections. I'm not sure if it can get the entire song at once. Some googling about the webaudio analyzer hasn't yielding anything yet except for it being used to show the sound as it plays.

    hi r0j0 yea i have been looking into that .... .... however sample rates in audio plugin are not the real samples they have to be calculated on gettingfrequencybeat which c2 audio can do but ... not further then the first 22500 of them il look into that...

    i tried using functions and even arrays and saving the bitdataat each milisecond but the effect is the same just 22500 are read and written even if i have an array of 2250000

    i did look in the audio runtime js and the only close enough number to 22500 is 22050 which is on line 2399

    and the code is for playing a empty buffer

    // play empty buffer to unmute audio
    			var buffer = context["createBuffer"](1, 220, 22050);
    			var source = context["createBufferSource"]();
    			source["buffer"] = buffer;
    			source["connect"](context["destination"]);
    			startSource(source);
    		};[/code:2i4hq3rs]
    
    not even sure if this has any relevance...
    
    Edited: and it does not
    
    if i do draw while playing works good for the entire song... but not sections... something is up with the cache of the buffer clearing the samples and only reading from source it might be also that ... seen a few browser "Has enough memory tag around then cache cleared.." so im guessing the enough memory is around 2.25 seconds or i guess under 1 mb then after that the app wold buffer directly from the source... the weird part is .. even if i move the music in the sounds folder it still does it... so it cannot be the preloading of the music... its way out of my area...
    
    Edit2: have to mention if i draw a repeat from 1 to 22500 starting the loopindex("x") at 0 lets say and then repeat the same number loopindex at next interval of 200 px to right its drawing the same thing... the only problem is why it does not draw further after 22500 even though the loopindex takes the time to read the entire data of the song...which is 2.250.000 X rows
    
    how i know it reads all the data? .. if i leave only the 1 to 22500 repeat once then its only taking around 0.5-1 second if i leave it for the entire song... takes around 5 -10 seconds so something is reading the problem is does the writting is jumping with 10k further? i tried using the 100k layout to see if shows further out but no changes...  
    if i use the w3 audio array formula and saving of the bitssamples and repeat the audio.bincount 512 for the loopindex 1 to 22500 which is called preloading the samples of the song.... its not doing nothing else but repeating the same 22500 bits in same place... so its clearly something limiting it to that number or to 1-2% of a Music file(.ogg).
    
    as i noticed if i use the 36000hz song then the data is smaller and reads faster but same stops at the same 1-2% if i decrease the fft size from 2^15 which is 36000hz to 1024 or 2^10 then it reads the half of that so... i wold increase the fft size just we cant above 2^15 i dont see a usage above that either since the more bits the harder computers and browser wold be compatible....
    
    @r0j0hound you said something is interrupting what ived seen in the runtime was that on some browsers its preloading till and quote "Memory is Enough" then after that it clears the cache and starts live streaming.
    
    Edit3: but as many websites that did tutorials on the web audio api a fft size of 1024 should read the entire song... it does not require to be that large... unless.................. i have to check something il edit later a bit...
    
    Edit4: ok so its nothing else but the first point i was wabling around... its related to the [url=http://support.ircam.fr/docs/AudioSculpt/3.0/co/FFT%20Size.html]fft size[/url] calculus and [url=http://support.ircam.fr/docs/AudioSculpt/3.0/co/Time%20Buffer.html]time buffer[/url] thats why is the 22050 in there its basically 21.35 hz band  and on that hand the time buffer only plays an average 0.23s which in the example i made its a fftsize 10 times bigger so its adding up to 2.25 / 2.135 makes sense... but... now remains the question..
    
    how do we preload more samples then the 1 its doing?
    
    found a beat detection tutorial about samples... however i cant really understand how i wold move the next 1024 instances to the right... im guessing the loopindex it should automatically do it .........in C2 right? 
    
    Simple sound energy algorithm #1:  its relating to the sampling issue.
    
    [url=http://archive.gamedev.net/archive/reference/programming/features/beatdetection/index.html]Beat detection Gamedev[/url]