Im completely lost in my power electronics project and have no experience coding

Hello all, I am terrible at coding and need to create a musicale interrupter for my Tesla coil following the specifications described in this article. Any help with writing the code or code that already exists (again I’m terrible at coding) would be amazing.

This might help

The basic level in this Forum is that You provide the code and we help You to adjust it.
Started Your link but it's too much to follow at this hour.

oh i understand the Tesla coil i'm building just fin, its the coding of a Arduino that completely escapes me. The problem i'm having is the ones I have made work fine, but i get like .05v output which obviously isn't enough to power my fiber which has a forward voltage of 2 volts.

Post a drawing of the hardware and a link to the stuff You intend to control.

#define OUTPIN  2 //Output pin to drive coil.
#define NOTELIM  300 // Highest MIDI note to output.
#define PWLIM  100 //Pulse Width limit in us.
#define PWMULT  1.5 //  multiplier applied to velocity to get pulse width .


//Include librarys.

#include <MIDI.h>
#include "TimerOne.h"

MIDI_CREATE_DEFAULT_INSTANCE();

//Define Global Variables

unsigned int midiperiod[128]; // Array to store midi note periods
unsigned int pw = 20;            // Caurrent Pulase width

void setup(void){
  
  // Prepare Timer1
  Timer1.initialize(1000000);

  //  Set the pin we want the ISR to toggle for output.
 pinMode(LED_BUILTIN, OUTPUT);

  //Start up the serial port
  Serial.begin(9600);  



//Define Midi Note Periods
  
midiperiod[0] =122312;
midiperiod[1] =115447;
midiperiod[2] =108968;
midiperiod[3] =102852;
midiperiod[4] =97079;
midiperiod[5] =91631;
midiperiod[6] =86488;
midiperiod[7] =81634;
midiperiod[8] =77052;
midiperiod[9] =72727;
midiperiod[10] =68645;
midiperiod[11] =64793;
midiperiod[36] =15289;
midiperiod[37] =14431;
midiperiod[38] =13621;
midiperiod[39] =12856;
midiperiod[40] =12135;
midiperiod[41] =11454;
midiperiod[42] =10811;
midiperiod[43] =10204;
midiperiod[44] =9631;
midiperiod[45] =9091;
midiperiod[46] =8581;
midiperiod[47] =8099;
midiperiod[72] =1911;
midiperiod[73] =1804;
midiperiod[74] =1703;
midiperiod[75] =1607;
midiperiod[76] =1517;
midiperiod[77] =1432;
midiperiod[78] =1351;
midiperiod[79] =1276;
midiperiod[80] =1204;
midiperiod[81] =1136;
midiperiod[82] =1073;
midiperiod[83] =1012;
midiperiod[108] =239;
midiperiod[109] =225;
midiperiod[110] =213;
midiperiod[111] =201;
midiperiod[112] =190;
midiperiod[113] =179;
midiperiod[114] =169;
midiperiod[115] =159;
midiperiod[116] =150;
midiperiod[117] =142;
midiperiod[118] =134;
midiperiod[119] =127;
midiperiod[12] =61156;
midiperiod[13] =57724;
midiperiod[14] =54484;
midiperiod[15] =51426;
midiperiod[16] =48540;
midiperiod[17] =45815;
midiperiod[18] =43244;
midiperiod[19] =40817;
midiperiod[20] =38526;
midiperiod[21] =36364;
midiperiod[22] =34323;
midiperiod[23] =32396;
midiperiod[48] =7645;
midiperiod[49] =7215;
midiperiod[50] =6810;
midiperiod[51] =6428;
midiperiod[52] =6067;
midiperiod[53] =5727;
midiperiod[54] =5405;
midiperiod[55] =5102;
midiperiod[56] =4816;
midiperiod[57] =4545;
midiperiod[58] =4290;
midiperiod[59] =4050;
midiperiod[84] =956;
midiperiod[85] =902;
midiperiod[86] =851;
midiperiod[87] =804;
midiperiod[88] =758;
midiperiod[89] =716;
midiperiod[90] =676;
midiperiod[91] =638;
midiperiod[92] =602;
midiperiod[93] =568;
midiperiod[94] =536;
midiperiod[95] =506;
midiperiod[120] =119;
midiperiod[121] =113;
midiperiod[122] =106;
midiperiod[123] =100;
midiperiod[124] =95;
midiperiod[125] =89;
midiperiod[126] =84;
midiperiod[127] =80;
midiperiod[24] =30578;
midiperiod[25] =28862;
midiperiod[26] =27242;
midiperiod[27] =25713;
midiperiod[28] =24270;
midiperiod[29] =22908;
midiperiod[30] =21622;
midiperiod[31] =20408;
midiperiod[32] =19263;
midiperiod[33] =18182;
midiperiod[34] =17161;
midiperiod[35] =16198;
midiperiod[60] =3822;
midiperiod[61] =3608;
midiperiod[62] =3405;
midiperiod[63] =3214;
midiperiod[64] =3034;
midiperiod[65] =2863;
midiperiod[66] =2703;
midiperiod[67] =2551;
midiperiod[68] =2408;
midiperiod[69] =2273;
midiperiod[70] =2145;
midiperiod[71] =2025;
midiperiod[96] =478;
midiperiod[97] =451;
midiperiod[98] =426;
midiperiod[99] =402;
midiperiod[100] =379;
midiperiod[101] =358;
midiperiod[102] =338;
midiperiod[103] =319;
midiperiod[104] =301;
midiperiod[105] =284;
midiperiod[106] =268;
midiperiod[107] =253;


    MIDI.begin();                //   Launch MIDI with default options
  


}

void pulse(){
  
  digitalWrite(LED_BUILTIN,HIGH);
  delayMicroseconds(pw);
  digitalWrite(LED_BUILTIN,LOW);
  
}

void loop(){
  
int controlnote;


  
      //Check for availible midi data
      if (MIDI.read()) {
        switch(MIDI.getType()) {        //   Get the type of the message we caught
           case midi::NoteOn:
                
                
                // get note on number and check for limit
                controlnote = MIDI.getData1();
                
                if (controlnote > NOTELIM){
                  controlnote = 10;
                }
                
                
                Timer1.attachInterrupt(pulse,midiperiod[controlnote]);
     
      
                // Calculate Pulse width from velocity and Limit to P WLIM
                pw = PWMULT * MIDI.getData2();
                if (pw > PWLIM){
                    pw = PWLIM;
                
                    }
                    
                    
               
                break;
           case midi::NoteOff:
      
                //Disable the interupt.
                Timer1.detachInterrupt();
                break;


     default:
        break;
    }
  }
  
  
  
  
  
}

heres the code i have that only gives me .05v out
heres the fiber optic transmitter https://i-fiberoptics.com/pdf/ife96e-2-20.pdf
I have a simple audio jack input (only .5v in) and i thought this might be the problem so i gave the Arduino 5v inout signal and i still got a .05v output signal
its a half bridge DRSSTC which should yield 5-6’ arcs (hence the fiber)

Drawings! Arduinos are not audio amplifiers.
0.05 volt out..... You don't have much experience of this I guess. Where are You measuring? What is the signal, a DC on a digital output? Are You measuring AC, a PWM signal or what? It makes no sence.

The link You posted tells about 2 - 2.5 volt level needed, TTL level logic. How do You get it down to 0.05 volt?
Drawing!

ok I cant draw anything right now (no camera). measured the voltage on my scope (it was on 1x i checked) audio signal on analog pin 0 i think the audio signal from my computer is like .5v. it should be a pwm signal out so 0 to 5v no in-between. I have the output on digital pin 2, the problem is that its .05v and not the 5v like expected

0.05 volt to a 5 volt powered Arduino analog input would give a small reading. 5 / 1024 is the resolution, raughly 0.005 volt per bit.
Check Your audio equipment, what signal it outputs.

it outputs .5v, its my computer audio. but wouldn't it not matter, because its either on (5v) or off (0v)?

You can read, detect, a 0.5 volt signal using an analog input. For a digital input it is too low.

Does the scope show 0.05 volt on digital pin 2? That is output is on zero, nothing is sent out..

Time to go sleeping here so You have plenty of time for thinking.

unsigned int pw = 20;            // Caurrent Pulase width

Try using pw = 200

Any change?

no change

Disconnect pin D2 from the other circuit. Then measure on pin D2. Any change?

Try this code and activate Serial Monitor in the IDE and check what is printed.

#define OUTPIN  2 //Output pin to drive coil.
#define NOTELIM  300 // Highest MIDI note to output.
#define PWLIM  100 //Pulse Width limit in us.
#define PWMULT  1.5 //  multiplier applied to velocity to get pulse width .


//Include librarys.

#include <MIDI.h>
#include "TimerOne.h"

MIDI_CREATE_DEFAULT_INSTANCE();

//Define Global Variables

unsigned int midiperiod[128]; // Array to store midi note periods
unsigned int pw = 20;            // Caurrent Pulase width

void setup(void) {

  // Prepare Timer1
  Timer1.initialize(1000000);

  //  Set the pin we want the ISR to toggle for output.
  pinMode(LED_BUILTIN, OUTPUT);

  //Start up the serial port
  Serial.begin(9600);

  //Define Midi Note Periods

  midiperiod[0] = 122312;
  midiperiod[1] = 115447;
  midiperiod[2] = 108968;
  midiperiod[3] = 102852;
  midiperiod[4] = 97079;
  midiperiod[5] = 91631;
  midiperiod[6] = 86488;
  midiperiod[7] = 81634;
  midiperiod[8] = 77052;
  midiperiod[9] = 72727;
  midiperiod[10] = 68645;
  midiperiod[11] = 64793;
  midiperiod[36] = 15289;
  midiperiod[37] = 14431;
  midiperiod[38] = 13621;
  midiperiod[39] = 12856;
  midiperiod[40] = 12135;
  midiperiod[41] = 11454;
  midiperiod[42] = 10811;
  midiperiod[43] = 10204;
  midiperiod[44] = 9631;
  midiperiod[45] = 9091;
  midiperiod[46] = 8581;
  midiperiod[47] = 8099;
  midiperiod[72] = 1911;
  midiperiod[73] = 1804;
  midiperiod[74] = 1703;
  midiperiod[75] = 1607;
  midiperiod[76] = 1517;
  midiperiod[77] = 1432;
  midiperiod[78] = 1351;
  midiperiod[79] = 1276;
  midiperiod[80] = 1204;
  midiperiod[81] = 1136;
  midiperiod[82] = 1073;
  midiperiod[83] = 1012;
  midiperiod[108] = 239;
  midiperiod[109] = 225;
  midiperiod[110] = 213;
  midiperiod[111] = 201;
  midiperiod[112] = 190;
  midiperiod[113] = 179;
  midiperiod[114] = 169;
  midiperiod[115] = 159;
  midiperiod[116] = 150;
  midiperiod[117] = 142;
  midiperiod[118] = 134;
  midiperiod[119] = 127;
  midiperiod[12] = 61156;
  midiperiod[13] = 57724;
  midiperiod[14] = 54484;
  midiperiod[15] = 51426;
  midiperiod[16] = 48540;
  midiperiod[17] = 45815;
  midiperiod[18] = 43244;
  midiperiod[19] = 40817;
  midiperiod[20] = 38526;
  midiperiod[21] = 36364;
  midiperiod[22] = 34323;
  midiperiod[23] = 32396;
  midiperiod[48] = 7645;
  midiperiod[49] = 7215;
  midiperiod[50] = 6810;
  midiperiod[51] = 6428;
  midiperiod[52] = 6067;
  midiperiod[53] = 5727;
  midiperiod[54] = 5405;
  midiperiod[55] = 5102;
  midiperiod[56] = 4816;
  midiperiod[57] = 4545;
  midiperiod[58] = 4290;
  midiperiod[59] = 4050;
  midiperiod[84] = 956;
  midiperiod[85] = 902;
  midiperiod[86] = 851;
  midiperiod[87] = 804;
  midiperiod[88] = 758;
  midiperiod[89] = 716;
  midiperiod[90] = 676;
  midiperiod[91] = 638;
  midiperiod[92] = 602;
  midiperiod[93] = 568;
  midiperiod[94] = 536;
  midiperiod[95] = 506;
  midiperiod[120] = 119;
  midiperiod[121] = 113;
  midiperiod[122] = 106;
  midiperiod[123] = 100;
  midiperiod[124] = 95;
  midiperiod[125] = 89;
  midiperiod[126] = 84;
  midiperiod[127] = 80;
  midiperiod[24] = 30578;
  midiperiod[25] = 28862;
  midiperiod[26] = 27242;
  midiperiod[27] = 25713;
  midiperiod[28] = 24270;
  midiperiod[29] = 22908;
  midiperiod[30] = 21622;
  midiperiod[31] = 20408;
  midiperiod[32] = 19263;
  midiperiod[33] = 18182;
  midiperiod[34] = 17161;
  midiperiod[35] = 16198;
  midiperiod[60] = 3822;
  midiperiod[61] = 3608;
  midiperiod[62] = 3405;
  midiperiod[63] = 3214;
  midiperiod[64] = 3034;
  midiperiod[65] = 2863;
  midiperiod[66] = 2703;
  midiperiod[67] = 2551;
  midiperiod[68] = 2408;
  midiperiod[69] = 2273;
  midiperiod[70] = 2145;
  midiperiod[71] = 2025;
  midiperiod[96] = 478;
  midiperiod[97] = 451;
  midiperiod[98] = 426;
  midiperiod[99] = 402;
  midiperiod[100] = 379;
  midiperiod[101] = 358;
  midiperiod[102] = 338;
  midiperiod[103] = 319;
  midiperiod[104] = 301;
  midiperiod[105] = 284;
  midiperiod[106] = 268;
  midiperiod[107] = 253;


  MIDI.begin();                //   Launch MIDI with default options

}

void pulse() {

  digitalWrite(LED_BUILTIN, HIGH);
  delayMicroseconds(pw);
  digitalWrite(LED_BUILTIN, LOW);

}

void loop() {

  int controlnote;
  Serial.println( analogRead(A0));//Debug by Railroader
  //Check for availible midi data
  if (MIDI.read()) {
    switch (MIDI.getType()) {       //   Get the type of the message we caught
      case midi::NoteOn:

        // get note on number and check for limit
        controlnote = MIDI.getData1();

        if (controlnote > NOTELIM) {
          controlnote = 10;
        }

        Timer1.attachInterrupt(pulse, midiperiod[controlnote]);

        // Calculate Pulse width from velocity and Limit to P WLIM
        pw = PWMULT * MIDI.getData2();
        if (pw > PWLIM) {
          pw = PWLIM;

        }

        break;
      case midi::NoteOff:

        //Disable the interupt.
        Timer1.detachInterrupt();
        break;

      default:
        break;
    }
  }





}

shoot i'm gonna need to try in the morning, thanks for all your help and i will keep you updated!

Thanks! High time to go to bed for me also.