[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
RabidHaMsTeR.Org • View topic - Help with beatmatching & possibilities of script languag

Help with beatmatching & possibilities of script languag

How to create a custom scene, and custom scenes people have created.

Moderators: rabidhamster, Rovastar

Help with beatmatching & possibilities of script languag

Postby Drew » Sun Nov 14, 2004 4:15 pm

Drew
 

Postby Rovastar » Mon Nov 15, 2004 1:00 pm

Welcome

There is documentation on OpenGL in

\R4\dll\gl.r4

and shader stuff is here

\R4\docs\shader.txt

Maths stuff and commands here

\R4\data\native.r4

more commands here

\R4\docs\lang.txt

and the few commands are here

\R4\dll\

For scripting

\R4\docs\script.html

Yes they are allover the place. But I think that covers most bases. :)

The scene script language is capable of a fairly decent about of stuff although if youa re doing *really* complex stuff there will be a speed difference. Obviously any scripting language isn't going to be as quick as native C & openGL.

I am not sure what you are after in the in beat detection area.

YOu can use

float time; // time since scene start in seconds
float timePass; // Time passed since last frame, in seconds
float soundA; // Sound Level of Bass
float soundB; // Mid
float soundC; // Treble
float soundPos; // Ranges from 0 to 1 depending on BPM. not implemented yet
float finished; // Set this to 1 to signal the scene/fader wants to finish

// all the following values lie between -1 and 1
float waveLeft[512]; // The waveform (left channel)
float waveRight[512]; // The waveform (right channel)

// all the following values lie between 0 and 1
float specLeft[512]; // The spectrum (left channel)
float specRight[512]; // The spectrum (right channel)

in r4/data/native.r4

you get the sound information for you.

From there you can do what you want.

There is no *beat* matching yet though (unless Gordon added it in teh last version and I am not aware). Most of the scenes use the sounda (bass) variable to detect the bass.
Rovastar
 
Posts: 423
Joined: Mon May 19, 2003 3:15 am
Location: Derby & London, England


Return to R4 Custom Scenes

Who is online

Users browsing this forum: No registered users and 8 guests

cron