Shop OBEX P1 Docs P2 Docs Learn Events
Contest: Make it rain! — Parallax Forums

Contest: Make it rain!

Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
edited 2013-07-09 12:37 in Propeller 1
Inspired by this thread, how about a contest to see who can come up with the best rain sound effect using the Propeller? Here are the proposed rules:
1. Program must be pure Spin/PASM and run self-contained from the Propeller's internal memory (i.e. no SD cards, etc.).
2. Output must be monaural, with the port specified in a CON section.
3. Sound effect must be generated via simulation only and run continuously. Playing a rain recording will not be allowed.
4. Submissions are to be posted in this thread.
5. Stealing and improving the work of others will be encouraged. If you don't want your stuff stolen, wait until just before the deadline to submit.
6. Because the goodness of the result is entirely subjective, judging will be done via a poll (another thread), once all entries are in.
7. I suppose we need some kind of prize. An umbrella perhaps? Or ... ?

What should be the time limit for entries? Two weeks perhaps? Any and all ideas are welcome!

-Phil
«1

Comments

  • Cluso99Cluso99 Posts: 18,069
    edited 2013-06-16 22:26
    Inspired by this thread, how about a contest to see who can come up with the best rain sound effect using the Propeller? Here are the proposed rules:
    1. Program must be pure Spin/PASM and run self-contained from the Propeller's internal memory (i.e. no SD cards, etc.).
    2. Output must be monaural, with the port specified in a CON section.
    3. Sound effect must be generated via simulation only and run continuously. Playing a rain recording will not be allowed.
    4. Submissions are to be posted in this thread.
    5. Stealing and improving the work of others will be encouraged. If you don't want your stuff stolen, wait until just before the deadline to submit.
    6. Because the goodness of the result is entirely subjective, judging will be done via a poll (another thread), once all entries are in.
    7. I suppose we need some kind of prize. An umbrella perhaps? Or ... ?

    What should be the time limit for entries? Two weeks perhaps? Any and all ideas are welcome!

    -Phil
    How about the prize will be the sound of an umbrella opening - to be done by Phil ;)
  • Beau SchwabeBeau Schwabe Posts: 6,566
    edited 2013-06-16 23:13
    What if we can make the rain stop in mid stream and even rain backwards?

    Not sure if this is real, but it looks cool. I think it has more to do with the video frame rate. IOW you wouldn't "see" this effect without using a video camera.
    http://www.youtube.com/watch?feature=player_embedded&v=mODqQvlrgIQ

    Edit: it is the frame rate... here is another video using 60Hz instead of 24Hz...
    http://www.youtube.com/watch?v=OtxlQTmx1LE&feature=player_embedded

    Sorry to Hijack Phil
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-06-16 23:43
    You can do that with a strobe light in the shower, so far as making the water look like it's going back into the shower head -- no reciprocating pump needed.

    -Phil
  • Christof Eb.Christof Eb. Posts: 1,201
    edited 2013-06-17 03:45
    Hi Phil,
    about the hardware rules (no external memory, uses the Prop DAC capabilities, runs on a demo-board) I agree but I see no reason to forbid the compilers. At this moment I think, that good results can be achieved using a compiler instead of PASM. And it will be very interesting to see the different approaches. Forth for example.....
    I am not sure, if I will be able to make my entry within 2 weeks but a longer time will not help too much. 8th of July then?
    Judging should be based on testsleepers who answer the poll, I think.....
    Christof
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-06-17 09:26
    ... but I see no reason to forbid the compilers ...
    The reason is simple: to give the most number of people a chance to judge the results. Not everyone has -- or wants to have -- a C compiler or Forth IDE just to listen to some audio. Spin/PASM is the lowest common denominator.

    -Phil
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-06-17 12:41
    Come to think of it, any dev tool that can produce a .bin or .eeprom file should be fine, since the Propeller Tool will be able to load it. So I guess the rule would be this: provide either a Spin/PASM source or else any other source along with its compiled .bin or .eeprom file.

    BTW, 8 July wouild be okay for a deadline -- or even later for that matter -- whatever you guys want.

    -Phil
  • ElectricAyeElectricAye Posts: 4,561
    edited 2013-06-17 12:54
    If I make a submission for the sound of rain in Beijing, must I include the sound of its acidity sizzling into the sidewalk?

    tumblr_inline_mgw3l3s8Nf1rrnkzm.jpg
  • Ahle2Ahle2 Posts: 1,179
    edited 2013-06-17 13:28
    If you want the rainbow, you gotta put up with the rain.


    HeavyRain.binary
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-06-17 14:11
    Ahle2,

    I just realized: one problem with .binary files is that users can't specify the output port. Which does yours use?

    Also, are you witholding the source until the deadline?

    -Phil
  • jazzedjazzed Posts: 11,803
    edited 2013-06-17 14:23
    Come to think of it, any dev tool that can produce a .bin or .eeprom file should be fine, since the Propeller Tool will be able to load it.

    So anyone who cares to do so can use propeller-gcc since the loader can create a spin .binary file.

    Big ugly command window program and option required though: [ -s ] write a spin .binary file for use with the Propeller Tool

    https://sites.google.com/site/propellergcc/documentation/propeller-loader

    Ahle2,

    I just realized: one problem with .binary files is that users can't specify the output port. Which does yours use?

    Also, are you witholding the source until the deadline?

    -Phil

    Using normal propeller-gcc output would of course solve that problem since the pins can be defined post-compile by the board-type and parameter passed to propeller load.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-06-17 15:19
    Okay, how about this: either use Spin/PASM or include a way, via serial I/O to PST, to specify the port. 5MHz crystals only, too. This has to be accessible to everyone with a Propeller board to try, without having to download any other dev software besides the Prop Tool.

    -Phil
  • jazzedjazzed Posts: 11,803
    edited 2013-06-17 16:20
    Okay, how about this: either use Spin/PASM or include a way, via serial I/O to PST, to specify the port. 5MHz crystals only, too. This has to be accessible to everyone with a Propeller board to try, without having to download any other dev software besides the Prop Tool.

    -Phil

    Requiring 5MHz crystals would only eliminate SpinStamp and Hydra Parallax customers. It would exclude most boards from the over-clocker crowd. Of course propeller-gcc has a solution to this clock problem too. Just saying :) Not trying to be malicious.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-06-17 17:20
    'Just trying to keep things as simple and accessible as possible for the most number of people. I'd be willing to include 10 MHz, so long as one used the attached module (or its other-language equivalent). But there is no way for those with 5- or 10 MHz boards to test a program that requires a 6.25 MHz crystal.

    In any event, the idea is to get as many people voting on their favorite as possible. If someone can't run a candidate program, they're not going to vote for it. So anything program authors can do to make their entries accessible will be to their benefit. Requiring Propeller-gcc out of the gate to test an entry will not attract as many votes as something the PropTool can load and run.

    BTW, if this looks like it will become a language war with votes solicited or cast based upon the author's choice of dev tools, rather than the sound quality, it'll just have to be Spin/PASM. The idea is to show off what the Propeller chip can do, not what a particular language is capable of.

    -Phil
  • jazzedjazzed Posts: 11,803
    edited 2013-06-17 17:42
    Again: "Not trying to be malicious."
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-06-17 17:55
    jazzed wrote:
    Again: "Not trying to be malicious."
    Understood. :)

    Simple things have a way of getting complicated, it seems. So let's take a leap to ultimate simplicity, since it's obvious now that dev-tool obscurity is a competitive disadvantage: anything goes. Use any dev tool you want, and post your source code. Add anything else you want (.binary files, etc.) to make your entry as inclusive as possible for the largest community of potential voters.

    The only other thing I can think of is to convert the outputs of all entries to one-minute mp3s and set up a "blind tasting."

    -Phil
  • Christof Eb.Christof Eb. Posts: 1,201
    edited 2013-06-18 03:19
    Fine, Phil, compilers are allowed. ((As PropBasic compiles to Spin/Pasm there would not have been such a problem at all.))
    It should be possible to write the ouput in parallel to several ports. On demo-board I use PA11. Which ports are typical?
    Yesterday I found 2 nasty bugs and got it dripping then, so I am looking forward to post my first trial soon.....
    Christof
  • Ahle2Ahle2 Posts: 1,179
    edited 2013-06-18 12:16
    I will provide source code eventually. I just want to see what other people comes up with first. :)
    Everything is, of course, pure synthesis and no LUT's are used.

    Here's revision 2 for the demo board.

    HeavyRainR2_demoBoard.binary
  • PublisonPublison Posts: 12,366
    edited 2013-06-18 13:34
    Ahle2 wrote: »
    I will provide source code eventually. I just want to see what other people comes up with first. :)
    Everything is, of course, pure synthesis and no LUT's are used.

    Here's revision 2 for the demo board.

    HeavyRainR2_demoBoard.binary

    Spectacular!

    I probably couldn't use this as a sleep aid though , as I would be up all night wondering if my basement was being flooded. :)
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2013-06-18 14:40
    Over here all you have to do is run ... summer.exe.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-06-18 15:57
    Ahle2,

    'Very nice!

    -Phil
  • Christof Eb.Christof Eb. Posts: 1,201
    edited 2013-06-19 09:13
    Droplet_Prop_B

    is a mix of low frequency noise
    with high frequency noise together
    with "Cirped Impact Atoms" (drops into water, look here: http://forums.parallax.com/showthread.php/148487-Drops-Rain-and-Sleep-...-and-the-Prop)
    put into a reverb loop.

    Enjoy for demo board.
    Christof
  • Ahle2Ahle2 Posts: 1,179
    edited 2013-06-19 13:32
  • JT CookJT Cook Posts: 487
    edited 2013-06-19 16:09
    Ahle2: You should post a MP3 or WAV file or Youtube video so people without the demo board can hear it.
  • AribaAriba Posts: 2,690
    edited 2013-06-19 17:47
    Here is a version with my PM-Synth object (link)
    It simulates single raindrops first then rain-noise mixed with a lot of raindrops.
    You should hear it in stereo if possible. If you listen at it long enough, then you get a little surprise...

    This one is with sourcecode in Spin.

    Andy
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-06-20 10:07
    Attached is my contribution to date (from the other thread), FIR-filter overflow and all.

    -Phil
  • PublisonPublison Posts: 12,366
    edited 2013-06-20 13:27
    Droplet_Prop_B

    is a mix of low frequency noise
    with high frequency noise together
    with "Cirped Impact Atoms" (drops into water, look here: http://forums.parallax.com/showthread.php/148487-Drops-Rain-and-Sleep-...-and-the-Prop)
    put into a reverb loop.

    Enjoy for demo board.
    Christof

    Sounds like the the Maxwell House commercial from the 50's:

    http://www.youtube.com/watch?v=Cdx_SjxXhmY

    I
    believe the sounds were done from a Moog synthesizer module Bob developed just for this commercial, ( percussive synthesizer),

    The was another later commercial (80's ?) that I believe Suzanne Ciani did a better sound with a Buchla but I can't find a link. Maybe I read it in one of her liner notes.
  • PublisonPublison Posts: 12,366
    edited 2013-06-20 13:31
    Attached is my contribution to date (from the other thread), FIR-filter overflow and all.

    -Phil

    Phil,

    Most soothing so far.
  • AribaAriba Posts: 2,690
    edited 2013-06-20 16:02
    Another contribution, totally different from my first one.

    This is a Spin only version an so short that I can post it in a code box:
    '' Spin Rain
    '' ---------
    '' (c)2013 Andy Schenk
    
    CON  _clkmode      = xtal1 + pll16x                                    
         _xinfreq      = 5_000_000
    
         DAC_PIN   = 10
    
    VAR
      long  rndm, lp1, lp2, bp2, sah, lfrt, lowns
           
    PUB Main  
      rndm := cnt
      dira[DAC_PIN] := 1                         'Set up DAC
      ctra := %00110 << 26 + DAC_PIN             'counter A in DUTY mode
      
      repeat
        rndm?
        if lfrt-- == 0
          lfrt := (rndm & 511) + 700             'Sample & Hold with random rate
          sah := rndm
        bp2 := (sah/5 - bp2/16 - lp2) / 2 + bp2  'BP filter for S&H
        lp2 := bp2/2 + lp2                    
        lowns += (rndm-lowns) / 5  + rndm/40     'low noise
        lp1 += (rndm~>1-lp1)  /  9               'LP filter for rndm
        frqa := lp1/2 + bp2/3 + lowns/50 + $8000_0000    'mix all
    ' 
    
    The code calculates several components:
    - a lowpass filtered noise (steady rain)
    - a randomly overdriven filter (patter)
    - a lowspeed sample and hold with a resonating bandpass filter. (raindrops)
    On the last line they are all mixed together and written to the Duty-DAC.
    With different mix levels and filter parameters you get a lot of rain variations.

    Andy
  • PublisonPublison Posts: 12,366
    edited 2013-06-20 16:12
    Ariba wrote: »
    Another contribution, totally different from my first one.

    This is a Spin only version an so short that I can post it in a code box:
    '' Spin Rain
    '' ---------
    '' (c)2013 Andy Schenk
    
    CON  _clkmode      = xtal1 + pll16x                                    
         _xinfreq      = 5_000_000
    
         DAC_PIN   = 10
    
    VAR
      long  rndm, lp1, lp2, bp2, sah, lfrt, lowns
           
    PUB Main  
      rndm := cnt
      dira[DAC_PIN] := 1                         'Set up DAC
      ctra := 110 << 26 + DAC_PIN             'counter A in DUTY mode
      
      repeat
        rndm?
        if lfrt-- == 0
          lfrt := (rndm & 511) + 700             'Sample & Hold with random rate
          sah := rndm
        bp2 := (sah/5 - bp2/16 - lp2) / 2 + bp2  'BP filter for S&H
        lp2 := bp2/2 + lp2                    
        lowns += (rndm-lowns) / 5  + rndm/40     'low noise
        lp1 += (rndm~>1-lp1)  /  9               'LP filter for rndm
        frqa := lp1/2 + bp2/3 + lowns/50 + $8000_0000    'mix all
    ' 
    
    The code calculates several components:
    - a lowpass filtered noise (steady rain)
    - a randomly overdriven filter (patter)
    - a lowspeed sample and hold with a resonating bandpass filter. (raindrops)
    On the last line they are all mixed together and written to the Duty-DAC.
    With different mix levels and filter parameters you get a lot of rain variations.

    Andy

    Nicely Done!

    Tight code with a great output.

    Judging is going to be tough!
    .
  • Christof Eb.Christof Eb. Posts: 1,201
    edited 2013-06-23 12:10
    Ok, this is Droplet_Prop_F

    * A: noise with two sample rates
    * B: cirped impacts: drops into water.
    * C: constant frequency impacts: Drops onto solid surface
    * D: decaying noise impacts onto wet surface
    * B+C are fed into a reverb loop.

    Sleep well, Christof

    Output on Port11
Sign In or Register to comment.