Self Made Grain/Overlapping streams
Date | 2016-09-15 12:40 |
From | T Lopez |
Subject | Self Made Grain/Overlapping streams |
Hi all!! I really like how selfmade grain overlaps audio streams... I would like to do something similar with the other granular opcodes for an installation I'm coding in pure data. |
Date | 2016-09-15 12:50 |
From | Victor Lazzarini |
Subject | Re: Self Made Grain/Overlapping streams |
yes, you can use an opcode like syncgrain/syncloop or partikkel. There are others too, take a look at Iain McCurdy’s granular synthesis examples. ======================== Dr Victor Lazzarini Dean of Arts, Celtic Studies and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 15 Sep 2016, at 12:40, T Lopez |
Date | 2016-09-15 12:52 |
From | T Lopez |
Subject | Re: Self Made Grain/Overlapping streams |
Thanks so much for your response, I should have been more specific... I am using partikkel currently....the point is, I don´t know how to get the streams to overlap as in selfmade grain without using schedwhen in another instrument..On 15 September 2016 at 13:50, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote: yes, you can use an opcode like syncgrain/syncloop or partikkel. There are others too, |
Date | 2016-09-15 13:00 |
From | Victor Lazzarini |
Subject | Re: Self Made Grain/Overlapping streams |
With Partikkel you should be able to do everything you want in terms of granular synthesis, overlapping streams should not be a problem. Maybe you should ask a specific question on Partikkel, and I am sure there would be people here with expertise to help you. ======================== Dr Victor Lazzarini Dean of Arts, Celtic Studies and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 15 Sep 2016, at 12:52, T Lopez |
Date | 2016-09-15 13:12 |
From | T Lopez |
Subject | Re: Self Made Grain/Overlapping streams |
Okkk, makes sense...will do. One last question then...or maybe I should do the same as with partikkel.. Would you happen to know how one could achieve this with fog? Thanks so much for your swift responses. On 15 Sep 2016 14:00, "Victor Lazzarini" <Victor.Lazzarini@nuim.ie> wrote:
Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
With Partikkel you should be able to do everything you want in terms of granular synthesis, |
Date | 2016-09-15 13:38 |
From | Victor Lazzarini |
Subject | Re: Self Made Grain/Overlapping streams |
Not quite sure what exactly you want to do, but you can have overlapped streams with any of these opcodes, fog included. ======================== Dr Victor Lazzarini Dean of Arts, Celtic Studies and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 15 Sep 2016, at 13:12, T Lopez |
Date | 2016-09-15 14:00 |
From | T Lopez |
Subject | Re: Self Made Grain/Overlapping streams |
Ok..what I mean is, all of the granular opcode examples are monophonic, as they only play one "note" at a time Selfmade grain's use of sndwarp is polyphonic as the "notes" are triggered every 12.5 seconds and overlap..forming a brief 'chord' This is due to schedwhen triggering sndwarp.. I wanted to know if it was possible to use the opcodes polyphonically(did I spell that right??) as in the above example WITHOUT using schedwhen to trigger the opcode.. I hope that's clear...I should have probably phrased it that way in the original post. On 15 Sep 2016 14:38, "Victor Lazzarini" <Victor.Lazzarini@nuim.ie> wrote:
Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Not quite sure what exactly you want to do, but you can have overlapped streams |
Date | 2016-09-15 14:18 |
From | Oeyvind Brandtsegg |
Subject | Re: Self Made Grain/Overlapping streams |
Hi. Do you have an example csd of what you want to do? 15. sep. 2016 06.00 skrev "T Lopez" <wstlopez@gmail.com>:
|
Date | 2016-09-15 14:28 |
From | T Lopez |
Subject | Re: Self Made Grain/Overlapping streams |
Ok good idea thx, will post later after work;-) On 15 Sep 2016 15:18, "Oeyvind Brandtsegg" <obrandts@gmail.com> wrote:
Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
|
Date | 2016-09-19 13:02 |
From | T Lopez |
Subject | Re: Self Made Grain/Overlapping streams |
A little bit delayed but here it goes...... <CsoundSynthesizer> <CsOptions> --env:SSDIR+=../SourceMaterials -odac </CsOptions> <CsInstruments> ;example written by Iain McCurdy sr = 44100 ksmps = 32 nchnls = 2 0dbfs = 1 ; the name of the sound file used is defined as a string variable - ; - as it will be used twice in the code. ; This simplifies adapting the orchestra to use a different sound file gSfile = "folo.wav" ; waveform used for granulation giSound ftgen 1,0,2097152,1,gSfile,0,0,0 ; window function - used as an amplitude envelope for each grain giWFn ftgen 2,0,16384,9,0.5,1,0 seed 0 ; seed the random generators from the system clock gaSendL init 0 ; initialize global audio variables gaSendR init 0 instr 1 ; triggers instrument 2 ktrigger metro .08 schedkwhen ktrigger,1,40,2,0,40 endin instr 2 ; generates granular synthesis textures ;define the input variables ifn1 = giSound ilen = nsamp(ifn1)/sr iPtrStart random 1,ilen-1 iPtrTrav random -1,1 ktimewarp line iPtrStart,p3,iPtrStart+iPtrTrav kamp linseg 0,p3/2,0.2,p3/2,0 iresample invalue "pitch" ifn2 = giWFn ibeg = 0 iwsize invalue "size" irandw = iwsize/3 ioverlap = 50 itimemode = 1 ; create a stereo granular synthesis texture using sndwarp aSigL,aSigR sndwarpst kamp,ktimewarp,iresample,ifn1,ibeg,\ iwsize,irandw,ioverlap,ifn2,itimemode ; envelope the signal with a lowpass filter kcf expseg 50,p3/2,12000,p3/2,50 aSigL moogvcf2 aSigL, kcf, 0.5 aSigR moogvcf2 aSigR, kcf, 0.5 ; add a little of our audio signals to the global send variables - ; - these will be sent to the reverb instrument (2) gaSendL = gaSendL+(aSigL*0.4) gaSendR = gaSendR+(aSigR*0.4) outs aSigL,aSigR endin instr 3 ; reverb (always on) aRvbL,aRvbR reverbsc gaSendL,gaSendR,0.85,8000 outs aRvbL,aRvbR ;clear variables to prevent out of control accumulation clear gaSendL,gaSendR endin </CsInstruments> <CsScore> ; p1 p2 p3 i 1 0 3600 ; triggers instr 2 i 3 0 3600 ; reverb instrument e </CsScore> </CsoundSynthesizer> </p> The above is an example of how I want it to work, a slightly modified version of selfmade grain. It is polyphonic by default as the "notes" overlap due to schedwhen triggering instrument 2. <CsoundSynthesizer> <CsOptions> ; Select audio/midi flags here according to platform ; Audio out -odac ;;;RT audio ; For Non-realtime ouput leave only the line below: ; -o partikkel.wav -W ;;; for file output any platform </CsOptions> <CsInstruments> sr = 44100 ksmps = 20 nchnls = 2 ; Example by Joachim Heintz and Oeyvind Brandtsegg 2008 giCosine ftgen 0, 0, 8193, 9, 1, 1, 90 ; cosine giDisttab ftgen 0, 0, 32768, 7, 0, 32768, 1 ; for kdistribution giFile ftgen 0, 0, 0, 1, "FOLO.wav", 0, 0, 0 ; soundfile for source waveform giWin ftgen 0, 0, 4096, 20, 9, 1 ; grain envelope giPan ftgen 0, 0, 32768, -21, 1 ; for panning (random values between 0 and 1) ; ************************************************* ; partikkel example, processing of soundfile ; uses the file "x.wav" ; ************************************************* instr 1 kspeed invalue "speed" ; 1 = original speed kgrainrate invalue "rate" ; grain rate kgrainsize invalue "size" ; grain size in ms kcent invalue "cent" ; transposition in cent iposrand = p8 ; time position randomness (offset) of the pointer in ms kcentrand invalue "kcent" ; transposition randomness in cents ipan = p10 ; panning narrow (0) to wide (1) kdist invalue "kdist" ; grain distribution (0=periodic, 1=scattered) /*get length of source wave file, needed for both transposition and time pointer*/ ifilen tableng giFile ifildur = ifilen / sr /*sync input (disabled)*/ async = 0 /*grain envelope*/ kenv2amt = 1 ; use only secondary envelope ienv2tab = giWin ; grain (secondary) envelope ienv_attack = -1 ; default attack envelope (flat) ienv_decay = -1 ; default decay envelope (flat) ksustain_amount = 0.5 ; no meaning in this case (use only secondary envelope, ienv2tab) ka_d_ratio = 0.5 ; no meaning in this case (use only secondary envelope, ienv2tab) /*amplitude*/ kamp = 0.4*0dbfs ; grain amplitude igainmasks = -1 ; (default) no gain masking /*transposition*/ ; random transposition iorig = 1 / ifildur ; original pitch kwavfreq = iorig * (kcent + kcentrand) /*other pitch related (disabled)*/ ksweepshape = 0 ; no frequency sweep iwavfreqstarttab = -1 ; default frequency sweep start iwavfreqendtab = -1 ; default frequency sweep end awavfm = 0 ; no FM input ifmamptab = -1 ; default FM scaling (=1) kfmenv = -1 ; default FM envelope (flat) /*trainlet related (disabled)*/ icosine = giCosine ; cosine ftable kTrainCps = kgrainrate ; set trainlet cps equal to grain rate for single-cycle trainlet in each grain knumpartials = 1 ; number of partials in trainlet kchroma = 1 ; balance of partials in trainlet /*panning, using channel masks*/ imid = .5; center ileftmost = imid - ipan/2 irightmost = imid + ipan/2 giPanthis ftgen 0, 0, 32768, -24, giPan, ileftmost, irightmost ; rescales giPan according to ipan tableiw 0, 0, giPanthis ; change index 0 ... tableiw 32766, 1, giPanthis ; ... and 1 for ichannelmasks ichannelmasks = giPanthis ; ftable for panning /*random gain masking (disabled)*/ krandommask = 0 /*source waveforms*/ kwaveform1 = giFile ; source waveform kwaveform2 = giFile ; all 4 sources are the same kwaveform3 = giFile kwaveform4 = giFile iwaveamptab = -1 ; (default) equal mix of source waveforms and no amplitude for trainlets /*time pointer*/ afilposphas phasor kspeed / ifildur /*generate random deviation of the time pointer*/ iposrandsec = iposrand / 2400; iposrand = iposrandsec / ifildur krndpos linrand iposrand ;random offset in phase value /*add random deviation to the time pointer*/ asamplepos1 = afilposphas + krndpos; resulting phase values (0-1) asamplepos2 = asamplepos1 asamplepos3 = asamplepos1 asamplepos4 = asamplepos1 /*original key for each source waveform*/ kwavekey1 = 1 kwavekey2 = kwavekey1 kwavekey3 = kwavekey1 kwavekey4 = kwavekey1 /* maximum number of grains per k-period*/ imax_grains = 20 aL, aR partikkel kgrainrate,kdist , giDisttab, async, kenv2amt, ienv2tab, \ ienv_attack, ienv_decay, ksustain_amount, ka_d_ratio, kgrainsize, kamp, igainmasks, \ kwavfreq, ksweepshape, iwavfreqstarttab, iwavfreqendtab, awavfm, \ ifmamptab, kfmenv, icosine, kTrainCps, knumpartials, \ kchroma, ichannelmasks, krandommask, kwaveform1, kwaveform2, kwaveform3, kwaveform4, \ iwaveamptab, asamplepos1, asamplepos2, asamplepos3, asamplepos4, \ kwavekey1, kwavekey2, kwavekey3, kwavekey4, imax_grains outs aL, aR endin </CsInstruments> <CsScore> ;i1 st dur speed grate gsize cent posrnd cntrnd pan dist i1 0 11028 0 0 0 0 0 0 0 0 </CsScore> </CsoundSynthesizer> The above is a modified example of partikkel that does not do what I want to to do as by default it seems to be monophonic, as you can only play one "note" at a time. I want to know how to make this polyphonic WITHOUT using schedwhen, if that is possible. My apologies as I really didn´t know how to make these examples any simpler. On 15 September 2016 at 15:28, T Lopez <wstlopez@gmail.com> wrote:
|
Date | 2016-09-20 13:56 |
From | Steven Yi |
Subject | Re: Self Made Grain/Overlapping streams |
I am curious, are you using the partikkel example within CsoundQT? The code has: kdist invalue "kdist" ; grain distribution (0=periodic, 1=scattered) which, if I remember correctly, invalue defaults to 0, which would set partikkel to use a periodic distribution. If you're not using CsoundQT, then I would check all of the lines using invalue and perhaps set it to a value manually. On Mon, Sep 19, 2016 at 8:02 AM, T Lopez |
Date | 2016-09-20 14:10 |
From | T Lopez |
Subject | Re: Self Made Grain/Overlapping streams |
Hi! Well, I made the adjustments in qt, however, the code is being run in pure data...I'm controlling the kvariables "live" On 20 Sep 2016 14:57, "Steven Yi" <stevenyi@gmail.com> wrote:
Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
I am curious, are you using the partikkel example within CsoundQT? The code has: |
Date | 2016-09-20 14:36 |
From | Steven Yi |
Subject | Re: Self Made Grain/Overlapping streams |
Thanks for that; could you describe then what settings you are using in the PD patch? (or share the patch?) Also, could you record the results as audio between what is expected and what you are getting? It's hard to diagnose without knowing what parameters are being used but hearing it might explain it easily. On Tue, Sep 20, 2016 at 9:10 AM, T Lopez |
Date | 2016-09-20 15:18 |
From | T Lopez |
Subject | Re: Self Made Grain/Overlapping streams |
The patch is EXTREMELY complex as it's not just audio... I will record the results of both csds using the same .wav so you can hear the difference when I get home...thanks for your interest. Using the csds in pd or qt is irrelevant as the results are the same in both...I am beginning to think what I want to do is impossible without schedwhen or multiple instances(polyphony). On Sep 20, 2016 3:36 PM, "Steven Yi" <stevenyi@gmail.com> wrote:
Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Thanks for that; could you describe then what settings you are using |
Date | 2016-09-24 12:16 |
From | T Lopez |
Subject | Re: Self Made Grain/Overlapping streams |
Well, I've been trying to record to no avail.. First, I tried the menu record option in CsoundQT(0.91) only to see "this version was not built with recording support" Then I tried putting <CsoundSynthesizer> <CsOptions> ; audio output destination is given as a sound file (wav format specified) ; this method is for deferred time performance, ; simultaneous real-time audio will not be possible -oWriteToDisk1.wav -W </CsOptions> to no avail....real time audio should not be possible with this code, and I still heard it anyways.....in addition, there was no error message in the console. On 20 Sep 2016 16:18, "T Lopez" <wstlopez@gmail.com> wrote:
|
Date | 2016-09-24 13:17 |
From | Iain McCurdy |
Subject | Re: Self Made Grain/Overlapping streams |
Try using 'monitor' and 'fout' in a separate, always-on instrument. I. From: A discussion list for users of Csound <CSOUND@LISTSERV.HEANET.IE> on behalf of T Lopez <wstlopez@GMAIL.COM>
Sent: 24 September 2016 11:16 To: CSOUND@LISTSERV.HEANET.IE Subject: Re: [Csnd] Self Made Grain/Overlapping streams Well, I've been trying to record to no avail.. First, I tried the menu record option in CsoundQT(0.91) only to see "this version was not built with recording support" Then I tried putting <CsoundSynthesizer> <CsOptions> ; audio output destination is given as a sound file (wav format specified) ; this method is for deferred time performance, ; simultaneous real-time audio will not be possible -oWriteToDisk1.wav -W </CsOptions> to no avail....real time audio should not be possible with this code, and I still heard it anyways.....in addition, there was no error message in the console. On 20 Sep 2016 16:18, "T Lopez" <wstlopez@gmail.com> wrote:
|
Date | 2016-09-24 16:20 |
From | Oeyvind Brandtsegg |
Subject | Re: Self Made Grain/Overlapping streams |
Yes, that should take care if the recording. But it is even better if you can just replace the invalues with simple values (=), then anyone can run the csd and even modify it and send you back a new version. 24. sep. 2016 05.17 skrev "Iain McCurdy" <i_mccurdy@hotmail.com>:
|
Date | 2016-09-24 16:29 |
From | Steven Yi |
Subject | Re: Self Made Grain/Overlapping streams |
As a sidenote, I went through the manual examples for partikkel and they all seemed to take approaches where grains did not overlap. Oeyvind: would you happen to have example that does demonstrate overlapping grains? I think it would be very nice to have it within the examples. On Sat, Sep 24, 2016 at 11:20 AM, Oeyvind Brandtsegg |
Date | 2016-09-24 16:38 |
From | Oeyvind Brandtsegg |
Subject | Re: Self Made Grain/Overlapping streams |
Oh. That was an odd coincidence. I'll have to check when I get to my machine. I use them overlapping all the time. Anything particular (pun intended) you would want to see in an example? 24. sep. 2016 08.29 skrev "Steven Yi" <stevenyi@gmail.com>: As a sidenote, I went through the manual examples for partikkel and |
Date | 2016-09-24 19:31 |
From | T Lopez |
Subject | Re: Self Made Grain/Overlapping streams |
Do you use schedwhen for overlapping grains? Or only the partikkel code? Thank you Ian...will try it out. On 24 Sep 2016 17:38, "Oeyvind Brandtsegg" <obrandts@gmail.com> wrote:
Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
|
Date | 2016-09-24 20:15 |
From | Steven Yi |
Subject | Re: Self Made Grain/Overlapping streams |
Perhaps an example that sweeps the ranges from small to large grains, and also from synchronous to overlapping? On Sat, Sep 24, 2016 at 11:38 AM, Oeyvind Brandtsegg |