Earl (Fatha) Hines, the father of modern jazz piano, died Friday in Oakland, Calif., after a heart attack. He was 77 years old. In his pioneering work with Louis Armstrong in the late 1920's, Mr. Hines virtually redefined jazz piano. With what he called ''trumpet style,'' Mr. Hines played horn-like solo lines in octaves with his right hand and spurred them with chords from his left. He thus carved a place for the piano as a solo instrument outside the rhythm section and defined the roles of both hands for the next generations of jazz pianists. Mr. Hines's strong right hand and angular melodic ideas continued to sound contemporary throughout his career. In the 1930's and 1940's, he led a Chicago big band that began the careers of the singers Billy Eckstine and Sarah Vaughan and included the saxophonists Wardell Gray and Budd Johnson. That band became an incubator for be-bop in the early 1940's, when it featured the trumpeter Dizzy Gillespie and the saxophonist Charlie Parker. Son of Two Musicians Earl Hines was born in Duquesne, Pa. His father was a trumpeter and his mother played piano and organ. He took up the trumpet as a child, but began studying classical piano at the age of 9. After three years of lessons, he decided he was more interested in jazz piano, and by the time he was 15 years old he was leading his own trio. Mr. Hines worked with big bands led by Lois B. Deppe in Pittsburgh and Carroll Dickerson and Sammy Stewart in Chicago, and in 1927 he joined a quintet led by Louis Armstrong at Chicago's Savoy Ballroom. With Mr. Armstrong, he made such recordings as ''West End Blues'' and ''Weather Bird,'' and in 1928 he recorded solos, including ''A Monday Date'' and ''Caution Blues,'' that established his style and have had a lasting influence on jazz piano. Mr. Hines started his own big band in 1928 at Chicago's Grand Terrace Ballroom, and stayed in residence there for more than a decade, although he toured for part of each year. His was one of the first black big bands to tour the South. Thn ''Jelly Jelly'' and ''Stormy Monday Blues.'' Although he left the Grand Terrace in 1940, Mr. Hines led a big band nearly continuously until 1947; at one point the group included a string section composed entirely of women. Origin of Nickname A Chicago disk jockey called him ''Fatha'' in the 1930's and the nickname - as in ''Father of modern piano'' -stayed with him. After dissolving his band, Mr. Hines worked with smaller groups. He rejoined Mr. Armstrong from 1948 to 1951, then led his own bands. In 1957, he toured Europe with an all-star group including the trombonist Jack Teagarden, but he spent much of the 1950's playing Dixieland jazz - music that he had not be Jack Teagarden, but he spent much of the 1950's playing Dixieland jazz - music that he had not been a part of - on the West Coast. He re-emerged with triumphant concerts and recordings in the early 1960's, and was elected a member of Downbeat magazine's jazz hall of fame in 1965. In 1966, the United States sponsored Mr. Hines' group on a tour of the Soviet Union, where he played for 92,000 people. Since the 1950's, Mr. Hines had been based in the San Francisco Bay area, and he continued to tour Europe, Japan and the United States through the early 1980's. He played his final engagement last weekend in San Francisco. Mr. Hines is survived by a granddaughter. He was divorced from his wife, Janie, in 1980.