1

On my webpage I have a form that accesses a bot API via talk.js

    var pb = new Pandorabot("aiaas.pandorabots.com","1409611418607",
    "botipiranga" etc);

I have a series of .txt documents on a server, say, lyrics to songs.

I want to query the client inputs:

1 - appending his words as strings to an array object, real time;

2 - when the array reaches a given number of words, start looking for string intersections between the array and the .txt documents.

3- when I have a match of n words, trigger an event, and play the .mp3 relative to its lyrics.

4 - once the song starts, trigger a processing.pde animation during playback, using processing.min.js.

How do I create these intersections? How do I create the events?

halfer
  • 19,824
  • 17
  • 99
  • 186
8-Bit Borges
  • 9,643
  • 29
  • 101
  • 198
  • Please do not use Processing.js, I discontinued it in December of 2018 after years of not getting any new work done on it. in 2021, just do what you want to do in plain JS. It can almost certainly already do what you're thinking of using Processing for. Also, if your question is about finding string intersections, none of the other steps are relevant to your question, so try to remove them and describe only the one problem you're trying to solve. What's the data you have, what's the data you want that to turn into, what's the code you already tried, and how did that not meet your expectations? – Mike 'Pomax' Kamermans Jan 23 '21 at 21:23

0 Answers0