Forum Rule: Always post complete source code & details to reproduce any issue!

Search:

Type: Posts; User: wcalvert

Search: Search took 0.00 seconds.

  1. Replies
    87
    Views
    1,154

    Hey, well I can explain the voice stealing part...

    Hey, well I can explain the voice stealing part pretty quickly. Millis() returns the time in milliseconds since power on. So to find the voice that has been on the longest (so we can steal it), we...
  2. Replies
    87
    Views
    1,154

    The benefit of wavetables, at least as I...

    The benefit of wavetables, at least as I understand it, is that you get to have samples recorded at different pitches. This helps make things more realistic because, for example, resonance effects...
  3. Replies
    87
    Views
    1,154

    Actually I don't know, haha. I've only really...

    Actually I don't know, haha. I've only really heard the old "super saw" oscillators which had like 6 oscillators per voice, it makes such a wall of sound it was hard for me to tell. I'll have to...
  4. Replies
    87
    Views
    1,154

    Oh like, instead of the B oscillator being...

    Oh like, instead of the B oscillator being detuned to a higher frequency, you want it detuned to a lower frequency? You could do:

    oscsB[i]->frequency((1.0f / detune) * noteFreqs[voiceToNote[i]]);...
  5. Replies
    87
    Views
    1,154

    I screwed up again, it should be: ...

    I screwed up again, it should be:

    oscsB[i]->frequency(detune * noteFreqs[voiceToNote[i]]);
  6. Replies
    87
    Views
    1,154

    Oh, nice catch, pow() needs both arguments to be...

    Oh, nice catch, pow() needs both arguments to be double or float, that's why it wasn't working.

    Making it continuously sweepable... Hmm, that's a cool idea, I hadn't thought of that. You could...
  7. Replies
    87
    Views
    1,154

    Glad you got it working. I don't have time to...

    Glad you got it working.

    I don't have time to integrate this into the code right now, but it would go something like this. First define a global variable called detune:

    float detune=1.0f;
    ...
  8. Replies
    87
    Views
    1,154

    You can do that, sure. If you look here near the...

    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...
  9. Replies
    87
    Views
    1,154

    That's how it's setup to work now. Just uncomment...

    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...
  10. Replies
    87
    Views
    1,154

    Just clone or download the Audio library, open a...

    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,...
  11. Replies
    87
    Views
    1,154

    I just edited the mixer class to have 8 inputs,...

    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...
  12. Replies
    87
    Views
    1,154

    Oh I misunderstood what you were asking when you...

    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...
  13. Replies
    87
    Views
    1,154

    For a larger synth, yeah it is needed. I have an...

    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,...
  14. Replies
    87
    Views
    1,154

    That just reminds the compiler that it's a...

    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.
  15. Replies
    87
    Views
    1,154

    For number of voices.. I think most polyphonic...

    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...
  16. Replies
    87
    Views
    1,154

    Here's my tested code, 2 oscillators per voice,...

    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...
  17. Replies
    87
    Views
    1,154

    I have one oscillator per voice right now, but...

    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...
  18. Replies
    87
    Views
    1,154

    Hmm... well, "voiceToUse + 8" certainly looks...

    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...
  19. Replies
    87
    Views
    1,154

    All of the waveform definition and selection...

    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...
  20. Replies
    87
    Views
    1,154

    Hey no worries, to be honest I am learning a ton...

    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...
  21. Replies
    87
    Views
    1,154

    Well, one thing first, I see your max release...

    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...
  22. Replies
    87
    Views
    1,154

    That looks better. Yes, that would be a scope...

    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...
  23. Replies
    87
    Views
    1,154

    One minor thing, you might want to move the...

    One minor thing, you might want to move the declarations "Bounce *mybutton[]" and "AudioFilterStateVariable *myfilter[]" outside of your loop() method.
  24. Replies
    87
    Views
    1,154

    Glad I could help!

    Glad I could help!
  25. Replies
    87
    Views
    1,154

    Looking good... The next level is multiple...

    Looking good...

    The next level is multiple detuned oscillators per voice... that's on my todo list for my synth at some point.
  26. Replies
    87
    Views
    1,154

    idleVoices is an array of bools, so it's...

    idleVoices is an array of bools, so it's perfectly valid syntax. You don't need to explicitly type "if(idleVoices[i] == true)", the compiler knows what you mean.
  27. Replies
    87
    Views
    1,154

    Scroll down in my code, IdleCheck is listed...

    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...
  28. Replies
    87
    Views
    1,154

    bool idleVoices[12] = {1, 1, 1, 1, 1, 1, 1, 1, 1,...

    bool idleVoices[12] = {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...
  29. Replies
    87
    Views
    1,154

    This is basically the system that I am using. It...

    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[12] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1,...
Results 1 to 29 of 29