Class extends class - doubt
in
Programming Questions
•
3 years ago
Hi,
I'm working on a sketch with one class, one "class extends class" and its main tag (3 tags total). Let me describe a little bit:
1. Class Particle says there is an array of 27 particles for which one letter of the alphabet is assigned to every member... and displays as animated typography.
2. Class LimitedParticle extends class Particle and tells us when each particle reaches the bottom of the screen... and rings a tone for every occurrence.
My main question:
I just can't figure out how to combine both returned datas and assign a specific sound to every member of the Class Particle. So, when "a" hits the bottom, sound "aaaa" is played. You'll find my last attempt in the code, but even if it'd worked it wouldn't be the answer, since sounds and letters would have not corresponded each other (I guess).
Secondary:
I cannot even make an array of samples with Sonia, either. It seems it understands sound file names as strings. (Gives me a "cannot convert from String to Sample")
I uploaded the sketch folder on a server (7 days, pleased to upload again if requested). I thought it wouldn't help to trim. If not good idea, please tell me. https://rcpt.yousendit.com/922102893/8d2bc6058529c4dacafe31b3d02e1823
Any look at the code or simple guidance... very appreciated.
Marcelo
(PS: it's sound interactive. Clap to the mic.)
I'm working on a sketch with one class, one "class extends class" and its main tag (3 tags total). Let me describe a little bit:
1. Class Particle says there is an array of 27 particles for which one letter of the alphabet is assigned to every member... and displays as animated typography.
2. Class LimitedParticle extends class Particle and tells us when each particle reaches the bottom of the screen... and rings a tone for every occurrence.
My main question:
I just can't figure out how to combine both returned datas and assign a specific sound to every member of the Class Particle. So, when "a" hits the bottom, sound "aaaa" is played. You'll find my last attempt in the code, but even if it'd worked it wouldn't be the answer, since sounds and letters would have not corresponded each other (I guess).
Secondary:
I cannot even make an array of samples with Sonia, either. It seems it understands sound file names as strings. (Gives me a "cannot convert from String to Sample")
I uploaded the sketch folder on a server (7 days, pleased to upload again if requested). I thought it wouldn't help to trim. If not good idea, please tell me. https://rcpt.yousendit.com/922102893/8d2bc6058529c4dacafe31b3d02e1823
Any look at the code or simple guidance... very appreciated.
Marcelo
(PS: it's sound interactive. Clap to the mic.)
1