Cabbage Logo
Back to Cabbage Site

第一个合成器

这是我的第一个合成器。我想在这里记录我的过程。

@ rorywalsh
你好我想问一下example里面的arpeggiator怎么可以只要arpreggiator part不要synth part呢?我尝试过把synth删掉小部分的之后工程就不发声了Arpeggiator1.csd (24.6 KB)

Are you trying to remove the arpeggiator from the synth part? Or the other way around? I didn’t write that code, so I’m not sure that’s going to be easy to do.

On the other hand… if you look at the MIDI_Arpeggiator example I think you will find it more accessible.

非常感谢您的帮助!我刚刚看了一下您之前做的有关于琶音的例子,我想运用一下他,在你做的基础上增加多几个选择,使他不只是往上的音阶,还有往下的音阶,但我不知道怎么可以让他做出选择。arpUDO.csd (1.9 KB)

Thank you for your help! I just looked at the example of arpeggios you did before, and I want to use him to add a few more choices based on what you do, so that he not only goes up the scale, but also down the scale, But I don’t know how to make him choose.updownn.csd (2.1 KB)

Thank you for your help! I just looked at the example of arpeggios you did before, and I want to use him to add a few more choices based on what you do, so that he not only goes up the scale, but also down the scale, But I don’t know how to make him choose.updownn.csd (2.1 KB)

oh 我今天上課做出來了 :罗夫:

Once your kNoteIndex variable gets to the top end of the notes, just have it change direction and move downwards again like this:

;trigger by midi keyboard
instr 1 
    iNoteArray[] fillarray 0, 4, 7, 12, 16, 19, 24 //up
    idown[] fillarray 24, 19, 16, 12, 7, 4, 0 //down
    iupdown[] fillarray 0, 4, 7, 12, 16, 19, 24, 19, 16, 12, 7, 4, 0 //updown
    kDir init 1
    kNoteIndex init 0   
    if chnget:k("enableArp") == 1 then
        kTempo chnget "tempo"
        kMetro metro kTempo
        if kMetro == 1 then
            ;trigger sounds from instrument 1000, which in turns calls synth UDO..
            event "i", 1000, 0, chnget:k("duration"), p4+iNoteArray[kNoteIndex], p5/5
                       
            if kNoteIndex == 6 then
                kDir = -1
            elseif kNoteIndex == 0 then
                kDir = 1
            endif
            kNoteIndex += kDir
        endif
    else    
       ;plays sound through thr simple synth UDO
       a1, a2 SimpleSynth, p4, p5
       outs a1, a2
    endif
endin

今天做的这个是可以用不同的knob来控制琶音音符arpe select.csd (7.5 KB)

1 Like