I've managed to set up six LED buttons, each of which controls a sine wave that's being modulated by another wave to vibrato a few times a second. The pitches form a not-quite-harmonic series, which makes it sound nice and crunchy. I'm hoping that, when I put them all together, the result will be rhythmically interesting, and the user would be able to turn each of the six tones on or off to change the sound.
Unfortunately, now that I've got the buttons to do what I want them to do and added a gain control for each of the six sounds, I can't hear anything coming out of my speakers. The dac~ is on, and the level meters in Max itself are registering mostly what I'd expect. I just can't hear the signals aloud, except occasionally in unexpected ways. Replacing the dad~ with ezdac~ makes no difference.
*I've now realized the cycle~ object doesn't understand "start/stop" or "0/1" messages. I have to figure out how to turn each of the six sounds' audio on and off independently. Either I'll have to put in six different dac~ objects (doubt it will work), or I'll have to find a different way to start and stop each sound going.
*Lizzy helped me to figure this out. First of all, I had to add a line~ object to each sound so that I didn't get nasty clicks when starting and stopping the sounds. You have to add floating-point messages (0. and 1.) to the input values for that to get it to ramp up (1.) and ramp down (0.). Then I added a route object right below the LED buttons, with the choices of 0 and 1, which then bang the line~ object with either 0. or 1. messages to ramp up and ramp down the signal to full volume, and then the master volume of each sound is controlled by the live.gain faders. Very nice of Lizzy to teach me that.
No comments:
Post a Comment