Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Music? Hypnotic tones? Alien communication? you decide.


  • Please log in to reply
4 replies to this topic

Poll: What does this sound like to you? (3 member(s) have cast votes)

What does this sound like to you?

  1. Alien code (0 votes [0.00%])

    Percentage of vote: 0.00%

  2. Rabbits (0 votes [0.00%])

    Percentage of vote: 0.00%

  3. Wierd music (1 votes [33.33%])

    Percentage of vote: 33.33%

  4. Techno. (2 votes [66.67%])

    Percentage of vote: 66.67%

Vote Guests cannot vote
1991
  • Members
  • 29 posts
  • Last active: Jun 04 2007 03:05 AM
  • Joined: 20 Jan 2006
I can never be on one topic.
Must make new code! :shock:
Interesting (music? code? etc.) based on the fibbonacci rabbit sequence (see code for website)

Not entirely my idea though. See the site for their quicktime version.

I made up the speed/volume increase and (pseudo)randomness.

beeps=
(join
"10110101101101011010110110101101101011010110110101101
01101101011011010110101101101011011010110101101101011010110110101101
10101101011011010110101101101011011010110101101101011011010110101101
10101101011011010110110101101011011010110110101101011011010110101101
10101101101011010110110101101011011010110110101101011011010110110101
10101101101011010110110101101101011010110110101101011011010110110101
10101101101011011010110101101101011010110110101101101011010110110101
10110101101011011010110101101101011011010110101101101011010110110101
10110101101011011010110110101101011011010110101101101011011010110101
10110101101101011010110110101101011011010110110101101011011010110101
10110101101101011010110110101101101011010110110101101011011010110110
10110101101101011010110110101101101011010110110101101101011010110110
10110101101101011011010110101101101011011010110101101101011010110110
10110110101101011011010110101101101011011010110101101101011011010110
10110110101101011011010110110101101011011010110101101101011011010110
10110110101101101011010110110101101011011010110110101101011011010110
11010110101101101011010110110101101101011010110110101101011011010110
11010110101101101011011010110101101101011010110110101101101011010110
11010110110101101011011010110101101101011011010110101101101011010110
11010110110101101011011010110110101101011011010110101101101011011010
11010110110101101011011010110110101101011011010110110101101011011010
11010110110101101101011010110110101101101011010110110101101011011010
11011010110101101101011010110110101101101011010110110101101101011010
11011010110101101101011011010110101101101011011010110101101101011010
11011010110110101101011011010110101101101011011010110101101101011011
01011010110110101101011011010110110101101011011010110101101101011011
01011010110110101101101011010110110101101011011010110110101101011011
01011011010110101101101011010110110101101101011010110110101101011011
01011011010110101101101011011010110101101101011010110110101101101011
0101101101011010110110101101101011010110110"
)

;fibbonacci rabbit sequence (never repeats! just like PHI) READ MORE: http://www.mcs.surrey.ac.uk/Personal/R.Knott/Fibonacci/fibrab.html#2000

;Begin fix
Loop Parse, beeps
{
   Random random, 0, 1000        ; Random frequency
   SoundBeep 600+(A_LoopField-0.5)*random, (2000-A_Index)/5
;   SoundSet A_Index/20,PCSPEAKER ; Volume increases (often no effect)
}
;^ Lazlo's fix (I didn't realize I was listening to pseudorandomness!)
 

--

AGU
  • Guests
  • Last active:
  • Joined: --
Could you please overwork your code to avoid horizontal scrolling?
E.g. by using a continuation section

beeps =
(
1011010110110101101011011010110110101101011011010110101101101011011
1011010110110101101101011010110110101101011011010110110101101011011....
)
_______________
Cheers
AGU

PhiLho
  • Moderators
  • 6850 posts
  • Last active: Jan 02 2012 10:09 PM
  • Joined: 27 Dec 2005
Aha, that's why I don't see the poll...
I didn't care to search to it.
1991, since you created this post logged in, you can edit your post. Please do, it will be easier to read.
Posted Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")

Laszlo
  • Moderators
  • 4713 posts
  • Last active: Mar 31 2012 03:17 AM
  • Joined: 14 Feb 2005
Interesting effects!

You can generate the rabbit sequence with a handful of AHK commands. Also, the two first parameters in "stringmid, beeps, beepout, %a_index%, 1" are swapped, causing the variable beeps and beepout to be empty. Fixing this, here is an equivalent script, for experimenting.
beeps = 0                        ; 1st 1 dropped
Loop 1235 {                      ; Generate 1999 bits of the rabbit sequence
   StringMid x, beeps, A_Index, 1
   beeps := beeps "1" Chr(x*48)  ; ASC("0") = 48
}

Loop Parse, beeps
{
   Random random, 0, 1000        ; Random frequency
   SoundBeep 600+(A_LoopField-0.5)*random, (2000-A_Index)/5
   SoundSet A_Index/20,PCSPEAKER ; Volume increases (often no effect)
}


Laszlo
  • Moderators
  • 4713 posts
  • Last active: Mar 31 2012 03:17 AM
  • Joined: 14 Feb 2005
This version has no randomness. Sliding groups of 3 bits select harmonic tones:
s = 0                      ; 1st 1 dropped

Loop 1235 {                ; Generate 1999 bits of the rabbit sequence

   StringMid x, s, A_Index, 1

   s := s "1" Chr(x*48)    ; ASC("0") = 48

}



fx = 440.00,493.88,523.25,587.33,659.26,698.46,783.99,880.00

Loop Parse, fx, `,

{

   i := A_Index - 1

   f%i% := A_LoopField

}



Loop Parse, s

{

   i := 2*Mod(i,4) + A_LoopField

   SoundBeep f%i%, (2000-A_Index)/10

   SoundSet A_Index/20,PCSPEAKER

}
It sounds very differently.