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.)
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 ;-)
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...
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.
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!
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).
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.
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
Comments
Neither can we!
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
Thanks, Jonathan! You are a gentleman and a scholar.
yw,
Jonathan
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
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.
C.W.
(also, almost related: this video.)
thanks,
Jonathan
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.
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. ;-)