p5(op) no fs5, d4, fn5
nGen provides several output converters (filters) (listed below); these must be included within parentheses after a p-field number.
Available Output Formats
HZ / (SR / FFT_SIZE).
nGen will automatically convert the CPC value in the p-field into HZ values (if you'd rather specify HZ in a p-field you can store it as CPCs internally by using the HZ input mode).
For example:
sr(48000) ;sampling rate to help "bn" filter
i1 = 6 0 -10 {
p2 1 p3 1
p4 100
p5(bn4) no a2 a3 a4 a5 c4 cs d ds e f ;note names for bins
p6(hz) ex(T 1. p5) ;hz values
}
;I-block #1 (i1):
i1 0.000 1.000 100.000 9 110.00000
i1 1.000 1.000 100.000 19 220.00000
i1 2.000 1.000 100.000 38 440.00000 (see exp. below)
i1 3.000 1.000 100.000 75 880.00000
i1 4.000 1.000 100.000 22 261.62558
i1 5.000 1.000 100.000 24 277.18265
i1 6.000 1.000 100.000 25 293.66473
i1 7.000 1.000 100.000 27 311.12698
i1 8.000 1.000 100.000 28 329.62759
i1 9.000 1.000 100.000 30 349.22818
Here's how this works (event number 3 above):
N.B. nGen will do all of this for you, you just have to specify the pitch that you want turned into a bin number.
When using the output filter you need to specify two things:
BN Flag: 0 1 2 3 4 5 6 Window Size: 256 512 1024 2048 4096 8192 16384If you don't give a number after "bn" it will use 4096 for the size. Why would you need this? One example: it would be useful for an instrument that does spectral extraction with the phase vocoder.