Csound Csound-dev Csound-tekno Search About

Schottstaedt's piano

Date1999-10-22 03:46
Frompatrick pagano
SubjectSchottstaedt's piano
Have any of you C sounders ever attempted to code Bills FM piano sound
for C sound?
We tried here at Ufems to code it from the old Music V code and got a
crappy clarinetty sound

ARRAY DECAYFUNC, AMPLFUNC, SINEWAVE(512);
SYNTH(SINEWAVE); 1,1 999;
SEG(AMPLFUNC); 1,1 1,95 0,100;
SEG(DECAYFUNC); 1,1 .6,5 .3,10 .15,25 .07,50 0,100;

INSTRUMENT PIANO;
VARIABLE AMP,DECAYLENGTH,FREQ,PEDAL,
        DURATION,STRETCH,INDEX1,INDEX2,
        /DECAY,/DAMPER,/MOD1,/MOD2,/STR1;
I_ONLY BEGIN
        DURATION = P2;
        FREQ = P3;
        AMPL = P4;
        INDEX1 = 20 * (8 - ALOG(FREQ)) / (ALOG(FREQ) * ALOG(FREQ));
        INDEX2 = 75 * (8 - ALOG(FREQ)) / FREQ;
        DECAYLENGTH = 10 * SQRT(AMPL) / SQRT(FREQ);
        STRETCH = FREQ/200;
END;
DECAY = EXPEN[20](1,MAG * 20 / DECAYLENGTH,DECAYFUNC);
DAMPER = OSCIL[20](AMPL,MAG * 20 / DURATION,AMPLFUNC);
MOD1 = OSCIL(FREQ * MAG * INDEX1, (FREQ + STRETCH) * MAG,SINEWAVE);
MOD2 = OSCIL(FREQ * MAG * INDEX2, 4 * (FREQ + STRETCH) * MAG,SINEWAVE);
STR1 = ZOSCIL(DECAY * DAMPER, FREQ * MAG + MOD1 + MOD2,SINEWAVE);
OUTA = OUTA + STR1;
END;

This is the code that Bill was able to dig up.
surely one of you masters out there can code it for C sound.
Please let me know if any one can help us out.
Cheers
Pat Pagano