Kyma Forum
  Tips & Techniques
  Query folder for number of samples

Post New Topic  Post A Reply
profile | register | preferences | faq | search

next newest topic | next oldest topic
Author Topic:   Query folder for number of samples
Peripatitis
Member
posted 10 November 2014 18:26         Edit/Delete Message   Reply w/Quote
I am making a simple patch that should select each sample in a folder, place it in a specific speaker and play it.
So far i've been using the multi file disk player and a replicator to route and play these samples.
It started out as a simple solution to playback my multichannel files, but now i want to expand this a little bit further and do a few things.
Before that though i need to be able to do two things:

a) get the number of samples in a folder automatically, to use it in the replicator
as the number of instances
b) get the duration of each sample to use in the specific instance. (in my first patch i didn't really care since all files had the same duration).

Now there must be some message that returns the number of files of specific type, but i don't know where to look.
Is this a smalltalk issue, or a capytalk ?

Further down the line i think it would be cool, to pan each file between two speakers and use some sort of time-related modulator for this. Somehow offset the spatial image.
It should pretty easy to do.

Thanks !

** corrected sound attached in further down...

[This message has been edited by Peripatitis (edited 10 November 2014).]

[This message has been edited by Peripatitis (edited 10 November 2014).]

IP: Logged

SSC
Administrator
posted 10 November 2014 18:45         Edit/Delete Message   Reply w/Quote
You can obtain the number of samples in folder by sending a message to one of the samples in the folder, for example:

'Kyma:Samples 3rd party:EDG:werewolf.aif' sampleFileNamesInSameFolder size

To access the duration of each sample, you could use:

((?VoiceNumber - 1) of: ('Kyma:Samples 3rd party:Strangewave Sound:SwS - 075 Vacuum Packed.aif' fileNamesOfSameTypeInSameFolder collect: [:nm | nm fileDuration s]))

IP: Logged

Peripatitis
Member
posted 10 November 2014 19:41         Edit/Delete Message   Reply w/Quote

SpatializeSamplesFromFolder.kym

 
Thanks guys
This works nicely.

Attaching a new version with the changes..

IP: Logged

All times are CT (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply

Contact Us | Symbolic Sound Home

This forum is provided solely for the support and edification of the customers of Symbolic Sound Corporation.


Ultimate Bulletin Board 5.45c