Author |
Message |
Arnaud06
Joined: Jul 13, 2009 Posts: 40 Location: France
Audio files: 1
|
Posted: Tue Jul 28, 2009 2:41 pm Post subject:
Slicing a sample |
 |
|
Hi,
It's me again. I have a question, wich mught not be related to ChucK, but I think a can find some people here who can help me. I want to "slice" a sample, but when I do it the butcher way, it (obviously) click at each part.
I just want to learn how to cut a sample properly with ChucK's generator or analyzers.... So if anyone have a website or anything on the subject, link me
Thank you !! |
|
Back to top
|
|
 |
mrcold

Joined: Jun 18, 2009 Posts: 187 Location: USA
Audio files: 31
|
Posted: Tue Jul 28, 2009 7:35 pm Post subject:
|
 |
|
what are using to do the slicing? I've used SndBuf and did the slicing by editing the start position of the file and I didn't notice any clicking... i was slicing a beat though, so i probably wouldn't have noticed the clicking.
In any case, look up SndBuf in the documentation (look at the otf examples for usage) and then something like THIS:
44100 => buf.pos;
will start playback at sample 44100.
when the file is read into memory, you can get the total length (in samples) by reading buf.samples.
when i sliced up a beat i got the total length in samples and divided that number by 8 or 16 and then send THAT number multiplied to buf.pos, so i got 8 or 16 even slices.
if that gives you clicks, you could use a quick volume envelope to smooth out the edges of the slicing.
good luck |
|
Back to top
|
|
 |
Arnaud06
Joined: Jul 13, 2009 Posts: 40 Location: France
Audio files: 1
|
Posted: Wed Jul 29, 2009 1:09 am Post subject:
|
 |
|
That is exactly what I did !! We are on the same page (like in the Bubbles melody you post, I put my melody into arrays ). I thought about the enveloppe, but it works for the first part, after that the envelope doesn't reset. I use the ADSR, with KeyOn/KeyOff. |
|
Back to top
|
|
 |
Antimon
Joined: Jan 18, 2005 Posts: 4145 Location: Sweden
Audio files: 371
G2 patch files: 100
|
|
Back to top
|
|
 |
Arnaud06
Joined: Jul 13, 2009 Posts: 40 Location: France
Audio files: 1
|
Posted: Thu Jul 30, 2009 12:40 am Post subject:
|
 |
|
What do you mean two voices ? |
|
Back to top
|
|
 |
Antimon
Joined: Jan 18, 2005 Posts: 4145 Location: Sweden
Audio files: 371
G2 patch files: 100
|
Posted: Thu Jul 30, 2009 12:52 am Post subject:
|
 |
|
Two SndBufs (if that's what you're using) each with an envelope, one silent and one playing. Then, when you're changing what part of the sample you're playing, you set the position on the one that is silent and do env1.keyOff(); env2.keyOn();
...
Come to think of it, maybe I misunderstand what "slice" means... do you want to change what part of the sample is playing, or do you just want to make it go quiet every now and then?
/Stefan _________________ Antimon's Window
@soundcloud @Flattr home - you can't explain music |
|
Back to top
|
|
 |
Kassen
Janitor


Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Thu Jul 30, 2009 3:26 am Post subject:
|
 |
|
Antimon wrote: | Two SndBufs (if that's what you're using) each with an envelope, one silent and one playing. Then, when you're changing what part of the sample you're playing, you set the position on the one that is silent and do env1.keyOff(); env2.keyOn();
|
LiSa
LiSa
LiSa
LiSa
LiSa
LiSa
Did I mention LiSa lately? She does all of that, with ready made multiple voices, each with envelopes, exactly because it helps deal with zero-x-ings. Really, LiSa is the bestest for everything.
 _________________ Kassen |
|
Back to top
|
|
 |
Inventor
Stream Operator

Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Thu Jul 30, 2009 5:08 am Post subject:
|
 |
|
Haha LiSa LiSa LiSa! Our Alice in Wonderland character, such a dear she is! I tried to get LiSa working but couldn't understand how the read pointer worked or how it sucked in samples. Does LiSa just suck in a minute's worth of samples or does it take a minute to do that? How do you playback backwards? I want to make an accelerometer-based record scratcher for the Laptop Battle using LiSa.
Les _________________ "Let's make noise for peace." - Kijjaz |
|
Back to top
|
|
 |
Antimon
Joined: Jan 18, 2005 Posts: 4145 Location: Sweden
Audio files: 371
G2 patch files: 100
|
Posted: Thu Jul 30, 2009 8:52 am Post subject:
|
 |
|
Heh, yeah LiSa is a great gal. I just think that she's a bit clumsy with sound files. I know there are a couple of tricks to read in, connecting to blackhole and shuffling bits, or just piping and recording, but that's tricky enough to distract I think.
/Stefan _________________ Antimon's Window
@soundcloud @Flattr home - you can't explain music |
|
Back to top
|
|
 |
Arnaud06
Joined: Jul 13, 2009 Posts: 40 Location: France
Audio files: 1
|
Posted: Fri Jul 31, 2009 10:35 am Post subject:
|
 |
|
But... Who is LiSa ? |
|
Back to top
|
|
 |
Antimon
Joined: Jan 18, 2005 Posts: 4145 Location: Sweden
Audio files: 371
G2 patch files: 100
|
|
Back to top
|
|
 |
DrumAliens

Joined: Jul 10, 2008 Posts: 31 Location: UK
Audio files: 1
|
|
Back to top
|
|
 |
Arnaud06
Joined: Jul 13, 2009 Posts: 40 Location: France
Audio files: 1
|
Posted: Sat Aug 01, 2009 10:11 am Post subject:
|
 |
|
Oh ok, I didn't look into the UGen list, sorry
I'm not at home right now, so I'll take a loop deep into this LiSa, and in your script DrumAliens too  |
|
Back to top
|
|
 |
|