Kodi Community Forum

Full Version: Karaoke support; CD+G, CDG, KAR, KOK, and/or KFN
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6
i would love to see some cd+g (mp3) support in xbmc!

is this a possibility?

this is a terrific plugin for winamp

http://pages.infinit.net/belier/

this would (for me) *complete* the xbox as the most ideal media centre for my home!

thanks all!
would be sweet if you could add karaoke support.
in other words, cdg file support.
ok, let's twist that topic a bit, still fitting the tile : about karaoke support for mid files : .kar

plentiful of those on the web, very light, and there are fairly acceptable free soundfont libraries.

would be great.

fab
i second the motion... and support for the xmm microphone wouldn't be a bad idea (for those of us dumb enough to buy it).

bump!
i propose to add karaoke files support to xbmc so it can read kar and midi files. i now that it already exist a midi player for dreamcast so it must possible to do.

without this function the music mixer has something that xbmc don't have Huh

thanx

i would like to help but i'm not a programmer.
if they are people that don't know *.kar files are midi files with lyrics included.
that's all.

thanx
sadly it seems that noone of the devs are interested in implementing karaoke. i definitely think it should have a higher priority. as a matter of fact karaoke is fun (if you are drunk enough) and it's a great entertainment for a party.
maybe i don't know how to search on the forum but i only find three results and they don't talk about midi karaoke but about cd+g karaoke.

either i agree with odrike. karaoke is great (even if your not drunk) and fun when you use it with friends.
i aggree that it should have a greater priority. :d
i can't even find it in the list of what the devs want to implement so i guess all those people waiting for it will need to wait for a long time unless somone else can write a patch.
with the release of the xbox music mixer, it just begs the addition of cd+g support for karaoke. there are many mp3+cdg files available on the net for free. this would fill a big hole in the xbmc. there is even a cd+g plug-in for winamp.
i have load of dvd-rs with karaoke mp3+g and also cd+g disc. xbox music mixer uses proprietary .krk files. once again microsoft wants to suck money out of people for the songs. the microphones are out for xbox. i know others have requested so im just going to ask again to please consider support. i know winamp had a plug-in so i wondering if it isnt that difficult to port it to mediaplayer.
if you already know that others suggested this feature, why do you start a new thread instead of replying to another?.

we can't use the winamp plugin. it is not open source.
hello
is it possible to use direct show filter on xbox to play kar files
look at:

http://karaoke.km.ru/

karaoke for directshow is a an excellent solution for midi karaoke file playback by standard means such as windows media player.

capabilities and features of karaoke for directshow:

midi karaoke files played back as video
full screen video!!!
seamless integration with standard windows media player
filter's reusability in other directshow applications
windows shell (windows explorer) extensions: karaoke file property sheet to present file information (lyrics, title, artist, copyright)
appearance of karaoke window is accessible for configuration
this software is absolutely free!!!

tombel
i have c++ code which will read a .cdg file and decode it into a matrix ready for display.

i do not have the experience to finish it for the xbox. i've included the source for any intrepid programmer to help finish it off. all i ask is a line of credit if you are able to finish it up.

note, the cdggraphicsmatrix needs to be translated into rgb values by colorgrid -- i hope this can help kick start karaoke development

Quote:// cdg.cpp : defines the entry point for the console application.
//

#include "stdafx.h"
#include <fstream.h>
#include <string.h>
#include "cdg.h"

int cdggraphicsmatrix [300][216];
int colorgrid [16][3];

void pause () {
char c[1];
printf("hit any key to continue\n");
cin >> c;
}


void clear_grid() {
int i,j;

for (i=0;i<300;i++) {
for (j=0;j<216;j++) {
cdggraphicsmatrix [i][j]=*null_character;
}
}
}


void dump_grid() {
int i,j;

ofstream outfile ("c:\\dump.txt",ios::out);
for (j=0;j<216;j++) {
for (i=0;i<300;i++) {
outfile << hex << (cdggraphicsmatrix [i][j]);
}
outfile << "\n";
}
outfile << "color table (r,g,b)\n";
for (i=0;i<16;i++) {
outfile << "row ";
outfile << i;
outfile << " ";
outfile << hex << colorgrid[i][0];
outfile << ",";
outfile << hex << colorgrid[i][1];
outfile << ",";
outfile << hex << colorgrid[i][2];
outfile << "\n";
}

}


void memory_preset (char tempdata[16]) {
struct mem_preset memorypreset;
int i,j;


memcpy(&memorypreset,tempdata,16);
for (i=0;i<300;i++) {
for (j=0;j<216;j++) {
cdggraphicsmatrix [i][j]=memorypreset.color;
}
}
}

void border_preset (char tempdata[16]) {
struct bord_preset borderpreset;
int i,j;

memcpy(&borderpreset,tempdata,16);

for (i=0;i<6;i++) {
for (j=0;j<216;j++) {
cdggraphicsmatrix [i][j]=borderpreset.color;
}
}


for (i=294;i<300;i++) {
for (j=0;j<216;j++) {
cdggraphicsmatrix [i][j]=borderpreset.color;
}
}

for (i=0;i<300;i++) {
for (j=0;j<12;j++) {
cdggraphicsmatrix [i][j]=borderpreset.color;
}
}

for (i=0;i<300;i++) {
for (j=204;j<216;j++) {
cdggraphicsmatrix [i][j]=borderpreset.color;
}
}
}

void tile_block_normal (char tempdata[16]) {
struct tileblock tileblock;
int i,j,currentrow;
char tile[6][12];

memcpy(&tileblock,tempdata,16);

for (i=0;i<12;i++) {
currentrow=tileblock.tilepixels[i]&sc_mask;
for (j=5;j>=0;j--) {
if(currentrow % 2 !=0) {
tile[j][i]=34;
} else {
tile[j][i]=33;
}
currentrow /= 2;
}
}

for (i=0;i<12;i++) {
for(j=0;j<6;j++) {
if (tile[j][i]==33) {
cdggraphicsmatrix[(tileblock.column*6)+j][(tileblock.row*12)+i]=tileblock.color0&sc_color_mask;
} else {
cdggraphicsmatrix[(tileblock.column*6)+j][(tileblock.row*12)+i]=tileblock.color1&sc_color_mask;
}
}
}
}


void tile_block_xor (char tempdata[16]) {
struct tileblock tileblock;
int i,j,currentrow;
char tile[6][12];

memcpy(&tileblock,tempdata,16);

for (i=0;i<12;i++) {
currentrow=tileblock.tilepixels[i]&sc_mask;
for (j=5;j>=0;j--) {
if(currentrow % 2 !=0) {
tile[j][i]=34;
} else {
tile[j][i]=33;
}
currentrow /= 2;
}
}

for (i=0;i<12;i++) {
for(j=0;j<6;j++) {
if (tile[j][i]==33) {
cdggraphicsmatrix[(tileblock.column*6)+j][(tileblock.row*12)+i]=(tileblock.color0&sc_color_mask)^cdggraphicsmatrix[(tileblock.column*6)+j][(tileblock.row*12)+i];
} else {
cdggraphicsmatrix[(tileblock.column*6)+j][(tileblock.row*12)+i]=(tileblock.color1&sc_color_mask)^cdggraphicsmatrix[(tileblock.column*6)+j][(tileblock.row*12)+i];
}
}
}
}


void load_color_table (char tempdata[16], int section) {
int i,j,mod;
short colorvalue;
unsigned int red=0;
unsigned int green=0;
unsigned int blue=0;
struct colortab colortable;

memcpy(&colortable,tempdata,16);
for (i=8*section; i<8*section+8; i++) {
colorvalue=colortable.colorspec[i-(8*section)] & sc_double_mask;
printf("colorvalue %d\n",colorvalue);
for (j=0; j<4; j++) {
if(colorvalue &2 !=0) {
red += (8.00/((2<<j)/2));
}
colorvalue /=2;
}
for (j=0; j<2; j++) {
if(colorvalue &2 !=0) {
green += (8.00/((2<<j)/2));
}
colorvalue /=2;
}
colorvalue /= 4;
for (j=0; j<4; j++) {
if(colorvalue &2 !=0) {
green += (8.00/((2<<j)/2));
}
colorvalue /=2;
}
for (j=0; j<4; j++) {
if(colorvalue &2 !=0) {
blue += (8.00/((2<<j)/2));
}
colorvalue /=2;
}
printf("row %d red=%d, green=%d, blue=%d\n",i,red,green,blue);
colorgrid[i][0]=red * 255/15;
colorgrid[i][1]=green * 255/15;
colorgrid[i][2]=blue * 255/15;

red=green=blue=0;
}
}


// ***** main function here
int main(int argc, char* argv[])
{
char *filename;
char cdgfilebuffer[24];
int i,j;
struct subcode cdgsubcodesector;

clear_grid();
i=0;
filename="f:\\karaoke - organized and renamed\\dk\\dk006-06-joplin, janis-me & bobby mcgee.cdg";
ifstream myfile (filename,ios::in | ios::binary);

while(!myfile.eof()) {
myfile.read (cdgfilebuffer,24);
memcpy(&cdgsubcodesector,cdgfilebuffer,24);
i++;
printf("%d ",i);
if (i % 1000 == 0) {
dump_grid();
pause();
}

if ((cdgsubcodesector.command & sc_mask) == sc_cdg_command ) {
switch (cdgsubcodesector.instruction & sc_mask) {
case cdg_memorypreset:
printf("cdg_memorypreset \n");
memory_preset(cdgsubcodesector.data);
break;
case cdg_border_preset:
printf("cdg_border_preset \n");
border_preset(cdgsubcodesector.data);
break;
case cdg_tile_block_normal:
printf("cdg_tile_block_normal \n");
tile_block_normal(cdgsubcodesector.data);
break;

case cdg_scroll_preset:
printf("cdg_scroll_preset \n");
break;
case cdg_scroll_copy:
printf("cdg_scroll_copy \n");
break;
case cdg_define_transparent_color:
printf("cdg_define_transparent_color \n");
break;

case cdg_load_color_table_low:
printf("cdg_load_color_table_low \n");
load_color_table(cdgsubcodesector.data,0);
break;
case cdg_load_color_table_high:
printf("cdg_load_color_table_high \n");
load_color_table(cdgsubcodesector.data,1);
printf("subcode data-");
printf(cdgsubcodesector.data);
break;
case cdg_tile_block_xor:
printf("cdg_tile_block_xor \n");
tile_block_xor(cdgsubcodesector.data);
break;
default:
printf("unknown command %d\n",cdgsubcodesector.instruction & sc_mask);
break;
}
} else {
printf("no command\n");
}

}


return 0;
}
i have c++ code which will read a .cdg file and decode it into a matrix ready for display.

i do not have the experience to finish it for the xbox. i've included the source for any intrepid programmer to help finish it off. all i ask is a line of credit if you are able to finish it up.

note, the cdggraphicsmatrix needs to be translated into rgb values by colorgrid -- i hope this can help kick start karaoke development

Quote:// cdg.cpp : defines the entry point for the console application.
//

#include "stdafx.h"
#include <fstream.h>
#include <string.h>
#include "cdg.h"

int cdggraphicsmatrix [300][216];
int colorgrid [16][3];

void pause () {
char c[1];
printf("hit any key to continue\n");
cin >> c;
}


void clear_grid() {
int i,j;

for (i=0;i<300;i++) {
for (j=0;j<216;j++) {
cdggraphicsmatrix [i][j]=*null_character;
}
}
}


void dump_grid() {
int i,j;

ofstream outfile ("c:\\dump.txt",ios::out);
for (j=0;j<216;j++) {
for (i=0;i<300;i++) {
outfile << hex << (cdggraphicsmatrix [i][j]);
}
outfile << "\n";
}
outfile << "color table (r,g,b)\n";
for (i=0;i<16;i++) {
outfile << "row ";
outfile << i;
outfile << " ";
outfile << hex << colorgrid[i][0];
outfile << ",";
outfile << hex << colorgrid[i][1];
outfile << ",";
outfile << hex << colorgrid[i][2];
outfile << "\n";
}

}


void memory_preset (char tempdata[16]) {
struct mem_preset memorypreset;
int i,j;


memcpy(&memorypreset,tempdata,16);
for (i=0;i<300;i++) {
for (j=0;j<216;j++) {
cdggraphicsmatrix [i][j]=memorypreset.color;
}
}
}

void border_preset (char tempdata[16]) {
struct bord_preset borderpreset;
int i,j;

memcpy(&borderpreset,tempdata,16);

for (i=0;i<6;i++) {
for (j=0;j<216;j++) {
cdggraphicsmatrix [i][j]=borderpreset.color;
}
}


for (i=294;i<300;i++) {
for (j=0;j<216;j++) {
cdggraphicsmatrix [i][j]=borderpreset.color;
}
}

for (i=0;i<300;i++) {
for (j=0;j<12;j++) {
cdggraphicsmatrix [i][j]=borderpreset.color;
}
}

for (i=0;i<300;i++) {
for (j=204;j<216;j++) {
cdggraphicsmatrix [i][j]=borderpreset.color;
}
}
}

void tile_block_normal (char tempdata[16]) {
struct tileblock tileblock;
int i,j,currentrow;
char tile[6][12];

memcpy(&tileblock,tempdata,16);

for (i=0;i<12;i++) {
currentrow=tileblock.tilepixels[i]&sc_mask;
for (j=5;j>=0;j--) {
if(currentrow % 2 !=0) {
tile[j][i]=34;
} else {
tile[j][i]=33;
}
currentrow /= 2;
}
}

for (i=0;i<12;i++) {
for(j=0;j<6;j++) {
if (tile[j][i]==33) {
cdggraphicsmatrix[(tileblock.column*6)+j][(tileblock.row*12)+i]=tileblock.color0&sc_color_mask;
} else {
cdggraphicsmatrix[(tileblock.column*6)+j][(tileblock.row*12)+i]=tileblock.color1&sc_color_mask;
}
}
}
}


void tile_block_xor (char tempdata[16]) {
struct tileblock tileblock;
int i,j,currentrow;
char tile[6][12];

memcpy(&tileblock,tempdata,16);

for (i=0;i<12;i++) {
currentrow=tileblock.tilepixels[i]&sc_mask;
for (j=5;j>=0;j--) {
if(currentrow % 2 !=0) {
tile[j][i]=34;
} else {
tile[j][i]=33;
}
currentrow /= 2;
}
}

for (i=0;i<12;i++) {
for(j=0;j<6;j++) {
if (tile[j][i]==33) {
cdggraphicsmatrix[(tileblock.column*6)+j][(tileblock.row*12)+i]=(tileblock.color0&sc_color_mask)^cdggraphicsmatrix[(tileblock.column*6)+j][(tileblock.row*12)+i];
} else {
cdggraphicsmatrix[(tileblock.column*6)+j][(tileblock.row*12)+i]=(tileblock.color1&sc_color_mask)^cdggraphicsmatrix[(tileblock.column*6)+j][(tileblock.row*12)+i];
}
}
}
}


void load_color_table (char tempdata[16], int section) {
int i,j,mod;
short colorvalue;
unsigned int red=0;
unsigned int green=0;
unsigned int blue=0;
struct colortab colortable;

memcpy(&colortable,tempdata,16);
for (i=8*section; i<8*section+8; i++) {
colorvalue=colortable.colorspec[i-(8*section)] & sc_double_mask;
printf("colorvalue %d\n",colorvalue);
for (j=0; j<4; j++) {
if(colorvalue &2 !=0) {
red += (8.00/((2<<j)/2));
}
colorvalue /=2;
}
for (j=0; j<2; j++) {
if(colorvalue &2 !=0) {
green += (8.00/((2<<j)/2));
}
colorvalue /=2;
}
colorvalue /= 4;
for (j=0; j<4; j++) {
if(colorvalue &2 !=0) {
green += (8.00/((2<<j)/2));
}
colorvalue /=2;
}
for (j=0; j<4; j++) {
if(colorvalue &2 !=0) {
blue += (8.00/((2<<j)/2));
}
colorvalue /=2;
}
printf("row %d red=%d, green=%d, blue=%d\n",i,red,green,blue);
colorgrid[i][0]=red * 255/15;
colorgrid[i][1]=green * 255/15;
colorgrid[i][2]=blue * 255/15;

red=green=blue=0;
}
}


// ***** main function here
int main(int argc, char* argv[])
{
char *filename;
char cdgfilebuffer[24];
int i,j;
struct subcode cdgsubcodesector;

clear_grid();
i=0;
filename="f:\\karaoke - organized and renamed\\dk\\dk006-06-joplin, janis-me & bobby mcgee.cdg";
ifstream myfile (filename,ios::in | ios::binary);

while(!myfile.eof()) {
myfile.read (cdgfilebuffer,24);
memcpy(&cdgsubcodesector,cdgfilebuffer,24);
i++;
printf("%d ",i);
if (i % 1000 == 0) {
dump_grid();
pause();
}

if ((cdgsubcodesector.command & sc_mask) == sc_cdg_command ) {
switch (cdgsubcodesector.instruction & sc_mask) {
case cdg_memorypreset:
printf("cdg_memorypreset \n");
memory_preset(cdgsubcodesector.data);
break;
case cdg_border_preset:
printf("cdg_border_preset \n");
border_preset(cdgsubcodesector.data);
break;
case cdg_tile_block_normal:
printf("cdg_tile_block_normal \n");
tile_block_normal(cdgsubcodesector.data);
break;

case cdg_scroll_preset:
printf("cdg_scroll_preset \n");
break;
case cdg_scroll_copy:
printf("cdg_scroll_copy \n");
break;
case cdg_define_transparent_color:
printf("cdg_define_transparent_color \n");
break;

case cdg_load_color_table_low:
printf("cdg_load_color_table_low \n");
load_color_table(cdgsubcodesector.data,0);
break;
case cdg_load_color_table_high:
printf("cdg_load_color_table_high \n");
load_color_table(cdgsubcodesector.data,1);
printf("subcode data-");
printf(cdgsubcodesector.data);
break;
case cdg_tile_block_xor:
printf("cdg_tile_block_xor \n");
tile_block_xor(cdgsubcodesector.data);
break;
default:
printf("unknown command %d\n",cdgsubcodesector.instruction & sc_mask);
break;
}
} else {
printf("no command\n");
}

}


return 0;
}
Pages: 1 2 3 4 5 6