Shop OBEX P1 Docs P2 Docs Learn Events
Karplus-Strong on the Propeller? - Page 6 — Parallax Forums

Karplus-Strong on the Propeller?

12346»

Comments

  • Ahle2Ahle2 Posts: 1,179
    edited 2011-07-06 09:57
    "I can't wait to post build info, pictures and video to the 'net!"

    Neither can we! :)
  • lonesocklonesock Posts: 917
    edited 2011-08-02 08:45
    Sorry, it's been a while since I had time to work on this, but finally a tiny update:

    I realized that for an actual guitar synth type application, being able to directly set the period (or, as it's used internally, the delay) makes more physical sense, as it should be proportional to string length. So, I changed the API to add the 'get_period' and 'set_period' functions. You can set a note like usual, then call get_period to see what that note was. You can store the periods of 2 notes, and 'slide' between them by continuously updating the period with the 'set_period' subroutine. (I also updated the PASM code a tiny bit to do all the requisite clamping internally, which I should have done anyway, since PASM is faster than Spin.)

    Jonathan
  • jeff-ojeff-o Posts: 181
    edited 2011-08-02 09:30
    Sweeeet. The final piece in my plan for world domination! Ok, well, maybe I'll settle for laser guitar awesomeness.

    Thanks, Jonathan! You are a gentleman and a scholar.
  • lonesocklonesock Posts: 917
    edited 2011-08-02 09:52
    Well, I once studied to _be_ a gentleman. [8^)

    yw,
    Jonathan
  • jeff-ojeff-o Posts: 181
    edited 2011-08-02 18:23
    OK! Kids in bed, time to start working this new shiny code into my guitar... After I watch Eureka. ;)
  • StefanL38StefanL38 Posts: 2,292
    edited 2011-08-02 22:50
    Hi Jeff-o,

    please record a video of playing it. I need all my patience to wait for the prop 2. So there is no patience left for waiting for a laser-guitar-video ;-)

    best regards

    Stefan
  • jeff-ojeff-o Posts: 181
    edited 2011-08-03 08:07
    I got a basic "whammy bar" working last night, I'll improve it tonight so that it's more responsive. I still have to figure out the best way to simulate a "string bend" on strings that don't physically move...
  • lonesocklonesock Posts: 917
    edited 2011-08-03 09:19
    Awesome! Do you mean you are looking for an input mechanism to signal the string-bend, or the math to update the frequency / period of each string?

    Jonathan
  • jeff-ojeff-o Posts: 181
    edited 2011-08-03 09:50
    lonesock wrote: »
    Awesome! Do you mean you are looking for an input mechanism to signal the string-bend, or the math to update the frequency / period of each string?

    Jonathan

    The input mechanism, mostly. The best I can think of right now is that the player can kinda wiggle their finger lengthwise within the confines of two frets to simulate the effect. The problem is that I don't know how the player can differentiate between using that technique or not. I suppose some sort of monitor could be put in place that records the "absolute" position on the fretboard when the string is plucked and only initiates the string bend (or vibrato) when the new position is adequately different from the starting position.

    The whammy bar code works by first measuring the resistance of the "whammy bar" sensor when the guitar starts up. I'm using a shorter membrane potentiometer on the body of the guitar. The potentiometer is "centered" by a pair of large resistors, so that the player can either bend the pitch up (by moving their finger towards the bridge) or down (by moving towards the neck). The difference between the "startup" resistance and the current resistance is used as the pitch modifier.

    So I guess the string bending could be similar, except that an "initial" reading of the player's finger on the fretboard would be needed each time a note is plucked. Actually, it does that already. Heh. So I guess the code could be very similar to the whammy bar code I already have...

    I think, with all of the pitch, volume and sustain bending going on, that I might have to offload these features into their own cog. I fear my main loop that breaks all the fancy stuff into functions is getting a bit too long.
  • jeff-ojeff-o Posts: 181
    edited 2011-09-07 05:00
    Hey, everyone! I thought you'd all like to know that my laser guitar will be on display at my local museum for an exhibition called RAM. It's a showcase for art meeting technology. A few of my friends from the local makerspace also have projects on display there. More info coming soon!
  • ctwardellctwardell Posts: 1,716
    edited 2011-09-07 07:33
    Most Excellent! This is one of the more interesting projects I've seen using the Prop.

    C.W.
  • lonesocklonesock Posts: 917
    edited 2011-09-21 18:49
    So, this post is mostly a ping / request for status update...how's it going?

    (also, almost related: this video.)

    thanks,
    Jonathan
  • jeff-ojeff-o Posts: 181
    edited 2011-09-22 07:13
    Well, the laser guitar is on display there, though to my dismay is not out in the open for people to play around with. I told them repeatedly they could leave it out, but I guess they're worried someone will break it. I've been invited to come in a few times and give demos (aka supervise as people play around with it).

    Here's a link to the museum exhibit: http://www.themuseum.ca/ram/

    The laser guitar (and the other items from the makerspace) aren't part of the RAM exhibit, but you need to walk past them to get to it! So, we're all getting some nice exposure. I still haven't managed to get some decent video though.
  • volkvolk Posts: 1
    edited 2013-06-17 23:48
    I have implemented it on an AVR. Here is an example of what it sounds like:

    https://soundcloud.com/link-zero-1/bond-theme
    https://soundcloud.com/link-zero-1/electronic-piano-synthesis

    8kb flash, 1k ram, 16mhz clock, 26 lines of code. ;-)
  • skylightskylight Posts: 1,915
    edited 2013-06-18 03:29
    Hopefully not hijacking the thread (it is old) but I never realised that a baloney sandwich (post#20) existed as here the term is used to express disbelief in something such as "what a load of old baloney" you learn something new everyday on this forum :smile:
Sign In or Register to comment.