Forum Rule: Always post complete source code & details to reproduce any issue!
Page 2 of 2 FirstFirst 1 2
Results 26 to 32 of 32

Thread: Single cycle wavetable, transients and spiking.

  1. #26
    Here is the output using the same soundfont to drive virtual midi on pc:

    As you can see there is no transient spike:
    Click image for larger version. 

Name:	pc.jpg 
Views:	5 
Size:	134.0 KB 
ID:	18872

  2. #27
    Senior Member
    Join Date
    Nov 2017
    Location
    Belgium
    Posts
    215
    Quote Originally Posted by RABB17 View Post
    Code:
    ((uint32_t)2048 - 1) << (32 - 12), // MAX_PHASE
    ((uint32_t)2047 - 1) << (32 - 12), // LOOP_PHASE_END
    (((uint32_t)2047 - 1) << (32 - 12)) - (((uint32_t)0 - 1) << (32 - 12)), // LOOP_PHASE_LENGTH
    I am wondering if this bit might have something do with it
    LOOP_PHASE_LENGTH doesn't look right, subtracting a negative number with unsigned integers doesn't make sense in this case.

    This seems to remove the artefact:
    Code:
    ((uint32_t)2048 - 1) << (32 - 12), // MAX_PHASE
    ((uint32_t)2047 - 1) << (32 - 12), // LOOP_PHASE_END
    ((uint32_t)2047 - 1) << (32 - 12), // LOOP_PHASE_LENGTH

  3. #28
    Quote Originally Posted by neurofun View Post
    LOOP_PHASE_LENGTH doesn't look right, subtracting a negative number with unsigned integers doesn't make sense in this case.

    This seems to remove the artefact:
    Code:
    ((uint32_t)2048 - 1) << (32 - 12), // MAX_PHASE
    ((uint32_t)2047 - 1) << (32 - 12), // LOOP_PHASE_END
    ((uint32_t)2047 - 1) << (32 - 12), // LOOP_PHASE_LENGTH
    Aha! So it does. Many thanks, indeed. Now I can get on with my actual intended project.

  4. #29
    I neglected to mention that the offending code is generated by these single cycle special cases in the soundfont decoder. I will upload a fix to the python code as soon as I have time to review it.

  5. #30
    Quote Originally Posted by RABB17 View Post
    I neglected to mention that the offending code is generated by these single cycle special cases in the soundfont decoder. I will upload a fix to the python code as soon as I have time to review it.
    Good to see the problem was solved!

    You better fork https://github.com/PaulStoffregen/SoundfontDecoder to make the fix, commit it and push it to your github fork and then send Paul the pull request and he will decide what to do with it (isn't this the workflow?).

    Now when you have got the single cycle loops working I'd like to suggest implementing Transwaves - a single cycle loop with a modulated loop point inside a real wavetable (array of single cycle waves with different harmonic content). You can get some from Ensoniq firmwares from MAME project or generate using Audioterm: https://www.facebook.com/Audioterm/

  6. #31
    Quote Originally Posted by mhelin View Post
    Good to see the problem was solved!

    You better fork https://github.com/PaulStoffregen/SoundfontDecoder to make the fix, commit it and push it to your github fork and then send Paul the pull request and he will decide what to do with it (isn't this the workflow?).

    Now when you have got the single cycle loops working I'd like to suggest implementing Transwaves - a single cycle loop with a modulated loop point inside a real wavetable (array of single cycle waves with different harmonic content). You can get some from Ensoniq firmwares from MAME project or generate using Audioterm: https://www.facebook.com/Audioterm/
    I was just going to paste the code here but forking the git does make more sense. Regarding the transwaves, thank you for the suggestion, I will check it out And thanks again for your help.

  7. #32
    Ah so just read up on the transwave - seems very similar to the wavetable morph function in Serum. I was definitely planning to implement something like this. Currently, I'm working on creating an audio object to use the wavetables as carriers for FM. Then next I'm going to implement unison across the 16 midi channels, create some sort of dynamic patching system, and implement wavetable sweeping. I currently have a pure data advanced interface going for gui control but will likely develop something in JUCE as PD advanced doesn't have a version for armbian. I plan on making a few configurations but the first one will feature two teensys one to handle the audio and the other to drive visuals. The end goal is to have it Eurorack compatible.

Posting Permissions

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