i_dropped_my_phone_the_screen_cracked
i_dropped_my_phone_the_screen_cracked copied to clipboard
selectors mixing id & type don't work
//create a mono synth and connect to output __().monosynth({id:"m1"}).dac()
//change frequency of the lowpass in the mono synth __("monosynth lowpass").frequency(300) //works
//try to change frequency of the lowpass in the mono synth __("#m1 lowpass").frequency(300) //fails
Don't think I'll fix this. Makes more sense to use appropriate mappings in the monosynth
//create a mono synth and connect to output __().monosynth({id:"m1"}).dac()
//change frequency of the lowpass in the mono synth __("#m1").attr({"lowpass_frequency":300});
Will close this when I've done the mappings
I would say the original proposition makes more sense, as it is something many people are familiar with from using CSS
selectors and are already used to do such selecting.
Frankly, when I tried to do things the same way as the __("#m1 lowpass").frequency(300)
-style way, I was quite sad that it wouldn't work.
I agree with you, it should work. For the time being, you can use type selectors __("monosynth lowpass").frequency(300)
or if that's not possible (because of multiple instances of the same type) you can wrap the code blocks you want to target in macros and then use type selectors on those. If you look at the random_interval demo, you can see an example