Here is an example of the tanh opcode. It uses the files tanh.orc and tanh.sco.
Example 372. Example of the tanh opcode.
/* tanh.orc */ ; Initialize the global variables. sr = 44100 kr = 4410 ksmps = 10 nchnls = 1 ; Instrument #1. instr 1 irad = 1 i1 = tanh(irad) print i1 endin /* tanh.orc */
/* tanh.sco */ ; Play Instrument #1 for one second. i 1 0 1 e /* tanh.sco */
Its output should include a line like this:
instr 1: i1 = 0.762