0

我对实现与此人链接所做的类似事情的处理方式感兴趣

据我所知,她在 tiff's 中切了一段视频,然后用 RiTa Library 将它们组合起来

有谁知道如何实现这样的事情,只是改变了我正在使用另一种扩展名或文件格式的事实。我想用声音样本来实现这一点。

任何关于代码、逻辑或类似作品的信息,并且可以免费更改。

开导我!!

谢谢

对于直接问题,我如何使用以下代码导入和读取这些文件。

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);
}

那么我怎样才能或可以用例如 .mp3 文件更改 .txt 文件,然后如何通过处理来播放它?像 Minim 这样的音频库?

任何想法都会有所帮助。

4

1 回答 1

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.

于 2015-01-27T20:04:26.547 回答