Kyma Forum
  Kyma Support
  Harmonic tempo

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

next newest topic | next oldest topic
Author Topic:   Harmonic tempo
Andrew
Member
posted 16 February 2012 07:25         Edit/Delete Message   Reply w/Quote
I would like to get some help in writing a Capytalk expression I can put into the Rate parameter of the TimeControl Sound please.
I want to create acceleration and deceleration according to a harmonic series such as:
1 + 1/2 + 1/3 + 1/4 + 1/5

I know it's possible but because I was a bad pupil in my Maths classes and always hit too many walls when I try to code in Capytalk, I cannot do it!

Any help is much appreciated.

Andrew

IP: Logged

SSC
Administrator
posted 16 February 2012 10:33         Edit/Delete Message   Reply w/Quote
Were you imagining something like, when you click the Plus button, it adds the next term and, when you click the Minus button, it removes one term? Or something that gradually accelerates on its own (or when triggered)?

IP: Logged

SSC
Administrator
posted 16 February 2012 10:55         Edit/Delete Message   Reply w/Quote
To get the nth term of the harmonic series (as a constant), you could use a Smalltalk block. For example, the following gives you the 10th term in the summation:

code:

| sum |
sum := [:n | (n = 1) ifTrue: [1] ifFalse: [(sum value: (n-1)) + n inverse]].
sum value: 10


IP: Logged

SSC
Administrator
posted 16 February 2012 11:02         Edit/Delete Message   Reply w/Quote
To use a control (say, !Speed) to access ascending values in the series, you could first decide how many of them you want, use the Smalltalk block code to collect up that many of them, and then use a fader to access the array,

For example, say you wanted to use 100 terms from the series (that gives you a range of approximately 1 to 5 as your speed multiplier). You could use:

code:

| sum |
sum := [:n | (n = 1) ifTrue: [1] ifFalse: [(sum value: (n-1)) + n inverse]].

(100 * !Speed) of: (1 to: 100 collect: [:m | sum value: m])


Is that the kind of thing you had in mind?

[This message has been edited by SSC (edited 16 February 2012).]

IP: Logged

Andrew
Member
posted 16 February 2012 15:25         Edit/Delete Message   Reply w/Quote
Thanks for the quick reply!
I'm not needing to increment the series manually, just to have an acceleration/deceleration according to that sequence, as you say, gradually, on its own.

So I'm thinking your last reply will work. It would be great to be able to interpolate between the steps- which is essentially a f(x)=1/x curve.

However you have reminded me that 100 terms will only give me a factor of 1 to 5! What I really want to do is model an artists visual perspective, which (remarkably) works on harmonic principles- the classic railway track single view perspective has the sleepers recede in a harmonic sequence. So I was hoping to apply this to tempo and run the tempo to infinity, but of course a harmonic series is divergent. But maybe I can get that effect at least.

Anyhow I will play with the numbers and code - and a big thank you!
I'll report back.

IP: Logged

Andrew
Member
posted 16 February 2012 15:38         Edit/Delete Message   Reply w/Quote
Ah I see, this gives me an array that I can scroll through with a fader. Not quite what I was hoping for. I was rather thinking to be able to do the following:
Set an initial tempo
Watch this tempo increase on its own, according to a harmonic series.
Is that possible?

On thinking more- if I could input f(x) =1/x as a tempo curve expression with a choosable initial tempo, it would be great. As far as I can tell, this curve is an harmonic curve as any two points on the curve produce their harmonic mean on the curve

[This message has been edited by Andrew (edited 16 February 2012).]

IP: Logged

SSC
Administrator
posted 16 February 2012 16:53         Edit/Delete Message   Reply w/Quote

harmonicseriesacceleration.kym

 
In that case, I think you could just use !x inverse as the speed control. Or you could use a function like (1 - (1 ramp: 10 s)) in place of !x if you want the accelerando to be automatic (see attached Sounds).

IP: Logged

Andrew
Member
posted 16 February 2012 17:04         Edit/Delete Message   Reply w/Quote
YES!

Thank you so much, that is it, the piece can begin. Really can't thank you enough, very excited.

IP: Logged

Andrew
Member
posted 16 February 2012 19:00         Edit/Delete Message   Reply w/Quote
One more question!

'Time Control' Sound in the timeline:
If I paste the expression you gave of "(1 - (Trigger! ramp: 20 s)) inverse" into the Rate parameter of Time Control (and replace trigger with 1) it makes the timeline accelerate as expected.
However I cannot get other Sounds in the timeline to track this acceleration- using for example Drum Sample Follow BPM it does not follow BPM.
I even tried slaving the one Sound to the other but still no joy.

IP: Logged

SSC
Administrator
posted 16 February 2012 19:42         Edit/Delete Message   Reply w/Quote
If you use a SoundToGlobalController to generate an accelerating BPM in the right range (let's say you called it !AccelBPM), then you could slave the BPM and !AccelBPM to the same master control in the Timeline.

IP: Logged

Andrew
Member
posted 16 February 2012 19:58         Edit/Delete Message   Reply w/Quote
OK thanks.

Strange..It's what I thought the 'Time Control' Sound would do- it does seem to accelerate, but only the timeline, not other Sounds lying concurrent in the timeline, even if they have !BPM parameters- is that right?
In the manual it says Time Control.......
"Slows down or speeds up the rate that time is progressing in its Input by controlling how the time counter is incremented on the signal processor. This affects only the start time of events within the Input (e.g. if Input is a Script or Concatenation or contains TimeOffsets), not the sample rate."

This says to me that it controls the input only, which is why I was shocked (and delighted!) to see the main playback wiper being manipulated by this Sound. So what I am asking is, does this manipulation of the playback wiper only affect the input to the 'Time Control' Sound and nothing else?

IP: Logged

SSC
Administrator
posted 16 February 2012 20:20         Edit/Delete Message   Reply w/Quote

timelinewithacceleratingbpm&cursor.ktl.zip

 
TimeControl controls the yellow time cursor which will affect the start and stop times of the time bars in the Timeline. It has no effect on the control called !BPM.

However, you could use a SoundToGlobalController to generate an accelerating BPM. Then you could link the track bpm to that accelerating one. The attached Timeline has both an accelerating TimeControl and accelerating BPM, just to show an example. You probably don't need both of them; if your Sounds depend on BPM, then the bpm one alone is probably the one you need.

(There's a description of how to link two track controls to a shared master control on page 80 of Kyma X Revealed. )

[This message has been edited by SSC (edited 16 February 2012).]

IP: Logged

Andrew
Member
posted 17 February 2012 06:04         Edit/Delete Message   Reply w/Quote
Yes I understand now (pre-sleep moment of revelation!). It does say it in the info for the Time Control Sound- I can see that now.
Thanks you so much for the timeline- it is exactly what I wanted to achieve.

Best wishes to Kyma Central!


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