robinschmidt / rs-met Goto Github PK
View Code? Open in Web Editor NEWCodebase for RS-MET products (Robin Schmidt's Music Engineering Tools)
License: Other
Codebase for RS-MET products (Robin Schmidt's Music Engineering Tools)
License: Other
Robin, what do I need to do to create a variable per product for the location of the preset?
I need a different location per product or per system Mac/Win/Linux potentially.
I can't tell what's going on here with the #if
#if JUCE_MSVC
// retrieve the directory in which the plugIn resides:
File thisPlugInAsFile = File::getSpecialLocation(juce::File::currentExecutableFile);
File keyDirectoryAsFile = thisPlugInAsFile.getParentDirectory();
#else
// Most correct path would be /~/Library/Application Support/Soundemote/ but it's a hassle for the user to find this,
// so we fallback to ~/Documents/Soundemote/
#if 1
File userDocuments = File::getSpecialLocation(juce::File::userDocumentsDirectory);
File keyDirectoryAsFile = File(File::addTrailingSeparator(File::addTrailingSeparator(userDocuments.getFullPathName()) + plugInVendor));
#else
File userAppData = File::getSpecialLocation(juce::File::userApplicationDataDirectory);
File keyDirectoryAsFile = File(File::addTrailingSeparator(File::addTrailingSeparator(userAppData.getFullPathName()) + plugInVendor) + plugInName);
#endif // 1
#endif // JUCE_MSVC
Why isn't
#ifdef _WIN32
#elif __APPLE__
#endif
being used?
I'd like to offer code to your library free from obligation, you can take my code and do whatever you want with it and I will not ask for compensation. I just want to make your library better so it's better for me.
I'm still working on this one, but this gives you an idea of a class you can add onto as a subclass (or whatver the correct terminology is). I've attached this to my SimpleLFO class so now I can controls the frequency of the LFO easily in 3 modes: pitch/hz/tempo.
I'm still working on what to do to make it easy to create custom tempo options. Like I said I have a string to value convert for this style of tempo: "1/4T" "1/4." "1/8" etc. but I didn't implement it here just yet.
So, what do you think? You should take my code and "Robinize" it as needed. Then I will rewrite my own stuff to connect with the class that you came up with.
class FrequencyModeHelper
{
public:
enum class Mode { hz, tempo, pitch };
vector<juce::String> TempoOptionsStr ={ "1/4","1/3","1/2","x1","x1.333","1.5x","x2","x2.666","x3","x4","x5.333",
"x6", "x8","x10.666","x12","x16","x21.333","x24","x32","x42.666","x48","x64","x85.333","x96","x128", };
vector<double> TempoMultipliers ={ 4.0, 3.0, 2.0, 1/1.0, 0.75/1.0, 1/1.5, 1/2.0, 0.75/2.0, 1/3.0, 1/4.0,
0.75/4.0, 1/6.0, 1/8.0, 0.75/8.0, 1/12.0, 1/16.0, 0.75/16.0, 1/24.0, 1/32.0, 0.75/32.0, 1/48.0, 1/64.0, 0.75/64.0, 1/96.0, 1/128.0, };
void setTempoOption(int idx)
{
tempo_selection = idx;
updateTempoInHz();
}
void setBPM(double bpm)
{
bpm_factor = bpm/60.0;
updateTempoInHz();
}
void setFrequency(double f)
{
hz = f;
}
void setPitch(double pitch)
{
pitch_in_hz = pitchToFreq(pitch);
}
void setFreqMode(Mode mode)
{
freqMode = mode;
}
double getFrequency()
{
switch (freqMode)
{
case Mode::hz: return hz;
case Mode::pitch: return pitch_in_hz;
case Mode::tempo: return tempo_in_hz;
}
}
protected:
Mode freqMode = Mode::hz;
double hz = 1.0;
double pitch_in_hz = 1.0;
double tempo_in_hz = 1.0;
double bpm_factor = 1.0;
int tempo_selection = 3;
void updateTempoInHz()
{
tempo_in_hz = bpm_factor * TempoMultipliers[tempo_selection];
}
};
https://www.kvraudio.com/forum/viewtopic.php?p=6802033#p6802033
ill just update this thread every time
jura_AudioModule.h
below moduleName add moduleVendor
If you have a parameter assigned to DAW host automation, the DAW will continuously send updates to that parameter even if the value has not changed. This is bad, will eat up a lot of unecessary CPU for some functions otherwise I have to put a "value change" check for every function. Please allow for parameters to be set to not call the function if value has not changed. I think this should be default. Then you can turn off this feature where needed in the parameter/widget constructor/setup.
Played around with the new feedback controls. I'm getting unstable waveforms, can't seem to get much in terms of tonal stuff. Also, there's a lot of triangle-ness to it, it's edgy, poppy.
What are your plans for this? I think the way to make it more musical is to create sinusoidal patterns via attractors/gravity rather than having the "bouncing off walls" be the focus. A gravity well will create circular patterns which will be a better starting point for tonal/musical/smooth sound.
I am trying to create a combo box with 3 options.
I am going to place 3 sliders on the exact same spot on the UI.
I need to show/hide the right slider based on the combo box.
How do I do it?
I already tried ->setVisible(false);
but I get access violation because the slider doesn't exist when the function is called or something.
I have if statements to set controls visible in the resize callback to show or hide things. When I set a modulation target I want to call a resized.
This has to be addressed.
Allow for me the programmer to decide what mouse modifiers do what.
We have the following actions:
Missing:
Use Case:
How would you go about adding tabs to the PrettyScope GUI so we can switch between 1D and 2D mode and show separate controls for each?
jura_ColorMapLoader.cpp
LoadableColorMap::LoadableColorMap()
{
setActiveDirectory(getApplicationDirectory() + "/ColorMaps");
}
I need to set that path differently for Mac/Linux/Windows
causes assertion errors for
c->setDescription("");
c->setDescriptionField(infoField);
in my code
I found jura_AudioModule.h has
virtual void setMidiController(int controllerNumber, float controllerValue);
virtual void setPitchBend(int pitchBendValue);
I don't see a get. How do I get pitch bend and midi cc 1?
Why is the breakpoint envelope generator not responding to changes in parameters? It only changes after being retriggered. For example, doing a long decay time and changing decay time does not change the decay time until retriggering the envelope.
Maybe you need to design a modulatable breakpoint envelope system.
Line 49 to 54 in updateCoeffs() in Ellipse.cpp
A B C D E F "Use of undeclared identifier"
you need to declare those variables.
inline bool isPointOutside(T x, T y) {return this->evaluate(x, y) > 0; }
you need to add this->
please investigate if you have time: https://gitlab.com/Hickler/Chaosfly/issues/46
Did you test any plugins on linux yet? This should not be a spiral generator only problem, sounds like a problem with the framework unless you already tested your plugins on linux.
Could you take a look at the scrollbar in reaper and resizing the PrettyScope window? It's as if the scrollbar doesn't exist in the GUI as far as REAPER is concerned. Before the scrollbar, window resizing was just fine. Very strange.
SpiralGeneratorModule::SpiralGeneratorModule(CriticalSection *lockToUse)
: AudioModuleWithMidiIn(lockToUse)
{
ScopedLock scopedLock(*lock);
moduleName = JucePlugin_Name; // correct name is vital for licensing system
moduleVendor = JucePlugin_Manufacturer;
String desktopPath = juce::File::getSpecialLocation(juce::File::userDesktopDirectory).getFullPathName();
#ifdef _WIN32
presetPath = getApplicationDirectory() + "/Presets";
#elif __APPLE__
presetPath = "/Library/Audio/Presets/"+moduleVendor+"/"+moduleName+"/Presets";
#elif __linux__
presetPath = getApplicationDirectory() + "/Presets";
#endif
setActiveDirectory(presetPath);
createParameters();
}
presetPath gets the correct value yet when you click the load button on spiral generator to load a preset, it still defaults to the "application directory"
Please add the ability to get patch in clipboard. This will also require that the xml patch have a place for patch name so that the patch will have a name when pasted.
Maybe have two buttons
"SendPatchToClipboard"
"GetPatchFromClipboard"
After using the combo box for a while it will randomly stop responding to clicks. It is very random and I can find no pattern. Clicking furiously and fast will get it to respond again.
So you made a linux version of Chaosfly I think. You had some trouble with it? It seems like you figured it out well enough. Could you make more linux versions of my plugins?
For sliders, could you provide an option per slider to allow user to type in and accept a value that is outside the range of the slider?
when modulating tune by an LFO (and the LFO is set to track the pitch of the oscillator) it doesn't sound right. Different keys sound too different timbrally.
I do something like take the main oscillator pitch and set the LFO to that same pitch plus a tuning offset. I then convert that to frequency with pitchToFrequency(). LFO and Oscillator should be tracking perfectly as they are set to the same pitches plus optional tuning offsets.
You can load spiral generator into FL studio, you can play it, but the audio comes out completely distorted.
Really need a mod matrix system. Editing your library is not fun, I can't edit it without causing all sorts of errors, otherwise I would and implement an easy mod matrix for myself.
What are you planning, how will your mod matrix work?
Is there a function you have to get midi aftertouch value?
d:\_programming\rs-met\libraries\juce\modules\rosic\dynamics\rosic_softkneecompressor.cpp(88): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\math\rosic_complex.cpp(92): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\math\rosic_complex.cpp(92): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\analysis\rosic_waveformdisplaybuffer.cpp(169): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\math\rosic_specialfunctionsreal.cpp(91): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\math\rosic_specialfunctionsreal.cpp(75): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\datastructures\rosic_string.cpp(235): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\datastructures\rosic_string.cpp(233): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\dynamics\rosic_softkneeexpander.h(112): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\math\rosic_complex.cpp(14): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\filters\rosic_prototypedesigner.cpp(844): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\math\rosic_complexfunctions.cpp(146): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\math\rosic_complex.cpp(92): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\filters\rosic_polezeromapper.cpp(501): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\math\rosic_complex.cpp(92): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\filters\rosic_polezeromapper.cpp(476): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\math\rosic_complex.cpp(92): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\filters\rosic_polezeromapper.cpp(447): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\math\rosic_complex.cpp(92): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\filters\rosic_polezeromapper.cpp(346): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\math\rosic_complex.cpp(92): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\filters\rosic_polezeromapper.cpp(234): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\math\rosic_complex.cpp(92): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\math\rosic_polynomialalgorithms.cpp(9): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\math\rosic_complex.cpp(92): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\math\rosic_complexfunctions.cpp(204): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\math\rosic_complex.cpp(92): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\math\rosic_complex.cpp(92): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\math\rosic_complex.cpp(92): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\math\rosic_complex.cpp(92): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\math\rosic_complexfunctions.cpp(203): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\filters\rosic_prototypedesigner.cpp(1009): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\math\rosic_complex.cpp(14): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\filters\rosic_prototypedesigner.cpp(920): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\filters\rosic_prototypedesigner.cpp(864): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\math\rosic_complex.cpp(92): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\filters\rosic_polezeromapper.cpp(501): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\analysis\rosic_waveformdisplaybuffer.cpp(21): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\filters\rosic_prototypedesigner.cpp(944): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\filters\rosic_prototypedesigner.cpp(1033): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\datastructures\rosic_string.cpp(315): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\filters\rosic_prototypedesigner.cpp(1100): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\filters\rosic_filteranalyzer.cpp(184): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\dynamics\rosic_softkneeexpander.h(112): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\filters\rosic_prototypedesigner.cpp(1120): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\dynamics\rosic_softkneeexpander.h(112): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\jura_processors\effects\jura_funcshaper.cpp(175): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\filters\rosic_prototypedesigner.cpp(384): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\filters\rosic_prototypedesigner.cpp(501): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\filters\rosic_prototypedesigner.cpp(501): warning C4723: potential divide by 0
d:\_programming\rs-met\libraries\juce\modules\rosic\filters\rosic_infiniteimpulseresponsedesigner.cpp(233): warning C4723: potential divide by 0
This is bad because... let's say a large value jump causes a spike in your audio because that particular variable is very sensitive. Another simple problem is that you want to remember what the previous value was previously. You also have a potential for extra confusing undo points. It's just a bad user experience.
https://puu.sh/wbjOT/a334d1e1a2.png
I have SpiralGenerator2 specified as moduleName because XML fails to load if there are spaces. You should rename the variable to something like: moduleNameForXML
I'm going to remove spaces for now, but at some point I'd like to have spaces where it makes sense such as what is displayed in the GUI title and what is the file name.
I would also add another variable: moduleNameForGUI or displayName or moduleTitleForGUI. I would like to customize the title to something like Spiral Generator v2.00. What variable dictates the GUI title?
I want to represent a tempo sync on/off button with a symbol. Is there an ok way to do it now without you having implemented an advanced gui system?
Value should not jump to mouse position when performing fine tune.
This is a feature needed immediately! Please get on this quickly if you can.
I got some links form Hansi Raber and some info on what I need for Spiral Generator to lower the CPU.
Hansi Raber:
there are two approaches to improving the speed of sin/cos. One is to create lookup tables, the implementations are often trivial, something along the lines of this: https://stackoverflow.com/a/13042227/347508
The other way out is to use approximations, it's a bit trickier, but other people have done the work already. Here's a great SO post: https://stackoverflow.com/questions/345085/how-do-trigonometric-functions-work/394512#394512
Please use whichever approach you want, just need it done quickly! Thanks! I might also need cos. I may need a few others but cos and sin are pretty good for now.
-Elan
I had to come up with this weird formula to get velocity and velocity influence working
EnvelopeList[i].setPeakScale(1 - ADSRVelInf[i] * (127 - lastVelocity)/127.0);
This allows ADSRVelInf (value 0 to 1) to dictate how much effect velocity has on the ADSR. I think this is something you should build into the library.
on parameter change:
ADSR.setVelocityInfluence(velocityInfluenceValuePercent); //maybe a 0 to 100 as a percentage or 0 to 1 is fine
on TriggerAttack:
ADSR.setVelocity(velocity); //Set the internal velocity for controlling peak scale
Maybe I can start contributing stuff like this and we can do pull requests so you can see my changes before you accept them... or however it works.
why does MonoSynth have no noteOff function?
it's very confusing to combine noteOn to and noteOff into one function called noteOn
Robin, I created an arpeggiator from scratch for HISE and I'd like to create a C++ arp for my future products. How feature rich is the arp you have now?
My arp in HISE is general purpose, it could be re-used for any project, all you need is to create a custom UI to control it. You can choose to use or not use certain features.
How do I correct for the extremely non-linear modulation of the one pole filter? Like for example, if I modulate rosic::OnePoleFilter by calling setCutoff, it doesn't sound like it really starts filtering until a very tiny portion of the modulation.
What math should I use to convert the modulation to be more compatible with it?
https://puu.sh/wf1bF/b29cef2daa.mp4 (download to desktop, this one didn't play in my web browser)
For this specific value of 10, the slider sends a value twice. Once it is 10.00000000, another time it is 9.999999 which then becomes 9.
Other times it will simply send 9.0000000 twice which does not create a problem, but still strange. The breakpoint is hit twice every time.
For apple, please see this thread:
https://www.kvraudio.com/forum/viewtopic.php?f=33&t=485068&p=6792487#p6792487
It is best if we separate presets into User and Factory. We need this to work GUI wise where we have a more robust browsing system so we can select user or factory folders.
For now, I will direct Spiral Generator and PrettyScope to look for presets here for Mac: /Library/Application Support/Soundemote/Spiral Generator/Presets
there's a few things this would be useful for.
It might be nice to also have an optional extension other than xml, somethign custom like .sgpreset for spiral generator preset
Right now ctrl + mousewheel allows for fine tuning. Actually, mouse-drag fine tuning is more popular and easier to use than one's mousewheel.
How do you do tempo-synced LFOs? Is there a special way to do it? I need to retrieve the host BPM of course. I think that's all I need, unless you have some convenient functions in your library. I can apply some functions the LFOs I already have for now since your LFOs lack waveforms at the moment.
This is really annoying. You don't know what patch you are editing as soon as you change a parameter. The patch name must be remembered and displayed at all times.
rosic_AnalogEnvelope.cpp
void AnalogEnvelope::setPeakScale(double newPeakScale)
{
if( newPeakScale > 0 )
peakScale = newPeakScale;
}
That can be confusing, randomly getting no effect on getting peak scale. It's a gotcha.
reported here: https://www.kvraudio.com/forum/viewtopic.php?f=238&t=486349&p=6826273#p6826273
Spiral Generator 2 crashes when using as mono in Garageband
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.