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 :
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.