Pink Trombone in VCV - Help Wanted

I have started work porting the Pink Trombone from Pink Trombone into VCV. The original code base is actually already available in C++ and MIT licenced at GitHub - cutelabnyc/pink-trombone-cpp: C++ implementation of everyone's favorite Pink Trombone and my efforts so far can be seen at GitHub - VegaDeftwing/PinkTromboneVCV: Attempt to port Pink Trombone to VCV Rack

I believe I have made significant progress; however, currently upon adding the module memory almost immediately climbs to 100%, so clearly I have a memory leak somewhere. Unfortunately, this is a bit outside my skill level to make much more progress on, as such I would greatly appreciate any contributions/PRs or for someone else to take the torch from here.

11 Likes

first comments

  1. the bgnd svg is too complex and contains some wrong instructions, crashing the nvgRenderer

  2. you call the

void onAdd() override {
		initializeTractProps(&tractProps, n);
...
	}

but this is happening AFTER you inizialize the

Tract * tract = new Tract(sampleRate, samplesPerBlock, &tractProps);

(happening on the stack)

more to come

2 Likes

I have modified all the classes to have

  1. correct destructors

  2. correct sequence of destructions

no more memory leaks…

(I can allocate hundreds and delete all them and the memory is back )

comments:

A) currently is doing nothing

B) you should rewrite in C++ all memory allocation and destructions

I’ll pass you a zip (I used it on a MAC)

created a PULL request for you

12 Likes
1 Like

I just accepted your PR and added an output line and it is working right as you made the demo output PR too! I can definitely take it over the finish line from here. Thank you so much!

4 Likes

Awesome work Antonio!

1 Like

oops just noticed I did comment out something last second, breaking the build correcting

1 Like

I already have it working, just trying to adjust other parameters rn

(sorry ! )

I’m currently trying to figure out how to change the frequency. I thought it would just be

glottis->setTargetFrequency(params[PITCHO_PARAM].getValue() * 1000.0);

but that results in a mute output

edit: not mute, but very faint filtered noise

andddd I got it, just had to put it in a process divider

correct formula human voice is

        float range = math::rescale(params[PITCHO_PARAM].getValue(), 0, 1, 0, 5);
        float freq = pow(2.0, range) * 65.406391325149612;
        
        glottis->setTargetFrequency(freq);

you have widget one on top of the OTHER ! CAOS!

example move the PITCHO_PARAM

using this

		addParam(createParamCentered<HexKnob>(mm2px(Vec(17.0, 36.0)), module, PinkTrombone::PITCHO_PARAM));

Yeah, I like having the stacked attenuator offset thing, and it’s inspired by hardware

1 Like

brrrr, che paura !!! (i pots uno sull’altro… )

add the cv input to the pitch:

float range = math::rescale(params[PITCHO_PARAM].getValue() + params[PITCHA_PARAM].getValue() * inputs[PITCH_INPUT].getVoltage() * 0.2, 0, 1, 0, 5);
1 Like

hey there !

Just a little message of encouragement, I love the sound of this pink trombone !

If you could make it a module for vcv, it would be really fantastic !

I can be a beta tester, only on linux though.

Thank you for the discovery, and thank you a lot for the work you are currently doing !

1 Like

Next up, Shatner’s Bassoon I hope :wink:

2 Likes

Do you never sleep?!

Antonio has modules that do that for him. :wink:

5 Likes

debugging it’s like playing chess, and they pay me too !

1 Like