| Thanks for the suggestions sir, I get the general idea to isolate the opcodes, will try to get some nice sounds!
Sent from my iPhone
> On 15 Jun, 2013, at 4:24 pm, Victor Lazzarini wrote:
>
> Or the reverb. Try replacing it by a freeverb.
>> On 15 Jun 2013, at 09:08, Pier wrote:
>>
>> I'm thinking it could be the fmb3 as my code below does not use moogladder. Is it computationally intensive?
>>
>> Pier.
>>
>>> On 15 Jun, 2013, at 4:01 PM, Victor Lazzarini wrote:
>>>
>>> moogladder is very heavy processing, you can try using moogvcf instead.
>>>
>>> What you describe sounds like the processor is not being able to keep up with
>>> the computation, so you will need to scale it down. You can also try dropping
>>> the SR tp 32K or 22.05K.
>>>
>>> Victor
>>>
>>>> On 15 Jun 2013, at 03:06, lppier wrote:
>>>>
>>>> Hi,
>>>>
>>>> I'm using CSound iOS 5.19.02.2, and the MidiTest in the iOS examples.
>>>> The example MidiTest works fine.
>>>> However, when I try to run more intensive csd algorithms the sound drops out
>>>> when I play a few notes. It stutters and sometimes there is no sound at all.
>>>> It works a bit better when I drop the voice stealing instruments number of
>>>> voices to 8 or so. However, after this I tried an algorithm with more
>>>> opcodes like moogladder for processing that builds on the below code and the
>>>> sound broke up after a few notes pressed.
>>>>
>>>> All csds run fine in CSoundQt on Mac OSX btw.
>>>>
>>>> Is there something I've done wrong here, or is this an inherent limitation
>>>> of CSound on iOS?
>>>>
>>>> Thank you very much.
>>>>
>>>> My csd file.
>>>>
>>>>
>>>>
>>>> -o dac -+rtmidi=null -+rtaudio=null -d -+msg_color=0 -M0 -m0
>>>>
>>>>
>>>> nchnls=2
>>>> 0dbfs=1
>>>> ksmps=64
>>>> sr = 44100
>>>>
>>>> turnon 3
>>>> massign 0, 1
>>>>
>>>> ga1 init 0
>>>>
>>>>
>>>> opcode cpsmid, k, k
>>>>
>>>> kmid xin
>>>>
>>>> #define MIDI2CPS(xmidi) # (440.0*exp(log(2.0)*(($xmidi)-69.0)/12.0)) #
>>>> kcps = $MIDI2CPS(kmid)
>>>>
>>>> xout kcps
>>>>
>>>> endop
>>>>
>>>>
>>>> instr 1
>>>>
>>>> midinoteonkey p4, p5
>>>>
>>>> kvel = (p5/127.0) * 0.09
>>>> kpch cpsmid (p4-19)
>>>> kpb init 0
>>>>
>>>> iwhammy chnget "whammy"
>>>>
>>>> if (iwhammy==1) then
>>>> midipitchbend kpb ; whammy
>>>> else
>>>> midipitchbend kpb, 0, 21.167 ;2 semi-tones
>>>> endif
>>>>
>>>> kpch = octcps(kpch)
>>>> kcps = cpsoct(kpch + kpb)
>>>>
>>>> iattack chnget "attack"
>>>> idecay chnget "decay"
>>>> isustain chnget "sustain"
>>>> irelease chnget "release"
>>>>
>>>>
>>>> ;print iattack
>>>> ;print idecay
>>>> ;print isustain
>>>> ;print irelease
>>>>
>>>> k2 linsegr 0, iattack, 1, idecay, isustain, irelease, 0
>>>> a1 fmb3 k2*kvel, kcps, 5, 5, 0.1, 1, 1, 1, 1, 1, 1
>>>>
>>>> ga1 = ga1 + a1
>>>>
>>>> endin
>>>>
>>>> instr 2
>>>>
>>>> aL, aR reverbsc ga1, ga1, .72, 5000
>>>>
>>>> aL clip aL, 0, 1
>>>> aR clip aR, 0, 1
>>>>
>>>> outs aL, aR
>>>>
>>>> ga1 = 0
>>>>
>>>> endin
>>>>
>>>> instr allNotesOff
>>>> turnoff2 1, 0, 1
>>>> turnoff
>>>> endin
>>>>
>>>> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
>>>> ;; Voice "Stealing" Instrument
>>>> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
>>>> instr 3
>>>> kinstr init 1
>>>> kactive active kinstr
>>>> if kactive > 16 then
>>>> turnoff2 kinstr, 1, 0
>>>> endif
>>>> endin
>>>>
>>>>
>>>>
>>>>
>>>> f 1 0 32768 10 1
>>>>
>>>> i2 0 360000
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context: http://csound.1045644.n5.nabble.com/Stuttering-with-CSound-iOS-tp5724530.html
>>>> Sent from the Csound - Dev mailing list archive at Nabble.com.
>>>>
>>>> ------------------------------------------------------------------------------
>>>> This SF.net email is sponsored by Windows:
>>>>
>>>> Build for Windows Store.
>>>>
>>>> http://p.sf.net/sfu/windows-dev2dev
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>> Dr Victor Lazzarini
>>> Senior Lecturer
>>> Dept. of Music
>>> NUI Maynooth Ireland
>>> tel.: +353 1 708 3545
>>> Victor dot Lazzarini AT nuim dot ie
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> This SF.net email is sponsored by Windows:
>>>
>>> Build for Windows Store.
>>>
>>> http://p.sf.net/sfu/windows-dev2dev
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>> ------------------------------------------------------------------------------
>> This SF.net email is sponsored by Windows:
>>
>> Build for Windows Store.
>>
>> http://p.sf.net/sfu/windows-dev2dev
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
> Dr Victor Lazzarini
> Senior Lecturer
> Dept. of Music
> NUI Maynooth Ireland
> tel.: +353 1 708 3545
> Victor dot Lazzarini AT nuim dot ie
>
>
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net |