I found it to be the case that for non-realtime renders, it was slower for me on the same computer when using Windows than on Linux. I don't know if that is still the case or if it is an issue of binaries being more optimized for CPU or not. I last tried a comparison maybe a few years ago though, and really haven't used Csound on windows much since. steven On 11/18/05, Iain Duncan wrote: > > Latency on Windows is very small with ASIO. I have been running with cs > > buffers of 200 samples and > > 'very low latency' ASIO settings, which here mean something like 32 or > > 64 samples. Audio processing works > > like a treat, almost like dedicated hardware. > > > > Victor > > That is definitely an improvement over windows last time I used it. > However, using the Ingo Molnar low latency kernel patch on 2.6.12, I am > able to run simple csound orchestras with sr=48000 ksmps=1 in real time > at buffer settings of -b1 -B1 with no break up! ( Delta 66 card, alsa > 0.9 or so ) > > csound -+rtaudio=alsa -odac -m0 -d --expression-opt --sched -b1 -B0 > monosynth5.orc monosynth5.sco > > "audio buffered in 1 sample-frame blocks > writing 4-byte blks of shorts to dac" > > I have not done a recent shoot out because I don't have a windows > install on this machine anymore, but when I did a comparison a long time > ago, the improvement was dramatic in terms of latency, ability to use > other gui apps at the same time ( using --sched ) and even cpu use for > the same orchestra. Of course this is a very simple orchestra ( 8 vco's > plus 2 moogvcf's, hits 25% cpu at ksmps=1 ), but it would be interesting > to have the comparison for windows too. I am on an AMD 3000+ if anyone > wants to try to see what the lowest -b -B's they can get are. Attached > are the files. > > Iain > > > ;*** Mono synth with nice legato! > ;*** This version uses 2 instruments, 1 trigger instr and envelope/oscillator/filter instr > > ;*** what could be better, but is not crucial > ;*** - if a release is cut off, attack time could be adjusted so as to prevent different shape > ;*** - user could set threshold on release val of where it gets to be legato or not. > ;*** - user could set different port speeds for up and down, and add velocity effect > > ;*** the gk1_blahblah prefix is just how I keep track of which instrument in my mixer > ;*** these values correspond to. > > sr = 48000 > ksmps = 1 > nchnls = 2 > > #define ON #1# > #define OFF #0# > > > ;********************************************************************************************** > ;************* Global Control Values, can be changed by sequencer/control instr/GUI etc > > ;*** play with these as much as you want. > > gk1_ampatt init 0.1 > gk1_ampdec init 2 > gk1_ampsus init 0.7 > gk1_amprel init 0.5 > > gk1_regfrqprt init 0.02 ;*** pitch portamento for non legato > gk1_legfrqprt init 0.1 ;*** pitch portamento time for legato > > gk1_legvelprt init 0.002 ;*** velocity portamento time for legato > > gk1_vol init 20000 ;*** amp value for full velocity. ( 1 ) > > > ;********************************************************************************************** > ;*** These are necessary initializations, don't change 'em. > > gk1_frq init 440 ;*** control signal for pitch, needs dummy start val > gk1_vel init $OFF ;*** velocity value, 0 to 1, needs dummy start val > > gk1_ampenvtrig init $OFF ;*** amp env start trigger > gk1_ampreltrig init $OFF ;*** amp env rel trigger > gk1_amprelflag init $OFF ;*** stays ON during release > > > ;********************************************************************************************** > ;******** Instrument 1, Trigger Module ******************************************************** > instr 1 > > ;*** This module gets turned on and off from the score. > ;*** Triggers the envelope module, controls pitch and velocity, including portamento. > ;*** The release stage happens *after* the end of the note. > ;*** For a midi version, this module would be replaced by a midiin parser instrument. > > ;********************************************************************************************** > ;******** Note initialization section. > > ;*** hold the note, and find out if it was tied > ihold > itie tival > > ;*** the counter stuff, max values are frozen at start > kcnt init 0 ;*** ksmps counter > icntend init int( p3 * kr ) ;*** ksmps at end of p3, start of release > > ;*** freeze the portamento times for legato or non legato notes > iregfrqprt init i( gk1_regfrqprt ) > ilegfrqprt init i( gk1_legfrqprt ) > ilegvelprt init i( gk1_legvelprt ) > > ;*** freeze last gk1_amp and gk1_frq before this note for portamento ramps > ilastvel init i( gk1_vel ) > ilastfrq init i( gk1_frq ) > > > ;********************************************************************************************** > ;************* Send out the triggers and flags to the envelope and osc/filter modules. > > ;*** trigs flash ON for only one ksmp, flags stay on for duration of quality they flag > > ;*** Amp env trigger ON at start of note, only if not tied > gk1_ampenvtrig = ( ( kcnt == 0 ) && ( itie == $OFF ) ? $ON : $OFF ) > > ;*** Amp release trigger ON only on first ksmp of release ( last ksmp of p3 ) > gk1_ampreltrig = ( kcnt == icntend ? $ON : $OFF ) > > ;*** Amp rel flag incremented when we hit release stage, thus not cleared at start > gk1_amprelflag = ( kcnt == icntend ? $ON : gk1_amprelflag ) > > ;********************************************************************************************** > ;************* The regular and legato velocity and pitch controls. > > if ( itie == $ON ) kgoto LegatoTrans > > gk1_vel = p4 ;*** no amp glide for detached notes > > ;*** need an if here to prevent first note from gliding from an init point > if ( ilastfrq == 0 ) kgoto NoPortamento > > gk1_frq expseg ilastfrq, iregfrqprt, p5, 1, p5 > > kgoto DoneTrans > > NoPortamento: > gk1_frq = p5 ;*** no pitch glide on very first note > > kgoto DoneTrans > > > LegatoTrans: > > ;*** legato vel envelope, so as to avoid clicks from amp jumps > gk1_vel linseg ilastvel, ilegvelprt, p4, 1, p4 > > ;*** legato frq envelope, leave on p5 > gk1_frq expseg ilastfrq, ilegfrqprt, p5, 1, p5 > > DoneTrans: > > > ;********************************************************************************************** > ;************* Turn off section, and counter increment. > > ;*** if this is after release time, turn off the note > ;*** I am not sure why it needs to be icntend + 1, but what the hell, it works. > if ( kcnt < icntend + 1 ) kgoto End > turnoff > End: > > ;*** increment the kcounter > kcnt = kcnt + 1 > > endin > > > ;********************************************************************************************** > ;********************************************************************************************** > ;************* Instr 2, Envelope & Audio Module > > instr 2 > > ;*** always on instrument, triggers reinitialize the envelopes > ;*** this section receives triggers from i1, and then fires the envelopes > ;*** uses the global envelope values frozen on reinit calls > ;*** sends out a global ampenv control value to the oscillator section, 0 - 1 > > ;*** This instrument will start up by firing an envelope, but that doesn't matter > ;*** because it will reinit on the first real note anyway. > > ;********************************************************************************************** > ;************* Main Envelope section, for legato or not legato > > kamprelenv init 0 ;*** starts at 0 for first note > > > ;*** We hop to the Release section if in release stage and not a new note > if ( ( gk1_amprelflag == $ON ) && ( gk1_ampenvtrig == $OFF ) ) kgoto ReleaseSection > > > ;*** otherwise, do the regular envelopes > if ( gk1_ampenvtrig == $OFF ) kgoto AmpEnv > > ;*** we are here on ampenvtrig pass only > reinit AmpEnvReinit > > AmpEnvReinit: > > ;*** freeze new envelope values for the reinit pass, ( don't need reltime ) > iampatt init i( gk1_ampatt ) > iampdec init i( gk1_ampdec ) > iampsus init i( gk1_ampsus ) > > ;*** freeze last value from the release env. new env starts from there. > iampstrt init i( kamprelenv ) > > ;*** turn off the release flag, and reset the release env > gk1_amprelflag init $OFF > kamprelenv = 1 ;*** not an init because of first note > > ;*** hops here if not reiniting, and on first pass > AmpEnv: > > ;*** envelope starts from the last value used, 0.0001 if a note finished the release > ;*** envelope just ends parked on the sus level. > > kampenv linseg iampstrt, iampatt, 1, iampdec, iampsus, 1, iampsus > > rireturn > > kgoto EndEnvelopes ;*** skip envelop release section > > > > ;********************************************************************************************** > ;************* Release envelope section > > ReleaseSection: > > ;*** if this is not the trigger kpass, hop to envelope > if ( gk1_ampreltrig == $OFF ) kgoto AmpReleaseEnv > > reinit AmpReleaseReinit > > AmpReleaseReinit: > > ;*** freeze the release time > iamprel init i( gk1_amprel ) > > AmpReleaseEnv: > > ;*** make the release envelope, hold it at 0 > kamprelenv expseg 1, iamprel, 0.0001, 1, 0.0001 > > ;*** turn off release flag if release is done, is this needed? seems not, but keep around > ;gk1_amprelflag = ( gk1_amprelenv <= 0.001 ? $OFF : gk1_amprelflag ) > > rireturn > > EndEnvelopes: > > > ;********************************************************************************************** > ;************* Audio section, oscillators and filters > > ;*** some base values, change later to global variables > ifcbase init 6000 > ifcenvamt init 3000 > > ;*** receive the pitch and amp controls, originally passed as pfields to i1 > kfrq = gk1_frq > > kfc = ifcbase > > ;* amp, cps mode pw > asig1 vco 1, kfrq * 1, 1, > asig2 vco 1, kfrq * 1.001, 1, > asig3 vco 1, kfrq * 1.002, 1, > asig4 vco 1, kfrq * 1.003, 1, > asig5 vco 1, kfrq * 1.004, 1, > asig6 vco 1, kfrq * 1.005, 1, > asig7 vco 1, kfrq * 1.006, 1, > asig8 vco 1, kfrq * 1.007, 1, > > asig = ( asig1 + asig2 + asig3 + asig4 + asig5 + asig6 + asig7 + asig8 ) / 3 > > afilt moogvcf asig, kfc + 2000, 0.3 > afilt moogvcf asig, kfc, 0.5 > > ;*** apply and envelope and velocity > aout = afilt * kampenv * kamprelenv * gk1_vel * gk1_vol > > > outs aout, aout > > > endin > > > > > ;*** score file for monosynth1 > > f1 0 16384 10 1 ;*** sine wave for vco > i2 0 20 ;*** leave always on, could use ihold or make this big > > > i1 1 1.0 1 110 ;*** start note > i1 3 1.0 . 110 ;*** seperate note > i1 3.2 1.7 .7 165 ;*** attack overlap > i1 5 2.5 .8 110 ;*** release ovelap, not legato. > i1 7 2.5 .8 165 ;*** decay/sus overlap > i1 9 2 1 110 ;*** legato accent note > > e > > > > > > > >