Kyma Forum
  Kyma Support
  BPM Problem

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

next newest topic | next oldest topic
Author Topic:   BPM Problem
sidechain
Member
posted 17 February 2003 15:24         Edit/Delete Message   Reply w/Quote
I'm having a problem using BPMSampleLoop, BPMTimeStretchLoop, and BPMResynthesisLoop. When a fader is assigned to BPM the fader does not change the BPM as expected. At certain points along the throw of the fader the sample playback jumps to half speed or double speed. I need to have the BPM fader function without these jumps like in SampleAccelerator (when you assign a fader to BPM it functions as expected slowing and speeding with no double time or half time jumps). Could someone please tell me how to achieve this?



IP: Logged

SSC
Administrator
posted 17 February 2003 18:09         Edit/Delete Message   Reply w/Quote
As you change the BPM, those modules do adjust the internal tempo. However, once you get far enough away from the original tempo, it will jump to half time (or double time) and still match the tempo.
You can achieve a straight speed up or slow down without the clever stuff by starting with a Sample module and editing its parameters as follows:
1. Shift-click on the disk icon next to the name of the sample file. This will give you the duration of the loop in seconds. For our example, lets say it was 2 s.
2. Divide the duration by the number of beats in your loop, for example:

2 s / 8

This should be the duration of one beat in seconds.

3. To convert this duration to the natural BPM of the loop, use the message 'bpm' . For example

(2 s / 8) bpm

Select that whole expression and use ctrl-y to evaluate it. That will tell you the BPM.

4. In the Frequency field of the Sample put the following expression:

default * (!BPM / (2 s / 8) bpm removeUnits)

That will adjust the natural frequency of the Sample by the ratio of the *desired* !BPM to the natural BPM of your sample.

IP: Logged

sm
Member
posted 18 February 2003 04:22         Edit/Delete Message   Reply w/Quote

1. Shift-click on the disk icon next to the name of the sample file. This will give you the duration of the loop in seconds. For our example, lets say it was 2 s.

is there a way to obtain this information automatically e.g with a script that writes the sample duration into a soundtoglobalcontroler ? - or somwhere else where one could work with that data...

IP: Logged

SSC
Administrator
posted 18 February 2003 10:04         Edit/Delete Message   Reply w/Quote
Here's something kind of fun:

Drag a BPMSampleLoop from Prototypes into a Sound file
Action>Edit Class
Action> Retrieve example from class

Then close the Class editor and double click on the retrieved example (in the upper left corner of your Sound file window). Take a look at the Script. It is doing a lot more than you need, but you will see in there how to get at the duration of a samples file and use it in a Script.

IP: Logged

sidechain
Member
posted 18 February 2003 16:06         Edit/Delete Message   Reply w/Quote
Thanks! Your procedure worked like a charm!

IP: Logged

sm
Member
posted 21 February 2003 12:16         Edit/Delete Message   Reply w/Quote
i tried to "reverse-engingeer" theBPMTimeStrechLoop by following the edit and then "retrive example..." and then trying to do a "new class from example" (the very example i just retrieved.)
the script asks me for a value for ?sample which i cannot provide (use default sound) doesnt work.
so how can i get around this to use this script. ???

thanks
m

[This message has been edited by sm (edited 21 February 2003).]

IP: Logged

SSC
Administrator
posted 21 February 2003 12:51         Edit/Delete Message   Reply w/Quote
It asks for default values for ?vars when you create a new class. For most values you can type a number. For Sample, just type in a string, for example:

'aSampleName'

IP: Logged

sm
Member
posted 22 February 2003 04:31         Edit/Delete Message   Reply w/Quote
yippie! this is it:-)

perfect!!!
tak
m

quote:
Originally posted by SSC:
It asks for default values for ?vars when you create a new class. For most values you can type a number. For Sample, just type in a string, for example:

'aSampleName'



IP: Logged

korb
Member
posted 06 March 2003 23:58         Edit/Delete Message   Reply w/Quote
i got into the script and can see how it is getting the file duration, but can't figure out how to use it in a different context.

im my case, declaring the current variable 'sampleDur' global would be ideal, so it could be used in an expression in some field similar to volume like this:

--------------------------
!Grid = 4
!sampleDur = "find sample duration with script"

((1 bpm: (60 / !sampleDur) * !Grid) countTriggersMod: !Grid) / !Grid
--------------------------

would it be best to use a script that gets the file duration in a SoundToGlobalController?

if so, how would the script change?

the relevant part of script extracted from the BPMSampleLoop pertaining to retrieving the sample duration, looks like this:

--------------------------
|file sampleDur|

file := SampleFile fromOldFileNamed: ?sample ifCanceled: [self abortForKyma].
sampleDur := file fileDuration.

--------------------------

korb

IP: Logged

SSC
Administrator
posted 08 March 2003 10:25         Edit/Delete Message   Reply w/Quote
When you use the Script, you can associate values with "?-variables". For example, you could use ?sampleDuration in the Duration field of a FunctionGenerator.

In the Script, you associate the value with the variable using the following syntax:

nameOfSound start: 0 s sampleDuration: 2 s.

where "nameOfSound" is the name of the Sound you have placed in the Inputs field of the Script Sound. What this tells Kyma is that you want to make a copy of the Sound "nameOfSound" to start at time zero, and have "2 s" used in place of ?sampleDuration.

In your example, all you need to do is to add this sort of expression to the end of the script, after the other expressions that actually compute the duration of the sample.

IP: Logged

korb
Member
posted 09 March 2003 17:14         Edit/Delete Message   Reply w/Quote

soundDuration.kym

 
i know i am probably missing alot, but i attached the sound i am working on anyway. i have been trying to get the duration dynamically based on the script we have been talking about and have had no luck.

can anyone tweak this or have a demo of how the duration could be a variable so it could be used in expressions?

thanks,

korb

IP: Logged

sm
Member
posted 10 March 2003 11:03         Edit/Delete Message   Reply w/Quote

soundDuration_2.kym

 
you need to use script to do this (i guess)
when you run the sound youŽll be asked to specify a sample name. do this by with something like 'name of sound' (the quotes are important)

note that you have to " removeUnits " from the ?sampleDur.
i also added an offset in the scale field. since 4 mod: 4 is zero. would give you one ?sampleDur of silence

|m

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