< Back to IRCAM Forum

NIM

Hi All!

I may be having a little trouble understanding the NIM datatype.

Running Antescofo in Pure Data under Mac OS10.10.3.

I am trying to pass a NIM as a variable to a processus, but whenever the processus fires Pure Data crashes—hard. Total quit to desktop.

I have made sure that I’m running Antescofo 0.8 and all that, so I’m wondering what I don’t quite understand; code saves all right in ascograph, but no luck actually running it. Simplified code attached.

Thanks!

~NRN~

@proc_def ScratchWhistleNIM($note, $vel, $length, $revAmt, $FBNIMtab, $CutoffNIMTAB, $VolNIMTAB, $PanNIMTAB) { group ScratWhistle @global @tight {
$midinote := [$note, $vel]  
$midioff := [$note, 0]  

midipair1 $midinote  
revAmt1 $revAmt  

curve feedback @grain = 0.1 @action = {feedback1 $feedback1}  
{$feedback1 : $FBNIMtab}  
  
curve cutoff @grain = 0.1 @action = {cutoff1 $cutoff1}  
{$cutoff1 : $CutoffNIMTAB}  

curve volume @grain = 0.1 @action = {volume1 $volume1}  
{$volume1 : $VolNIMTAB}  

curve pan @grain = 0.1 @action = {pan1 $pan1}  
{$pan1 : $PanNIMTAB}  

$length midipair1 $midioff  
}}  

BPM 44
;----Measure 1-----;
NOTE 7100 1/2
NOTE 0 1/2
NOTE 0 1
NOTE 0 1
NOTE 0 1
NOTE 0 1
;----Measure 2-----;
NOTE 7100 1/2

group ScratchWhistle @tight @local {

let $XNIM := NIM { 0 0.0 , 1 0.2 ,   
				   1 0.4 }  
let $YNIM := NIM { 0 0.0 , 1 0.2 ,   
				   1 0.4 }  
let $ZNIM := NIM { 0 0.0 , 1 0.2 ,   
				   1 0.4 }  
let $ANIM := NIM { 0 0.0 , 1 0.2 ,   
				   1 0.4 }  
::ScratchWhistleNIM (60, 100, 3, 0.8, $XNIM, $YNIM, $ZNIM, $ANIM)  
}  

NOTE 0 1/2
NOTE 0 1
NOTE 0 1
NOTE 0 1
NOTE 0 1

Hello.
Your code is fine. There is a bug in the last distributed forum version. Since, this bug has been corrected and the correction will be propagated in the next forum release. Meanwhile, I will send you a corrected antescofo~ object.

Just two remarks on your code fragment:

  • The @global attribute for the group in the process is useless: this attribute is used when the action is bound to a musical event. It specifies what to do if the event is missed. But the actions in a process (or in a whenever) are not bound to a musical event: they are launched by the start of the process. So this attribute will not be used. On the other hand, the @local attribute of the group to the NOTE 7100 at Measure 2 is effective: if this note is missed, the group is not launched and therefor, the process ScratchWhistleNIM is not called.

  • The sequence of silence at the end of your code fragment will be difficult to follow for the listening machine. But I suppose that they are here just for the sake of the example.