[Csnd] 8-bit sound advice.
| Date | 2012-02-21 02:34 |
| From | Roger Kelly |
| Subject | [Csnd] 8-bit sound advice. |
| 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/ |
| Date | 2012-02-21 02:55 |
| From | peiman khosravi |
| Subject | Re: [Csnd] 8-bit sound advice. |
| 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 <loraxman@gmail.com> 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/ |
| Date | 2012-02-21 03:17 |
| From | Josh Moore |
| Subject | Re: [Csnd] 8-bit sound advice. |
| 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 <peimankhosravi@gmail.com> 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 |
| Date | 2012-02-21 08:46 |
| From | Tito Latini |
| Subject | Re: [Csnd] 8-bit sound advice. |
| Attachments | None |
| Date | 2012-02-21 09:01 |
| From | Øyvind Brandtsegg |
| Subject | re: [Csnd] 8-bit sound advice. |
Fantastic.
Oeyvind
________________________________________
Fra: Tito Latini [tito.01beta@gmail.com]
Sendt: 21. februar 2012 09:46
Til: csound@lists.bath.ac.uk
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
|
| Date | 2012-02-21 09:33 |
| From | zappfinger |
| Subject | [Csnd] Re: 8-bit sound advice. |
Brilliant! Richard -- View this message in context: http://csound.1045644.n5.nabble.com/8-bit-sound-advice-tp5500924p5501675.html Sent from the Csound - General mailing list archive at Nabble.com. |
| Date | 2012-02-21 09:44 |
| From | luis antunes pena |
| Subject | Re: [Csnd] 8-bit sound advice. |
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
> |
| Date | 2012-02-21 10:06 |
| From | Oeyvind Brandtsegg |
| Subject | Re: [Csnd] 8-bit sound advice. |
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 |
| Date | 2012-02-21 20:18 |
| From | Aidan Collins |
| Subject | Re: [Csnd] 8-bit sound advice. |
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 |
| Date | 2012-02-21 20:54 |
| From | Rory Walsh |
| Subject | Re: [Csnd] 8-bit sound advice. |
Reducing the size of ftables is fun. |
| Date | 2012-02-21 21:13 |
| From | Steven Yi |
| Subject | Re: [Csnd] 8-bit sound advice. |
Nice! On Tue, Feb 21, 2012 at 8:54 PM, Rory Walsh |
| Date | 2012-02-21 22:06 |
| From | joachim heintz |
| Subject | Re: [Csnd] 8-bit sound advice. |
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
> |
| Date | 2012-02-24 16:09 |
| From | Andres Cabrera |
| Subject | Re: [Csnd] 8-bit sound advice. |
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 |
| Date | 2012-02-24 16:52 |
| From | Tito Latini |
| Subject | Re: [Csnd] 8-bit sound advice. |
| Attachments | None |
| Date | 2012-02-24 17:30 |
| From | Andres Cabrera |
| Subject | Re: [Csnd] 8-bit sound advice. |
Thanks! Cheers, Andrés On Fri, Feb 24, 2012 at 4:52 PM, Tito Latini |
| Date | 2012-02-25 15:22 |
| From | Aaron Krister Johnson |
| Subject | Re: [Csnd] 8-bit sound advice. |
| 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 <mantaraya36@gmail.com> wrote: Thanks! Aaron Krister Johnson http://www.akjmusic.com http://www.untwelve.org |