electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Articles  |  Radio
 |  Media  |  Forum  |  Links  |  Store
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks GalleryGallery 
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » DIY Hardware and Software » ChucK programming language
Can ChucK manipulate preexisting soundfiles?
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [7 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
Plankhead



Joined: Apr 24, 2008
Posts: 9
Location: Long Island

PostPosted: Thu Apr 24, 2008 10:50 pm    Post subject: Can ChucK manipulate preexisting soundfiles?
Subject description: Or can it only synthesize them?
Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
Inventor



Joined: Oct 13, 2007
Posts: 825
Location: Florida, USA
Audio files: 37

PostPosted: Thu Apr 24, 2008 11:25 pm    Post subject: Re: Can ChucK manipulate preexisting soundfiles?
Subject description: Or can it only synthesize them?
Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Send e-mail Visit poster's website
kijjaz



Joined: Sep 20, 2004
Posts: 409
Location: bangkok, thailand
Audio files: 2

PostPosted: Thu Apr 24, 2008 11:34 pm    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 5961
Location: The Hague, NL
G2 patch files: 3

PostPosted: Fri Apr 25, 2008 1:37 am    Post subject: Reply with quote  Mark this post and the followings unread

...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.

_________________
while(!machine.crash() ) <<<"all is well">>>;
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Plankhead



Joined: Apr 24, 2008
Posts: 9
Location: Long Island

PostPosted: Fri Apr 25, 2008 4:36 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 5961
Location: The Hague, NL
G2 patch files: 3

PostPosted: Fri Apr 25, 2008 5:17 am    Post subject: Reply with quote  Mark this post and the followings unread

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.

_________________
while(!machine.crash() ) <<<"all is well">>>;
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Plankhead



Joined: Apr 24, 2008
Posts: 9
Location: Long Island

PostPosted: Fri Apr 25, 2008 8:07 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [7 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » ChucK programming language
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
Once You Know, You Newegg

Please support our site. If you click through and buy from
our affiliate partners, we earn a small commission.


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003, 2004, 2005, 2006 and 2007 by electro-music.com