Here is an example of the tanh opcode. It uses the files tanh.orc and tanh.sco.
Example 1. 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 */
instr 1: i1 = 0.762