Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

!! Split into letter/Lyric/API!!

$
0
0

Hello, I'm so new with this. I want to spilt the lyric into alphabets/letters so I could play around with the letter's shape and form.

So from the code I tried to split rLyrics (lyrics) by the delimiters indicated. The problem I think it's in the end of my void lyricsDisplay, I think I got it wrong.

thank you in advance


import geomerative.*;
import org.apache.batik.svggen.font.table.*;
import org.apache.batik.svggen.font.*;

MMTrack mmt;

String apiKey = "7a988cd002be2cacf0b8113576053e7d";
MusixMatch musixMatch = new MusixMatch(apiKey);

String delimiters = " ,.?!;:\n()*";
String songTitle = "hello";
String songArtist = "adele";
String rLyrics;

void setup() {
  size(900, 600);
  smooth();
  mmt = new MMTrack();

}
void draw(){
  translate(width/2, height/2);
  background(0);
  mmt.lyricsDisplay();
}

class MMTrack {

  int id;
  int albumId;
  String albumName;
  String artistId;
  String artistName;
  String lyrics;
  String[] finalText;
  String trackName;
  float offsetX;
  float offsetY;
  float leftCol;
  float topRow;
  float panX;
  float endX;

  int[] matches;
  MMTrack(int id_, int albumId_, String albumName_, String artistId_, String artistName_, String lyrics_, String trackName_) {
    id = id_;
    albumId = albumId_;
    albumName = albumName_;
    artistId = artistId_;
    artistName = artistName_;
    lyrics = lyrics_;
    rLyrics = lyrics;
    trackName = trackName_;
  }
    void lyricsDisplay() {
    splitlyrics= splitTokens(lyrics, delimiters);
    text(splitlyrics, 0, 50);
  }

}

Viewing all articles
Browse latest Browse all 2896

Trending Articles