public static void OPM_CALC_CH7(FM_CH CH) {
        long eg_out1, eg_out2, eg_out3, eg_out4;  //envelope output
/*TODO*///
/*TODO*///	/* Phase Generator */
/*TODO*///#if FM_LFO_SUPPORT
/*TODO*///	INT32 pms = lfo_pmd * CH->pms / LFO_RATE;
/*TODO*///	if(pms)
/*TODO*///	{
/*TODO*///		pg_in1 = (CH->SLOT[SLOT1].Cnt += CH->SLOT[SLOT1].Incr + (INT32)(pms * CH->SLOT[SLOT1].Incr) / PMS_RATE);
/*TODO*///		pg_in2 = (CH->SLOT[SLOT2].Cnt += CH->SLOT[SLOT2].Incr + (INT32)(pms * CH->SLOT[SLOT2].Incr) / PMS_RATE);
/*TODO*///		pg_in3 = (CH->SLOT[SLOT3].Cnt += CH->SLOT[SLOT3].Incr + (INT32)(pms * CH->SLOT[SLOT3].Incr) / PMS_RATE);
/*TODO*///		pg_in4 = (CH->SLOT[SLOT4].Cnt += CH->SLOT[SLOT4].Incr + (INT32)(pms * CH->SLOT[SLOT4].Incr) / PMS_RATE);
/*TODO*///	}
/*TODO*///	else
/*TODO*///#endif
/*TODO*///	{
        pg_in1[0] = (int) (CH.SLOT[SLOT1].Cnt += CH.SLOT[SLOT1].Incr);
        pg_in2[0] = (int) (CH.SLOT[SLOT2].Cnt += CH.SLOT[SLOT2].Incr);
        pg_in3[0] = (int) (CH.SLOT[SLOT3].Cnt += CH.SLOT[SLOT3].Incr);
        pg_in4[0] = (int) (CH.SLOT[SLOT4].Cnt += CH.SLOT[SLOT4].Incr);
        /*TODO*///	}

        /* Envelope Generator */
        eg_out1 = FM_CALC_EG(CH.SLOT[SLOT1]);
        eg_out2 = FM_CALC_EG(CH.SLOT[SLOT2]);
        eg_out3 = FM_CALC_EG(CH.SLOT[SLOT3]);
        eg_out4 = FM_CALC_EG(CH.SLOT[SLOT4]);
        /* connection */
        if (eg_out1 < EG_CUT_OFF) /* SLOT 1 */ {
            if (CH.FB != 0) {
                /* with self feed back */
                pg_in1[0] += (CH.op1_out[0] + CH.op1_out[1]) >> CH.FB;
                CH.op1_out[1] = CH.op1_out[0];
            }
            CH.op1_out[0] = OP_OUT(pg_in1[0], (int) eg_out1);
            /* output slot1 */
            if (CH.connect1 == null) {
                /* algorythm 5  */
                pg_in2[0] += CH.op1_out[0];
                pg_in3[0] += CH.op1_out[0];
                pg_in4[0] += CH.op1_out[0];
            } else {
                /* other algorythm */
                CH.connect1.write(0, CH.connect1.read(0) + CH.op1_out[0]);//*CH->connect1 += CH->op1_out[0];
            }
        }
        if (eg_out2 < EG_CUT_OFF) {	/* SLOT 2 */

            CH.connect2.write(0, CH.connect2.read(0) + OP_OUT(pg_in2[0], (int) eg_out2));//*CH->connect2 += OP_OUT(pg_in2,eg_out2);
        }
        if (eg_out3 < EG_CUT_OFF) {	/* SLOT 3 */

            CH.connect3.write(0, CH.connect3.read(0) + OP_OUT(pg_in3[0], (int) eg_out3));//*CH->connect3 += OP_OUT(pg_in3,eg_out3);
        }
        /* SLOT 4 */
        if (NoiseIncr != 0) {
            NoiseCnt += NoiseIncr;
            if (eg_out4 < EG_CUT_OFF) {
                CH.connect4.write(0, CH.connect4.read(0) + OP_OUTN((int) NoiseCnt, (int) eg_out4));//*CH->connect4 += OP_OUTN(NoiseCnt,eg_out4);
            }
        } else {
            if (eg_out4 < EG_CUT_OFF) {
                CH.connect4.write(0, CH.connect4.read(0) + OP_OUT(pg_in4[0], (int) eg_out4));//*CH->connect4 += OP_OUT(pg_in4,eg_out4);
            }
        }
    }