0

I'm interested in a processing way of achieving something similar as is made by this person link

From how I get it she had a video sliced int in tiff's and then composed them with the RiTa Library

Does anybody know how to achieve such a thing, only changing the fact that I'm using another extension or format of file.I would like to achieve this with sound samples.

Any info about the code, logic or works that are similar and maybe free for altering.

Enlighten me!!

Thanks

For the direct question how do I import and read these files with following code.

import rita.*;

RiMarkov markov;

void setup()
{    
size(500, 500);

RiText.defaultFontSize(18);

new RiText(this, "click to (re)generate!");

// create a markov model w' n=3
markov = new RiMarkov(4);  

// load files into the model
markov.loadFrom(new String[] { "wittgenstein.txt", "kafka.txt" }, this);    
}

void draw()
{
background(255);
RiText.drawAll();
}

void mouseClicked() 
{   
if (!markov.ready()) return; 

RiText.disposeAll(); // clean-up old data

String[] lines = markov.generateSentences(10);

// lay out in rect (x=50 y=50, w=400, h=400)
RiText.createLines(this, lines, 50, 50, 400, 400);
}

So how can I or can I change the .txt files with for example .mp3 files and how can I then play it with processing? An audio library like Minim?

Any ideas will help.

Blckpstv
  • 117
  • 3
  • 17
  • If I got you right, I think Minim would do the job. You could also consider (if you use processing java version) http://www.beadsproject.net/ It has a sample manager, you load the samples and then trigger them according to chains/sequences you generate via RiTa. You can choose to use many small samples or jump at different points of the same sample. You will need to evaluate the efficiency of each alternative. – smarques Jan 27 '15 at 17:17

1 Answers1

1

I have no idea how Angela Ferraiolo made her movies, but I will take a stab at how I would approach it if I were to make this.

First of all, it's important to understand that RiTa works with text. File names are text. So you can use RiTa to pick which files to play by using their file names parsed through some sort of grammar.

The grammar part is where the power of RiTa comes in. Look at the HaikuGrammar example that's packaged with the RiTa library. Imagine replacing the words in the haiku.json file with your sample names and you could generate a new order for sample playback every time you clicked.

The example you quoted above uses Markov chains which work slightly differently. The markov object looks at the text input and analyzes the frequencies that certain words come after other words. Then when it starts generating, it uses those frequencies to generate the new text (many people have described this way better than me if you're interested). All that being said, I don't think file names would be a good seed for Markov chains. Unless you made a Markov chain out of a directory structure or something. Maybe it would be interesting if you associated a particular sample with a particular word, and every time that word came up, the sample played.

Long story short, send file names through RiTa and see what pops out.

justincouch
  • 101
  • 3
  • Tutorials on the two techniques are here: https://rednoise.org/rita/tutorial/grammars.php and here: https://rednoise.org/rita/tutorial/ngrams.php – rednoyz Jan 05 '19 at 15:28