teensy synth 101 on audio board?

Status
Not open for further replies.
i found this awesome synth developed by brian peters but he's not touched synths a few years now. i got it compiled and uploaded using arduino classic 1.06, but before i can hear anything i gotta build all the breadboard stuff. i'd rather use my new audio board tho - how do i go about converting this to the audio board?

https://github.com/brianmarkpeters

can i just change the pin numbers or do i have to do more complicated shit?
oh and hi everyone btw! :)
 
From a quick look at the code, it seems to output an analog signal on the DAC/A14 pin, and digital waveforms on these 4 digital pins:

Code:
const unsigned int audioFour = 20;
const unsigned int audioThree = 10;
const unsigned int audioTwo = 9;
const unsigned int audioOne = 6;

Looks like there's a lot of good work in that old project. But without a clearly stated open source license, I'm reluctant to spend much time with this code or merge any of it into the audio library.
 
Looks like his code uses PWM at different frequencies for audioOne and audioTwo, so those 2 would need to be PWM pins controlled by different timers. Documentation about which pins are controlled by which timers can be found here: (scroll to "PWM Frequency")

http://www.pjrc.com/teensy/td_pulse.html

Looks like any digital pins can be used for audioThree and audioFour.

Again, I'm reluctant to put much more work into this code if it can't be shared.

To adapt and accept it as a contribution to the audio library (which I'd love to do), Brian would need to release it with the MIT license. I can understand he might be reluctant to do so, since MIT allows commercial use.
 
not going to happen...
This is actually one project of mine that's out there that I really wish wasn't- it's really really poor code that I made very quickly as a proof of concept that some friends asked to see in an unfinished state and somebody put it on the internet for me and it kind of got carried away. I've made a couple versions of this since then that are much much better and have plans to make one that is even better than those. I got derailed when a company inquired about buying the newer algorithms from me, which led to talks about mass producing synthesizers based on those algorithms, but then we hit some roadblocks with the FCC and that got put on hold. So, I don't really even know what's happening with the newer versions, but the old one is definitely one that I don't want to spread around.

Also, regarding the audio library, that kind of defeats the original purpose of what I wanted to do, which was to hear the natural switching characteristics of the digital outputs of the teensy being used for gritty chiptune audio. I feel like the audio library would just make it a sort of generic thing, but I can explore that in the future too. I'll keep you posted if I get permission to release the newer teensy synth algorithms, which are much much more in tune and the program uses the analog output (so it doesn't require a transformer on the digital out.) Right now I'm completely inundated with starting up a composing company, a video game company, going through a divorce, moving, and a bunch of other little stuff, so I don't know what the immediate future holds yet. I'm curious if I get one of those audio boards if it'll spark some new ideas for other synths too. So we'll see! I'll send you an email if I make some progress with either.

-Brian
 
i found this awesome synth developed by brian peters but he's not touched synths a few years now. i got it compiled and uploaded using arduino classic 1.06, but before i can hear anything i gotta build all the breadboard stuff. i'd rather use my new audio board tho - how do i go about converting this to the audio board?

https://github.com/brianmarkpeters

can i just change the pin numbers or do i have to do more complicated shit?
oh and hi everyone btw! :)

FWIW: I played with Brian's synth implementation a bit, and got it working on a teensy. It's very cool! But it did not require the audio board, or the audio library. Like he said, it's the very opposite of that: it's all about the 8-bit gritty nature of waveforms created by various forms of simple PWM. Paul's goal with the audio board was to remove such grit, so ...

If I recall correctly, all I had to do to make Brian's code work on my teensy was to change some pin definitions. But if you want to do this while your teensy is connected to the sound board, you'd better make sure that you're doing it on pins that aren't used by the board, or even connected to it. I believe there's a lot of super-high-frequency noise present on those pins, and you wouldn't want that in the rest of your circuits. Check your documentation; there are a lot of pins to play with.

Brian's suggested audio output circuit uses a line-transformer, like you'd use for converting from balanced mic connections to unbalanced line-level connections. I think that's partly to get the impedence right, but also partly to use the transformer as a choke for filtering out those ultra-supersonic switching frequencies.

Later on at a Dorkbot meeting I played around with taking the signal from other places on the board and running it directly into a small speaker with no other amp. That worked surprisingly well but only for a very low volume. Again, the magnetic coil in the speaker acts as a choke, aka a low-pass filter that passes audible frequencies but not much higher up. You need something to remove those.

If you don't want to deal with a transformer, I can relate. I imagine some kind of RC circuit could filter that for you, but I don't know how to design those. I'd start with the advice that Paul gives here: https://www.pjrc.com/teensy/td_pulse.html
 
Status
Not open for further replies.
Back
Top