PS-PurrSoftware Plugin Modules

Shoot! I will dig deeper.

Just to make sure, are you building from my GitHub repository or are you using Silvioā€™s Azure builds?

Your github.

Use nvgMoveTo(...); then nvgLineTo(...); which will draw a line to x co-ordinates.

My first call is nvgArc(ā€¦) followed by nvgLineTo(ā€¦)
I donā€™t need nvgMoveTo(ā€¦) in that case do I? But this would fit the symptoms.

If lineTo is transparent moveTo might be better suited.

I just committed another change having to do with the ModuleWidget use of the Module*, which I just added yesterday while doing the singleton module instance work. If this does not work, I will have to put my thinking cap on. I would be surprised if the issue is in the nvg() calls since I havenā€™t touched that code in a while.

Sorry, Iā€™m not explaining this well. The nvgArc(ā€¦) and nvgLineTo(ā€¦) are what are used to draw the circle of 5ths annular rings segments and then fill them with color. The lines and arcs are not transparent.

But, if I donā€™t figure out what is causing the problem, I will put some nvgMoveTo(ā€¦) calls before the first nvgArc() call, even though the start pos is included in the nvgArc() call arguments.

Thanks for looking at this. It may still be something nvg related, even though I am leaning towards a Module* issue in the browser preview where there is no Module.

Oh okay. I see what you mean Iā€™m not too sure then. Just compiled also and those lines appeared the first time with no fill colours / arcs but everything corrected itself now?! :thinking:

beginpath will start at 0, 0 (top left corner) or previous coordinates in some cases

@Coirt and @contemporaryinsanity

Okay, I duplicated the problem on my end. I had to create a new patch and try to add Meander module to the patch. This may be an issue with global data. The Module initializes the global data and the ModuleWidget uses this initialized data to draw the panel graphics. Using an existing patch that already has one Meander module running means the global data always gets initialized. When starting from scratch, the global data is not initialized until the first instance of Meander is added and seemingly Rack exited and restarted. Then the preview is correct.

Iā€™ll have to think about how to fix this.

1 Like

Can recreate here.

I load my global data in plugin.cpp init() so itā€™s ready to go before any modules are instantiated, give that a try.

Is that module.init, rather than widget.init?

Neither, plugin.cpp:

#include "plugin.hpp"
#include "RS.hpp"

rsglobal RSGlobal;

Plugin *pluginInstance;

void init(Plugin *p) {
	pluginInstance = p;

	// Add modules here
	p->addModel(modelRSHeat);
	p->addModel(modelRSGroundControl);


	// Any other plugin initialization may go here.
	// As an alternative, consider lazy-loading assets and lookup tables when your module is created to reduce startup times of Rack.

	loadRSGlobal();
}

OH! Of course.

Iā€™ll give this a try. I will have to proceed cautiously. I may have to do some surgery to separate global variable setup from module global var setup.

Thanks for the suggestion.

@contemporaryinsanity @dlphillips @Squinky @Coirt

Okay, at the risk of being premature, I have committed the changes to github in which the global variables setup occur in plugin.cpp rather than in Meander.cpp and the Module. All global types, variables and functions have been moved to meander.hpp . I have tested this and it resolves the browser preview nvg issues for new patches as well as working with existing patches that already contain a Meander module. I feel pretty confident in this, but it is a fairly major rearrangement of the project files.

Let me know either way! Thanks for helping me test and debug Meander. Hopefully I can move on to other Meander development and Azure efforts now.

2 Likes

Case issue on linux:

src/Meander.cpp:14:10: fatal error: meander.hpp: No such file or directory
 #include "meander.hpp"
          ^~~~~~~~~~~~~

Thanks. Fixed and committed.

1 Like

It is fun to see that a couple of artists have posted YouTube videos featuring Meander:) Todayā€™s GitHub commits include:

  • Change to true ā€œgateā€ output with note length capabilities, rather than trying to include volume on the gate channel. Did away with ā€œtriggerā€ outs since gate should be the trigger. For now the volume outputs donā€™t do anything. I will work on sending the volume control knobs voltages out the ā€œvolumeā€ outputs in case someone wants to run those to another module for mixing etc.
  • As part of the gate changes, gates can be legato or staccato. Control is partially implemented. The harmony part buttons currently set the legato or staccato setting for melody and bass. This has not been implemented on the arpeggiator yet.
  • 7th chords were implemented. All 7ths or 7ths on the V chord can be selected. The 7th is added to the current circle position chord type: major, minor or diminished.
  • A first pass shuffle swing bass was added.
  • A first pass harmonic progression editor was implemented and is complete but no save capabilities. To use the editor:
  1. Toggle Run off.
  2. Click on the ā€œSet Stepā€ you want to edit.
  3. Click on the circle positions buttons to set the progression stepā€¦
  4. Turn ā€œHarmony Enableā€ back on, which gets turned off if you click on the circle positions at any time.
  5. Toggle Run on.
  6. Donā€™t forget that the progression changes go away when you exit Rack.
1 Like

I just noticed that the progression editor does not sound the chord when the circle position button is clicked on. I guess my new gate scheme broke this. Will fix.