Discovered avr-gcc printf, FU arduino serial println functions. I realize that if I was a serial killer my signature would be mascara because everything I own if. I thought it best that I document how I got printf to work and how I made it thread safe for. H for avr-gcc. The printf function to the hardware serial.
Some time later, I resumed the experimentation with a slightly more scientific mindset. In order to better understand what was going on, I needed a simpler and 'purer' environment. Something that lacked the arbitrary quirks and hidden complexities of 8-bit soundchips and processors. I chose to experiment with short C programs that dump raw PCM audio data. I had written tiny '/dev/dsp softsynths' before, and I had even had one in my email/usenet signature in the late 1990s. However, the programs I would now be experimenting with would be shorter and less planned than my previous ones.
I chose to replicate the essentials of my earlier 8-bit experiments: a wave generator whose pitch is controlled by a function consisting of shifts and logical operators. The simplest waveform for /dev/dsp programs is sawtooth. A simple for(;;)putchar(t) generates a sawtooth wave with a cycle length of 256 bytes, resulting in a frequency of 31.25 Hz when using the the default sample rate of 8000 Hz. The pitch can be changed with multiplication. T.2 is an octave higher, t.3 goes up by 7 semitones from there, t.(t8) produces a rising sound. After a couple of trials, I came up with something that I wanted to share on an IRC channel. In just over an hour, Visy and Tejeez had contributed six more programs on the channel, mostly varying the constants and changing some parts of the function.
On the following day, Visy shared our discoveries on Google+. I reshared them. A surprising flood of interested comments came up. Some people wanted to hear an MP3 rendering, so I produced one.
All these reactions eventually led me to release the MP3 rendering on Youtube with some accompanying text screens. (In case you are wondering, I generated the screens with an old piece of code that simulates a non-existing text mode device, so it's just as 'fakebit' as the sounds are). At some point of time, some people noticed that by getting rid of the t.
part altogether and just applying logical operators on shifted time values one could get percussion patterns as well as some harmonies. Even a formula as simple as t&t8, an aural corollary of 'munching squares', has interesting harmonic properties. Some small features can be made loud by adding a constant to the output. A simple logical operator is enough for combining two good-sounding formulas together (often with interesting artifacts that add to the richness of the sound). All this provided material for the 'second iteration' video. We've had the technology for all this for decades.
People have been building musical circuits that operate on digital logic, creating short pieces of software that output music, experimenting with chaotic audiovisual programs and trying out various algorithms for musical composition. Mathematical theory of music has a history of over two millennia. Based on this, I find it quite mind-boggling that I have never before encountered anything similar to our discoveries despite my very long interest in computing and algorithmic sound synthesis. I've made some Google Scholar searches for related papers but haven't find anything. Still, I'm quite sure that at many individuals have come up with these formulas before, but, for some reason, their discoveries remained in obscurity. Maybe it's just about technological mismatch: to builders of digital musical circuits, things like LFSRs may have been more appealing than very wide sequential counters.
In the early days of the microcomputer, there was already enough RAM available to hold some musical structure, so there was never a real urge to simulate it with simple logic. Or maybe it's about the problems of an avant-garde mindset: if you're someone who likes to experiment with random circuit configurations or strange bit-shifting formulas, you're likely someone who has learned to appreciate the glitch esthetics and never really wants to go far beyond that. The softsynths used in the 4-kilobyte size class are still quite engineered. They often use tight code to simulate the construction of an analog synthesizer controlled by a stored sequence of musical events. However, as 256 bytes is becoming the new 4K, there has been ever more need to play decent music in the 256-byte size class. It is still possible to follow the constructivist approach in this size class - for example, I've coded some simple 128-byte players for the VIC-20 when I had very little memory left.
However, since the recent findings suggest that an approach with a lot of random experimentation may give better results than deterministic hacking, people have been competing in finding more and more impressive musical formulas. Perhaps all this was something that just had to come out of the demoscene and nowhere else. Something I particularly like in this 'movement' is its immediate, hands-on collaborative nature, with people sharing the source code of their findings and basing their own experimentation on other people's efforts. Anyone can participate in it and discover new, mind-boggling stuff, even with very little programming expertise.
I don't know how long this exploration phase is going to last, but things like this might be useful for a ' that advocates hands-on hard-core hacking to greater masses. I definitely want to see more projects like this. Apart from some deterministic efforts that quickly bloat the code up to hundreds of source-code characters, the exploration process so far has been mostly trial-and-error. Some trial-and-error experimenters, however, seem to have been gradually developing an intuitive sense of what kind of formulas can serve as ingredients for something greater.
Perhaps, at some time in the future, someone will release some enlightening mathematical and music-theoretical analysis that will explain why and how our algorithms work. It already seems apparent, however, that stuff like this stuff works in contexts far beyond PCM audio. The earlier 8-bit experiments, such as the C-64 Wallflower, quite blindly write values to sound and video chip registers and still manage to produce interesting output.
Media artist Kyle McDonald has rendered the first bunch of sounds into that show an interesting, 'glitchy' structure. Usually, music looks quite bad when rendered as bitmaps - and this applies even to small chiptunes that sound a lot like our experiments, so it was interesting to notice the visual potential as well. I envision that, in the context of generative audiovisual works, simple bitwise formulas could generate source data not only for the musical output but also drive various visual parameters as a function of time. This would make it possible, for example, for a 256-byte demoscene production to have an interesting and varying audiovisual structure with a strong, inherent synchronization between the effects and the music. As the formulas we've been experimenting with can produce both microstructure and macrostructure, we might assume that they can be used to drive low-level and high-level parameters equally well. From wave amplitudes and pixel colors to layer selection, camera paths, and 3D scene construction. But so far, this is mere speculation, until someone extends the experimentation to these parameters.
Anonymous said. Nice sounds and nice reading. Regarding the theory behind it: this (and particularly the graphics at the bottom) reminds me a lot of wavelets, particularly the dyadic or fast wavelet transforms with very simple wavelets (e.g., the haar wavelet). As to why it produces so nice harmonical and musical structures: if you look at it, musical structure is just kind of 'macro-harmonics'. Play 4 bars of this, then play 4 bars of this, then change to another theme, like the poplar ABAB, AABA structures. It's just a very low frequency square wave:-). Strange though that there has been no scientific research going on there.
Normally scientists go crazy if they find even the smallest topic that hasn't been grinded to death yet. Anonymous said. Adding conditional statements gets pretty interesting. It may be breaking the spirit of the game, as it starts falling very similar to normal music coding, but you can make some pretty coos stuff.
Baseline, melody, snare, volume control. '( ((t.4).(((t11)&1)?1:0).(((t11)&8)?0:1) + (t.2).(((t10)&1)?1:0).(((t10)&128)?0:1) +(t.4).(((t10)&1)?1:0).(((t10)&128)?1:0) + (t.sin(t).(((t10)&4)?1:0).(((t10)&1)?1:0)))% 256). (7/10)' The URL is pretty long tho: CC123. The visual rendering of the audio patterns reminds me of two things that may be of interest from an algorithm perspective. Uses a single Hilbert Curve to compress the entire Internet IP allocation space into a single diagram. Imagine if you used a 256 byte algorithm to produce a Hilbert curve graphic, and then played it as audio. Or multiple overlapping curve trails, playing the image in a continuous loop as the ants (over)write new trails onto the audio-graphic.
Uses something called 'Treemaps' to represent the hierarchical space usage of a hard drive full of information as a simple, human-understandable graph. On most of my hard drives, the result resembles very strongly like the black-and-white graphic above. So perhaps it would be possible to feed a generic treemap algorithm a list of simple inputs and have it produce an audio-graphic for playback use as well. Thanks for writing this up, much appreciated. I've created an Arduino sketch that plays these algorithmic compositions through the PWM port. Get it from here: Upload it to your Arduino and connect an amplifier to pin 11 (PWM output). Look in the source code for details of how it works.
I've added the algorithms from the two videos on your site, plus a couple of my own. You can even add some pots and switches and read them in the main loop function, and make your algorithms tweakable!
Very neat post, I am pretty interested in algorithmically generated music as well. I recently read an article on fractal music: It talks about how music that is generated using properties of fractals creates music that is pleasing to people. I think this article gives a good framework/criteria for the types of functions that will create 'good' music. Namely, functions that create 1/f noise as opposed to white noise. Hope you find the article interesting and thanks for sharing: ). Anonymous said. Such a total time waste!
That said, i just wanted to add my experiments. Not really too proud of 'em, as i am humbled by skurk's and miiro's and more than all by Lost in Space which i can literally sleep to.
I was trying to find longer phrases, so i used a lot of divisions, which don't seem to be very common on your examples. Anyway, i liked this experiment: ((t+13217)/1211)&(t2 t4 t6) though it is too silent. I managed to amplify it with: ((t+13217)/1211)&(t2 t4 t6) (t2) (t%256) Then i found this that sounds a little like 'vocalize' exercises: t.((t+13217)/1211)&(t2 t4 t6)/512 Those 13217 and 1211 i seem to have generated by sheer keyboard-bashing.
Much further i got ((t.(t8 t9)&(t/256+45)&t8))^(t&t13 t6) and (t/384)&(t3)+(t/896)&(t5)+(t/1664)&(t7) Then there is this last one i like a lot, specially @32Hz (t.t/256)&( t((t/1024)%16) ) I guess my mind just keeps on classifying all those sounds as parts that could be tied together (in say audacity or something) and that is why i like the unbalanced macro-structures. Anyway, the whole thing seems to hinge upon /dev/audio discarding anything above 8 bits, so that 75% of the t variable (which should default to int which should be 32 bits) never goes anywhere. But on the other hand this kinda sucks because we can't really sum two different formulas. Isn't there a smarter way to do this? I did some experiments with aplay -format but didn't seem promising. After a bit of playing around by some people in the ludum dare IRC, inspired by one of the tunes in the 3rd vid: or for a shorter url: http://bit.ly/o1uCzQ. I' ve played with the genetic programming (GP) algorithm a little and here is an interesing result.
((t.t)((((8.t)&(tt))((11t)&(8 8)))+(((t+8).((((t 11).(t+11))+((t&8)(t+11))).(((118) (t 8))((t8) (11&8)))))+((t11)-(8 11))))) Let it play for some seconds and it produces rhythmical structure. I have also kept some versions of very similar programs (that were highly graded by me during the evolutionary procedure) and were kept with little modifications by GP. (((((8-t) (8+t))&((8 11)(88)))+(((t&t).(t11))-((t 11)+(8.8))))-((((11t)(t+t))((11&11)(t11)))(((8t)-(t+8)).((8+11)-(1111))))) (((((8-t) (8+t))&(11(88)))+(((t&t).(t11))-((t 11)+(8.8))))-((((11t)(t+t))((11&11)(t11)))(((8t)-(t+8)).((8+11)-(1111))))) (((((8-t) (8+t))&11)+(((t&t).(t11))-((t 11)+(11.8))))-((((11t)(t+t))((11&11)(t11)))(((8t)-(t+8)).((8+11)-(1111))))) Notice also that there are some not necessary operations like (1111). I will try to make the algorithm get rid of those automatically.
There were some old implementations of BASIC with the BEEP (or other related) command that could create sounds close to this back in the day of 8 computers. One in particular HP 85 Hewlett Packard Computer which I experimented with - the computer was in a analytical chemistry laboratory and was supposed to be used to collect gas chromatography data. The lab even had a tape with VisiCalc on it (the original PC spreadsheet program). The sounds were not one liners though - they were generated as loops in BASIC. So, since BASIC isn't as space efficient as C it was more or less equivalent. Quite fun to play around with:) I used the js player to find a few, and actually IMO quite good ones. First off, 44.1 kHz: t.
((t3 t4)&79&t14) +3.(8/t)&t6 Playing around with the above, I eventually got a quite dramatic piece: t. ((t3&t4).sin(79)-(t43/362)&t14) +3 (t8) t9 sounds kinda like 'sneak music' from some movie:) For 8kHz: A little kinda lulzy melody. Best enjoyed using a 60 sec duration t.(t42 t12) Last one for now is one containing an assortment of videogame-like sounds. T.(t11&t6)/(t1&t6) A few of them were dumb luck, I admit, but after I found out more about how it worked, I was able to make something:). Perhaps the just reason why these types of teenagers hotel to online pay day loans is principally since they generate much less but are very driven to take pleasure from stuff various other teenagers using increased earnings include. An additional acceptable reason can be that these teenagers are nevertheless from that will get older if they are having their 1st taste of freedom and therefore are nonetheless wanton within where did they commit their salary.
They're whoever has the particular trend to splurge about the most current artist clothes, dedicate to the newest tools, obtain the trendiest autos as well as apartments as well as commit the most of what exactly they generate going to watering holes as well as other cultural areas. Before they learn that, they've already maxed on their credit cards along with should count on the particular mercy of cash advance loan providers to present them a primary lender cash advance to purchase rent along with ammenities. Frequently within the existence you need to encounter a few difficulties and people difficulties could be associated with something actually, that may be associated with economic crisis. When you are via any kind of financial crunches that point you'll need cash really urgently however in those days you cannot obtain which the help of all of your member of the family as well as your near family member.
If you find financial difficulty that point just that individual may realize that scenario which exactly how trouble scenario they're dealing with therefore terribly too. Throughout the second you cannot actually realize what you need to precisely perform or even exactly what not really as well as exactly how encounter which severe scenario that you experienced. However anyway you need to overcome through which hard scenario and thus; you'll need cash in order to manage your own home as well as every thing. The total amount availed may be used through the person within readily within the satisfaction of the numerous requirements such as paying down their house lease, purchasing brand new points, food expenses, college or even college tuition costs, debt consolidation reduction, unexpected fixing from the cars and so forth. Hello Everybody, My name is Mrs Sharon Sim. I live in singapore and i am a happy woman today? And i told my self that any lender that rescue my family from our poor situation, i will refer any person that is looking for loan to him, he gave me happiness to me and my family, i was in need of a loan of S$250,000.00 to start my life all over as i am a single mother with 3 kids I met this honest and GOD fearing man loan lender that help me with a loan of S$250,000.00 SG.
Dollar, he is a GOD fearing man, if you are in need of loan and you will pay back the loan please contact him tell him that is Mrs Sharon, that refer you to him. Contact Dr Purva Pius,via email:([email protected]) +51 Thank you.
Here is a code for some coolmusic followed by cool sound effects, then more music. Sound effects. After I paste in that code, I Ll paste in another musical one, which involves quarter tones. You Ll need to shuck off your western music brain for this one. The sound effects are shrill at first so turn your volume down. R=6, t%(((t%254)11)-c&(t15)+c&(t12)-c (t15)&t10).5 Now here is the musical one, which my band, Blind Labyrinth, are using in an electroacoustic piece. R=3, t%((t10)-c&(t14)+c&(t11)-c (t18)).2r=3, t%((t10)-c&(t14)+c&(t11)-c (t18)).2.
Anonymous said. Made a really good complicated one that turned out to have multiple 'movements,' but i made it on the wurstcaptures online machine and saved the resulting wav, but i neglected to record the source formula:( is there any way to analyze a piece of music and sort of 'decompile' it back into an algorithm?
On Jul 11, 5:22 pm, 'Lucas J. crossposts trimmed Malcolm McLean said: 'Lucas J. Riesau' Can you help me to kill a few more people by giving me some advice??? I need some extremly deadly C programs. Some routines that could instantly kill people.
Please help!!! A method for factoring large prime numbers. Bill Gates is already working on that, and he can throw a lot more resource at the problem than you can.
Richard Heathfield Email: -www. +rjh@ Google users: 'Usenet is a strange place' - dmr 29 July 1999. In article, Malcolm McLean 'Lucas J. Riesau' Can you help me to kill a few more people by giving me some advice???
I need some extremly deadly C programs. A method for factoring large prime numbers. This would compromise national security because anyone could break the RSA cryptosystem. Anyone in possession of the secret would be hunted down by the CIA and killed. Obviously they would make it look like someone else had done it.
So.that's. what happened! I knew Bill wouldn't retire without good reason! Jason Foxtrot must have been getting too close to the secret, so they must have forced Bill to lie low! - 'law - it's a commodity' - Andrew Ryan (The Globe and Mail, 2005/11/26). On 11 Jul, 19:58, 'Malcolm McLean'. On Wed, 11 Jul 2007 19:58:24 +0100, 'Malcolm McLean' 'Lucas J.
Riesau' I'm a serial killer and unlike other killers I don't kill people with guns, knives or chainsaws. I kill people with software. By reading the sourcecode of one of my programs, the victim's brain will overload and shut down.
The cops and CSI teams don't have a clue. But now I'm running out of deadly sourcecodes. Can you help me to kill a few more people by giving me some advice??? I need some extremly deadly C programs.
Some routines that could instantly kill people. Please help!!!
A method for factoring large prime numbers. This would compromise national security because anyone could break the RSA cryptosystem. Anyone in possession of the secret would be hunted down by the CIA and killed. Obviously they would make it look like someone else had done it. A bit too easy. Consider the number of factors for a prime number.
Al Balmer Sun City, AZ. On Jul 12, 1:22 am, 'Lucas J. On Wed, 11 Jul 2007 08:22:43 -0700, Lucas J.
Riesau wrote: I'm a serial killer and unlike other killers I don't kill people with guns, knives or chainsaws. I kill people with software. By reading the sourcecode of one of my programs, the victim's brain will overload and shut down. The cops and CSI teams don't have a clue. But now I'm running out of deadly sourcecodes. Can you help me to kill a few more people by giving me some advice??? I need some extremly deadly C programs.
Some routines that could instantly kill people. Please help!!! On the DS9K, you have several ways to do that, but they are not portable. On PCs they would probably just segfault.
Army1987 (Replace 'NOSPAM' with 'email') 'Never attribute to malice that which can be adequately explained by stupidity.' On Jul 12, 10:29 am, Army1987.
On Jul 11, 1:19 pm, Al Balmer. On Thu, 12 Jul 2007 14:17:38 -0700, user923005 wrote: Right. I can factor a prime number in a heartbeat. It's the ones composed of two very large factors that give me cross-eyed hissy fits. For instance, given: It takes a while to come up with: ^2 I'd bet you did the other way round, didn't you?:-) - Army1987 (Replace 'NOSPAM' with 'email') 'Never attribute to malice that which can be adequately explained by stupidity.' On Jul 14, 2:25 am, Army1987. On Mon, 16 Jul 2007 12:34:42 -0700, user923005 wrote: On Jul 14, 2:25 am, Army1987 On Thu, 12 Jul 2007 14:17:38 -0700, user923005 wrote: Right.
I can factor a prime number in a heartbeat. It's the ones composed of two very large factors that give me cross-eyed hissy fits. For instance, given: It takes a while to come up with: ^2 I'd bet you did the other way round, didn't you?:-) Naturally. But my factoring software could solve it in a couple of weeks, according to my estimate. One might argue that if that is the case, your factoring software is somewhat poorly designed. Consider: there is no point examining any potential factor larger than the square root of the number being factored.
Since one presumably has to calculate this anyways (to set the boundary), then either an integral result or a quick multiplication will tell you, almost instantly, that the number has the factor noted above; this should not take anywhere near even a second, never mind a couple of weeks. Or did I miss something?
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |