We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSound,  Music Libraries › Display id3.songTitle
Page Index Toggle Pages: 1
Display id3.songTitle (Read 344 times)
Display id3.songTitle
Apr 7th, 2008, 6:27am
 
I'm new to processing and trying to figure out why the ID3 information prints to the tray at the bottom of processing, but won't display in the rendered app.

If some could let me know what I'm doing wrong or point me to a simple example, I'd appreciate it.

Here is my code:

import ddf.minim.*;

AudioPlayer song;

import jorgecardoso.processing.id3.*;

void setup()
{
 size(1400, 300);
 
 // always start Minim first!
 Minim.start(this);

 // this loads mysong.wav from the data folder
 song = Minim.loadFile("DontForgetMe_WayOutWest.mp3");
 song.play();

ID3 id3 = new ID3(this);
id3.readID3("DontForgetMe_WayOutWest.mp3");


PFont font;
font = loadFont("EurostileRegular-48.vlw");
textFont(font);
textSize(40);
fill(255);


println("Song Title:" + id3.songTitle);
println("Artist: " + id3.artist);
println("Album: " + id3.album);
println("Year: " + id3.year);
println("Genre: " + id3.genre);

}



void draw()
{
background(0);
fill(255);
text("Song Title:", 20, 40);

// Although I have the call to the id3 title correct, it's not displaying in the app. Should I use "data" here?

text("id3.songTitle", 220, 40);

text("Artist:", 20, 80);
text("id3.artist", 220, 80);

text("Album:", 20, 120);
text("id3.album", 220, 120);

text("Genre:", 20, 160);
text("id3.genre", 220, 160);

text("Track Time:", 1000, 280);
text("2:28", 1200, 280);

fill(58, 254, 34);
noStroke();
rect(20, 200, 1350, 30);


fill(200, 10, 10);
rect(25, 203, 40, 25);



 PImage img;
 img = loadImage("netmix_logotype_blackwhite_250x.jpg");
 image(img, 1175, 10, 200, 60);
}

void stop()
{
 song.close();
 super.stop();
}
Page Index Toggle Pages: 1