GithubHelp home page GithubHelp logo

dukesrg / logue-osc Goto Github PK

View Code? Open in Web Editor NEW
103.0 14.0 6.0 15.44 MB

Custom oscillators for Korg logue-sdk compatible synths. Contains Oscillator API extensions and reusable header to create wavetable-based oscilator and example web page for user wave data injection.

Home Page: https://dukesrg.github.io/logue-osc/

Makefile 0.85% C++ 16.81% C 78.66% Shell 3.69%
logue-sdk esg korg nts-1 prologue minilogue-xd minilogue logue oscillator custom-oscillators

logue-osc's People

Contributors

dukesrg avatar tervez avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

logue-osc's Issues

Possible OSC_CYCLE improvement in fm64.cpp

@dukesrg

In OSC_CYCLE, in the MODn_MASK section again.

This idea may not work out, but I thought I'd mention it, because I think all the masks may be creating a bunch of
loads if the compiler isn't very smart.
I just looked at the armv7-m Arch manual and it really only has 12 general purpose registers,. the others are used for address/stack pointers and the main PC.
The function has many variables so I imagine there are many loads going on.

I made the observation that MOD6_MASK makes algorithm[i] an odd value
so why not do this

uint8_t mask = algorithm[i];

else if (mask & (ALG_FBK_MASK - 1)) {
if (mask % 2) modw0 += s_opval[0]; // if the compiler is smart it can do an odd compare and test in one instruction
mask = mask >> 1; //should take 1 cycle, no register move
if (mask % 2) modw0 += s_opval[1];
mask = mask >>1;

and so on ...

No sound on Minilogue XD

Hi,

I tried the pre-compiled files and also just compiled my own for the minilogue XD. I tried multiple FMxx osc, and it doesn't seem to matter whether I upload a mnlg/ntk/prlg file to the synth. There's no sound.
Changing any of the parameters has no effect - still no sound. I also tried multiple voices (poly/mono/duo/unison).
Nothing seems to make a difference.

What's wrong here?

another possible performance improvement(s) for OSC_CYCLE

Hi @dukesrg

Well my last idea was a blunder, but I think this one might be good. I'm now keeping the .list files from the compiles and
I see how it optimized bit tests, what a nice instruction.
Back to my idea.... update ideas, there are two here, one with a couple variants

At the start of OSC_CYCLE, for fixed frequency operators you could pre-compute the opw0[i] in the initvoice routine, and
just load it, where you currently have:
if (s_fixedfreq[i])
opw0[i] = pitch_to_phase(s_oppitch[i]);

you could have
opw0[i] = s_opw0[i] ; // where s_opw0 has the fixed frequency values,
This wouldn't save much maybe a cycle or two per fixed oscillator, and if you used Q31 for pitch then really nothing is saved.

One other possibility is that you don't care about the pitch bender (or lfo so much), so you set a flag in the state on NOTEON,
You check the flag, compute basew0, store the basew0 in part of the state and clear the flag.
The next time OSC_CYCLE is called you check the flag, and then
don't compute basew0 again as it is a rather large routine until the next NOTEON, or after n number of calls to OSC_CYCLE after note on and pitch bend might work or get noisy.

Another variant would be to store the params->pitch value using the set state flag in NOTEON, clear in OSC_CYCLE and store the value.
The next time OSC_CYCLE is called compare the saved value to the current one, skip the compute if they are equal,
and if not equal calculate basew0 again.
Save the new value, and so on, that way you only do the big routine when you need to.

FMxx features implementation

  • 32 6-op algorithms
  • 8 4-op algorithms
  • 40 opsix algorithms (can be selected manually)
  • Frequency modulation
  • Feedback
  • EG
  • EG shift
  • 6-op frequency/ratio coarse
  • 6-op frequency/ratio fine
  • 4-op frequency/ratio coarse
  • 4-op frequency/ratio fine
  • 8 waveforms
  • Phase init
  • Transpose
  • Velocity
  • Key velocity sensitivity
  • Level scaling
  • Rate scaling
  • Detune
  • PEG
  • LFO
  • Amplitude modulation
  • Pitch modulation
  • Portamento
  • Reverb

Release stage clicks

Visually phase is changed on stage chgange to Release with Note Off changin the stage index itself only.

Level scaling issue

ex. ROM1A Voice 13 - center C to D transition changes output level drastically.
Most likely level scaling curve sign issue

Anthologue dual-timbre questions

  • main/sub balance position (main<--->sub ?)
  • main/sub balance curve (simple crossfade X or main:^^^, sub: /^^^)
  • xfade main/sub position (always sub<--->main or depends on main/sub position setting)

FM64 note on/note off clicks & noise bursts

Disappears when one voice is playing note and other voices triggered the note at least once. Might be interference with the firmware part of oscillator cpu due to a high cpu load in note on routine.

fm64.cpp OSC_CYCLE performance optimization

Hi Oleg,

on the develop-fm64 branch
I think I have a small improvement in the OSC_CYCLE.
I don't believe operator 1 ever modulates any other operator, so you can safely remove:

Assuming ALG_MOD1_MASK is for operator 1 modulating another operator,
if (s_algorithm[i] & ALG_MOD1_MASK) modw0 += s_opval[5];
may be removed, but looking at this I see modw0 +=opval[5] ,
If opval[5] is the output of operator 6, it looks like the mask and operator orders are not aligned.
If that is the case all the lines with modulation need to be fixes so that the ALG_MOD_MASK check results in modw0 +=s_opval[]

Hope this helps

SuperSaw/FastSaw Release & Crash Problems on XD

Both Supersaw and Fastsaw have these problems on my Minilogue XD:

  1. If Unison set to 12, it crashes the XD and needs a power cycle to restore to normal. The sound continues as if release = infinity, and changing patches results in the same behavior.

  2. Doesn't obey the AMP EG Release. It treats release as zero even when opened up to higher values. This sounds strange when other oscillators continue to play as the release occurs, but the multi oscillators stops abruptly.

It's possible both problems are related to eachother?

fm64.cpp OSC_CYCLE, modulation block idea

Most operators don't have the feedback flag set, change the comparison to not ALG_FBK_MASK and go into
the modulation block, and have the else branch with feedback. might save a few cycles per operator

Inside that switch on the "i" value, case 0, break, case 1, only MOD6_MASK, break, case 2, MOD6, MOD5 mask, break
case 3 MOD6,MOD5,MOD4 , break
case 4 ifdef OPSIX MOD6, MOD5, MOD4, endif MOD3, break
case 5 ifdef OPSIX MOD6, endif MOD5, MOD4, MOD3, MOD2 break
for non-OPSIX, saves many compares and conditional load/adds because the DX7 alg's only modulate operator 2 from operator 3

Performance issue after FM64 0.6-10

Introduced in b322392
Suspecting ARM register pool exhausted in the inner loop of OSC_CYCLE
Need to investigate GNU ARM performance profiling otherwise it will repeat somewhere else with the -logues especially.

FM64 voice change clicks

Result of the algorithm change when modulator with non-zero L4 becomes carrier. Can be avoided with initializing L4 with 0 and setting it properly in NOTE_ON.
Stranegely this won't fix TRAIN voice carrier still sounding on voice change but shouldn't :(

FMxx multi-carrier voices clipped/distorted

Each operator is calculated in the full range of Q31 fixed point. So with high operator level & high velocity saturation will occur. Could be fixed with scaling all the dynamic range inside Q31 but the original range/bit depth is still unclear.

Anthologue features implementation

  • minilogue program data
  • monologue program data
  • minilogue xd program data
  • prologue program data
  • minilogue xd sub-step motion
  • minilogue xd joystick (-) assign
  • minilogue xd joystick range
  • prologue mod wheel range
  • prologue e.pedal assign
  • prologue e.pedal range
  • Timbre type (Layer, XFade, Split)
  • Sub/Main balance
  • Sub/Main position
  • Sub/Main split point
  • VCO square/triangle/saw waves
  • noise
  • VCO level
  • VCO shape
  • VCO pitch
  • VCO sync
  • VCO ring mod
  • VCO cross mod
  • Program level
  • Drive
  • LFO
  • EG
  • VCF
  • HPF
  • Delay
  • Microtuning
  • Sequence step length
  • Sequence step resolution
  • Sequence BPM
  • Sequence BPM native control for NTS-1
  • Sequence note pitch (first track)
  • Polyphonic sequence
  • Sequence note velocity
  • Sequence motion
  • Sequence smooth
  • Sequence slide
  • Sequence key transpose
  • Sequence trigger switch
  • Sequence gate
  • Sequence gate tie
  • Sequence gate motion
  • Sequence swing

Morpheus feature request

by @Sebo1971

  • one-shot LFO option
  • LFO depth (with param 6?)

And if you add modulation depth, may be you can add wave select when oscillator is in Linear X Mode and LFO is active. At the moment Alt Shape is unused in that case, may be you can keep Shape to select the wave for both LFO on and off states, and Alt Shape to adjust LFO rate when LFO is on.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.