KONEY KONEY

Posted on: 2013-12-15

Milliseconds to CD frames converter

To compile CDJs CUE sheets

Today I wrote a very simple piece of Javascript code to convert an actual CUE point expressed in Ms into real CDJs CUE frame. Very handy because from any wave editor it's possible to make a CUE sheet, starting from milliseconds values.

The code works straight out of this page:

CDFRAME->

 


CODE:

<input type="text" name="ms" id="ms" min="1" max="1000" 
 autocomplete="off" placeholder="1-1000" />
<strong id="cdFramesResult"> CDFRAME-></strong>
<script>
 // Calculates CD frame values of milliseconds ###
 // by KONEY 2013 - www.koney.org #########
 var cdFps=75;
 var cdFrameMs=1000/cdFps;
 $("#ms").keyup(function(){
   var ms=$("#ms").val();
   if(ms>1000){ms=1000;}
   var msInCdFps=Math.round(ms/cdFrameMs);
   $("#cdFramesResult").html(' CDFRAME-> '+msInCdFps);
 });
</script> 

Requires JQuery to run.


Back to Blog Archive