electro-music.org   Dedicated to experimental electro-acoustic
and electronic music
 
 Front Page  |  Radio  |  Forum  |  Media  |  Playlists  |  Wiki
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 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
Varisample
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [4 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
Antimon



Joined: Jan 18, 2005
Posts: 4145
Location: Sweden
Audio files: 373
G2 patch files: 100

PostPosted: Mon Jan 26, 2009 1:13 pm    Post subject: Varisample
Subject description: multiple sample variations in a single file
Reply with quote  Mark this post and the followings unread

Was idly browsing through stuff bundled with Live yesterday, when I came across a sample called "Drum Machines 909", which seemed to be a bunch of similar samples in a single .aif file, playing one after each other. I immediately thought of how I've tried recording banging on a can or an egg or something, and then stored it in a single file so that I could choose which of the samples that I wanted or liked when I used them later - it's such a pain to record many samples one by one, storing them in separate files.

It isn't that easy... the interfaces for scrolling through a sample like that a often cumbersome. I've had some success on an ESX, but when the files get bigger the start position knobs are a bit too low resolution.

A couple of minutes later it struck me - I have this ChucK thing, that is a programming language. Those are pretty good at doing stuff automatically, and ChucK is really good at audio. Why don't I just make an app that looks through a sample, finds all of the hits and lets me play them in some easy fashion.

So I wrote this Varisample thing. It's a class containing a LiSa that is loaded with a sample file, and some functions for playing the different variations. I've included some documentation at the top of the file. I'm including a little package with some test code and recordings of me clapping and banging on two different cans - run "test_varisample.ck" to listen to it. It isn't the greatest demo, but I think it sounds a little bit more lively than static, single samples.

I have a hunch that this is done in Ableton somewhere (since I found that file), but I can't guess where. Anyway, what do you think? Useful?

Stuff left to do: sounds with slow attack cut in too sharply because of the simple threshold algorithm I use when looking for sound. Any thoughts on a better (but still simple enough) way? Also, I wanted to pan sounds when using multiple voices, but there is no pan function per voice in LiSa. What's the easiest way to do that - I am guessing that I need two LiSas, one for left and one for right.

/Stefan

Edit: new version of the Varisample class and a second test bundle


Varisample test.zip
 Description:
Varisample test bundle

Download (listen)
 Filename:  Varisample test.zip
 Filesize:  2.05 MB
 Downloaded:  426 Time(s)


Varisample.ck
 Description:
Varisample class version 2, with docs

Download (listen)
 Filename:  Varisample.ck
 Filesize:  6.38 KB
 Downloaded:  471 Time(s)


Varisample test2.zip
 Description:
Better demonstrates the sound variations

Download (listen)
 Filename:  Varisample test2.zip
 Filesize:  1.55 MB
 Downloaded:  422 Time(s)


_________________
Antimon's Window
@soundcloud @Flattr home - you can't explain music
Back to top
View user's profile Send private message Visit poster's website
Antimon



Joined: Jan 18, 2005
Posts: 4145
Location: Sweden
Audio files: 373
G2 patch files: 100

PostPosted: Tue Jan 27, 2009 11:12 am    Post subject: Reply with quote  Mark this post and the followings unread

Should I detect the lack of responses as this is tired old thing that everyone knew about, or does the code not work? Wink

Anyway, I fixed the attack thingie, and attached a new bundle that better demonstrates the variation in sound.

/Stefan

_________________
Antimon's Window
@soundcloud @Flattr home - you can't explain music
Back to top
View user's profile Send private message Visit poster's website
rogan



Joined: Dec 16, 2007
Posts: 83
Location: Urbana, IL
Audio files: 5

PostPosted: Tue Jan 27, 2009 2:58 pm    Post subject: Reply with quote  Mark this post and the followings unread

The lack of response for me is being busy, but I plan to check this out when things calm down. Finding attacks on the fly is *very* interesting and, I would guess, a very challenging problem in general.
Back to top
View user's profile Send private message
Antimon



Joined: Jan 18, 2005
Posts: 4145
Location: Sweden
Audio files: 373
G2 patch files: 100

PostPosted: Wed Jan 28, 2009 2:08 am    Post subject: Reply with quote  Mark this post and the followings unread

OK, thanks for saying something Smile It has been a bit quiet here in the forums lately.

I think the attack detector could probably be perfected a bit more, and maybe needs to be tweaked for some samples, but my own tests were pretty satisfactory.

/Stefan

_________________
Antimon's Window
@soundcloud @Flattr home - you can't explain music
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [4 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
Log in
Username:     Password:      Log me on automatically each visit    


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2026 by electro-music.org