extending buildin Ugen (eg SndBuf)
14 Mar
2015
14 Mar
'15
6:18 a.m.
Hi Thought I could inherit from SndBuf and extend by overiding some funtions: public class Beat extends SndBuf{ int last_pos; fun void tempo_match(dur match_length){ length()/match_length => rate; } fun void pos(int sample){ if(sample < 0){ last_pos => sample; } sample => s.pos => last_pos; } fun void random(int nb_slices){ Math.random2(0,nb_slices-1) * samples()/nb_slices => pos => last_pos;; } } but chuck gives me: [lib_beat2.ck]:line(13): function 'Beat.pos' matches 'SndBuf.pos' but cannot override... Any way to achieve what I'm trying to do? Cheers -- Atte http://atte.dk http://a773.dk
3579
Age (days ago)
3579
Last active (days ago)
0 comments
1 participants
participants (1)
-
Atte