|
What would be a good method to generate an 8 bit type sound in Csound? Would downsamp be a good approach? I am wanting to make some sounds similar to older video games and similar to this work:
http://kindofbloop.com/
|
|
I suppose it's bit depth you want to downgrade rather than sampling rate. Try this UDO http://www.csounds.com/udo/displayOpcode.php?opcode_id=73
Best, Peiman On 21 February 2012 02:34, Roger Kelly <[hidden email]> wrote: What would be a good method to generate an 8 bit type sound in Csound? Would downsamp be a good approach? I am wanting to make some sounds similar to older video games and similar to this work: http://kindofbloop.com/ |
|
Actually, it would be a little bit of both.
"8bit" sound is really more about using simple triangle/squre/sine/noise waveforms and fast arpeggiation in a limited number of channels. Also, the pwm on the square waves is what allows for some of the sound as well. Any regular PCM samples used were usually 8 bit 11025 or 22050 hz, but not all of those old chips even did that.
A lot of the Atari sounds relied on heavily decimated waveshaping.
On Mon, Feb 20, 2012 at 6:55 PM, peiman khosravi <[hidden email]> wrote: I suppose it's bit depth you want to downgrade rather than sampling rate. Try this UDO http://www.csounds.com/udo/displayOpcode.php?opcode_id=73 |
|
In reply to this post by Roger Kelly-2
I hope that this can inspire you.
The one-line C code, for example http://www.youtube.com/watch?v=GtQdIYUtAHg http://www.youtube.com/watch?v=qlrs2Vorw2Y is fascinating. We can use csound to easily explore these 8-bit patterns, with the possibility to turn them into sounds of high quality. I have added only anti-alias and dcblock filter. The `kt' variable is increased every k-cycle (8kHz in the example) and replaces the `t' variable used in the original C code. The `av' variable contains the previous value of the pattern and allows us to design recursive patterns. Premise: no problems if you have Csound5.16, otherwise you have to use the old parser with the following example (add the `--old-parser' option). csound --omacro:PAT='kt*((kt>>12|kt>>8)&63&kt>>4)' bytesong.csd # by viznut Here is some example using csound from the shell: # first we create an alias for our csound command function bytesong () { csound --omacro:PAT=$1 bytesong.csd; } # don't forget '...' otherwise the shell interprets '<< >> & *' etc.. bytesong '(kt*(kt>>5|kt>>8))>>(kt>>16)' # by tejeez bytesong 'kt*((kt>>9|kt>>13)&25&kt>>6)' # by visy bytesong 'kt*(kt>>11&kt>>8&123&kt>>3)' # by tejeez bytesong 'kt*(kt>>((kt>>9|kt>>8))&63&kt>>4)' # by visy bytesong '(kt>>6|kt|kt>>(kt>>16))*10+((kt>>11)&7)' # by viznut bytesong '(av>>1)+(av>>4)+kt*(((kt>>16)|(kt>>6))&(69&(kt>>9)))' # by pyryp bytesong 'kt*5&(kt>>7)|kt*3&(kt*4>>10)' # by miiro bytesong '(kt>>7|kt|kt>>6)*10+4*(kt&kt>>13|kt>>6)' # by viznut # by tejeez # (this pattern works only with the new parser in 5.16) bytesong '((-kt&4095)*(255*kt*(kt&kt>>13))>>12)+(127&kt*(234&kt>>8&kt>>3)>>(3&kt>>14))' # game over unset -f bytesong ;; bytesong.csd <CsoundSynthesizer> <CsOptions> ;--old-parser -m0 -odac </CsOptions> <CsInstruments> sr = 48000 ksmps = 6 ; kr = 8kHz nchnls = 1 #define T #0# #define V #0# ;; pattern discovered by viznut ;#define PAT #kt*((kt>>12|kt>>8)&63&kt>>4)# instr 1 kt init $T av init $V av = ($PAT) & 255 asrc = av << 7 aflt butlp asrc, 3500 aout dcblock aflt kt = kt+1 out aout*0.7 endin </CsInstruments> <CsScore> i1 0 36000 </CsScore> </CsoundSynthesizer> tito On Mon, Feb 20, 2012 at 08:34:07PM -0600, Roger Kelly wrote: > What would be a good method to generate an 8 bit type sound in Csound? > Would downsamp be a good approach? I am wanting to make some sounds > similar to older video games and similar to this work: > http://kindofbloop.com/ 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 [hidden email] with body "unsubscribe csound" |
|
Fantastic.
Oeyvind ________________________________________ Fra: Tito Latini [[hidden email]] Sendt: 21. februar 2012 09:46 Til: [hidden email] Emne: Re: [Csnd] 8-bit sound advice. I hope that this can inspire you. The one-line C code, for example http://www.youtube.com/watch?v=GtQdIYUtAHg http://www.youtube.com/watch?v=qlrs2Vorw2Y is fascinating. We can use csound to easily explore these 8-bit patterns, with the possibility to turn them into sounds of high quality. I have added only anti-alias and dcblock filter. The `kt' variable is increased every k-cycle (8kHz in the example) and replaces the `t' variable used in the original C code. The `av' variable contains the previous value of the pattern and allows us to design recursive patterns. Premise: no problems if you have Csound5.16, otherwise you have to use the old parser with the following example (add the `--old-parser' option). csound --omacro:PAT='kt*((kt>>12|kt>>8)&63&kt>>4)' bytesong.csd # by viznut Here is some example using csound from the shell: # first we create an alias for our csound command function bytesong () { csound --omacro:PAT=$1 bytesong.csd; } # don't forget '...' otherwise the shell interprets '<< >> & *' etc.. bytesong '(kt*(kt>>5|kt>>8))>>(kt>>16)' # by tejeez bytesong 'kt*((kt>>9|kt>>13)&25&kt>>6)' # by visy bytesong 'kt*(kt>>11&kt>>8&123&kt>>3)' # by tejeez bytesong 'kt*(kt>>((kt>>9|kt>>8))&63&kt>>4)' # by visy bytesong '(kt>>6|kt|kt>>(kt>>16))*10+((kt>>11)&7)' # by viznut bytesong '(av>>1)+(av>>4)+kt*(((kt>>16)|(kt>>6))&(69&(kt>>9)))' # by pyryp bytesong 'kt*5&(kt>>7)|kt*3&(kt*4>>10)' # by miiro bytesong '(kt>>7|kt|kt>>6)*10+4*(kt&kt>>13|kt>>6)' # by viznut # by tejeez # (this pattern works only with the new parser in 5.16) bytesong '((-kt&4095)*(255*kt*(kt&kt>>13))>>12)+(127&kt*(234&kt>>8&kt>>3)>>(3&kt>>14))' # game over unset -f bytesong ;; bytesong.csd <CsoundSynthesizer> <CsOptions> ;--old-parser -m0 -odac </CsOptions> <CsInstruments> sr = 48000 ksmps = 6 ; kr = 8kHz nchnls = 1 #define T #0# #define V #0# ;; pattern discovered by viznut ;#define PAT #kt*((kt>>12|kt>>8)&63&kt>>4)# instr 1 kt init $T av init $V av = ($PAT) & 255 asrc = av << 7 aflt butlp asrc, 3500 aout dcblock aflt kt = kt+1 out aout*0.7 endin </CsInstruments> <CsScore> i1 0 36000 </CsScore> </CsoundSynthesizer> tito On Mon, Feb 20, 2012 at 08:34:07PM -0600, Roger Kelly wrote: > What would be a good method to generate an 8 bit type sound in Csound? > Would downsamp be a good approach? I am wanting to make some sounds > similar to older video games and similar to this work: > http://kindofbloop.com/ 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 [hidden email] 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 [hidden email] with body "unsubscribe csound" |
|
In reply to this post by Tito Latini
Brilliant!
Richard |
|
In reply to this post by Tito Latini
Great sounds! Thanks for sharing!
Am 21.02.12 09:46, schrieb Tito Latini: > I hope that this can inspire you. > The one-line C code, for example > > http://www.youtube.com/watch?v=GtQdIYUtAHg > http://www.youtube.com/watch?v=qlrs2Vorw2Y > > is fascinating. We can use csound to easily explore these 8-bit patterns, > with the possibility to turn them into sounds of high quality. I have > added only anti-alias and dcblock filter. > > The `kt' variable is increased every k-cycle (8kHz in the example) > and replaces the `t' variable used in the original C code. > The `av' variable contains the previous value of the pattern and > allows us to design recursive patterns. > > Premise: no problems if you have Csound5.16, otherwise you have to use > the old parser with the following example (add the `--old-parser' option). > > csound --omacro:PAT='kt*((kt>>12|kt>>8)&63&kt>>4)' bytesong.csd # by viznut > > Here is some example using csound from the shell: > > # first we create an alias for our csound command > function bytesong () { csound --omacro:PAT=$1 bytesong.csd; } > > # don't forget '...' otherwise the shell interprets '<< >> & *' etc.. > > bytesong '(kt*(kt>>5|kt>>8))>>(kt>>16)' # by tejeez > > bytesong 'kt*((kt>>9|kt>>13)&25&kt>>6)' # by visy > > bytesong 'kt*(kt>>11&kt>>8&123&kt>>3)' # by tejeez > > bytesong 'kt*(kt>>((kt>>9|kt>>8))&63&kt>>4)' # by visy > > bytesong '(kt>>6|kt|kt>>(kt>>16))*10+((kt>>11)&7)' # by viznut > > bytesong '(av>>1)+(av>>4)+kt*(((kt>>16)|(kt>>6))&(69&(kt>>9)))' # by pyryp > > bytesong 'kt*5&(kt>>7)|kt*3&(kt*4>>10)' # by miiro > > bytesong '(kt>>7|kt|kt>>6)*10+4*(kt&kt>>13|kt>>6)' # by viznut > > # by tejeez > # (this pattern works only with the new parser in 5.16) > bytesong '((-kt&4095)*(255*kt*(kt&kt>>13))>>12)+(127&kt*(234&kt>>8&kt>>3)>>(3&kt>>14))' > > # game over > unset -f bytesong > > ;; bytesong.csd > <CsoundSynthesizer> > <CsOptions> > ;--old-parser > -m0 -odac > </CsOptions> > <CsInstruments> > sr = 48000 > ksmps = 6 ; kr = 8kHz > nchnls = 1 > > #define T #0# > #define V #0# > > ;; pattern discovered by viznut > ;#define PAT #kt*((kt>>12|kt>>8)&63&kt>>4)# > > instr 1 > kt init $T > av init $V > av = ($PAT)& 255 > asrc = av<< 7 > aflt butlp asrc, 3500 > aout dcblock aflt > kt = kt+1 > out aout*0.7 > endin > </CsInstruments> > <CsScore> > i1 0 36000 > </CsScore> > </CsoundSynthesizer> > > tito > > On Mon, Feb 20, 2012 at 08:34:07PM -0600, Roger Kelly wrote: >> What would be a good method to generate an 8 bit type sound in Csound? >> Would downsamp be a good approach? I am wanting to make some sounds >> similar to older video games and similar to this work: >> http://kindofbloop.com/ > > 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 [hidden email] with body "unsubscribe csound" > > -- -- http://luisantunespena.eu 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 [hidden email] with body "unsubscribe csound" |
|
I'm at the lab as we speak, and one of my students immediately caught
fire on this idea. Thanks 2012/2/21 luis antunes pena <[hidden email]>: > Great sounds! Thanks for sharing! > > Am 21.02.12 09:46, schrieb Tito Latini: >> >> I hope that this can inspire you. >> The one-line C code, for example >> >> http://www.youtube.com/watch?v=GtQdIYUtAHg >> http://www.youtube.com/watch?v=qlrs2Vorw2Y >> >> is fascinating. We can use csound to easily explore these 8-bit patterns, >> with the possibility to turn them into sounds of high quality. I have >> added only anti-alias and dcblock filter. >> >> The `kt' variable is increased every k-cycle (8kHz in the example) >> and replaces the `t' variable used in the original C code. >> The `av' variable contains the previous value of the pattern and >> allows us to design recursive patterns. >> >> Premise: no problems if you have Csound5.16, otherwise you have to use >> the old parser with the following example (add the `--old-parser' option). >> >> csound --omacro:PAT='kt*((kt>>12|kt>>8)&63&kt>>4)' bytesong.csd # by >> viznut >> >> Here is some example using csound from the shell: >> >> # first we create an alias for our csound command >> function bytesong () { csound --omacro:PAT=$1 bytesong.csd; } >> >> # don't forget '...' otherwise the shell interprets '<< >> & *' etc.. >> >> bytesong '(kt*(kt>>5|kt>>8))>>(kt>>16)' # by >> tejeez >> >> bytesong 'kt*((kt>>9|kt>>13)&25&kt>>6)' # by visy >> >> bytesong 'kt*(kt>>11&kt>>8&123&kt>>3)' # by >> tejeez >> >> bytesong 'kt*(kt>>((kt>>9|kt>>8))&63&kt>>4)' # by visy >> >> bytesong '(kt>>6|kt|kt>>(kt>>16))*10+((kt>>11)&7)' # by >> viznut >> >> bytesong '(av>>1)+(av>>4)+kt*(((kt>>16)|(kt>>6))&(69&(kt>>9)))' # by >> pyryp >> >> bytesong 'kt*5&(kt>>7)|kt*3&(kt*4>>10)' # by >> miiro >> >> bytesong '(kt>>7|kt|kt>>6)*10+4*(kt&kt>>13|kt>>6)' # by >> viznut >> >> # by tejeez >> # (this pattern works only with the new parser in 5.16) >> bytesong >> '((-kt&4095)*(255*kt*(kt&kt>>13))>>12)+(127&kt*(234&kt>>8&kt>>3)>>(3&kt>>14))' >> >> # game over >> unset -f bytesong >> >> ;; bytesong.csd >> <CsoundSynthesizer> >> <CsOptions> >> ;--old-parser >> -m0 -odac >> </CsOptions> >> <CsInstruments> >> sr = 48000 >> ksmps = 6 ; kr = 8kHz >> nchnls = 1 >> >> #define T #0# >> #define V #0# >> >> ;; pattern discovered by viznut >> ;#define PAT #kt*((kt>>12|kt>>8)&63&kt>>4)# >> >> instr 1 >> kt init $T >> av init $V >> av = ($PAT)& 255 >> >> asrc = av<< 7 >> aflt butlp asrc, 3500 >> aout dcblock aflt >> kt = kt+1 >> out aout*0.7 >> endin >> </CsInstruments> >> <CsScore> >> i1 0 36000 >> </CsScore> >> </CsoundSynthesizer> >> >> tito >> >> On Mon, Feb 20, 2012 at 08:34:07PM -0600, Roger Kelly wrote: >>> >>> What would be a good method to generate an 8 bit type sound in Csound? >>> Would downsamp be a good approach? I am wanting to make some sounds >>> similar to older video games and similar to this work: >>> http://kindofbloop.com/ >> >> >> 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 [hidden email] with body "unsubscribe >> csound" >> >> > > > -- > -- > http://luisantunespena.eu > > > > > 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 [hidden email] with body "unsubscribe > csound" > -- Oeyvind Brandtsegg Professor of Music Technology NTNU 7491 Trondheim Norway Cell: +47 92 203 205 http://flyndresang.no/ http://www.partikkelaudio.com/ http://soundcloud.com/brandtsegg http://soundcloud.com/t-emp 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 [hidden email] with body "unsubscribe csound" |
|
I've also had reasonable results just using a low resolution sample table. Like using oscil or vco, but having a super small square wave table (8 values).
I can forward a CSD when I get home if there is any interest. Aidan Sent from my iPhone On Feb 21, 2012, at 5:06 AM, Oeyvind Brandtsegg <[hidden email]> wrote: > I'm at the lab as we speak, and one of my students immediately caught > fire on this idea. > Thanks > > 2012/2/21 luis antunes pena <[hidden email]>: >> Great sounds! Thanks for sharing! >> >> Am 21.02.12 09:46, schrieb Tito Latini: >>> >>> I hope that this can inspire you. >>> The one-line C code, for example >>> >>> http://www.youtube.com/watch?v=GtQdIYUtAHg >>> http://www.youtube.com/watch?v=qlrs2Vorw2Y >>> >>> is fascinating. We can use csound to easily explore these 8-bit patterns, >>> with the possibility to turn them into sounds of high quality. I have >>> added only anti-alias and dcblock filter. >>> >>> The `kt' variable is increased every k-cycle (8kHz in the example) >>> and replaces the `t' variable used in the original C code. >>> The `av' variable contains the previous value of the pattern and >>> allows us to design recursive patterns. >>> >>> Premise: no problems if you have Csound5.16, otherwise you have to use >>> the old parser with the following example (add the `--old-parser' option). >>> >>> csound --omacro:PAT='kt*((kt>>12|kt>>8)&63&kt>>4)' bytesong.csd # by >>> viznut >>> >>> Here is some example using csound from the shell: >>> >>> # first we create an alias for our csound command >>> function bytesong () { csound --omacro:PAT=$1 bytesong.csd; } >>> >>> # don't forget '...' otherwise the shell interprets '<< >> & *' etc.. >>> >>> bytesong '(kt*(kt>>5|kt>>8))>>(kt>>16)' # by >>> tejeez >>> >>> bytesong 'kt*((kt>>9|kt>>13)&25&kt>>6)' # by visy >>> >>> bytesong 'kt*(kt>>11&kt>>8&123&kt>>3)' # by >>> tejeez >>> >>> bytesong 'kt*(kt>>((kt>>9|kt>>8))&63&kt>>4)' # by visy >>> >>> bytesong '(kt>>6|kt|kt>>(kt>>16))*10+((kt>>11)&7)' # by >>> viznut >>> >>> bytesong '(av>>1)+(av>>4)+kt*(((kt>>16)|(kt>>6))&(69&(kt>>9)))' # by >>> pyryp >>> >>> bytesong 'kt*5&(kt>>7)|kt*3&(kt*4>>10)' # by >>> miiro >>> >>> bytesong '(kt>>7|kt|kt>>6)*10+4*(kt&kt>>13|kt>>6)' # by >>> viznut >>> >>> # by tejeez >>> # (this pattern works only with the new parser in 5.16) >>> bytesong >>> '((-kt&4095)*(255*kt*(kt&kt>>13))>>12)+(127&kt*(234&kt>>8&kt>>3)>>(3&kt>>14))' >>> >>> # game over >>> unset -f bytesong >>> >>> ;; bytesong.csd >>> <CsoundSynthesizer> >>> <CsOptions> >>> ;--old-parser >>> -m0 -odac >>> </CsOptions> >>> <CsInstruments> >>> sr = 48000 >>> ksmps = 6 ; kr = 8kHz >>> nchnls = 1 >>> >>> #define T #0# >>> #define V #0# >>> >>> ;; pattern discovered by viznut >>> ;#define PAT #kt*((kt>>12|kt>>8)&63&kt>>4)# >>> >>> instr 1 >>> kt init $T >>> av init $V >>> av = ($PAT)& 255 >>> >>> asrc = av<< 7 >>> aflt butlp asrc, 3500 >>> aout dcblock aflt >>> kt = kt+1 >>> out aout*0.7 >>> endin >>> </CsInstruments> >>> <CsScore> >>> i1 0 36000 >>> </CsScore> >>> </CsoundSynthesizer> >>> >>> tito >>> >>> On Mon, Feb 20, 2012 at 08:34:07PM -0600, Roger Kelly wrote: >>>> >>>> What would be a good method to generate an 8 bit type sound in Csound? >>>> Would downsamp be a good approach? I am wanting to make some sounds >>>> similar to older video games and similar to this work: >>>> http://kindofbloop.com/ >>> >>> >>> 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 [hidden email] with body "unsubscribe >>> csound" >>> >>> >> >> >> -- >> -- >> http://luisantunespena.eu >> >> >> >> >> 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 [hidden email] with body "unsubscribe >> csound" >> > > > > -- > > Oeyvind Brandtsegg > Professor of Music Technology > NTNU > 7491 Trondheim > Norway > Cell: +47 92 203 205 > > http://flyndresang.no/ > http://www.partikkelaudio.com/ > http://soundcloud.com/brandtsegg > http://soundcloud.com/t-emp > > > 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 [hidden email] 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 [hidden email] with body "unsubscribe csound" |
|
Reducing the size of ftables is fun.
<CsoundSynthesizer> <CsOptions> -odac </CsOptions> <CsInstruments> sr = 44100 instr 1 aenv oscil p4, p5, p6 kfreq oscil 1, p5/ ftlen(p7), p7 aout oscil aenv, cpspch(kfreq+p8), p9 out aout endin </CsInstruments> <CsScore> f1 0 128 10 1 .5 .25 .17 .08 f6 0 128 10 1 0 [1/3] 0 [1/7] f2 0 16 5 0.01 100 1 924 0.01 f5 0 16 5 0.01 200 1 306 0.01 306 1 200 0.001 f3 0 8 -2 0.00 -100 0.05 0.07 -100 0.00 0.09 0.02 f4 0 8 -2 -100 0.05 0.07 -100 0.05 -100 0.09 -100 f7 0 8 -2 -100 1 -100 1 -100 1 -100 1 ;p1 p2 p3 p4 p5 p6 p7 p8 p9 i1 0 32 10000 4 2 3 7 1 i1 8 24 10000 2 2 4 8 1 i1 16 16 10000 4 2 3 6 6 i1 32 8 10000 8 2 6 8 1 i1 34.5 8 10000 8 2 6 8 1 i1 36 8 10000 12 2 7 9 1 i1 40 20 10000 4 2 7 8 1 i1 42 8 10000 12 2 6 9 1 i1 40 20 10000 4 2 3 7 1 i1 44 16 10000 4 2 3 6 6 i1 48 12 10000 2 2 4 8 1 i1 52 12 10000 16 2 1 6 6 </CsScore> </CsoundSynthesizer> On 21 February 2012 20:18, Aidan Collins <[hidden email]> wrote: > I've also had reasonable results just using a low resolution sample table. Like using oscil or vco, but having a super small square wave table (8 values). > > I can forward a CSD when I get home if there is any interest. > > Aidan > > Sent from my iPhone > > On Feb 21, 2012, at 5:06 AM, Oeyvind Brandtsegg <[hidden email]> wrote: > >> I'm at the lab as we speak, and one of my students immediately caught >> fire on this idea. >> Thanks >> >> 2012/2/21 luis antunes pena <[hidden email]>: >>> Great sounds! Thanks for sharing! >>> >>> Am 21.02.12 09:46, schrieb Tito Latini: >>>> >>>> I hope that this can inspire you. >>>> The one-line C code, for example >>>> >>>> http://www.youtube.com/watch?v=GtQdIYUtAHg >>>> http://www.youtube.com/watch?v=qlrs2Vorw2Y >>>> >>>> is fascinating. We can use csound to easily explore these 8-bit patterns, >>>> with the possibility to turn them into sounds of high quality. I have >>>> added only anti-alias and dcblock filter. >>>> >>>> The `kt' variable is increased every k-cycle (8kHz in the example) >>>> and replaces the `t' variable used in the original C code. >>>> The `av' variable contains the previous value of the pattern and >>>> allows us to design recursive patterns. >>>> >>>> Premise: no problems if you have Csound5.16, otherwise you have to use >>>> the old parser with the following example (add the `--old-parser' option). >>>> >>>> csound --omacro:PAT='kt*((kt>>12|kt>>8)&63&kt>>4)' bytesong.csd # by >>>> viznut >>>> >>>> Here is some example using csound from the shell: >>>> >>>> # first we create an alias for our csound command >>>> function bytesong () { csound --omacro:PAT=$1 bytesong.csd; } >>>> >>>> # don't forget '...' otherwise the shell interprets '<< >> & *' etc.. >>>> >>>> bytesong '(kt*(kt>>5|kt>>8))>>(kt>>16)' # by >>>> tejeez >>>> >>>> bytesong 'kt*((kt>>9|kt>>13)&25&kt>>6)' # by visy >>>> >>>> bytesong 'kt*(kt>>11&kt>>8&123&kt>>3)' # by >>>> tejeez >>>> >>>> bytesong 'kt*(kt>>((kt>>9|kt>>8))&63&kt>>4)' # by visy >>>> >>>> bytesong '(kt>>6|kt|kt>>(kt>>16))*10+((kt>>11)&7)' # by >>>> viznut >>>> >>>> bytesong '(av>>1)+(av>>4)+kt*(((kt>>16)|(kt>>6))&(69&(kt>>9)))' # by >>>> pyryp >>>> >>>> bytesong 'kt*5&(kt>>7)|kt*3&(kt*4>>10)' # by >>>> miiro >>>> >>>> bytesong '(kt>>7|kt|kt>>6)*10+4*(kt&kt>>13|kt>>6)' # by >>>> viznut >>>> >>>> # by tejeez >>>> # (this pattern works only with the new parser in 5.16) >>>> bytesong >>>> '((-kt&4095)*(255*kt*(kt&kt>>13))>>12)+(127&kt*(234&kt>>8&kt>>3)>>(3&kt>>14))' >>>> >>>> # game over >>>> unset -f bytesong >>>> >>>> ;; bytesong.csd >>>> <CsoundSynthesizer> >>>> <CsOptions> >>>> ;--old-parser >>>> -m0 -odac >>>> </CsOptions> >>>> <CsInstruments> >>>> sr = 48000 >>>> ksmps = 6 ; kr = 8kHz >>>> nchnls = 1 >>>> >>>> #define T #0# >>>> #define V #0# >>>> >>>> ;; pattern discovered by viznut >>>> ;#define PAT #kt*((kt>>12|kt>>8)&63&kt>>4)# >>>> >>>> instr 1 >>>> kt init $T >>>> av init $V >>>> av = ($PAT)& 255 >>>> >>>> asrc = av<< 7 >>>> aflt butlp asrc, 3500 >>>> aout dcblock aflt >>>> kt = kt+1 >>>> out aout*0.7 >>>> endin >>>> </CsInstruments> >>>> <CsScore> >>>> i1 0 36000 >>>> </CsScore> >>>> </CsoundSynthesizer> >>>> >>>> tito >>>> >>>> On Mon, Feb 20, 2012 at 08:34:07PM -0600, Roger Kelly wrote: >>>>> >>>>> What would be a good method to generate an 8 bit type sound in Csound? >>>>> Would downsamp be a good approach? I am wanting to make some sounds >>>>> similar to older video games and similar to this work: >>>>> http://kindofbloop.com/ >>>> >>>> >>>> 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 [hidden email] with body "unsubscribe >>>> csound" >>>> >>>> >>> >>> >>> -- >>> -- >>> http://luisantunespena.eu >>> >>> >>> >>> >>> 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 [hidden email] with body "unsubscribe >>> csound" >>> >> >> >> >> -- >> >> Oeyvind Brandtsegg >> Professor of Music Technology >> NTNU >> 7491 Trondheim >> Norway >> Cell: +47 92 203 205 >> >> http://flyndresang.no/ >> http://www.partikkelaudio.com/ >> http://soundcloud.com/brandtsegg >> http://soundcloud.com/t-emp >> >> >> 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 [hidden email] 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 [hidden email] 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 [hidden email] with body "unsubscribe csound" |
|
Nice!
On Tue, Feb 21, 2012 at 8:54 PM, Rory Walsh <[hidden email]> wrote: > Reducing the size of ftables is fun. > > <CsoundSynthesizer> > <CsOptions> > -odac > </CsOptions> > <CsInstruments> > sr = 44100 > > instr 1 > aenv oscil p4, p5, p6 > kfreq oscil 1, p5/ ftlen(p7), p7 > aout oscil aenv, cpspch(kfreq+p8), p9 > out aout > endin > > </CsInstruments> > <CsScore> > f1 0 128 10 1 .5 .25 .17 .08 > f6 0 128 10 1 0 [1/3] 0 [1/7] > f2 0 16 5 0.01 100 1 924 0.01 > f5 0 16 5 0.01 200 1 306 0.01 306 1 200 0.001 > > f3 0 8 -2 0.00 -100 0.05 0.07 -100 0.00 0.09 0.02 > f4 0 8 -2 -100 0.05 0.07 -100 0.05 -100 0.09 -100 > f7 0 8 -2 -100 1 -100 1 -100 1 -100 1 > > ;p1 p2 p3 p4 p5 p6 p7 p8 p9 > i1 0 32 10000 4 2 3 7 1 > i1 8 24 10000 2 2 4 8 1 > i1 16 16 10000 4 2 3 6 6 > i1 32 8 10000 8 2 6 8 1 > i1 34.5 8 10000 8 2 6 8 1 > i1 36 8 10000 12 2 7 9 1 > i1 40 20 10000 4 2 7 8 1 > i1 42 8 10000 12 2 6 9 1 > i1 40 20 10000 4 2 3 7 1 > i1 44 16 10000 4 2 3 6 6 > i1 48 12 10000 2 2 4 8 1 > i1 52 12 10000 16 2 1 6 6 > > </CsScore> > </CsoundSynthesizer> > > On 21 February 2012 20:18, Aidan Collins <[hidden email]> wrote: >> I've also had reasonable results just using a low resolution sample table. Like using oscil or vco, but having a super small square wave table (8 values). >> >> I can forward a CSD when I get home if there is any interest. >> >> Aidan >> >> Sent from my iPhone >> >> On Feb 21, 2012, at 5:06 AM, Oeyvind Brandtsegg <[hidden email]> wrote: >> >>> I'm at the lab as we speak, and one of my students immediately caught >>> fire on this idea. >>> Thanks >>> >>> 2012/2/21 luis antunes pena <[hidden email]>: >>>> Great sounds! Thanks for sharing! >>>> >>>> Am 21.02.12 09:46, schrieb Tito Latini: >>>>> >>>>> I hope that this can inspire you. >>>>> The one-line C code, for example >>>>> >>>>> http://www.youtube.com/watch?v=GtQdIYUtAHg >>>>> http://www.youtube.com/watch?v=qlrs2Vorw2Y >>>>> >>>>> is fascinating. We can use csound to easily explore these 8-bit patterns, >>>>> with the possibility to turn them into sounds of high quality. I have >>>>> added only anti-alias and dcblock filter. >>>>> >>>>> The `kt' variable is increased every k-cycle (8kHz in the example) >>>>> and replaces the `t' variable used in the original C code. >>>>> The `av' variable contains the previous value of the pattern and >>>>> allows us to design recursive patterns. >>>>> >>>>> Premise: no problems if you have Csound5.16, otherwise you have to use >>>>> the old parser with the following example (add the `--old-parser' option). >>>>> >>>>> csound --omacro:PAT='kt*((kt>>12|kt>>8)&63&kt>>4)' bytesong.csd # by >>>>> viznut >>>>> >>>>> Here is some example using csound from the shell: >>>>> >>>>> # first we create an alias for our csound command >>>>> function bytesong () { csound --omacro:PAT=$1 bytesong.csd; } >>>>> >>>>> # don't forget '...' otherwise the shell interprets '<< >> & *' etc.. >>>>> >>>>> bytesong '(kt*(kt>>5|kt>>8))>>(kt>>16)' # by >>>>> tejeez >>>>> >>>>> bytesong 'kt*((kt>>9|kt>>13)&25&kt>>6)' # by visy >>>>> >>>>> bytesong 'kt*(kt>>11&kt>>8&123&kt>>3)' # by >>>>> tejeez >>>>> >>>>> bytesong 'kt*(kt>>((kt>>9|kt>>8))&63&kt>>4)' # by visy >>>>> >>>>> bytesong '(kt>>6|kt|kt>>(kt>>16))*10+((kt>>11)&7)' # by >>>>> viznut >>>>> >>>>> bytesong '(av>>1)+(av>>4)+kt*(((kt>>16)|(kt>>6))&(69&(kt>>9)))' # by >>>>> pyryp >>>>> >>>>> bytesong 'kt*5&(kt>>7)|kt*3&(kt*4>>10)' # by >>>>> miiro >>>>> >>>>> bytesong '(kt>>7|kt|kt>>6)*10+4*(kt&kt>>13|kt>>6)' # by >>>>> viznut >>>>> >>>>> # by tejeez >>>>> # (this pattern works only with the new parser in 5.16) >>>>> bytesong >>>>> '((-kt&4095)*(255*kt*(kt&kt>>13))>>12)+(127&kt*(234&kt>>8&kt>>3)>>(3&kt>>14))' >>>>> >>>>> # game over >>>>> unset -f bytesong >>>>> >>>>> ;; bytesong.csd >>>>> <CsoundSynthesizer> >>>>> <CsOptions> >>>>> ;--old-parser >>>>> -m0 -odac >>>>> </CsOptions> >>>>> <CsInstruments> >>>>> sr = 48000 >>>>> ksmps = 6 ; kr = 8kHz >>>>> nchnls = 1 >>>>> >>>>> #define T #0# >>>>> #define V #0# >>>>> >>>>> ;; pattern discovered by viznut >>>>> ;#define PAT #kt*((kt>>12|kt>>8)&63&kt>>4)# >>>>> >>>>> instr 1 >>>>> kt init $T >>>>> av init $V >>>>> av = ($PAT)& 255 >>>>> >>>>> asrc = av<< 7 >>>>> aflt butlp asrc, 3500 >>>>> aout dcblock aflt >>>>> kt = kt+1 >>>>> out aout*0.7 >>>>> endin >>>>> </CsInstruments> >>>>> <CsScore> >>>>> i1 0 36000 >>>>> </CsScore> >>>>> </CsoundSynthesizer> >>>>> >>>>> tito >>>>> >>>>> On Mon, Feb 20, 2012 at 08:34:07PM -0600, Roger Kelly wrote: >>>>>> >>>>>> What would be a good method to generate an 8 bit type sound in Csound? >>>>>> Would downsamp be a good approach? I am wanting to make some sounds >>>>>> similar to older video games and similar to this work: >>>>>> http://kindofbloop.com/ >>>>> >>>>> >>>>> 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 [hidden email] with body "unsubscribe >>>>> csound" >>>>> >>>>> >>>> >>>> >>>> -- >>>> -- >>>> http://luisantunespena.eu >>>> >>>> >>>> >>>> >>>> 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 [hidden email] with body "unsubscribe >>>> csound" >>>> >>> >>> >>> >>> -- >>> >>> Oeyvind Brandtsegg >>> Professor of Music Technology >>> NTNU >>> 7491 Trondheim >>> Norway >>> Cell: +47 92 203 205 >>> >>> http://flyndresang.no/ >>> http://www.partikkelaudio.com/ >>> http://soundcloud.com/brandtsegg >>> http://soundcloud.com/t-emp >>> >>> >>> 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 [hidden email] 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 [hidden email] 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 [hidden email] 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 [hidden email] with body "unsubscribe csound" |
|
In reply to this post by Tito Latini
very cool, tito. i think it will take my summer holidays to study this
line of code =) joachim Am 21.02.2012 09:46, schrieb Tito Latini: > I hope that this can inspire you. > The one-line C code, for example > > http://www.youtube.com/watch?v=GtQdIYUtAHg > http://www.youtube.com/watch?v=qlrs2Vorw2Y > > is fascinating. We can use csound to easily explore these 8-bit patterns, > with the possibility to turn them into sounds of high quality. I have > added only anti-alias and dcblock filter. > > The `kt' variable is increased every k-cycle (8kHz in the example) > and replaces the `t' variable used in the original C code. > The `av' variable contains the previous value of the pattern and > allows us to design recursive patterns. > > Premise: no problems if you have Csound5.16, otherwise you have to use > the old parser with the following example (add the `--old-parser' option). > > csound --omacro:PAT='kt*((kt>>12|kt>>8)&63&kt>>4)' bytesong.csd # by viznut > > Here is some example using csound from the shell: > > # first we create an alias for our csound command > function bytesong () { csound --omacro:PAT=$1 bytesong.csd; } > > # don't forget '...' otherwise the shell interprets '<< >> & *' etc.. > > bytesong '(kt*(kt>>5|kt>>8))>>(kt>>16)' # by tejeez > > bytesong 'kt*((kt>>9|kt>>13)&25&kt>>6)' # by visy > > bytesong 'kt*(kt>>11&kt>>8&123&kt>>3)' # by tejeez > > bytesong 'kt*(kt>>((kt>>9|kt>>8))&63&kt>>4)' # by visy > > bytesong '(kt>>6|kt|kt>>(kt>>16))*10+((kt>>11)&7)' # by viznut > > bytesong '(av>>1)+(av>>4)+kt*(((kt>>16)|(kt>>6))&(69&(kt>>9)))' # by pyryp > > bytesong 'kt*5&(kt>>7)|kt*3&(kt*4>>10)' # by miiro > > bytesong '(kt>>7|kt|kt>>6)*10+4*(kt&kt>>13|kt>>6)' # by viznut > > # by tejeez > # (this pattern works only with the new parser in 5.16) > bytesong '((-kt&4095)*(255*kt*(kt&kt>>13))>>12)+(127&kt*(234&kt>>8&kt>>3)>>(3&kt>>14))' > > # game over > unset -f bytesong > > ;; bytesong.csd > <CsoundSynthesizer> > <CsOptions> > ;--old-parser > -m0 -odac > </CsOptions> > <CsInstruments> > sr = 48000 > ksmps = 6 ; kr = 8kHz > nchnls = 1 > > #define T #0# > #define V #0# > > ;; pattern discovered by viznut > ;#define PAT #kt*((kt>>12|kt>>8)&63&kt>>4)# > > instr 1 > kt init $T > av init $V > av = ($PAT) & 255 > asrc = av << 7 > aflt butlp asrc, 3500 > aout dcblock aflt > kt = kt+1 > out aout*0.7 > endin > </CsInstruments> > <CsScore> > i1 0 36000 > </CsScore> > </CsoundSynthesizer> > > tito > > On Mon, Feb 20, 2012 at 08:34:07PM -0600, Roger Kelly wrote: >> What would be a good method to generate an 8 bit type sound in Csound? >> Would downsamp be a good approach? I am wanting to make some sounds >> similar to older video games and similar to this work: >> http://kindofbloop.com/ > > > 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 [hidden email] 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 [hidden email] with body "unsubscribe csound" |
|
In reply to this post by Tito Latini
Hi Tito,
This is fantastic! Would you be OK if I include it in the examples for CsoundQt? (I'm thinking this can be a great example for the python API, where you can easily execute any of the lines) Cheers, Andrés On Tue, Feb 21, 2012 at 8:46 AM, Tito Latini <[hidden email]> wrote: > I hope that this can inspire you. > The one-line C code, for example > > http://www.youtube.com/watch?v=GtQdIYUtAHg > http://www.youtube.com/watch?v=qlrs2Vorw2Y > > is fascinating. We can use csound to easily explore these 8-bit patterns, > with the possibility to turn them into sounds of high quality. I have > added only anti-alias and dcblock filter. > > The `kt' variable is increased every k-cycle (8kHz in the example) > and replaces the `t' variable used in the original C code. > The `av' variable contains the previous value of the pattern and > allows us to design recursive patterns. > > Premise: no problems if you have Csound5.16, otherwise you have to use > the old parser with the following example (add the `--old-parser' option). > > csound --omacro:PAT='kt*((kt>>12|kt>>8)&63&kt>>4)' bytesong.csd # by viznut > > Here is some example using csound from the shell: > > # first we create an alias for our csound command > function bytesong () { csound --omacro:PAT=$1 bytesong.csd; } > > # don't forget '...' otherwise the shell interprets '<< >> & *' etc.. > > bytesong '(kt*(kt>>5|kt>>8))>>(kt>>16)' # by tejeez > > bytesong 'kt*((kt>>9|kt>>13)&25&kt>>6)' # by visy > > bytesong 'kt*(kt>>11&kt>>8&123&kt>>3)' # by tejeez > > bytesong 'kt*(kt>>((kt>>9|kt>>8))&63&kt>>4)' # by visy > > bytesong '(kt>>6|kt|kt>>(kt>>16))*10+((kt>>11)&7)' # by viznut > > bytesong '(av>>1)+(av>>4)+kt*(((kt>>16)|(kt>>6))&(69&(kt>>9)))' # by pyryp > > bytesong 'kt*5&(kt>>7)|kt*3&(kt*4>>10)' # by miiro > > bytesong '(kt>>7|kt|kt>>6)*10+4*(kt&kt>>13|kt>>6)' # by viznut > > # by tejeez > # (this pattern works only with the new parser in 5.16) > bytesong '((-kt&4095)*(255*kt*(kt&kt>>13))>>12)+(127&kt*(234&kt>>8&kt>>3)>>(3&kt>>14))' > > # game over > unset -f bytesong > > ;; bytesong.csd > <CsoundSynthesizer> > <CsOptions> > ;--old-parser > -m0 -odac > </CsOptions> > <CsInstruments> > sr = 48000 > ksmps = 6 ; kr = 8kHz > nchnls = 1 > > #define T #0# > #define V #0# > > ;; pattern discovered by viznut > ;#define PAT #kt*((kt>>12|kt>>8)&63&kt>>4)# > > instr 1 > kt init $T > av init $V > av = ($PAT) & 255 > asrc = av << 7 > aflt butlp asrc, 3500 > aout dcblock aflt > kt = kt+1 > out aout*0.7 > endin > </CsInstruments> > <CsScore> > i1 0 36000 > </CsScore> > </CsoundSynthesizer> > > tito > > On Mon, Feb 20, 2012 at 08:34:07PM -0600, Roger Kelly wrote: >> What would be a good method to generate an 8 bit type sound in Csound? >> Would downsamp be a good approach? I am wanting to make some sounds >> similar to older video games and similar to this work: >> http://kindofbloop.com/ > > > 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 [hidden email] 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 [hidden email] with body "unsubscribe csound" |
|
Of course, it is a pleasure
On Fri, Feb 24, 2012 at 04:09:37PM +0000, Andres Cabrera wrote: > Hi Tito, > > This is fantastic! Would you be OK if I include it in the examples for CsoundQt? > > (I'm thinking this can be a great example for the python API, where > you can easily execute any of the lines) > > Cheers, > Andrés > > On Tue, Feb 21, 2012 at 8:46 AM, Tito Latini <[hidden email]> wrote: > > I hope that this can inspire you. > > The one-line C code, for example > > > > http://www.youtube.com/watch?v=GtQdIYUtAHg > > http://www.youtube.com/watch?v=qlrs2Vorw2Y > > > > is fascinating. We can use csound to easily explore these 8-bit patterns, > > with the possibility to turn them into sounds of high quality. I have > > added only anti-alias and dcblock filter. > > > > The `kt' variable is increased every k-cycle (8kHz in the example) > > and replaces the `t' variable used in the original C code. > > The `av' variable contains the previous value of the pattern and > > allows us to design recursive patterns. > > > > Premise: no problems if you have Csound5.16, otherwise you have to use > > the old parser with the following example (add the `--old-parser' option). > > > > csound --omacro:PAT='kt*((kt>>12|kt>>8)&63&kt>>4)' bytesong.csd # by viznut > > > > Here is some example using csound from the shell: > > > > # first we create an alias for our csound command > > function bytesong () { csound --omacro:PAT=$1 bytesong.csd; } > > > > # don't forget '...' otherwise the shell interprets '<< >> & *' etc.. > > > > bytesong '(kt*(kt>>5|kt>>8))>>(kt>>16)' # by tejeez > > > > bytesong 'kt*((kt>>9|kt>>13)&25&kt>>6)' # by visy > > > > bytesong 'kt*(kt>>11&kt>>8&123&kt>>3)' # by tejeez > > > > bytesong 'kt*(kt>>((kt>>9|kt>>8))&63&kt>>4)' # by visy > > > > bytesong '(kt>>6|kt|kt>>(kt>>16))*10+((kt>>11)&7)' # by viznut > > > > bytesong '(av>>1)+(av>>4)+kt*(((kt>>16)|(kt>>6))&(69&(kt>>9)))' # by pyryp > > > > bytesong 'kt*5&(kt>>7)|kt*3&(kt*4>>10)' # by miiro > > > > bytesong '(kt>>7|kt|kt>>6)*10+4*(kt&kt>>13|kt>>6)' # by viznut > > > > # by tejeez > > # (this pattern works only with the new parser in 5.16) > > bytesong '((-kt&4095)*(255*kt*(kt&kt>>13))>>12)+(127&kt*(234&kt>>8&kt>>3)>>(3&kt>>14))' > > > > # game over > > unset -f bytesong > > > > ;; bytesong.csd > > <CsoundSynthesizer> > > <CsOptions> > > ;--old-parser > > -m0 -odac > > </CsOptions> > > <CsInstruments> > > sr = 48000 > > ksmps = 6 ; kr = 8kHz > > nchnls = 1 > > > > #define T #0# > > #define V #0# > > > > ;; pattern discovered by viznut > > ;#define PAT #kt*((kt>>12|kt>>8)&63&kt>>4)# > > > > instr 1 > > kt init $T > > av init $V > > av = ($PAT) & 255 > > asrc = av << 7 > > aflt butlp asrc, 3500 > > aout dcblock aflt > > kt = kt+1 > > out aout*0.7 > > endin > > </CsInstruments> > > <CsScore> > > i1 0 36000 > > </CsScore> > > </CsoundSynthesizer> > > > > tito > > > > On Mon, Feb 20, 2012 at 08:34:07PM -0600, Roger Kelly wrote: > >> What would be a good method to generate an 8 bit type sound in Csound? > >> Would downsamp be a good approach? I am wanting to make some sounds > >> similar to older video games and similar to this work: > >> http://kindofbloop.com/ > > > > > > 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 [hidden email] 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 [hidden email] 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 [hidden email] with body "unsubscribe csound" |
|
Thanks!
Cheers, Andrés On Fri, Feb 24, 2012 at 4:52 PM, Tito Latini <[hidden email]> wrote: > Of course, it is a pleasure > > On Fri, Feb 24, 2012 at 04:09:37PM +0000, Andres Cabrera wrote: >> Hi Tito, >> >> This is fantastic! Would you be OK if I include it in the examples for CsoundQt? >> >> (I'm thinking this can be a great example for the python API, where >> you can easily execute any of the lines) >> >> Cheers, >> Andrés >> >> On Tue, Feb 21, 2012 at 8:46 AM, Tito Latini <[hidden email]> wrote: >> > I hope that this can inspire you. >> > The one-line C code, for example >> > >> > http://www.youtube.com/watch?v=GtQdIYUtAHg >> > http://www.youtube.com/watch?v=qlrs2Vorw2Y >> > >> > is fascinating. We can use csound to easily explore these 8-bit patterns, >> > with the possibility to turn them into sounds of high quality. I have >> > added only anti-alias and dcblock filter. >> > >> > The `kt' variable is increased every k-cycle (8kHz in the example) >> > and replaces the `t' variable used in the original C code. >> > The `av' variable contains the previous value of the pattern and >> > allows us to design recursive patterns. >> > >> > Premise: no problems if you have Csound5.16, otherwise you have to use >> > the old parser with the following example (add the `--old-parser' option). >> > >> > csound --omacro:PAT='kt*((kt>>12|kt>>8)&63&kt>>4)' bytesong.csd # by viznut >> > >> > Here is some example using csound from the shell: >> > >> > # first we create an alias for our csound command >> > function bytesong () { csound --omacro:PAT=$1 bytesong.csd; } >> > >> > # don't forget '...' otherwise the shell interprets '<< >> & *' etc.. >> > >> > bytesong '(kt*(kt>>5|kt>>8))>>(kt>>16)' # by tejeez >> > >> > bytesong 'kt*((kt>>9|kt>>13)&25&kt>>6)' # by visy >> > >> > bytesong 'kt*(kt>>11&kt>>8&123&kt>>3)' # by tejeez >> > >> > bytesong 'kt*(kt>>((kt>>9|kt>>8))&63&kt>>4)' # by visy >> > >> > bytesong '(kt>>6|kt|kt>>(kt>>16))*10+((kt>>11)&7)' # by viznut >> > >> > bytesong '(av>>1)+(av>>4)+kt*(((kt>>16)|(kt>>6))&(69&(kt>>9)))' # by pyryp >> > >> > bytesong 'kt*5&(kt>>7)|kt*3&(kt*4>>10)' # by miiro >> > >> > bytesong '(kt>>7|kt|kt>>6)*10+4*(kt&kt>>13|kt>>6)' # by viznut >> > >> > # by tejeez >> > # (this pattern works only with the new parser in 5.16) >> > bytesong '((-kt&4095)*(255*kt*(kt&kt>>13))>>12)+(127&kt*(234&kt>>8&kt>>3)>>(3&kt>>14))' >> > >> > # game over >> > unset -f bytesong >> > >> > ;; bytesong.csd >> > <CsoundSynthesizer> >> > <CsOptions> >> > ;--old-parser >> > -m0 -odac >> > </CsOptions> >> > <CsInstruments> >> > sr = 48000 >> > ksmps = 6 ; kr = 8kHz >> > nchnls = 1 >> > >> > #define T #0# >> > #define V #0# >> > >> > ;; pattern discovered by viznut >> > ;#define PAT #kt*((kt>>12|kt>>8)&63&kt>>4)# >> > >> > instr 1 >> > kt init $T >> > av init $V >> > av = ($PAT) & 255 >> > asrc = av << 7 >> > aflt butlp asrc, 3500 >> > aout dcblock aflt >> > kt = kt+1 >> > out aout*0.7 >> > endin >> > </CsInstruments> >> > <CsScore> >> > i1 0 36000 >> > </CsScore> >> > </CsoundSynthesizer> >> > >> > tito >> > >> > On Mon, Feb 20, 2012 at 08:34:07PM -0600, Roger Kelly wrote: >> >> What would be a good method to generate an 8 bit type sound in Csound? >> >> Would downsamp be a good approach? I am wanting to make some sounds >> >> similar to older video games and similar to this work: >> >> http://kindofbloop.com/ >> > >> > >> > 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 [hidden email] 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 [hidden email] 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 [hidden email] 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 [hidden email] with body "unsubscribe csound" |
|
Hi all,
I discover these C-code one-liners back in mid-October, and went nuts for a few days on the idea of exploring the rabbithole of possible variations in the formulas....eventually, life came rushing back and other things diverted me; I was also getting numb to the limitations (or perhaps my ears were numb? :) ) of it after a while, but YMMV :) I did about 70 formulas, a small handful were noteworthy. It was interesting (and difficult) to try and figure out what produced exciting output, and why, but I found no consistent clues! AKJ On Fri, Feb 24, 2012 at 11:30 AM, Andres Cabrera <[hidden email]> wrote: Thanks! Aaron Krister Johnson http://www.akjmusic.com http://www.untwelve.org |
| Powered by Nabble | See how NAML generates this page |
