Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 9 of 9

Thread: Guy making third synth has perhaps gone too big

Hybrid View

  1. #1

    Guy making third synth has perhaps gone too big

    Hi! I'm designing a synth around the 3.5 and audio shield. After getting a 7-pot arduino noise maker to work with Mozzi, I decided I'm qualified to take on a fully realized synth. Oh, and I've never really played one, either. Which should be helpful.

    So far i am just putting the hardware together- a bunch of regular old analog pots and three position switches. I can already tell I am going to need a few multiplexers, so I've ordered some based on the 74HC4051. I think I'll end up needing four of those- boy, i hope the controller code can run without killing the audio with all the polling.

    Synth has 2 oscillators. First is frequency controlled with an onboard keyboard, with octave and waveform selectable. Second has selectable waveform and mix% and frequency relationship to first osc, from slightly detuned to an octave or two. Two LFOs are assignable to a few different things each, there is also an assignable joystick (Y dimension always pitch bend, X dimension assignable.) Then there is a filter section and an ADSR section.

    Mostly trying to make it playable. Doesn't have any midi plan yet, likely monophonic. I just started by holding a cigar box in my hand and deciding where keys, pitch bender, octave switches and filter knob needed to be.

    Not sure how or whether to insert any photos...

    My only questions so far (after seeing what UHF pulled off with the TSynth, I know my feature set is doable!) would be whether there is anything I need to look out for with multiple MUX chips and the Teensy library, and whether a variable slope filter is supported (I saw 12db/octave in a frigging great video by Paul, but not sure if I can get 6 or 24 db slopes going.)

    Or of course unforeseen problems ahead...

    Oh, one more thing. What is the best power supply for a 3.5 running this sort of thing? Just any old 5V deal into a broken out USB port on the case, or...

    Thanks here's hoping,
    Trevor

  2. #2
    Senior Member
    Join Date
    Apr 2020
    Location
    DFW area in Texas
    Posts
    242
    Quote Originally Posted by trevorbryden View Post
    i hope the controller code can run without killing the audio with all the polling.

    Oh, one more thing. What is the best power supply for a 3.5 running this sort of thing? Just any old 5V deal into a broken out USB port on the case, or...

    Thanks here's hoping,
    Trevor
    Trevor:

    In my <TeensyMIDIPolySynth> project, I had 48 x 50K pots + 42 pushbuttons, all sampled by the T4.1 using the 74HC4067 MUXs. The MUXs require one analog input/output & 4 digital addressing pins. If you need even more inputs without consuming too many of the pins, you can cascade the MUXs (I used this approach in the TeensyMIDIPolySynth), so the primary MUX would use these initial 5 pins as described. The secondary MUX input/output pin would be wired to the 16 input/output pins on the primary MUX. Doing it this way, you would only need an additional 4 addressing pins for the secondary MUXs. Therefore, you would only need 9 pins total (4 primary addressing, 4 secondary addressing, & 1 input/output) to give you up to 256 analog inputs/outputs.

    The MUXs work for both analog signals & digital signals. You can use the 16 side of any MUX for either input or output, or any mix of both. You can take a look at the referenced Google Drive link to see the pseudo schematic of how I interconnected everything. In that particular project, (in addition to driving 48 LEDs & 2 x 7-segment displays via other hardware) the analog inputs (pots) & digital inputs (pushbuttons) were sampled every 3-5ms - you could certainly do even better than that with a smaller number of inputs. All of this verbiage is intended to answer the question of "can you do this without killing the audio: most certainly !!"

    As for power, I chose to include an Adafruit <2500 mAh battery>+ Adafruit <Powerboost 1000>. With this combo, my TeensyMIDIPolySynth project could operate either stand-alone, or with standard USB 5VDC input (which could also recharge the battery). I could get up to 8 hours of operation with that particular battery, which was great. I've since moved up to the Adafruit <6600 mAh battery> for even more extended operations without any worry of exceeding the battery capacity.

    I made use of the Adafruit <microUSB Panel Mount extension>. I split the 5VDC & GROUND wires (the pair of wires from the panel socket go to the input of the Powerboost 1000, & the pair of wires to the connector go to the output side of the Powerboost 1000). The data +/- wires remain intact/unbroken in the adapter cable. The panel mount connector of the adapter cable provides the jack for external data & power, where the microUSB connector of the adapter cable is plugged directly into the Teensy. That way, connecting an external USB cable will allow both powering the box (& recharging the battery), as well as programming the Teensy from your computer. As a side benefit, no need to cut the USB/5VDC trace on the Teensy, nor is there any need to worry about multiple power sources (e.g. USB & external 5VDC, both connected to the Teensy at the same time if you simply connected external power) fighting each other.

    Good luck & have fun !!

    Mark J Culross
    KD5RXT

  3. #3
    Senior Member
    Join Date
    Apr 2020
    Location
    DFW area in Texas
    Posts
    242
    Trevor:

    I forgot one more bit of advice: If you aren't already too committed to your T3.5, use a T4.1/T3.6 & get the cable that allows you to connect external MIDI devices (keyboards, etc.) to the 2nd USB (host) port. Using this cable & the USBHost_t36 library makes it extremely easy !!

    Mark J Culross
    KD5RXT

  4. #4
    Thanks! So for 21 analog inputs (just beyond the 4.1 availability, esp with audio shield) you'd recommend one or two of those 74HC4067s as the easiest path forward. Thanks!
    Can i maybe include your calliope as an SD file on my eventually operational synth to help test the audio circuit? Planning on including a few full range stereo files for that purpose...
    Thanks for everything!

  5. #5
    Senior Member
    Join Date
    Apr 2020
    Location
    DFW area in Texas
    Posts
    242
    @trevorbryden (Trevor):

    Yes, for your 21 inputs, 2 x 74HC4067s would cover your need, leaving some additional expansion if/as needed. You'll need to assign 4 pins for the addressing (common to both MUXs) & 1 additional (unique) pin for the I/O for each of the MUXs, for a total of 6 pins consumed.

    You are more than welcome to make use of anything from the TeensyMIDIPolySynth that may be helpful to you, including the calliope & anything else that you may tweak from there !!

    Mark J Culross
    KD5RXT

  6. #6
    Awesome. My total needs are something like 15 analog knobs, 71 switches and 3 LEDs and I am not yet sure how that will all work.
    I don't really know if there are any performance advantages to leaving some analog controls out of the multiplexers (like if a real time filter knob would be able to respond faster if it is somewhere else in the code or whatever.)
    I'm feeling pretty ok that 5 mux will handle everything. I believe the 4.1 leaves me 13 analog pins after the audio shield is implemented, and I can then put the 5 mux read pins on those, the rest on digital pins, and figure out which analog inputs to mux and which to tie to my few remaining analog in pins.
    Or something.

  7. #7
    If you see this...am I correct in planning to use 4 pins in common to all 5 MUX, and one analog pin each, for a total of 9 pins used (5 analog and 4 digital)? Crazy how many pins I ended up using...

  8. #8
    Senior Member
    Join Date
    Apr 2020
    Location
    DFW area in Texas
    Posts
    242
    Trevor:

    Yes, what you describe (4 addr pins common to all five MUXs & 1 I/O pin per each mux for a total of 9 pins) is the most straightforward way to connect your MUXs. I think you will find that reading all of your analog inputs thru the MUXs will be plenty fast enough. You can always break out an individual control out to its own analog pin later if you find some reason why that might be needed.

    Good luck & have fun !!

    Mark J Culross
    KD5RXT

  9. #9
    Thanks so much. I will definitely have fun. Your inspiring trip through this same jungle has already been super helpful!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •