• Equalizer Controlled Lights via Wire
    5 replies, posted
Is there a way to pull an audio feed from 3D Streaming Radio (a wire friendly radio) or sound source, and have it control lights via an equalizer like on many of today's stage shows? or maybe just make an array of lights to make a graphic equalizer on a large scale? I would like to attempt this but am not the best in wire, but I know my way around generally.
was pretty sure the old bass.dll did this. outside of that, i wouldn't have any idea.
Yes and No. you can do it within lua, even with the todays built in IGModAudioChannel (playURL uses) but without lua, you cant. The Spectrum analyzer (FFT) function is clientside, like the IGModAudioChannel. sending these datas to server would cause desync between music and fft data. Get Expression Advanced 2, theres everything built in you need. You just need to find out which is the best way to create and move the lights based on FFT data. Here is an example FFT expression advanced 2 code: [CODE]client{ array fft variant ar string url = "http://shit.com/1.mp3" if(canPlayFromURL()){ playURL(url,"3d",function(audio a){ a.play() a.setPos(entity().pos()) if(a){ ar = a } }) } event tick(){ if(canPlayFromURL()){ if(ar.type()=="audio"){ audio ar = (audio)ar fft = ar.fft(128) // FFT stuff goes here fft = numberArray() } if(ar.type()=="audio"){ audio ar = (audio)ar ar.setPos(entity().pos()) ar.set3DFadeDistance(1000,3000) } } } } [/CODE] within event tick, theres an fft table (see fft = ar.fft(128)) with 128 entries based on frequencies. You can go up to 8192
So that limits the number of tracked frequencies? or the number of actions the code can put through? It also says a.play has an unknown character "."
check your URL if the audio file [B]isnt [/B]a valid one then audio channel "a" isnt valid and audiochannel.play cant use it. (direct access to the file, no website around it. example: [url]http://gamerpaddy.bplaced.net/flash/shiverrz.mp3[/url] ) I didnt tested it but i think its the count of test points within the frequencies from 0.001 to xxx... maybe 32 or 41khz
even with a valid direct mp3 link to a site that works with other addons, it still says a.play is invalid at (.)
Sorry, you need to Log In to post a reply to this thread.