| Author |
Message |
Plankhead
Joined: Apr 24, 2008 Posts: 14 Location: Long Island
|
Posted: Thu Apr 24, 2008 10:50 pm Post subject:
Can ChucK manipulate preexisting soundfiles? Subject description: Or can it only synthesize them? |
 |
|
| I think ChucK is great from my first impression, seems very powerful. The problem is, I've got an ambitious idea that requires not only synthesizing of sound files with ChucK scripts, but also manipulation of preexisting sounds in wav, mp3, ogg, etc. Can ChucK do this? If not, will it ever? |
|
|
Back to top
|
|
 |
Inventor

Joined: Oct 13, 2007 Posts: 1330 Location: Florida, USA
Audio files: 52
|
Posted: Thu Apr 24, 2008 11:25 pm Post subject:
Re: Can ChucK manipulate preexisting soundfiles? Subject description: Or can it only synthesize them? |
 |
|
| Plankhead wrote: | | I think ChucK is great from my first impression, seems very powerful. The problem is, I've got an ambitious idea that requires not only synthesizing of sound files with ChucK scripts, but also manipulation of preexisting sounds in wav, mp3, ogg, etc. Can ChucK do this? If not, will it ever? |
Yes, ChucK is great and very powerful as you say! ChucK can read in wav files with WvIn and write them with WvOut. I've had a bit of limited success in reading wav files from outside sources, but files that ChucK writes do read back just fine and play on iTunes as well.
You can creatively manipulate existing audio with ChucK in many ways. Try using the FFT/IFFT features for that, or work in the time doain - it's your choice. Many of ChucK's features are based on existing synthesizer and electronic music techniques, so the familiar tool is often available.
I've become a ChucKist after ChucKing for about 7 months now, and I don't look back. It's a ChucK New World and ChucK is there to guide you, empower you, and to share in your ChucK joy. ChucK, ChucK often, and sometimes if you feel like it you can ChucK with wild, reckless abandon! _________________ @(ºoº)@ ><}}}º> ~(^.^) <:3 )~ |
|
|
Back to top
|
|
 |
kijjaz

Joined: Sep 20, 2004 Posts: 465 Location: bangkok, thailand
Audio files: 2
|
Posted: Thu Apr 24, 2008 11:34 pm Post subject:
|
 |
|
Yes, I agree also.
at first, you might want to play with SndBuf for input and WvOut for output..
and you can design the algorithm to do with SndBuf then output to WvOut.
I still haven't been doing this, i'll go to study more about SndBuf. |
|
|
Back to top
|
|
 |
Kassen
Janitor


Joined: Jul 06, 2004 Posts: 6365 Location: The Hague, NL
G2 patch files: 3
|
Posted: Fri Apr 25, 2008 1:37 am Post subject:
|
 |
|
...but mp3 and ogg won't work, I don't think any compressed format is supported.
You'd have to convert them in a editor (Audacity is free) aside from that; yes, that will work. _________________ Modern technology offers an endless field day to any deviant strains in our personalities. --J.G.Ballard |
|
|
Back to top
|
|
 |
Plankhead
Joined: Apr 24, 2008 Posts: 14 Location: Long Island
|
Posted: Fri Apr 25, 2008 4:36 am Post subject:
|
 |
|
Great to hear WAV files are supported.
Once I get more proficient with ChucK, though, I'm interested in actually doing stuff with it on the web, where WAV files can...take a while. So at the very least, support for an open source format like OGG would be wonderful.
Any idea whether this is on the to-do list for ChucK?
EDIT: I just checked and saw it was on the requested features list in the Wiki. |
|
|
Back to top
|
|
 |
Kassen
Janitor


Joined: Jul 06, 2004 Posts: 6365 Location: The Hague, NL
G2 patch files: 3
|
Posted: Fri Apr 25, 2008 5:17 am Post subject:
|
 |
|
Yes, OGG would probably be the first choice here; it's open and it's free. Using MP3 might conflict with some Linux package repositories and I think getting proper (up to date) packages makes more sense then supporting MP3 but we could debate that.
The thing with compressed formats is that you can't really work with them directly; I don't think any program does. What happens is that the compressed music is decoded (to Wav or AIFF or similar) and the actual work gets done on that format. For larger files (where size matters more) that will take a while which could conflict with the realtime nature of ChucK. It also typically means that some location on the HD is set where the file is temporarily stored though I suppose it could be unpacked directly to values in SndBuf.
Another issue might be that ChucK uses a library to load audio files and I'm not sure that one supports these formats.
So; it's not a bad idea at all, in fact it sounds quite convenient but it's not without questions either. _________________ Modern technology offers an endless field day to any deviant strains in our personalities. --J.G.Ballard |
|
|
Back to top
|
|
 |
Plankhead
Joined: Apr 24, 2008 Posts: 14 Location: Long Island
|
Posted: Fri Apr 25, 2008 8:07 am Post subject:
|
 |
|
| I know there's an MP3 method of encoding a wave file, but ChucK can't read that. If it's as simple as coding it to allow Vorbis-encoded wav files, it should be easier. |
|
|
Back to top
|
|
 |
|