author
4Instructables6,389Views10CommentsSan Francisco Bay Area
VFX Artist, Painter, Musician, Maker

Achievements

    • Marquetry Instrument Case
      2,438 views
      39 favorites
      2 comments
      • Small Box Sled
      • Corner Office Desk
      • Bandsaw Circle Jig
  • Arpeggiating Synthesizer (Mosquito I)

    That's an interesting idea! Things can get tricky with timing in Mozzi because it's trying to use every possible clock cycle for tone generation but I think it should be possible to sync it to an external trigger. I'm using a relatively simple method of controlling the playback speed by just having the Rate pot drive a Mozzi EventDelay which controls how long we wait between notes.For something that needs more explicit control of timing (like a click track/trigger) think a better approach would be to use a Mozzi object called ADSR which is an envelope generator. This would give you precise control over when the note starts/stops so you could start each note of the sequence exactly when you want. Of course you'd still have to keep track of each click's timing and set the delay after that…

    see more »

    That's an interesting idea! Things can get tricky with timing in Mozzi because it's trying to use every possible clock cycle for tone generation but I think it should be possible to sync it to an external trigger. I'm using a relatively simple method of controlling the playback speed by just having the Rate pot drive a Mozzi EventDelay which controls how long we wait between notes.For something that needs more explicit control of timing (like a click track/trigger) think a better approach would be to use a Mozzi object called ADSR which is an envelope generator. This would give you precise control over when the note starts/stops so you could start each note of the sequence exactly when you want. Of course you'd still have to keep track of each click's timing and set the delay after that to keep things spaced properly. It's a different approach to playing the notes than I'm currently using so the code would have to be re-worked quite a bit, but it might not be too bad. You'd probably also have to tweak the parts of the code that control the legato. My code uses the Legato pot to control the "on" cycle of the note relative to the "off" cycle. You would probably want to replace that by having the Legato pot control the sustain value in the ADSR (that's the "S" in ADSR) instead. So in that regard it might actually make things simpler.If you end up giving that a try, let me know how it goes. Who knows, maybe I'll have to work up a Mosquito II that uses an ADSR...could open up some interesting possibilities!

    View Instructable »
      • "9 Degrees of Freedom" IMU
      • Patterned Plywood Bookcase Speakers
      • 3D Printed Record
  • Arpeggiating Synthesizer (Mosquito I)

    It's all updated and should be correct now.

    View Instructable »
  • Arpeggiating Synthesizer (Mosquito I)

    That's awesome, glad it was (mostly) working. As for the LED, I'm glad you said something. I just noticed that I have an error in my schematic. In the schematic, I have the LED incorrectly going to pin 2 of the Nano when it should be going to pin 4. The two push buttons should be going to pins 2 and 3 because those two pins are the only pins with built-in interrupts. (I'd suspect that the button coming off of pin 4 only works for you sporadically as a result of this same issue). The pin designations are correct in the Arduino code, so switching around the wiring on the LED pin and the pushbuttons should get things operating all around. I'll update the schematic on my github shortly. Thanks for pointing this out.

    View Instructable »
    • Arpeggiating Synthesizer (Mosquito I)
      80 views
      2 favorites
      0 comments
  • Keytar Hero (Using a Wii Guitar Controller As a Synthesizer)

    Nice! I don't have the drums so I can't try it out myself, but it looks like you had to work through a lot of stuff to get that working. It's funny how these little "I-wonder-if-I-could" projects take us down the rabbit hole :) I hope folks can make use of it.

    View Instructable »
      • Human Flag Pole
      • Glowing Wand for Witches and Wizards
      • Arduino GRANDE the Huge Microcontroller
  • Keytar Hero (Using a Wii Guitar Controller As a Synthesizer)

    Yeah, it should but, because each GH controller uses a slightly different data structure, you'll need to customize the wiiGHController.py to understand the drums. But I don't think that'd be too hard, at least when it comes to the i2c part, especially since folks have already worked out the mappings. First, you can check how the byte is structured by looking at the table on this website: http://wiibrew.org/wiki/Wiimote/Extension_Controll...The table shows you the specifics of how the data packet looks coming from the drums, and there is other info to help with the setup. Most of the stuff is already worked out in my python code for the overall connection to the drums (since they look more or less identical to the guitar) so you'll just need to change things up to work with the drum-specif…

    see more »

    Yeah, it should but, because each GH controller uses a slightly different data structure, you'll need to customize the wiiGHController.py to understand the drums. But I don't think that'd be too hard, at least when it comes to the i2c part, especially since folks have already worked out the mappings. First, you can check how the byte is structured by looking at the table on this website: http://wiibrew.org/wiki/Wiimote/Extension_Controll...The table shows you the specifics of how the data packet looks coming from the drums, and there is other info to help with the setup. Most of the stuff is already worked out in my python code for the overall connection to the drums (since they look more or less identical to the guitar) so you'll just need to change things up to work with the drum-specific mappings.Here's the general idea of what's going on with the i2c stuff. There's basically three things you do to get the data from the controller: 1) decrypt the i2c signal, 2) read six bytes, 3) get the values from the specific bits within those bytes that you want. The decryption is pretty easy and I don't think you need to change any of the existing code for that. But just for clarity, this is done starting on line 51 of the python code. We send the value 0x55 to address 0x40 on device 0x52, then we send a value of 0x00. This then allows the decrypted data to be transmitted. Looking at that webpage, these lines should still work for the drums without any changes since all the values for addresses appear to be the same as far as I can tell.The second step, reading the byte is done in the function called read() at line 63. This simply reads 6 bytes of the data and returns those as a list with each item being one byte. I think this should work for the drums as-is also without any modifications.The last thing to do is to extract out the specific bits you need from each byte. That is done in the various functions after the # Guitar Hero Mappings comment on line 73. For these, you'll need to change these functions (or make new ones) to suit the drum data based on the table from the website. Each function follows the same general pattern, for example the red button function at line 99 first reads the 6 bytes with the self.read() call. On the guitar, the red button is in byte 5 in the 6th bit so to get that data the next line looks like :br = (data[5] >> 6) & 0x01So basically, when you're trying to access a specific single bit in the table, you change the data index to be the row from the table you need (5 in this case) and you shift the bits by the column you need (6 in this case). Looking at the drum's table, they're close to the guitar mappings (red and orange are in exactly the same spot, the others are also on bytes 4 and 5 just in different bit positions) so those should be fairly straightforward to modify.Some of the data uses more than one bit, for example on the guitar the whammy bar needs 5 bits and the joystick x and y values each use 6 bits, so getting the data is slightly different. For the joystick x, for example, I only need the last six bits of byte 0. So I cast that bit as binary and then grab the last six digits using the lastSix = fullbyte[4:]. Finally, in the return statement, I cast the value as a two digit integer which can then be used in the rest of the program as needed.While overall accessing the data is the same, it looks like, from that website, the drums have a lot of extra functionality that manages the velocity each drum is struck. I think it basically works like, if there is velocity, it sets byte2, bit 6 to a value of zero. Then it uses some bits on bytes 2 and 3 to indicate which drum the velocity is for, an how hard it was hit. So you'd probably have to add some functions to read those bits and return velocity values. That webpage lists the details on what bits are for what, and what values they send back. When working this out it'd probably be helpful to reference the table I'm using for the guitar to see how my code compares to the table for the guitar: https://wiibrew.org/wiki/Wiimote/Extension_Control...Sound like this could be a cool approach for driving a synth or drum module. I'd be curious to see how it turns out. Maybe if you get new controller code, we could add it to the git hub repository for others to benefit from.Hope this helps.

    View Instructable »
      • Awesome Analog Synthesizer Using Only Discrete Components
      • Make an Awesome Electric Guitar With Common Tools
      • Convert a Car Seat Into the Coolest Office Chair Ever
  • Awesome Analog Synthesizer Using Only Discrete Components

    Nice project! Thanks especially for posting all the details about component selection and how you arrived at the values for your resistors, etc. I've found that most schematics and tutorials don't really get into that and it can be frustrating when you're new to it so it's much appreciated.

    View Instructable »
  • Moog Style Synth

    Nice work! I really like the addition of the arpeggiator. Fits perfectly with the Moog-like sound. I ran across that Pete McBennett schematic as well when I was trying to build my first analog synth...what a great circuit. I don't totally understand everything he's doing in there, but it's fun and relatively easy to mess around with. In mine I ended up just using his LDR piece behind two RC Relaxation Oscillators that I cooked up. But now you've got me wanting to revisit it and add in your arpeggiator at the very least. Thanks for posting this!

    View Instructable »