Tone Programming

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #13181
    Med_Support
    Moderator
    Corey Puryear

    Does anyone have a basic tone conditioning (i.e. CS+/reward, CS-/no reward) program that I can take a look at. Being very new to programming, I am having trouble writing my own and need some help getting started. Any pointers are greatly appreciated.

    Corey

    #13182
    Med_Support
    Moderator
    Gary Bamberger

    This code will give you a good start on what you want to do:

    \ Inputs
    ^Lever = 1
    
    \ Outputs
    ^Pellet     = 6
    ^HouseLight = 7
    
     
    
    \ Variables
    \  P = Total # Pellets Delivered
    \  W = Total # Responses During 4KHz Tone
    
     
    
    LIST E = 60"
    LIST F = 1, 2
    
     
    
    S.S.1,
    S1,
    0.01": ON ^HouseLight ---> S2
    
    S2,
    #START: SET B = 80;              \ Volume         = 80 dB
    SET C = 10;              \ Rise\Fall Time = 10 ms
    SET D = 1000;            \ Duration       = 1000 ms
    ~InitANL926;~;           \ Reset ANL-926
    ~SetAmp(MG, BOX, B);~;   \ Initialize Amplitude
    ~SetRF(MG, BOX, C);~;    \ Initialize Rise\Fall Time
    ~SetDur(MG, BOX, D);~;   \ Initialize Duration
    RANDI N = F; ZN ---> S3  \ Start Procedure of randomly choosing atone
    
    S3,
    E(0)#T: Z3 ---> S4                     \ Wait for Duration of Session then repeat random selection
    
    S4,
    60": RANDI N = F; ZN ---> S3           \ Inter-Trial Interval
    
     
    
    S.S.2,
    S1,
    #Z1: ~OnFreq(MG, BOX, 2000);~ ---> S2  \ Emit 2KHz Tone
    
    S2,
    #R^Lever: ADD P; SHOW 1,Rewards,P; ON ^Pellet ---> S3  \ Show Lever Presses on Screen
    #Z3: ---> S1
    
    S3,
    0.15": OFF ^Pellet ---> S2
    #Z3: OFF ^Pellet ---> S1
    
     
    
    S.S.3,
    S1,
    #Z2: ~OnFreq(MG, BOX, 4000);~ ---> S2  \ Emit 4KHz tone
    
    S2,
    #R^Lever: ADD W; SHOW 2,4KHz Resp,W ---> S3  \ Show Lever Presses on Screen
    #Z3: ---> S1
    
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.