[Csnd] disk streaming version of loscil / GEN01 combo
Date | 2013-01-12 18:04 |
From | Roger Kelly |
Subject | [Csnd] disk streaming version of loscil / GEN01 combo |
I was wondering if there would be interest in adding a feature of a "disk-streaming" version of GEN01 to combine with loscil.
This basically would make a disk-streaming sampler, versus the need to pre-load all samples into memory.
Thoughts? |
Date | 2013-01-12 18:10 |
From | Rory Walsh |
Subject | Re: [Csnd] disk streaming version of loscil / GEN01 combo |
Can't you use diskin2? Not as flexible but pretty fast? On 12 January 2013 18:04, Roger Kelly |
Date | 2013-01-12 18:17 |
From | Marco Oros |
Subject | Re: [Csnd] disk streaming version of loscil / GEN01 combo |
Dňa 12. 1. 2013 19:04 Roger Kelly wrote / napísal(a): > I was wondering if there would be interest in adding a feature of a > "disk-streaming" version of GEN01 to combine with loscil. > > This basically would make a disk-streaming sampler, versus the need to > pre-load all samples into memory. > > Thoughts? Hi! What is a disc -streaming sampler? What is difference between normal and disc streaming sampler? Thank You! Marco |
Date | 2013-01-12 18:36 |
From | Rory Walsh |
Subject | Re: [Csnd] disk streaming version of loscil / GEN01 combo |
I think by disk-streaming Rodger is referring to something that is read directly from the hard disk rather than RAM. On 12 January 2013 18:17, Marco Oros |
Date | 2013-01-12 18:43 |
From | peiman khosravi |
Subject | Re: [Csnd] disk streaming version of loscil / GEN01 combo |
I don't think this is safe for live performance. On 12 January 2013 18:36, Rory Walsh <rorywalsh@ear.ie> wrote: I think by disk-streaming Rodger is referring to something that is |
Date | 2013-01-12 18:47 |
From | Rory Walsh |
Subject | Re: [Csnd] disk streaming version of loscil / GEN01 combo |
I've used diskin2 with drum samples and it performed just fine. It would be faster of course to load the samples, but on mobile devices that's not always an option due to limited memory. On 12 January 2013 18:43, peiman khosravi |
Date | 2013-01-12 19:18 |
From | peiman khosravi |
Subject | Re: [Csnd] disk streaming version of loscil / GEN01 combo |
yeah it works 10 times and then one day, right in the middle of a show, playback suddenly stops. This happened to me a few months ago while using sfplay~ in maxmsp. It was so embarrassing. And that was just reading a single file. On another note I heard that if the samples are really short then it's not a good idea for the disk because the data is fragmented and overworks the disk. (Of course that's not an issue with SSDs.) Is this true?
P
On 12 January 2013 18:47, Rory Walsh <rorywalsh@ear.ie> wrote: I've used diskin2 with drum samples and it performed just fine. It |
Date | 2013-01-12 19:23 |
From | Rory Walsh |
Subject | Re: [Csnd] disk streaming version of loscil / GEN01 combo |
> sfplay~ in maxmsp. It was so embarrassing. And that was just reading a > single file. Yes, but has it happened with Csound :) > On another note I heard that if the samples are really short then it's not a > good idea for the disk because the data is fragmented and overworks the > disk. (Of course that's not an issue with SSDs.) Is this true? I'm not sure about this one, perhaps someone else can enlighten us. |
Date | 2013-01-12 22:27 |
From | Marco Oros |
Subject | Re: [Csnd] disk streaming version of loscil / GEN01 combo |
OK! I understand now. |
Date | 2013-01-14 11:02 |
From | Ruben Sverre Gjertsen |
Subject | Re: [Csnd] disk streaming version of loscil / GEN01 combo |
I'm currently meeting an about 50 seconds limit for a stereo file read into a table with ftgentmp (macro below, this is part of a larger setup). I would be happy to try a "disk-streaming" version of GEN01 to overcome this limitation (editing samples I often cut to make them fit within 50 seconds). Rendering realtime is not important in my case. Could this new GEN01 version read any number of channels into tables? Ruben Den 12. jan. 2013 kl. 19.04 skrev Roger Kelly: > I was wondering if there would be interest in adding a feature of a "disk-streaming" version of GEN01 to combine with loscil. > > This basically would make a disk-streaming sampler, versus the need to pre-load all samples into memory. > > Thoughts? # define PlayInputWithTable(A#B#C#D) # ;___________________________________________________________________________________________________________________________________________________________________________ ;READ SOUND INTO TABLE ;___________________________________________________________________________________________________________________________________________________________________________ ;RESERVE TABLE SPACE FOR ALL SOUND FILES 3000+ itablenum$B=$A+3000 ;ifno ftgentmp itablenumber, ip2dummy, ( isize, igen, iarga, iargb, ...) paranthesis is like GEN 01 ; f time size 1 filcod skiptime format channel itablenum$B ftgentmp itablenum$B, 0, 0, -1, $A, 0, 0, 0 ;Load all in original format ;___________________________________________________________________________________________________________________________________________________________________________ ;LOSCIL3 reading, for stretching ;___________________________________________________________________________________________________________________________________________________________________________ iframes$B=ilength$B*isr$B-1 ;If itimeforloop is smaller than 0, the segment will be taken from the exact middle of the file imidten$B=iframes$B/2 ibegmidt$B=imidten$B - ((iframes$B*ipositivetimeforloop$B)/2) iendmidt$B=imidten$B + ((iframes$B*ipositivetimeforloop$B)/2) ibeg1$B=0 ibeg1$B=(itimeforloopuntouched$B<0?ibegmidt$B:ibeg1$B) ibeg2$B=ibeg1$B iend1$B=iframes$B iend1$B=(itimeforloopuntouched$B<0?iendmidt$B:iend1$B) iend2$B=iend1$B print ibeg1$B, iend1$B, itimeforloopuntouched$B ibas=1 ;ibas på 1 gjør isamplespeedratio til simpel faktor imod1=2 ;LOOP 1=normal loop 2=forlengs/baklengs 1=normal loop 0=ikke loop imod1=(itimeforloop$B==0?0:imod1) ;Turn off LOOPING if itimeforloop is 0 imod2=imod1 ;___________________________________________________________________________________________________________________________________________________________________________ ;loscil3 uses cubic interpolation ......ibas er base freq i Hz.....kcsps er freq.......imod er play modes for sustain/loop... ;___________________________________________________________________________________________________________________________________________________________________________ if (ichan$B ==2 ) goto loscil3stereo$B $C loscil3 kamp, ksamplespeedratio$B, itablenum$B ,ibas ,imod1 ,ibeg1$B, iend1$B, imod2, ibeg2$B, iend2$B $D = $C goto outtter$B loscil3stereo$B: $C,$D loscil3 kamp, ksamplespeedratio$B, itablenum$B ,ibas,imod1,ibeg1$B, iend1$B, imod2, ibeg2$B, iend2$B ;___________________________________________________________________________________________________________________________________________________________________________ outtter$B: # |
Date | 2013-01-14 12:07 |
From | Victor Lazzarini |
Subject | Re: [Csnd] disk streaming version of loscil / GEN01 combo |
I think this is a loscil bug. Try doing this: 1) read the file in two tables, one for each channel 2) use two flopper2 opcodes reading from each channel I am pretty sure you can get much more than 50 seconds. Victor On 14 Jan 2013, at 11:02, Ruben Sverre Gjertsen wrote: > > I'm currently meeting an about 50 seconds limit for a stereo file read into a table with ftgentmp (macro below, this is part of a larger setup). > I would be happy to try a "disk-streaming" version of GEN01 to overcome this limitation (editing samples I often cut to make them fit within 50 seconds). Rendering realtime is not important in my case. > Could this new GEN01 version read any number of channels into tables? > > Ruben > > > Den 12. jan. 2013 kl. 19.04 skrev Roger Kelly: > >> I was wondering if there would be interest in adding a feature of a "disk-streaming" version of GEN01 to combine with loscil. >> >> This basically would make a disk-streaming sampler, versus the need to pre-load all samples into memory. >> >> Thoughts? > > > # define PlayInputWithTable(A#B#C#D) # > ;___________________________________________________________________________________________________________________________________________________________________________ > ;READ SOUND INTO TABLE > ;___________________________________________________________________________________________________________________________________________________________________________ > ;RESERVE TABLE SPACE FOR ALL SOUND FILES 3000+ > > itablenum$B=$A+3000 > > ;ifno ftgentmp itablenumber, ip2dummy, ( isize, igen, iarga, iargb, ...) paranthesis is like GEN 01 > ; f time size 1 filcod skiptime format channel > > itablenum$B ftgentmp itablenum$B, 0, 0, -1, $A, 0, 0, 0 ;Load all in original format > > ;___________________________________________________________________________________________________________________________________________________________________________ > ;LOSCIL3 reading, for stretching > ;___________________________________________________________________________________________________________________________________________________________________________ > iframes$B=ilength$B*isr$B-1 > > ;If itimeforloop is smaller than 0, the segment will be taken from the exact middle of the file > imidten$B=iframes$B/2 > ibegmidt$B=imidten$B - ((iframes$B*ipositivetimeforloop$B)/2) > iendmidt$B=imidten$B + ((iframes$B*ipositivetimeforloop$B)/2) > > ibeg1$B=0 > ibeg1$B=(itimeforloopuntouched$B<0?ibegmidt$B:ibeg1$B) > ibeg2$B=ibeg1$B > iend1$B=iframes$B > iend1$B=(itimeforloopuntouched$B<0?iendmidt$B:iend1$B) > iend2$B=iend1$B > print ibeg1$B, iend1$B, itimeforloopuntouched$B > > ibas=1 ;ibas på 1 gjør isamplespeedratio til simpel faktor > imod1=2 ;LOOP 1=normal loop 2=forlengs/baklengs 1=normal loop 0=ikke loop > imod1=(itimeforloop$B==0?0:imod1) ;Turn off LOOPING if itimeforloop is 0 > imod2=imod1 > > > ;___________________________________________________________________________________________________________________________________________________________________________ > ;loscil3 uses cubic interpolation ......ibas er base freq i Hz.....kcsps er freq.......imod er play modes for sustain/loop... > ;___________________________________________________________________________________________________________________________________________________________________________ > if (ichan$B ==2 ) goto loscil3stereo$B > $C loscil3 kamp, ksamplespeedratio$B, itablenum$B ,ibas ,imod1 ,ibeg1$B, iend1$B, imod2, ibeg2$B, iend2$B > $D = $C > goto outtter$B > loscil3stereo$B: > $C,$D loscil3 kamp, ksamplespeedratio$B, itablenum$B ,ibas,imod1,ibeg1$B, iend1$B, imod2, ibeg2$B, iend2$B > ;___________________________________________________________________________________________________________________________________________________________________________ > outtter$B: > # > > Send bugs reports to the Sourceforge bug tracker > https://sourceforge.net/tracker/?group_id=81968&atid=564599 > Discussions of bugs and features can be posted here > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" > Dr Victor Lazzarini Senior Lecturer Dept. of Music NUI Maynooth Ireland tel.: +353 1 708 3545 Victor dot Lazzarini AT nuim dot ie |
Date | 2013-01-15 09:27 |
From | John Clements |
Subject | Re: [Csnd] disk streaming version of loscil / GEN01 combo |
This is what I did for one of my csound for live sampler plugins. Concur that it works! John Clements cell: 401-835-6050 http://www.clementsaudio.com On Jan 14, 2013, at 4:07 AM, Victor Lazzarini |
Date | 2013-01-15 09:39 |
From | Ruben Sverre Gjertsen |
Subject | Re: [Csnd] disk streaming version of loscil / GEN01 combo |
Thank you! I'm trying flooper2 now. Is there a possibility to use cubic interpolation when stretching the sound (like with loscil3)? It would be ideal to: Interpolate if the note is longer than the soundfile. Shorten by granulation if the note is shorter the the soundfile. If I manage to add something from this orchestra by Hans Mikelson: http://www.csounds.com/ezine/spring2000/processing/ Ruben Den 14. jan. 2013 kl. 13.07 skrev Victor Lazzarini: > I think this is a loscil bug. Try doing this: > > 1) read the file in two tables, one for each channel > 2) use two flopper2 opcodes reading from each channel > > I am pretty sure you can get much more than 50 seconds. > > Victor > > On 14 Jan 2013, at 11:02, Ruben Sverre Gjertsen wrote: > >> >> I'm currently meeting an about 50 seconds limit for a stereo file read into a table with ftgentmp (macro below, this is part of a larger setup). >> I would be happy to try a "disk-streaming" version of GEN01 to overcome this limitation (editing samples I often cut to make them fit within 50 seconds). Rendering realtime is not important in my case. >> Could this new GEN01 version read any number of channels into tables? >> >> Ruben >> >> >> Den 12. jan. 2013 kl. 19.04 skrev Roger Kelly: >> >>> I was wondering if there would be interest in adding a feature of a "disk-streaming" version of GEN01 to combine with loscil. >>> >>> This basically would make a disk-streaming sampler, versus the need to pre-load all samples into memory. >>> >>> Thoughts? >> >> >> # define PlayInputWithTable(A#B#C#D) # >> ;___________________________________________________________________________________________________________________________________________________________________________ >> ;READ SOUND INTO TABLE >> ;___________________________________________________________________________________________________________________________________________________________________________ >> ;RESERVE TABLE SPACE FOR ALL SOUND FILES 3000+ >> >> itablenum$B=$A+3000 >> >> ;ifno ftgentmp itablenumber, ip2dummy, ( isize, igen, iarga, iargb, ...) paranthesis is like GEN 01 >> ; f time size 1 filcod skiptime format channel >> >> itablenum$B ftgentmp itablenum$B, 0, 0, -1, $A, 0, 0, 0 ;Load all in original format >> >> ;___________________________________________________________________________________________________________________________________________________________________________ >> ;LOSCIL3 reading, for stretching >> ;___________________________________________________________________________________________________________________________________________________________________________ >> iframes$B=ilength$B*isr$B-1 >> >> ;If itimeforloop is smaller than 0, the segment will be taken from the exact middle of the file >> imidten$B=iframes$B/2 >> ibegmidt$B=imidten$B - ((iframes$B*ipositivetimeforloop$B)/2) >> iendmidt$B=imidten$B + ((iframes$B*ipositivetimeforloop$B)/2) >> >> ibeg1$B=0 >> ibeg1$B=(itimeforloopuntouched$B<0?ibegmidt$B:ibeg1$B) >> ibeg2$B=ibeg1$B >> iend1$B=iframes$B >> iend1$B=(itimeforloopuntouched$B<0?iendmidt$B:iend1$B) >> iend2$B=iend1$B >> print ibeg1$B, iend1$B, itimeforloopuntouched$B >> >> ibas=1 ;ibas på 1 gjør isamplespeedratio til simpel faktor >> imod1=2 ;LOOP 1=normal loop 2=forlengs/baklengs 1=normal loop 0=ikke loop >> imod1=(itimeforloop$B==0?0:imod1) ;Turn off LOOPING if itimeforloop is 0 >> imod2=imod1 >> >> >> ;___________________________________________________________________________________________________________________________________________________________________________ >> ;loscil3 uses cubic interpolation ......ibas er base freq i Hz.....kcsps er freq.......imod er play modes for sustain/loop... >> ;___________________________________________________________________________________________________________________________________________________________________________ >> if (ichan$B ==2 ) goto loscil3stereo$B >> $C loscil3 kamp, ksamplespeedratio$B, itablenum$B ,ibas ,imod1 ,ibeg1$B, iend1$B, imod2, ibeg2$B, iend2$B >> $D = $C >> goto outtter$B >> loscil3stereo$B: >> $C,$D loscil3 kamp, ksamplespeedratio$B, itablenum$B ,ibas,imod1,ibeg1$B, iend1$B, imod2, ibeg2$B, iend2$B >> ;___________________________________________________________________________________________________________________________________________________________________________ >> outtter$B: >> # >> >> Send bugs reports to the Sourceforge bug tracker >> https://sourceforge.net/tracker/?group_id=81968&atid=564599 >> Discussions of bugs and features can be posted here >> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" >> > > Dr Victor Lazzarini > Senior Lecturer > Dept. of Music > NUI Maynooth Ireland > tel.: +353 1 708 3545 > Victor dot Lazzarini AT nuim dot ie > > > > > > Send bugs reports to the Sourceforge bug tracker > https://sourceforge.net/tracker/?group_id=81968&atid=564599 > Discussions of bugs and features can be posted here > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" > |
Date | 2013-01-15 09:52 |
From | Victor Lazzarini |
Subject | Re: [Csnd] disk streaming version of loscil / GEN01 combo |
That can certainly be added to a TODO list. If you want to play around with durations etc, you can checkout the mincer opcode too. Victor On 15 Jan 2013, at 09:39, Ruben Sverre Gjertsen wrote: > Thank you! > > I'm trying flooper2 now. Is there a possibility to use cubic interpolation when stretching the sound (like with loscil3)? > > It would be ideal to: > Interpolate if the note is longer than the soundfile. > Shorten by granulation if the note is shorter the the soundfile. > > If I manage to add something from this orchestra by Hans Mikelson: > http://www.csounds.com/ezine/spring2000/processing/ > > Ruben > > > Den 14. jan. 2013 kl. 13.07 skrev Victor Lazzarini: > >> I think this is a loscil bug. Try doing this: >> >> 1) read the file in two tables, one for each channel >> 2) use two flopper2 opcodes reading from each channel >> >> I am pretty sure you can get much more than 50 seconds. >> >> Victor >> >> On 14 Jan 2013, at 11:02, Ruben Sverre Gjertsen wrote: >> >>> >>> I'm currently meeting an about 50 seconds limit for a stereo file read into a table with ftgentmp (macro below, this is part of a larger setup). >>> I would be happy to try a "disk-streaming" version of GEN01 to overcome this limitation (editing samples I often cut to make them fit within 50 seconds). Rendering realtime is not important in my case. >>> Could this new GEN01 version read any number of channels into tables? >>> >>> Ruben >>> >>> >>> Den 12. jan. 2013 kl. 19.04 skrev Roger Kelly: >>> >>>> I was wondering if there would be interest in adding a feature of a "disk-streaming" version of GEN01 to combine with loscil. >>>> >>>> This basically would make a disk-streaming sampler, versus the need to pre-load all samples into memory. >>>> >>>> Thoughts? >>> >>> >>> # define PlayInputWithTable(A#B#C#D) # >>> ;___________________________________________________________________________________________________________________________________________________________________________ >>> ;READ SOUND INTO TABLE >>> ;___________________________________________________________________________________________________________________________________________________________________________ >>> ;RESERVE TABLE SPACE FOR ALL SOUND FILES 3000+ >>> >>> itablenum$B=$A+3000 >>> >>> ;ifno ftgentmp itablenumber, ip2dummy, ( isize, igen, iarga, iargb, ...) paranthesis is like GEN 01 >>> ; f time size 1 filcod skiptime format channel >>> >>> itablenum$B ftgentmp itablenum$B, 0, 0, -1, $A, 0, 0, 0 ;Load all in original format >>> >>> ;___________________________________________________________________________________________________________________________________________________________________________ >>> ;LOSCIL3 reading, for stretching >>> ;___________________________________________________________________________________________________________________________________________________________________________ >>> iframes$B=ilength$B*isr$B-1 >>> >>> ;If itimeforloop is smaller than 0, the segment will be taken from the exact middle of the file >>> imidten$B=iframes$B/2 >>> ibegmidt$B=imidten$B - ((iframes$B*ipositivetimeforloop$B)/2) >>> iendmidt$B=imidten$B + ((iframes$B*ipositivetimeforloop$B)/2) >>> >>> ibeg1$B=0 >>> ibeg1$B=(itimeforloopuntouched$B<0?ibegmidt$B:ibeg1$B) >>> ibeg2$B=ibeg1$B >>> iend1$B=iframes$B >>> iend1$B=(itimeforloopuntouched$B<0?iendmidt$B:iend1$B) >>> iend2$B=iend1$B >>> print ibeg1$B, iend1$B, itimeforloopuntouched$B >>> >>> ibas=1 ;ibas på 1 gjør isamplespeedratio til simpel faktor >>> imod1=2 ;LOOP 1=normal loop 2=forlengs/baklengs 1=normal loop 0=ikke loop >>> imod1=(itimeforloop$B==0?0:imod1) ;Turn off LOOPING if itimeforloop is 0 >>> imod2=imod1 >>> >>> >>> ;___________________________________________________________________________________________________________________________________________________________________________ >>> ;loscil3 uses cubic interpolation ......ibas er base freq i Hz.....kcsps er freq.......imod er play modes for sustain/loop... >>> ;___________________________________________________________________________________________________________________________________________________________________________ >>> if (ichan$B ==2 ) goto loscil3stereo$B >>> $C loscil3 kamp, ksamplespeedratio$B, itablenum$B ,ibas ,imod1 ,ibeg1$B, iend1$B, imod2, ibeg2$B, iend2$B >>> $D = $C >>> goto outtter$B >>> loscil3stereo$B: >>> $C,$D loscil3 kamp, ksamplespeedratio$B, itablenum$B ,ibas,imod1,ibeg1$B, iend1$B, imod2, ibeg2$B, iend2$B >>> ;___________________________________________________________________________________________________________________________________________________________________________ >>> outtter$B: >>> # >>> >>> Send bugs reports to the Sourceforge bug tracker >>> https://sourceforge.net/tracker/?group_id=81968&atid=564599 >>> Discussions of bugs and features can be posted here >>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" >>> >> >> Dr Victor Lazzarini >> Senior Lecturer >> Dept. of Music >> NUI Maynooth Ireland >> tel.: +353 1 708 3545 >> Victor dot Lazzarini AT nuim dot ie >> >> >> >> >> >> Send bugs reports to the Sourceforge bug tracker >> https://sourceforge.net/tracker/?group_id=81968&atid=564599 >> Discussions of bugs and features can be posted here >> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" >> > > > > Send bugs reports to the Sourceforge bug tracker > https://sourceforge.net/tracker/?group_id=81968&atid=564599 > Discussions of bugs and features can be posted here > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" > Dr Victor Lazzarini Senior Lecturer Dept. of Music NUI Maynooth Ireland tel.: +353 1 708 3545 Victor dot Lazzarini AT nuim dot ie |
Date | 2013-01-16 01:21 |
From | Roger Kelly |
Subject | Re: [Csnd] disk streaming version of loscil / GEN01 combo |
Is there a stereo version of flooper2? On Tue, Jan 15, 2013 at 3:52 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote: That can certainly be added to a TODO list. |
Date | 2013-01-16 10:59 |
From | Ruben Sverre Gjertsen |
Subject | Re: [Csnd] disk streaming version of loscil / GEN01 combo |
With some routing all kind of multichannel formats should be possible. I paste the new macro below. I make sure to write the second channel to a different function number to avoid conflicts. Ruben Den 16. jan. 2013 kl. 02.21 skrev Roger Kelly:
# define PlayInputWithTableNEW(A#B#C#D) # ;___________________________________________________________________________________________________________________________________________________________________________ ;READ SOUND INTO TABLE ;___________________________________________________________________________________________________________________________________________________________________________ ;RESERVE TABLE SPACE FOR ALL SOUND FILES 3000+ itablenum$B=$A+3000 ;ifno ftgentmp itablenumber, ip2dummy, ( isize, igen, iarga, iargb, ...) paranthesis is like GEN 01 ; f time size 1 filcod skiptime format channel ; WRITE FROM CHANNEL 1: ;itablenum$B ftgentmp itablenum$B, 0, 0, -1, $A, 0, 0, 1 ;Load all in original format if (ichan$B ==1 ) goto writeMonoTable$B if (ichan$B ==2 ) goto writeStereoTable$B if (ichan$B ==3 ) goto writeTriTable$B if (ichan$B ==4 ) goto writeQuadTable$B if (ichan$B ==5 ) goto writePentTable$B if (ichan$B ==6 ) goto writeHexTable$B if (ichan$B ==7 ) goto writeSeptTable$B if (ichan$B ==8 ) goto writeOctTable$B writeMonoTable$B: itable1$B=itablenum$B itablenum$B ftgentmp itable1$B, 0, 0, -1, $A, 0, 0, 1 ;Load in original format of channel X goto writingDone$B writeStereoTable$B: itable1$B=itablenum$B itable2$B=itablenum$B+10000 itablenum$B ftgentmp itable1$B, 0, 0, -1, $A, 0, 0, 1 ;Load in original format of channel X itablenum$B ftgentmp itable2$B, 0, 0, -1, $A, 0, 0, 2 ;Load in original format of channel X goto writingDone$B writeTriTable$B: itable1$B=itablenum$B itable2$B=itablenum$B+10000 itable3$B=itablenum$B+20000 itablenum$B ftgentmp itable1$B, 0, 0, -1, $A, 0, 0, 1 ;Load in original format of channel X itablenum$B ftgentmp itable2$B, 0, 0, -1, $A, 0, 0, 2 ;Load in original format of channel X itablenum$B ftgentmp itable3$B, 0, 0, -1, $A, 0, 0, 3 ;Load in original format of channel X goto writingDone$B writeQuadTable$B: itable1$B=itablenum$B itable2$B=itablenum$B+10000 itable3$B=itablenum$B+20000 itable4$B=itablenum$B+30000 itablenum$B ftgentmp itable1$B, 0, 0, -1, $A, 0, 0, 1 ;Load in original format of channel X itablenum$B ftgentmp itable2$B, 0, 0, -1, $A, 0, 0, 2 ;Load in original format of channel X itablenum$B ftgentmp itable3$B, 0, 0, -1, $A, 0, 0, 3 ;Load in original format of channel X itablenum$B ftgentmp itable4$B, 0, 0, -1, $A, 0, 0, 4 ;Load in original format of channel X goto writingDone$B writePentTable$B: itable1$B=itablenum$B itable2$B=itablenum$B+10000 itable3$B=itablenum$B+20000 itable4$B=itablenum$B+30000 itable5$B=itablenum$B+40000 itablenum$B ftgentmp itable1$B, 0, 0, -1, $A, 0, 0, 1 ;Load in original format of channel X itablenum$B ftgentmp itable2$B, 0, 0, -1, $A, 0, 0, 2 ;Load in original format of channel X itablenum$B ftgentmp itable3$B, 0, 0, -1, $A, 0, 0, 3 ;Load in original format of channel X itablenum$B ftgentmp itable4$B, 0, 0, -1, $A, 0, 0, 4 ;Load in original format of channel X itablenum$B ftgentmp itable5$B, 0, 0, -1, $A, 0, 0, 5 ;Load in original format of channel X goto writingDone$B writeHexTable$B: itable1$B=itablenum$B itable2$B=itablenum$B+10000 itable3$B=itablenum$B+20000 itable4$B=itablenum$B+30000 itable5$B=itablenum$B+40000 itable6$B=itablenum$B+50000 itablenum$B ftgentmp itable1$B, 0, 0, -1, $A, 0, 0, 1 ;Load in original format of channel X itablenum$B ftgentmp itable2$B, 0, 0, -1, $A, 0, 0, 2 ;Load in original format of channel X itablenum$B ftgentmp itable3$B, 0, 0, -1, $A, 0, 0, 3 ;Load in original format of channel X itablenum$B ftgentmp itable4$B, 0, 0, -1, $A, 0, 0, 4 ;Load in original format of channel X itablenum$B ftgentmp itable5$B, 0, 0, -1, $A, 0, 0, 5 ;Load in original format of channel X itablenum$B ftgentmp itable6$B, 0, 0, -1, $A, 0, 0, 6 ;Load in original format of channel X goto writingDone$B writeSeptTable$B: itable1$B=itablenum$B itable2$B=itablenum$B+10000 itable3$B=itablenum$B+20000 itable4$B=itablenum$B+30000 itable5$B=itablenum$B+40000 itable6$B=itablenum$B+50000 itable7$B=itablenum$B+60000 itablenum$B ftgentmp itable1$B, 0, 0, -1, $A, 0, 0, 1 ;Load in original format of channel X itablenum$B ftgentmp itable2$B, 0, 0, -1, $A, 0, 0, 2 ;Load in original format of channel X itablenum$B ftgentmp itable3$B, 0, 0, -1, $A, 0, 0, 3 ;Load in original format of channel X itablenum$B ftgentmp itable4$B, 0, 0, -1, $A, 0, 0, 4 ;Load in original format of channel X itablenum$B ftgentmp itable5$B, 0, 0, -1, $A, 0, 0, 5 ;Load in original format of channel X itablenum$B ftgentmp itable6$B, 0, 0, -1, $A, 0, 0, 6 ;Load in original format of channel X itablenum$B ftgentmp itable7$B, 0, 0, -1, $A, 0, 0, 7 ;Load in original format of channel X goto writingDone$B writeOctTable$B: itable1$B=itablenum$B itable2$B=itablenum$B+10000 itable3$B=itablenum$B+20000 itable4$B=itablenum$B+30000 itable5$B=itablenum$B+40000 itable6$B=itablenum$B+50000 itable7$B=itablenum$B+60000 itable8$B=itablenum$B+70000 itablenum$B ftgentmp itable1$B, 0, 0, -1, $A, 0, 0, 1 ;Load in original format of channel X itablenum$B ftgentmp itable2$B, 0, 0, -1, $A, 0, 0, 2 ;Load in original format of channel X itablenum$B ftgentmp itable3$B, 0, 0, -1, $A, 0, 0, 3 ;Load in original format of channel X itablenum$B ftgentmp itable4$B, 0, 0, -1, $A, 0, 0, 4 ;Load in original format of channel X itablenum$B ftgentmp itable5$B, 0, 0, -1, $A, 0, 0, 5 ;Load in original format of channel X itablenum$B ftgentmp itable6$B, 0, 0, -1, $A, 0, 0, 6 ;Load in original format of channel X itablenum$B ftgentmp itable7$B, 0, 0, -1, $A, 0, 0, 7 ;Load in original format of channel X itablenum$B ftgentmp itable8$B, 0, 0, -1, $A, 0, 0, 8 ;Load in original format of channel X goto writingDone$B writingDone$B: ibas=1 ;ibas på 1 gjør isamplespeedratio til simpel faktor imod1=2 ;LOOP 1=normal loop 2=forlengs/baklengs 1=normal loop 0=ikke loop imod1=(itimeforloop$B==0?0:imod1) ;Turn off LOOPING if itimeforloop is 0 imod2=imod1 ;___________________________________________________________________________________________________________________________________________________________________________ ;Flooper2 reading, for stretching NEW ;___________________________________________________________________________________________________________________________________________________________________________ ;loscil measures in sample frames while this simply uses seconds imidten$B=ilength$B/2; ibegmidt$B=imidten$B - (ipositivetimeforloop$B/2) iendmidt$B=imidten$B + (ipositivetimeforloop$B/2) ibeg1$B=0 ibeg1$B=(itimeforloopuntouched$B<0?ibegmidt$B:ibeg1$B) iend1$B=ilength$B iend1$B=(itimeforloopuntouched$B<0?iendmidt$B:iend1$B) kloopstart$B=ibeg1$B kloopend$B=iend1$B print ibeg1$B, iend1$B, itimeforloopuntouched$B ifenv=0 ;non-zero is fn for crossfade shape, 0 is linear iskip=0 ;1 means skip initialization for tied notes istart$B=ibeg1$B kcrossfade$B=.05 ;Crossfade time for each looping ;___________________________________________________________________________________________________________________________________________________________________________ ;NEW: Read sound with flooper2 ;___________________________________________________________________________________________________________________________________________________________________________ ;asig flooper2 kamp, kpitch, kloopstart, kloopend, kcrossfade, ifn \ ;[, istart, imode, ifenv, iskip] if (ichan$B ==1 ) goto flooperMono$B if (ichan$B ==2 ) goto flooperStereo$B if (ichan$B ==3 ) goto flooperTri$B if (ichan$B ==4 ) goto flooperQuad$B if (ichan$B ==5 ) goto flooperPent$B if (ichan$B ==6 ) goto flooperHex$B if (ichan$B ==7 ) goto flooperSept$B if (ichan$B ==8 ) goto flooperOcto$B ;What i need to know about flooper2: flooperMono$B: itable1$B=itablenum$B $C flooper2 kamp, ksamplespeedratio$B, kloopstart$B, kloopend$B, kcrossfade$B, itable1$B , istart$B, imod1, ifenv, iskip $D=$C goto outtter$B flooperStereo$B: $C flooper2 kamp, ksamplespeedratio$B, kloopstart$B, kloopend$B, kcrossfade$B, itable1$B , istart$B, imod1, ifenv, iskip $D flooper2 kamp, ksamplespeedratio$B, kloopstart$B, kloopend$B, kcrossfade$B, itable2$B , istart$B, imod1, ifenv, iskip ; ;$D=$C goto outtter$B ;IF you use more than stereo, try handle signal names better.... Either you need to add multichannel to stereo, or you must change ;the whole rest of the instrument....challenge for later flooperTri$B: ;$C flooper2 kamp, ksamplespeedratio$B, kloopstart$B, kloopend$B, kcrossfade$B, itable1$B , istart$B, imod1, ifenv, iskip ;$D flooper2 kamp, ksamplespeedratio$B, kloopstart$B, kloopend$B, kcrossfade$B, itable2$B , istart$B, imod1, ifenv, iskip ;asig flooper2 kamp, ksamplespeedratio$B, kloopstart$B, kloopend$B, kcrossfade$B, itable3$B , istart$B, imod1, ifenv, iskip goto outtter$B flooperQuad$B: ;$C flooper2 kamp, ksamplespeedratio$B, kloopstart$B, kloopend$B, kcrossfade$B, itable1$B , istart$B, imod1, ifenv, iskip ;$D flooper2 kamp, ksamplespeedratio$B, kloopstart$B, kloopend$B, kcrossfade$B, itable2$B , istart$B, imod1, ifenv, iskip ;asig flooper2 kamp, ksamplespeedratio$B, kloopstart$B, kloopend$B, kcrossfade$B, itable3$B , istart$B, imod1, ifenv, iskip ;asig flooper2 kamp, ksamplespeedratio$B, kloopstart$B, kloopend$B, kcrossfade$B, itable4$B , istart$B, imod1, ifenv, iskip goto outtter$B flooperPent$B: ;$C flooper2 kamp, ksamplespeedratio$B, kloopstart$B, kloopend$B, kcrossfade$B, itable1$B , istart$B, imod1, ifenv, iskip ;$D flooper2 kamp, ksamplespeedratio$B, kloopstart$B, kloopend$B, kcrossfade$B, itable2$B , istart$B, imod1, ifenv, iskip ;asig flooper2 kamp, ksamplespeedratio$B, kloopstart$B, kloopend$B, kcrossfade$B, itable3$B , istart$B, imod1, ifenv, iskip ;asig flooper2 kamp, ksamplespeedratio$B, kloopstart$B, kloopend$B, kcrossfade$B, itable4$B , istart$B, imod1, ifenv, iskip ;asig flooper2 kamp, ksamplespeedratio$B, kloopstart$B, kloopend$B, kcrossfade$B, itable5$B , istart$B, imod1, ifenv, iskip goto outtter$B flooperHex$B: ;$C flooper2 kamp, ksamplespeedratio$B, kloopstart$B, kloopend$B, kcrossfade$B, itable1$B , istart$B, imod1, ifenv, iskip ;$D flooper2 kamp, ksamplespeedratio$B, kloopstart$B, kloopend$B, kcrossfade$B, itable2$B , istart$B, imod1, ifenv, iskip ;asig flooper2 kamp, ksamplespeedratio$B, kloopstart$B, kloopend$B, kcrossfade$B, itable3$B , istart$B, imod1, ifenv, iskip ;asig flooper2 kamp, ksamplespeedratio$B, kloopstart$B, kloopend$B, kcrossfade$B, itable4$B , istart$B, imod1, ifenv, iskip ;asig flooper2 kamp, ksamplespeedratio$B, kloopstart$B, kloopend$B, kcrossfade$B, itable5$B , istart$B, imod1, ifenv, iskip ;asig flooper2 kamp, ksamplespeedratio$B, kloopstart$B, kloopend$B, kcrossfade$B, itable6$B , istart$B, imod1, ifenv, iskip goto outtter$B flooperSept$B: ;$C flooper2 kamp, ksamplespeedratio$B, kloopstart$B, kloopend$B, kcrossfade$B, itable1$B , istart$B, imod1, ifenv, iskip ;$D flooper2 kamp, ksamplespeedratio$B, kloopstart$B, kloopend$B, kcrossfade$B, itable2$B , istart$B, imod1, ifenv, iskip ;asig flooper2 kamp, ksamplespeedratio$B, kloopstart$B, kloopend$B, kcrossfade$B, itable3$B , istart$B, imod1, ifenv, iskip ;asig flooper2 kamp, ksamplespeedratio$B, kloopstart$B, kloopend$B, kcrossfade$B, itable4$B , istart$B, imod1, ifenv, iskip ;asig flooper2 kamp, ksamplespeedratio$B, kloopstart$B, kloopend$B, kcrossfade$B, itable5$B , istart$B, imod1, ifenv, iskip ;asig flooper2 kamp, ksamplespeedratio$B, kloopstart$B, kloopend$B, kcrossfade$B, itable6$B , istart$B, imod1, ifenv, iskip ;asig flooper2 kamp, ksamplespeedratio$B, kloopstart$B, kloopend$B, kcrossfade$B, itable7$B , istart$B, imod1, ifenv, iskip goto outtter$B flooperOcto$B: ;$C flooper2 kamp, ksamplespeedratio$B, kloopstart$B, kloopend$B, kcrossfade$B, itable1$B , istart$B, imod1, ifenv, iskip ;$D flooper2 kamp, ksamplespeedratio$B, kloopstart$B, kloopend$B, kcrossfade$B, itable2$B , istart$B, imod1, ifenv, iskip ;asig flooper2 kamp, ksamplespeedratio$B, kloopstart$B, kloopend$B, kcrossfade$B, itable3$B , istart$B, imod1, ifenv, iskip ;asig flooper2 kamp, ksamplespeedratio$B, kloopstart$B, kloopend$B, kcrossfade$B, itable4$B , istart$B, imod1, ifenv, iskip ;asig flooper2 kamp, ksamplespeedratio$B, kloopstart$B, kloopend$B, kcrossfade$B, itable5$B , istart$B, imod1, ifenv, iskip ;asig flooper2 kamp, ksamplespeedratio$B, kloopstart$B, kloopend$B, kcrossfade$B, itable6$B , istart$B, imod1, ifenv, iskip ;asig flooper2 kamp, ksamplespeedratio$B, kloopstart$B, kloopend$B, kcrossfade$B, itable7$B , istart$B, imod1, ifenv, iskip ;asig flooper2 kamp, ksamplespeedratio$B, kloopstart$B, kloopend$B, kcrossfade$B, itable8$B , istart$B, imod1, ifenv, iskip goto outtter$B outtter$B: # |