| Author |
Message |
rpanuski
Joined: Apr 13, 2010 Posts: 2 Location: Allentown, Pa
|
Posted: Tue Apr 13, 2010 1:09 pm Post subject:
LiSa and SndBuf |
 |
|
My professor wrote an inquiry a while back in regards to asking about how to run Chuck on Ubuntu Linux ( http://www.electro-music.com/forum/topic-39741.html ). I would like to thank those who replied as we eventually got it working.
We are running into a problem at the moment in trying to restructure LiSa input buffers to separate sound buffer arrays.
The code records in LiSa and connects it to the sound buffer without any problems, however the connection remains even if the recording is stopped. It is very perplexing as I have even unconnected the LiSa to the sound buffers as well.
Essentially the code reads as shown below.
//Declare array of SndBuf(s)
//Declare LiSa Buffer as you cannot declare an array of LiSa Buffers
1 LiSaBuff.record(1); // Wait for an action to stop recording
2 LiSaBuff.record(0);
3 LiSaBuff => BuffArray[ArrayVar];// Tried to use @=> but it gave an error
4 LiSaBuff =< BuffArray[ArrayVar]; // To disconnect the buffers
5 LiSaBuff.clear();//Clears the current buffer of all previous information.
6 ArrayVar++
//Goto Line 1 after incrementing ArrayVar
The problem we are running into is that the connections are staying for each sound buffer and when the individual buffers are played back they are stacking atop each other and there is no break.
The question I have is there an assignment operator to which I can assign the value of the LiSa Buffer to the sound buffer, or is it essentially a pointer system where once the value is assigned it will remain regardless.
I saw a forum post similarly but I was confused and unable to follow the information presented and how it related to my problem.
http://www.electro-music.com/forum/topic-41095.html
Thank you in advance,
Ryan |
|
|
Back to top
|
|
 |
Acoustic Interloper

Joined: Jul 07, 2007 Posts: 2073 Location: Berks County, PA
Audio files: 89
|
Posted: Tue Apr 13, 2010 2:49 pm Post subject:
Subject description: Blessings. |
 |
|
This request has the professor's blessing Please let us know how to connect Lisa out to one audio buffer, then later disconnect and then connect to a new audio buffer. Thanks!
 _________________ When the stream is deep
my wild little dog frolics,
when shallow, she drinks. |
|
|
Back to top
|
|
 |
Kassen
Janitor


Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Sat Apr 17, 2010 3:27 am Post subject:
|
 |
|
I'm sorry but I really don't understand the question. I'm absolutely certain you *can* have a array of type LiSa, like this;
LiSa foo[8];
I also don't understand what sort of buffer you want to connect to in what way. Can I see some actual code with a explanation of the errors received, what behaviour you expected and what exactly you are trying to do? _________________ Kassen |
|
|
Back to top
|
|
 |
rpanuski
Joined: Apr 13, 2010 Posts: 2 Location: Allentown, Pa
|
Posted: Sat Apr 17, 2010 10:04 am Post subject:
Subject description: Elaboration |
 |
|
Kassen,
More of the code:
16 => int size; //Declares the size of the buffer to be 16
SndBuf Buffers[size]; //Declares a number of sndbufs
adc => LiSa testfile => dac; //Creates a LiSa obj, that records from the microphone and will output to the speaker
If you do the following errors will appear.
adc => LiSa testfile[size] => dac;
OR
adc => LiSa testfile[16] => dac;
What I am trying to do is have input entered through the microphone and have it stored into separate buffers dependent upon a specified action/response as to when the input stream will be split.
The method Dr Parson and myself decided upon was to have LiSa (as that is what we are using to record microphone input) and then store it into a buffer array of LiSa objects.
Eg:
Audio input: "In-A-Gadda-Da-Vida"
Correlating to a specified action that input stream could be split as shown below:
"In"
"A"
"Gadda"
"Da-Vida"
We would like each of those split into a different LiSa Buffer correspondent upon our previous action. We can easily start, stop recording as well as clear the input buffer used, however we cannot find a way to have as stated, the LiSa object be in an array form or if using LiSa with an array of SndBuf's have the input not be continuous.
aka the specified errors:
Currently if we were to use the code from the first post and the phrase above we would either have every SndBuf in the array having "In-A-Gadda-Da-Vida" in it, or as stated we are unable to get the array of LiSa buffers to work.
Thanks Again,
Ryan |
|
|
Back to top
|
|
 |
Kassen
Janitor


Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Sun Apr 18, 2010 4:10 am Post subject:
Subject description: Elaboration |
 |
|
| rpanuski wrote: | Kassen,
If you do the following errors will appear.
adc => LiSa testfile[size] => dac;
OR
adc => LiSa testfile[16] => dac; |
Yes. The issue here is that "testfile" here refers to a array of UGens. This array is not itself a UGen and the ChucK operator is not overloaded to deal with this. Here you go;
| Code: | LiSa testfile[size];
for (int n; n<size; n++)
{
adc => testfile[n] => dac;
}
|
Here "testfile[n]" does refer to a UGen. This is akin to how "crowd" doesn't refer to a person but "that man in the green jacket in the front of the crowd" does, even though the whole crowd is made up of people.
| Quote: |
The method Dr Parson and myself decided upon was to have LiSa (as that is what we are using to record microphone input) and then store it into a buffer array of LiSa objects.
|
Got it. This makes perfect sense as a structure. The one issue is that arrays, regardless of the type of the elements, are not UGens. Syntax isn't as important as a sound plan so I'd say you guys are doing well.
| Quote: |
We would like each of those split into a different LiSa Buffer correspondent upon our previous action. We can easily start, stop recording as well as clear the input buffer used, however we cannot find a way to have as stated, the LiSa object be in an array form or if using LiSa with an array of SndBuf's have the input not be continuous.
|
You're almost there. Next up would be a envelope follower. There is one by Perry in /examples/deep Using that with some code for analysis you will be able to do all of this in real time.
You could also record the whole thing to a single LiSa and store the points in time where the regions are in a array, then use that for restructuring the recording at playback. That would mean slightly more code but I think it'll be cheaper on the CPU. _________________ Kassen |
|
|
Back to top
|
|
 |
Acoustic Interloper

Joined: Jul 07, 2007 Posts: 2073 Location: Berks County, PA
Audio files: 89
|
Posted: Sat May 22, 2010 9:11 am Post subject:
Subject description: Thanks |
 |
|
Kassen,
Thanks for your help once again! Ryan got his project debugged and working in time for end of semester, and now I have a working example to extend for the "nondeterministic poetry," grammar-based restructuring program for spoken word performance that I want to build. It'll replace looping with more general grammar-structured rearrangement of live performance. Initially I am targeting spoken performance, but the phrase capture-restructure-replay machinery will apply equally well to instrumental phrases.
Take care, Dale _________________ When the stream is deep
my wild little dog frolics,
when shallow, she drinks. |
|
|
Back to top
|
|
 |
Kassen
Janitor


Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Sun May 23, 2010 8:26 am Post subject:
|
 |
|
Have a look at this;
http://joerg.piringer.net/
There's some nice stuff there on computer-aided poetry. _________________ Kassen |
|
|
Back to top
|
|
 |
Acoustic Interloper

Joined: Jul 07, 2007 Posts: 2073 Location: Berks County, PA
Audio files: 89
|
Posted: Sun May 23, 2010 9:46 am Post subject:
|
 |
|
Thanks for the link! Sound poems 4 and 5 are my favorites.
My students and I got out to play 3 gigs using Scrabble-to-MIDI in April, I used it a little at http://poconoskies.com/ , and I'll give a paper on it at http://www.icmc2010.org/ .
Wanting to get away from a trademarked game, I have been reading some game literature, including Xenakis' book, in preparation for my next round of the Glass Bead Game. That will probably take a year due to lack of time, will post when I have something interesting.
Examples like this one help me think about the space of possibilities.
Take care. _________________ When the stream is deep
my wild little dog frolics,
when shallow, she drinks. |
|
|
Back to top
|
|
 |
|