include "util/session.php";
include "util/drawing.php";
include "header.php";
include "util/mysql_connect.php";
$bpm_match = -1;
$selected_beat = -1;
$selected_beat_title = "";
$selected_vocal = -1;
$selected_vocal_title = "";
$passback_selected_beat = "";
$passback_selected_vocal = "";
$beat_volume = 100;
$vocal_volume = 100;
$beat_speed = 100;
$vocal_speed = 100;
if (isset($_GET['initial_component_id']))
{
$res = mysql_query("SELECT component_type, bpm_match, component_title FROM funk.component_catalog WHERE component_id = '".((int)$_GET['initial_component_id'])."' AND lite_component = 'Y' AND bpm_match is not NULL");
if ($res!=null)
{
$row = mysql_fetch_array($res);
if ($row!=null)
{
if ($row[0] == 'B')
{
$selected_beat = (int)$_GET['initial_component_id'];
$passback_selected_beat = (int)$_GET['initial_component_id'];
$selected_beat_title = $row[2];
$bpm_match = $row[1];
}
else if ($row[0] == 'V')
{
$selected_vocal = (int)$_GET['initial_component_id'];
$passback_selected_vocal = (int)$_GET['initial_component_id'];
$selected_vocal_title = $row[2];
$bpm_match = $row[1];
}
}
}
}
if (isset($_GET['selected_beat']))
{
$res = mysql_query("SELECT bpm_match, component_title FROM funk.component_catalog WHERE component_id = '".((int)$_GET['selected_beat'])."' AND lite_component = 'Y' AND bpm_match is not NULL AND component_type = 'B'");
if ($res!=null)
{
$row = mysql_fetch_array($res);
if ($row!=null)
{
$selected_beat = (int)$_GET['selected_beat'];
$passback_selected_beat = (int)$_GET['selected_beat'];
$selected_beat_title = $row[1];
$bpm_match = $row[0];
}
}
}
if (isset($_GET['selected_vocal']))
{
$res = mysql_query("SELECT bpm_match, component_title FROM funk.component_catalog WHERE component_id = '".((int)$_GET['selected_vocal'])."' AND lite_component = 'Y' AND bpm_match is not NULL AND component_type = 'V'");
if ($res!=null)
{
$row = mysql_fetch_array($res);
if ($row!=null)
{
if (($bpm_match!=-1) && (($bpm_match<($row[0]-5))||($bpm_match>($row[0]+5))))
{
// ignore, mismatched bpm
}
else
{
$selected_vocal = (int)$_GET['selected_vocal'];
$passback_selected_vocal = (int)$_GET['selected_vocal'];
$selected_vocal_title = $row[1];
$bpm_match = $row[0];
}
}
}
}
if (isset($_GET['beat_volume']))
{
$beat_volume = (int)$_GET['beat_volume'];
}
if (isset($_GET['vocal_volume']))
{
$vocal_volume = (int)$_GET['vocal_volume'];
}
if (isset($_GET['beat_speed']))
{
$beat_speed = (int)$_GET['beat_speed'];
}
if (isset($_GET['vocal_speed']))
{
$vocal_speed = (int)$_GET['vocal_speed'];
}
$bpm_match_where = "";
if ($bpm_match!=-1)
{
$bpm_match_where = " AND bpm_match > " . ($bpm_match-5) . " AND bpm_match < " . ($bpm_match+5);
}
$beat_search_like = "%";
$beat_search_formdata = "";
if (isset($_GET['beat_search_text']))
{
$beat_search_like = "%" . addslashes($_GET['beat_search_text']) . "%";
$beat_search_formdata = $_GET['beat_search_text'];
}
$vocal_search_like = "%";
$vocal_search_formdata = "";
if (isset($_GET['vocal_search_text']))
{
$vocal_search_like = "%" . addslashes($_GET['vocal_search_text']) . "%";
$vocal_search_formdata = $_GET['vocal_search_text'];
}
$bquery_res = mysql_query("SELECT component_id, component_title, bpm_match FROM funk.component_catalog WHERE lite_component = 'Y' and bpm_match is not NULL AND component_type = 'B'" . $bpm_match_where . " AND component_title LIKE '" . $beat_search_like . "'");
$vquery_res = mysql_query("SELECT component_id, component_title, bpm_match FROM funk.component_catalog WHERE lite_component = 'Y' and bpm_match is not NULL AND component_type = 'V'" . $bpm_match_where . " AND component_title LIKE '" . $vocal_search_like . "'");
?>
| FM Studio |
|
|
$fres = mysql_query("SELECT clearspring_embed FROM funk.deployments WHERE featured = 'Y' LIMIT 1");
while (($frow = mysql_fetch_array($fres))!=null) { ?>
=stripslashes($frow['clearspring_embed'])?>
}
?>
|
|
=$ad_alt_mid300?> |
|
|
include "footer.php";
?>