The licensing concerns means that someone would need to do the port and maintain it in a separate codebase from the core Teensy / Arduino implementation, while respecting the original license. That's a lot of work for...
The following is just my humble opinion if you wanted to pursue porting the code to any embedded platform, Teensy or otherwise.
There is some usage of calloc and free...
You can do that, sure. If you look here near the top of the file: https://github.com/PaulStoffregen/Audio/blob/master/synth_waveform.h
The waveforms have been #define'd, that's how the compiler knows what number...
That's how it's setup to work now. Just uncomment the lines "Serial.printf("Knob 1: %d\n", wave1);" and "Serial.printf("Knob 2: %d\n", wave2);" You should see each changing between 0, 1, 2, and 3. 0 is sine, 1 is saw, 2...
Just clone or download the Audio library, open a command prompt, change into the directory where you downloaded it, type "python -m SimpleHTTPServer" and then go to localhost:8000 in your browser, and boom, the GUI...
I just edited the mixer class to have 8 inputs, it's a simple change. Most of my instruments have only 6 voices, and one has only 3 voices due to how CPU hungry they are.
Oh, and it's really easy to change the number...
Oh I misunderstood what you were asking when you posted that originally.
What's happening is the map function is converting the pot reading to four distinct values, 0 - 3. Sine and triangle are the starting and...
For a larger synth, yeah it is needed. I have an instrument class, and 8 derived classes to encapsulate each instrument type. The derived classes hold the oscillators, envelopes, filters, NoteOn, NoteOff, assignable...
That just reminds the compiler that it's a floating point number rather than a double. It's just one of those little hand optimizations that I always do whether it's really needed or not.
For number of voices.. I think most polyphonic synths these days are in the range of 4 - 16. Minilogue is 4, Deepmind comes in 6 and 12, Prophet is 16. The voice stealing really makes a huge difference, I'm glad I tried...
Here's my tested code, 2 oscillators per voice, only 4 voices to get going. I'm using USB device rather than USB host, so you'll want to change that, and alter the analog pins to match what you are using.
#include...
I have one oscillator per voice right now, but I'm not using the stock Teensy oscillators ;). My synth is about the size of an OP-1, and it kinda works in the same way. Depending on what screen you're on and what you're...
Hmm... well, "voiceToUse + 8" certainly looks suspect.
If voiceToUse + 8 goes beyond the size of the array, it will probably lock the Teensy up. I'm amazed it's not locking up as is.
I loaded syntharch.h into the...
All of the waveform definition and selection stuff needs to be moved out of the NoteOn function. The idea is you want to read your pots inside loop(), and if the selected waveform has changed, apply the change to the...
Hey no worries, to be honest I am learning a ton hearing a musician's perspective, and voice stealing is something I really needed to address on my synth.
The way I showed above is very naive about still-held notes....
Well, one thing first, I see your max release time is nearly 12 seconds which seems pretty high to me, but then again I don't know what's considered normal.
The other thing, these oscillators don't take a lot of CPU...
That looks better.
Yes, that would be a scope problem. The variables defined inside setup() are only in scope for that method, and once that method is finished executing, they're no longer in scope... and could no...
idleVoices is an array of bools, so it's perfectly valid syntax. You don't need to explicitly type "if(idleVoices == true)", the compiler knows what you mean.
Scroll down in my code, IdleCheck is listed there. It deactivates the oscillators (sets the amplitude to 0) once the corresponding envelope has finished. Setting the oscillator amplitude to 0 saves CPU cycles. It also...
bool idleVoices = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
The "1" is very sloppy of me there. It should be "true" but I was just being lazy and my compiler doesn't seem to care.
byte voiceToNote = { -1, -1, -1, -1,...
This is basically the system that I am using. It does not allow note stealing. This code is edited a bit for clarity so there may be errors.
bool idleVoices = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
byte voiceToNote...
Mutable Instruments has also open sourced their Yarns midi interface: https://github.com/pichenettes/eurorack/tree/master/yarns
I haven't poked around the design yet but it could provide some additional hints or...
Kind of hard to parse your question, but if you trying to play .wav or .raw files with a Teensy, the answer is "yes, you can". See here for an example:...
The first thing to know is that audio is processed in blocks of 128 samples. So if a phase reset needs to occur in the middle of a block, let's say, it won't be possible to reset the phase until the end of that block....
It's possible. See my post here for sample code including hacks to the Audio library: https://forum.pjrc.com/threads/57669-SdFat-SDIO-for-Teensy-4-0?p=220515&viewfull=1#post220515
It's only working on T3.6 currently,...
What feature is it that's driving the selection for this chip in particular? Perhaps a codec + class D amp solution would work for you?
Alternatively, the datasheet for the eval board provides a BOM and board layout...
One minor suggestion.. when asking for help, please tell us if you're having a compile time problem (and if so, include the error message) or having a runtime problem (and be really specific about the problem).
The...
I have to admit I don't know much about MQS. A quick google search didn't reveal much about it, but I would imagine it would be somewhat better than PWM, otherwise it wouldn't make much sense to offer it.
An I2S...
Well, I'm not quite sure I understand the use case. As far as I know, MQS is output only... no need to get data from it since it'll be available elsewhere.
If you need to capture sound data, you can use...
If audioController.h has the code that you posted, you should be able to include it just fine from main.h or main.cpp for example.
You shouldn't need to make pointers to something just because it's been moved into a...
Are you just doing this for grins, or is there something specific you're trying to do by changing the block size? In general... I'd say the only reason to decrease the block size might be to try to decrease the latency...
I'm not a canbus expert, but I have some advice.
The way to think about canbus is that it's very similar to ethernet. Ethernet is a transport, and to do anything useful with it, you have to know the protocol that is...
Usually the answer for lots of IO is to use expanders such as MCP23017. It is possible to read encoders over the expander, provided you've got the right software. Something like this:...
I did something like this:
Edit synth_waveform.cpp around line 175:
// Hack to get amplitude for LFO purposes.
last_amplitude = static_cast<float>(block->data) / 32767.0f;
Edit synth_waveform.h around line 117...
You'll definitely want a master/slave setup when trying to sync two devices. For code readability, I usually would recommend two separate code projects (one for master, one for slave), rather than a bunch of #IFDEF or...
Hi Bill,
First I just wanted to say a quick "thank you" for all your work on SdFat over the years, it has been much appreciated by many in the community.
I've been testing with SdFat-beta and I think I have found...
I'm starting to think this would be a good idea too. Adafruit has a new board coming out with USB-C (https://www.adafruit.com/product/4382), so there is some precedence for it.
Well, are you wanting to create your own implementation from scratch just for the sake of it? You've linked to 2 different ways of doing it on a Teensy, so it is indeed possible.
I've not tried Duffy's but that is...
Well, I don't want to discourage you too much, but it sounds like a big part of your project will include Android development... and let's just say, I write software for a living and I won't touch Android. It is just...
That would be incredible... I have been away from this stuff long enough that I didn't expect memory mapping.
The RAM use case that I am considering is 'multi-track' recording capabilities for my synth. So DMAMEM and...
Ah... well, to be honest, I probably would not use Bluetooth then, for one reason: latency. Plain old A2DP has like 200-300 milliseconds of latency which pretty much ruins it IMHO.
You can get a low latency firmware...
I have to admit I'm not familiar with the new and different flavors of RAM. I believe SDRAM is commonly used, for example, in the SOM that I linked to above. I think SDRAM comes with the unfortunate need to be...
My preferences in descending order:
* Larger form factor with SDRAM and flash onboard (SOM like this is fine: https://wiki.somlabs.com/index.php/File:VisionSOM-RT-v_1_1.png)
* Dual row .1" header pins, microSD, with...
Interesting idea. I googled around a bit, trying to see how feasible the idea is, here is what I found:
* There's an Arduino library for using the AT command set to control the BK8000L, no audio streaming over the...