いらないモノ、ひつようなモノ

書籍、音楽、そして若干のテクノロジー

Simple Manipulations

A variety of simple model-domain transformations are implemented in Loris. You can apply these transformations to the partials obtained in an analysis, and then render a new sound from the modified partials.

Lorisで色々な音の変形が出来る。解析後得られるpartialに色々な変形をして新しい音を作ることが出来る。

The dilate function is used to warp the time scale of a sound, that is, to change the duration of parts of the sound. Arguments to dilate are the partials to transform and two sets of time points: the times before the transformation and the times after the transformation.

音を引き伸ばすことも出来る。

For example, to stretch the middle part of the cat's meow (which is 1.2 seconds long), you might make the following declarations:

例えば猫の鳴き声の真ん中を引き伸ばす例。

/* time points for dilation */
double itimes[] = { 0, 0.25, 0.75, 1 };
double ttimes[] = { 0, .25, 2.75, 3 };
const int ntimes = 4;
and then invoke dilate this way 

dilate( partials, itimes, ttimes, ntimes ); 

The final argument is the size of the number of time points in each array (both arrays must be the same size of course).

最後の引数は配列変数の大きさで、時間軸上の何箇所を指定するかを表す。(当然どちらの配列変数も同じ大きさであることが必要)

Another fun manipulation is pitch shifting. The shiftPitch function in Loris changes the partial frequencies according to a pitch bend function, having units of cents (1/100 of a semitone).

別の面白い操作はピッチシフトである。LorisのshiftPitch関数はpartialの周波数をピッチベンド関数に従って変更する。単位はセント(半音の1/100が1セント)

Since the pitch bend may vary over time, it is described by a line segment envelope, like the ones we discussed earlier in the semester. The following statements construct an envelope (called a LinearEnvelope in Loris) that starts at zero, goes up to 300 cents (up three semitones, a minor third) between 0.25 and 1.25 second, down to -300 cents beteen 1.25 and 2.25 seconds, and then back to zero between 2.25 and 2.75 seconds.

ピッチベンドは時間によってピッチの変更度合いが変わるため、直線で決めたエンベロップによりそれを表現する。次のC言語のプログラムはエンベロップを作り出すコードである。0から300セントまで0.25から1.25秒で上昇し(300セントは3半音文、マイナー3度)1.25秒から2.25秒で-300セント下がり、2.25秒から2.75秒で0に戻るようなエンベロップを作り出している。

env = createLinearEnvelope();
linearEnvelope_insertBreakpoint( env, 0, 0 );
linearEnvelope_insertBreakpoint( env, .25, 0 );
linearEnvelope_insertBreakpoint( env, 1.25, 300 );
linearEnvelope_insertBreakpoint( env, 2.25, -300 );
linearEnvelope_insertBreakpoint( env, 2.75, 0 );
linearEnvelope_insertBreakpoint( env, 3.0, 0 );

This envelope, which shifts the pitch during the dilated part of the cat's meow, is the second argument to shiftPitch (the first is the partials to transform).

猫の泣き声部分を延ばした部分のピッチシフトさせるエンベロップは、shiftPichの第二パラメータです(最初のパラメータは変形するpartialが入る)


shiftPitch( partials, env );
When I am done with it, I can free the memory associated with the LinearEnvelope by calling destroyLinearEnvelope.

これを終えた後でdestroyLinearEnvelopを呼ぶことによってLinearEnvelopeに関連図けられたメモリ領域を開放することができる。

destroyLinearEnvelope( env );
The end result sounds rather nice, I think.

There are other transformations available in Loris, including a simple multiplicative frequency scaler, called scaleFrequency.

Lorisでは他の変形も可能ある。例えば、scaleFrequecyと呼ばれる周波数を単純に倍するようなものもある。